diff options
author | Aaro Koskinen <Aaro.Koskinen@nokia.com> | 2010-12-02 10:51:24 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-02 20:06:45 -0500 |
commit | 5403187f83c12c6f4c03547e0cc05bac0310be7b (patch) | |
tree | 80d6792223da89c00db4b51afb100280dfc19e7b /arch/arm/mach-omap2/board-rx51-peripherals.c | |
parent | a1a92e6fccadbba1846a081f21d0c12a10addd56 (diff) |
arm: mach-omap2: rx51: 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-rx51-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 3fda20d73233..126b724a5e2d 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -817,25 +817,15 @@ static struct mtd_partition onenand_partitions[] = { | |||
817 | }, | 817 | }, |
818 | }; | 818 | }; |
819 | 819 | ||
820 | static struct omap_onenand_platform_data board_onenand_data = { | 820 | static struct omap_onenand_platform_data board_onenand_data[] = { |
821 | .cs = 0, | 821 | { |
822 | .gpio_irq = 65, | 822 | .cs = 0, |
823 | .parts = onenand_partitions, | 823 | .gpio_irq = 65, |
824 | .nr_parts = ARRAY_SIZE(onenand_partitions), | 824 | .parts = onenand_partitions, |
825 | .flags = ONENAND_SYNC_READWRITE, | 825 | .nr_parts = ARRAY_SIZE(onenand_partitions), |
826 | .flags = ONENAND_SYNC_READWRITE, | ||
827 | } | ||
826 | }; | 828 | }; |
827 | |||
828 | static void __init board_onenand_init(void) | ||
829 | { | ||
830 | gpmc_onenand_init(&board_onenand_data); | ||
831 | } | ||
832 | |||
833 | #else | ||
834 | |||
835 | static inline void board_onenand_init(void) | ||
836 | { | ||
837 | } | ||
838 | |||
839 | #endif | 829 | #endif |
840 | 830 | ||
841 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 831 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
@@ -918,7 +908,7 @@ error: | |||
918 | void __init rx51_peripherals_init(void) | 908 | void __init rx51_peripherals_init(void) |
919 | { | 909 | { |
920 | rx51_i2c_init(); | 910 | rx51_i2c_init(); |
921 | board_onenand_init(); | 911 | gpmc_onenand_init(board_onenand_data); |
922 | board_smc91x_init(); | 912 | board_smc91x_init(); |
923 | rx51_add_gpio_keys(); | 913 | rx51_add_gpio_keys(); |
924 | rx51_init_wl1251(); | 914 | rx51_init_wl1251(); |