aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-n8x0.c
diff options
context:
space:
mode:
authorAaro Koskinen <Aaro.Koskinen@nokia.com>2010-12-02 10:51:23 -0500
committerTony Lindgren <tony@atomide.com>2010-12-02 20:05:06 -0500
commita1a92e6fccadbba1846a081f21d0c12a10addd56 (patch)
tree8529c55639c9d6c4c5acbd2101d91870516da272 /arch/arm/mach-omap2/board-n8x0.c
parent7203f8a48bb63015ebe58a6f2a38aec1cb208b9d (diff)
arm: mach-omap2: n8x0: clean up dummy onenand init
When OneNAND support is disabled, the platform code defines NULL board_onenand_data and empty init function for us. By utilizing this we can avoid cluttering board files with dummy definitions/wrappers. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-n8x0.c')
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index dd353ffe57d2..0a4bc7715c38 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -184,23 +184,15 @@ static struct mtd_partition onenand_partitions[] = {
184 }, 184 },
185}; 185};
186 186
187static struct omap_onenand_platform_data board_onenand_data = { 187static struct omap_onenand_platform_data board_onenand_data[] = {
188 .cs = 0, 188 {
189 .gpio_irq = 26, 189 .cs = 0,
190 .parts = onenand_partitions, 190 .gpio_irq = 26,
191 .nr_parts = ARRAY_SIZE(onenand_partitions), 191 .parts = onenand_partitions,
192 .flags = ONENAND_SYNC_READ, 192 .nr_parts = ARRAY_SIZE(onenand_partitions),
193 .flags = ONENAND_SYNC_READ,
194 }
193}; 195};
194
195static void __init n8x0_onenand_init(void)
196{
197 gpmc_onenand_init(&board_onenand_data);
198}
199
200#else
201
202static void __init n8x0_onenand_init(void) {}
203
204#endif 196#endif
205 197
206#if defined(CONFIG_MENELAUS) && \ 198#if defined(CONFIG_MENELAUS) && \
@@ -669,7 +661,7 @@ static void __init n8x0_init_machine(void)
669 ARRAY_SIZE(n810_i2c_board_info_2)); 661 ARRAY_SIZE(n810_i2c_board_info_2));
670 662
671 omap_serial_init(); 663 omap_serial_init();
672 n8x0_onenand_init(); 664 gpmc_onenand_init(board_onenand_data);
673 n8x0_mmc_init(); 665 n8x0_mmc_init();
674 n8x0_usb_init(); 666 n8x0_usb_init();
675} 667}