diff options
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-nand.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 2bb29c160702..c1791d08ae56 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/mtd/nand.h> | ||
15 | 16 | ||
16 | #include <asm/mach/flash.h> | 17 | #include <asm/mach/flash.h> |
17 | 18 | ||
@@ -69,8 +70,10 @@ static int omap2_nand_gpmc_retime(void) | |||
69 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); | 70 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); |
70 | 71 | ||
71 | /* Configure GPMC */ | 72 | /* Configure GPMC */ |
72 | gpmc_cs_configure(gpmc_nand_data->cs, | 73 | if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) |
73 | GPMC_CONFIG_DEV_SIZE, gpmc_nand_data->devsize); | 74 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 1); |
75 | else | ||
76 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0); | ||
74 | gpmc_cs_configure(gpmc_nand_data->cs, | 77 | gpmc_cs_configure(gpmc_nand_data->cs, |
75 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); | 78 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); |
76 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); | 79 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); |