From cfeb34ede47921a5f9af48313eb4c61adbb6b343 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 31 May 2011 15:14:08 -0600 Subject: ARM: Tegra: Seaboard: Re-order sdhci device registration Ensure the built-in eMMC is always named mmcblk0. This is important because: * U-Boot statically assigns MMC device IDs based on controller ID. * U-Boot assumes that kernel MMC device ID numbering matches U-Boot numbering. * U-Boot provides a kernel cmdline option e.g. root=/dev/mmcblk0p3 based on that numbering. * The kernel dynamically assigns MMC device IDs based on enumeration order of the memory behind the host controller, rather than statically based on host controller ID like U-Boot. * By registering the SDHCI controller for the built-in eMMC first, the enumeration of the built-in eMMC is performed first, and hence eMMC gets assigned ID 0 just like U-Boot. If the SD slot is filled, it then gets assigned ID 1 just like U-Boot. * If the MMC IDs mismatch, and the system boots from SD card not eMMC, the kernel will access the eMMC instead of SD card when attempting to mount /dev/mmcblk1p3 as the root fs. If eMMC is not partitioned/formatted, the kernel will panic since the root fs can't be mounted. If eMMC is partitioned and formatted, the kernel will mount an unexpected filesystem as the root fs. This change relies on the SDHCI driver performing initial card detection synchronously during device registration. This is currently the case. Signed-off-by: Stephen Warren Signed-off-by: Colin Cross --- arch/arm/mach-tegra/board-seaboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-tegra/board-seaboard.c') diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index a8d7ace9f958..783de172c0eb 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c @@ -137,9 +137,9 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = { static struct platform_device *seaboard_devices[] __initdata = { &debug_uart, &tegra_pmu_device, - &tegra_sdhci_device1, - &tegra_sdhci_device3, &tegra_sdhci_device4, + &tegra_sdhci_device3, + &tegra_sdhci_device1, &seaboard_gpio_keys_device, }; -- cgit v1.2.3 From 78702e43c1cadd600e35374411caba82ad9354b6 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sun, 10 Jul 2011 14:37:22 -0700 Subject: ARM: tegra: remove copy-and-pasted i2c platform data in boards Every board file includes the same platform data definition for the i2c-tegra driver's bus speed. Move the platform data into devices.c, and remove it from all the board files. Signed-off-by: Colin Cross Tested-by: Konstantin Sinyuk Acked-by: Olof Johansson --- arch/arm/mach-tegra/board-seaboard.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'arch/arm/mach-tegra/board-seaboard.c') diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index 783de172c0eb..46d5df90c79e 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -66,22 +65,6 @@ static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = { { NULL, NULL, 0, 0}, }; -static struct tegra_i2c_platform_data seaboard_i2c1_platform_data = { - .bus_clk_rate = 400000. -}; - -static struct tegra_i2c_platform_data seaboard_i2c2_platform_data = { - .bus_clk_rate = 400000, -}; - -static struct tegra_i2c_platform_data seaboard_i2c3_platform_data = { - .bus_clk_rate = 400000, -}; - -static struct tegra_i2c_platform_data seaboard_dvc_platform_data = { - .bus_clk_rate = 400000, -}; - static struct gpio_keys_button seaboard_gpio_keys_buttons[] = { { .code = SW_LID, @@ -161,11 +144,6 @@ static void __init seaboard_i2c_init(void) i2c_register_board_info(4, &adt7461_device, 1); - tegra_i2c_device1.dev.platform_data = &seaboard_i2c1_platform_data; - tegra_i2c_device2.dev.platform_data = &seaboard_i2c2_platform_data; - tegra_i2c_device3.dev.platform_data = &seaboard_i2c3_platform_data; - tegra_i2c_device4.dev.platform_data = &seaboard_dvc_platform_data; - platform_device_register(&tegra_i2c_device1); platform_device_register(&tegra_i2c_device2); platform_device_register(&tegra_i2c_device3); -- cgit v1.2.3