diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-10-27 20:51:48 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-01-08 12:49:47 -0500 |
commit | bbc28cdbd003be5ceeaf644be3533e898c25da2b (patch) | |
tree | 7159086854e4be4ca940b0ca750a41030e037f08 | |
parent | d0020cc6384eb7edd56ba4769115c9497694e303 (diff) |
ARM: OMAP2+: gpmc: Move legacy GPMC width setting
After the introduction of gpmc_set_legacy(), move the GPMC width setting
to be done inside it. Currently, in the DT probed case, this is (wrongly)
done twice: first at gpmc_read_settings_dt(), and then based in the
NAND width setting.
Fix this and use only the value obtained from the DT.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 9dd40e70aca3..174caecc3186 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -74,6 +74,11 @@ static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data, | |||
74 | s->wait_on_read = true; | 74 | s->wait_on_read = true; |
75 | s->wait_on_write = true; | 75 | s->wait_on_write = true; |
76 | } | 76 | } |
77 | |||
78 | if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) | ||
79 | s->device_width = GPMC_DEVWIDTH_16BIT; | ||
80 | else | ||
81 | s->device_width = GPMC_DEVWIDTH_8BIT; | ||
77 | } | 82 | } |
78 | 83 | ||
79 | int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, | 84 | int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, |
@@ -118,11 +123,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, | |||
118 | 123 | ||
119 | s.device_nand = true; | 124 | s.device_nand = true; |
120 | 125 | ||
121 | if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) | ||
122 | s.device_width = GPMC_DEVWIDTH_16BIT; | ||
123 | else | ||
124 | s.device_width = GPMC_DEVWIDTH_8BIT; | ||
125 | |||
126 | err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s); | 126 | err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s); |
127 | if (err < 0) | 127 | if (err < 0) |
128 | goto out_free_cs; | 128 | goto out_free_cs; |