diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-05-31 17:14:08 -0400 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-07-12 23:38:39 -0400 |
commit | cfeb34ede47921a5f9af48313eb4c61adbb6b343 (patch) | |
tree | e1b9b546db5cbb9e95bce75d209bca67f1939048 /arch/arm/mach-tegra | |
parent | 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff) |
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 <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-seaboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 = { | |||
137 | static struct platform_device *seaboard_devices[] __initdata = { | 137 | static struct platform_device *seaboard_devices[] __initdata = { |
138 | &debug_uart, | 138 | &debug_uart, |
139 | &tegra_pmu_device, | 139 | &tegra_pmu_device, |
140 | &tegra_sdhci_device1, | ||
141 | &tegra_sdhci_device3, | ||
142 | &tegra_sdhci_device4, | 140 | &tegra_sdhci_device4, |
141 | &tegra_sdhci_device3, | ||
142 | &tegra_sdhci_device1, | ||
143 | &seaboard_gpio_keys_device, | 143 | &seaboard_gpio_keys_device, |
144 | }; | 144 | }; |
145 | 145 | ||