]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: tegra: don't hard-code USB ULPI PHY reset_gpio
authorStephen Warren <swarren@nvidia.com>
Thu, 12 Apr 2012 21:03:52 +0000 (15:03 -0600)
committerStephen Warren <swarren@nvidia.com>
Wed, 25 Apr 2012 21:22:09 +0000 (15:22 -0600)
Not all boards use GPIO_PV0 as the ULPI PHY reset signal. Instead of
hard-coding this GPIO into devices.c, make the board files set it
explicitly. This will allow the PHY code to differentiate between set and
unset values, and hence know when to read the value from device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-trimslice.c
arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index aebfa40038139870806c8137c2efc88c3396561e..e31317deec219f5aeb6aee96f26ebac078847e29 100644 (file)
@@ -159,6 +159,8 @@ static void paz00_i2c_init(void)
 
 static void paz00_usb_init(void)
 {
+       tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_ULPI_RST;
+
        platform_device_register(&tegra_ehci2_device);
        platform_device_register(&tegra_ehci3_device);
 }
index f6f5b6a11325e131fc8a73dfb81e69f6654c2b38..24f1678098dd88614f9045f41fb1b6a6fcb6cf78 100644 (file)
@@ -117,6 +117,8 @@ static void trimslice_usb_init(void)
        pdata = tegra_ehci1_device.dev.platform_data;
        pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE;
 
+       tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_GPIO_PV0;
+
        platform_device_register(&tegra_ehci3_device);
        platform_device_register(&tegra_ehci2_device);
        platform_device_register(&tegra_ehci1_device);
index bd3035e0cea164c8b8b1869fc5f06c2d048ef4e2..9fcb9a52227651fe917cd78ec22bd4bb3683fc30 100644 (file)
@@ -439,9 +439,8 @@ static struct resource tegra_usb3_resources[] = {
        },
 };
 
-static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
-       /* All existing boards use GPIO PV0 for phy reset */
-       .reset_gpio = TEGRA_GPIO_PV0,
+struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
+       .reset_gpio = -1,
        .clk = "cdev2",
 };
 
index ec455679b219a987dcade1063f7770559746e9f4..4290ea0063acdcc9d84c2097f33d711e7ec9c824 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/platform_data/tegra_usb.h>
 
+#include <mach/usb_phy.h>
+
+extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config;
+
 extern struct tegra_ehci_platform_data tegra_ehci1_pdata;
 extern struct tegra_ehci_platform_data tegra_ehci2_pdata;
 extern struct tegra_ehci_platform_data tegra_ehci3_pdata;