aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-n8x0.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-08-20 02:36:28 -0400
committerTony Lindgren <tony@atomide.com>2010-09-23 21:27:47 -0400
commita7f97d25c707e1020bd7bcb443e183860e5abf48 (patch)
treeb767a2298643e52dea0aa467bb5e0b6fa46543d3 /arch/arm/mach-omap2/board-n8x0.c
parentca828760f96ee8f0b6c93400599844761aa69dc0 (diff)
omap: n8x0: Cleanup i2c1 and menelaus registration
- Move n8x0_i2c_board_info_1 out from #ifdef CONFIG_MENELAUS block, register i2c1 in n8x0_init_machine and do a few clean-ups around these. Code looks better if board infos are grouped together - Mark n8x0_i2c_board_info_1 and n8x0_menelaus_platform_data with __initdata Signed-off-by: Jarkko Nikula <jhnikula@gmail.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.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index a3e2b49aa39f..313ce5eb0d09 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -614,30 +614,25 @@ static int n8x0_menelaus_late_init(struct device *dev)
614 return 0; 614 return 0;
615} 615}
616 616
617static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = { 617#else
618static int n8x0_menelaus_late_init(struct device *dev)
619{
620 return 0;
621}
622#endif
623
624static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
625 .late_init = n8x0_menelaus_late_init,
626};
627
628static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = {
618 { 629 {
619 I2C_BOARD_INFO("menelaus", 0x72), 630 I2C_BOARD_INFO("menelaus", 0x72),
620 .irq = INT_24XX_SYS_NIRQ, 631 .irq = INT_24XX_SYS_NIRQ,
632 .platform_data = &n8x0_menelaus_platform_data,
621 }, 633 },
622}; 634};
623 635
624static struct menelaus_platform_data n8x0_menelaus_platform_data = {
625 .late_init = n8x0_menelaus_late_init,
626};
627
628static void __init n8x0_menelaus_init(void)
629{
630 n8x0_i2c_board_info_1[0].platform_data = &n8x0_menelaus_platform_data;
631 omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
632 ARRAY_SIZE(n8x0_i2c_board_info_1));
633}
634
635#else
636static inline void __init n8x0_menelaus_init(void)
637{
638}
639#endif
640
641static void __init n8x0_map_io(void) 636static void __init n8x0_map_io(void)
642{ 637{
643 omap2_set_globals_242x(); 638 omap2_set_globals_242x();
@@ -665,9 +660,10 @@ static void __init n8x0_init_machine(void)
665 /* FIXME: add n810 spi devices */ 660 /* FIXME: add n810 spi devices */
666 spi_register_board_info(n800_spi_board_info, 661 spi_register_board_info(n800_spi_board_info,
667 ARRAY_SIZE(n800_spi_board_info)); 662 ARRAY_SIZE(n800_spi_board_info));
663 omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
664 ARRAY_SIZE(n8x0_i2c_board_info_1));
668 665
669 omap_serial_init(); 666 omap_serial_init();
670 n8x0_menelaus_init();
671 n8x0_onenand_init(); 667 n8x0_onenand_init();
672 n8x0_mmc_init(); 668 n8x0_mmc_init();
673 n8x0_usb_init(); 669 n8x0_usb_init();