diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3630sdp.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-flash.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-flash.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-nand.c | 7 |
7 files changed, 20 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 31085883199e..4a37c70e38b0 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -812,7 +812,7 @@ static void __init omap_3430sdp_init(void) | |||
812 | omap_serial_init(); | 812 | omap_serial_init(); |
813 | usb_musb_init(&musb_board_data); | 813 | usb_musb_init(&musb_board_data); |
814 | board_smc91x_init(); | 814 | board_smc91x_init(); |
815 | board_flash_init(sdp_flash_partitions, chip_sel_3430); | 815 | board_flash_init(sdp_flash_partitions, chip_sel_3430, 0); |
816 | sdp3430_display_init(); | 816 | sdp3430_display_init(); |
817 | enable_board_wakeup_source(); | 817 | enable_board_wakeup_source(); |
818 | usb_ehci_init(&ehci_pdata); | 818 | usb_ehci_init(&ehci_pdata); |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 16538757291a..8d1c4358ecf9 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/input.h> | 12 | #include <linux/input.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/mtd/nand.h> | ||
14 | 15 | ||
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
@@ -208,7 +209,7 @@ static void __init omap_sdp_init(void) | |||
208 | zoom_peripherals_init(); | 209 | zoom_peripherals_init(); |
209 | zoom_display_init(); | 210 | zoom_display_init(); |
210 | board_smc91x_init(); | 211 | board_smc91x_init(); |
211 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); | 212 | board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16); |
212 | enable_board_wakeup_source(); | 213 | enable_board_wakeup_source(); |
213 | usb_ehci_init(&ehci_pdata); | 214 | usb_ehci_init(&ehci_pdata); |
214 | } | 215 | } |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index fd38c05bb47f..f6b72533c089 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -139,11 +139,13 @@ static struct omap_nand_platform_data board_nand_data = { | |||
139 | }; | 139 | }; |
140 | 140 | ||
141 | void | 141 | void |
142 | __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs) | 142 | __init board_nand_init(struct mtd_partition *nand_parts, |
143 | u8 nr_parts, u8 cs, int nand_type) | ||
143 | { | 144 | { |
144 | board_nand_data.cs = cs; | 145 | board_nand_data.cs = cs; |
145 | board_nand_data.parts = nand_parts; | 146 | board_nand_data.parts = nand_parts; |
146 | board_nand_data.nr_parts = nr_parts; | 147 | board_nand_data.nr_parts = nr_parts; |
148 | board_nand_data.devsize = nand_type; | ||
147 | 149 | ||
148 | gpmc_nand_init(&board_nand_data); | 150 | gpmc_nand_init(&board_nand_data); |
149 | } | 151 | } |
@@ -194,7 +196,7 @@ unmap: | |||
194 | * @return - void. | 196 | * @return - void. |
195 | */ | 197 | */ |
196 | void board_flash_init(struct flash_partitions partition_info[], | 198 | void board_flash_init(struct flash_partitions partition_info[], |
197 | char chip_sel_board[][GPMC_CS_NUM]) | 199 | char chip_sel_board[][GPMC_CS_NUM], int nand_type) |
198 | { | 200 | { |
199 | u8 cs = 0; | 201 | u8 cs = 0; |
200 | u8 norcs = GPMC_CS_NUM + 1; | 202 | u8 norcs = GPMC_CS_NUM + 1; |
@@ -250,5 +252,5 @@ void board_flash_init(struct flash_partitions partition_info[], | |||
250 | "in GPMC\n"); | 252 | "in GPMC\n"); |
251 | else | 253 | else |
252 | board_nand_init(partition_info[2].parts, | 254 | board_nand_init(partition_info[2].parts, |
253 | partition_info[2].nr_parts, nandcs); | 255 | partition_info[2].nr_parts, nandcs, nand_type); |
254 | } | 256 | } |
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h index 69befe00dd2f..c240a3f8d163 100644 --- a/arch/arm/mach-omap2/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h | |||
@@ -25,6 +25,6 @@ struct flash_partitions { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern void board_flash_init(struct flash_partitions [], | 27 | extern void board_flash_init(struct flash_partitions [], |
28 | char chip_sel[][GPMC_CS_NUM]); | 28 | char chip_sel[][GPMC_CS_NUM], int nand_type); |
29 | extern void board_nand_init(struct mtd_partition *nand_parts, | 29 | extern void board_nand_init(struct mtd_partition *nand_parts, |
30 | u8 nr_parts, u8 cs); | 30 | u8 nr_parts, u8 cs, int nand_type); |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index d8eb2cb7cbc7..a3fae5697a72 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -433,7 +433,7 @@ static void __init omap_ldp_init(void) | |||
433 | omap_serial_init(); | 433 | omap_serial_init(); |
434 | usb_musb_init(&musb_board_data); | 434 | usb_musb_init(&musb_board_data); |
435 | board_nand_init(ldp_nand_partitions, | 435 | board_nand_init(ldp_nand_partitions, |
436 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS); | 436 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); |
437 | 437 | ||
438 | omap2_hsmmc_init(mmc); | 438 | omap2_hsmmc_init(mmc); |
439 | /* link regulators to MMC adapters */ | 439 | /* link regulators to MMC adapters */ |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index 85d4170f30ab..7e3f1595d77b 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/i2c/twl.h> | 18 | #include <linux/i2c/twl.h> |
19 | #include <linux/mtd/nand.h> | ||
19 | 20 | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -124,8 +125,8 @@ static void __init omap_zoom_init(void) | |||
124 | usb_ehci_init(&ehci_pdata); | 125 | usb_ehci_init(&ehci_pdata); |
125 | } | 126 | } |
126 | 127 | ||
127 | board_nand_init(zoom_nand_partitions, | 128 | board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), |
128 | ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS); | 129 | ZOOM_NAND_CS, NAND_BUSWIDTH_16); |
129 | zoom_debugboard_init(); | 130 | zoom_debugboard_init(); |
130 | zoom_peripherals_init(); | 131 | zoom_peripherals_init(); |
131 | zoom_display_init(); | 132 | zoom_display_init(); |
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); |