Tegra bugfixes for 3.0
Subsystems (3)
cover Tegra bugfixes for 3.0
Two fixes for Tegra boards:
The first fixes a regression on board Harmony. Without this, some devices won't initialize correctly due to conflicting gpiolib base "addresses".
The second could be considered a bugfix or a convenience. It's very useful, but less important than the Harmony fix if you need to merge just one:-)
Note: These were created against Linus's tree, a little after 3.0rc1, since the Tegra for-next is pretty stale. To be precise:
af0d6a0a3a30946f7df69c764791f1b0643f7cd6
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
Stephen Warren (2):
ARM: Tegra: Harmony: Fix conflicting GPIO numbering
ARM: Tegra: Seaboard: Re-order sdhci device registration
arch/arm/mach-tegra/board-harmony-power.c | 4 +++- arch/arm/mach-tegra/board-harmony.h | 3 ++- arch/arm/mach-tegra/board-seaboard.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-)
PATCH 1/2 ARM: Tegra: Harmony: Fix conflicting GPIO numbering
Currently, both the WM8903 and TPS6586x chips attempt to register with gpiolib using the same GPIO numbers. This causes the audio driver to fail to initialize.
To solve this, add a define to board-harmony.h for the TPS6586x, and make board-harmony-power.c use this define, instead of directly referencing TEGRA_NR_GPIOS.
This fixes a regression introduced by commit6f168f2fa60f87e85e0df25e87e2372f22f5eb7c.
ARM: tegra: harmony: initialize the TPS65862 PMIC
--- arch/arm/mach-tegra/board-harmony-power.c | 4 +++- arch/arm/mach-tegra/board-harmony.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/board-harmony-power.c +3 -1
@@ -24,6 +24,8 @@#include <mach/irqs.h> +#include "board-harmony.h" +#define PMC_CTRL 0x0#define PMC_CTRL_INTR_LOW (1 << 17)
@@ -98,7 +100,7 @@ static struct tps6586x_platform_data tps_platform = { .irq_base = TEGRA_NR_IRQS, .num_subdevs = ARRAY_SIZE(tps_devs), .subdevs = tps_devs, - .gpio_base = TEGRA_NR_GPIOS, + .gpio_base = HARMONY_GPIO_TPS6586X(0), };static struct i2c_board_info __initdata harmony_regulators[] = {
arch/arm/mach-tegra/board-harmony.h +2 -1
@@ -17,7 +17,8 @@#ifndef _MACH_TEGRA_BOARD_HARMONY_H#define _MACH_TEGRA_BOARD_HARMONY_H -#define HARMONY_GPIO_WM8903 (_x_) (TEGRA_NR_GPIOS + (_x_)) +#define HARMONY_GPIO_TPS6586X (_x_) (TEGRA_NR_GPIOS + (_x_)) +#define HARMONY_GPIO_WM8903 (_x_) (HARMONY_GPIO_TPS6586X(4) + (_x_))#define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5#define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1
Signature · 1 line
1.7.0.4
PATCH 2/2 ARM: Tegra: Seaboard: Re-order sdhci device registration
In reply to Stephen WarrenEnsure 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.
--- arch/arm/mach-tegra/board-seaboard.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/board-seaboard.c +2 -2
@@ -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, };
Signature · 1 line
1.7.0.4
PATCH 2/2 ARM: Tegra: Seaboard: Re-order sdhci device registration
Stephen Warren wrote at Tuesday, May 31, 2011 3:14 PM:
Quoted 1 line
Ensure the built-in eMMC is always named mmcblk0.
Colin, could you please consider this for 3.1?
Thanks.
Quoted 45 lines
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/mmcblk1p3as 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 <[email protected]>--- arch/arm/mach-tegra/board-seaboard.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach-tegra/board-seaboard.c +2
-3@@ -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, }; --1.7.0.4
Signature · 1 line
nvpublic
PATCH 2/2 ARM: Tegra: Seaboard: Re-order sdhci device registration
Quoted 5 lines
Stephen Warren wrote at Wednesday, July 13, 2011 12:56 PM:
Stephen Warren wrote at Tuesday, May 31, 2011 3:14 PM:Quoted 1 line
Ensure the built-in eMMC is always named mmcblk0.
Colin, could you please consider this for 3.1?
Never mind, I see this has already been applied; I must have missed the email saying so, and the local rebase of my branch didn't show it as already applied since the tegra next branch only got pushed out last night and isn't in linux-next yet.
Sorry for the noise.
Signature · 1 line
nvpublic