aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-n8x0.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-11-25 15:17:10 -0800
committerTony Lindgren <tony@atomide.com>2013-11-25 15:31:17 -0800
commitfa590c923401368d86db361350849a7bf9f42b8a (patch)
tree382de4e97235d6572c6648305a8a01cced5f8d5f /arch/arm/mach-omap2/board-n8x0.c
parent810ac2a1102880b6c66dc2f26979a896b2d84009 (diff)
ARM: OMAP2+: Add quirks support for n8x0
This allows us to keep things working when booted with device tree. Note that we still need to initialize most things with platform data as the drivers are lacking support for device tree. Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> 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.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index c9eef2b9b86f..99dd184f50f1 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -529,7 +529,7 @@ static void n8x0_mmc_cleanup(struct device *dev)
* MMC controller2 is not in use.
*/
static struct omap_mmc_platform_data mmc1_data = {
- .nr_slots = 2,
+ .nr_slots = 0,
.switch_slot = n8x0_mmc_switch_slot,
.init = n8x0_mmc_late_init,
.cleanup = n8x0_mmc_cleanup,
@@ -596,12 +596,13 @@ static void __init n8x0_mmc_init(void)
}
}
+ mmc1_data.nr_slots = 2;
mmc_data[0] = &mmc1_data;
if (!of_have_populated_dt())
omap242x_init_mmc(mmc_data);
}
#else
-
+static struct omap_mmc_platform_data mmc1_data;
void __init n8x0_mmc_init(void)
{
}
@@ -746,6 +747,24 @@ static int __init n8x0_late_initcall(void)
}
omap_late_initcall(n8x0_late_initcall);
+/*
+ * Legacy init pdata init for n8x0. Note that we want to follow the
+ * I2C bus numbering starting at 0 for device tree like other omaps.
+ */
+void * __init n8x0_legacy_init(void)
+{
+ board_check_revision();
+ spi_register_board_info(n800_spi_board_info,
+ ARRAY_SIZE(n800_spi_board_info));
+ i2c_register_board_info(0, n8x0_i2c_board_info_1,
+ ARRAY_SIZE(n8x0_i2c_board_info_1));
+ if (board_is_n810())
+ i2c_register_board_info(1, n810_i2c_board_info_2,
+ ARRAY_SIZE(n810_i2c_board_info_2));
+
+ return &mmc1_data;
+}
+
static void __init n8x0_init_machine(void)
{
board_check_revision();