diff options
| author | Jon Hunter <jon-hunter@ti.com> | 2013-02-25 11:36:47 -0600 | 
|---|---|---|
| committer | Jon Hunter <jon-hunter@ti.com> | 2013-04-03 20:13:38 -0500 | 
| commit | acc79980c92ca9e8a39115b60ca832718a8156df (patch) | |
| tree | d08fb7cd46fa7e7a369e46547e7210ba4f74a809 /arch/arm/mach-omap2/gpmc-nand.c | |
| parent | cdd6928c589a2dcf084bd62fa5a2b7db1516187b (diff) | |
| download | olio-linux-3.10-acc79980c92ca9e8a39115b60ca832718a8156df.tar.xz olio-linux-3.10-acc79980c92ca9e8a39115b60ca832718a8156df.zip  | |
ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT
When booting with device-tree, retrieve GPMC settings for NAND from
the device-tree blob. This will allow us to remove all static settings
stored in the gpmc-nand.c in the future once the migration to
device-tree is complete.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-nand.c')
| -rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 14 | 
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 12e9753f5ad..d9c27195caf 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c @@ -137,12 +137,16 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,  			return err;  		} -		s.device_nand = true; +		if (gpmc_nand_data->of_node) { +			gpmc_read_settings_dt(gpmc_nand_data->of_node, &s); +		} else { +			s.device_nand = true; -		/* Enable RD PIN Monitoring Reg */ -		if (gpmc_nand_data->dev_ready) { -			s.wait_on_read = true; -			s.wait_on_write = true; +			/* Enable RD PIN Monitoring Reg */ +			if (gpmc_nand_data->dev_ready) { +				s.wait_on_read = true; +				s.wait_on_write = true; +			}  		}  		if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)  |