From patchwork Tue May 31 21:14:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 833952 Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4VLEj9o018308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 31 May 2011 21:15:12 GMT Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRWGi-0004vr-EL; Tue, 31 May 2011 21:14:28 +0000 Received: from avon.wwwdotorg.org ([2001:470:1f0f:bd7::2]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRWGc-0004uN-5Y for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2011 21:14:26 +0000 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id B54436415; Tue, 31 May 2011 15:14:48 -0600 (MDT) Received: from localhost.localdomain (searspoint.nvidia.com [216.228.112.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 1AFCBE477C; Tue, 31 May 2011 15:14:19 -0600 (MDT) From: Stephen Warren To: ccross@android.com, konkers@android.com, olof@lixom.net Subject: [PATCH 2/2] ARM: Tegra: Seaboard: Re-order sdhci device registration Date: Tue, 31 May 2011 15:14:08 -0600 Message-Id: <1306876448-28147-3-git-send-email-swarren@nvidia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1306876448-28147-1-git-send-email-swarren@nvidia.com> References: <1306876448-28147-1-git-send-email-swarren@nvidia.com> X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110531_171422_347263_94E06A51 X-CRM114-Status: GOOD ( 18.09 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: linux-tegra@vger.kernel.org, Stephen Warren , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 21:15:12 +0000 (UTC) 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 --- 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 a8d7ace..783de17 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, };