aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-12 17:03:52 -0400
committerStephen Warren <swarren@nvidia.com>2012-04-25 17:22:09 -0400
commit60d148b9f838b718e4808061ee6d5833de77fd9c (patch)
treeeb0845d18a171176e605759ebaf52ae97c1c88b9 /arch/arm
parent9abafa021e223f04d6589ee2b977bbaf2e1f1367 (diff)
ARM: tegra: don't hard-code USB ULPI PHY reset_gpio
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/board-paz00.c2
-rw-r--r--arch/arm/mach-tegra/board-trimslice.c2
-rw-r--r--arch/arm/mach-tegra/devices.c5
-rw-r--r--arch/arm/mach-tegra/devices.h4
4 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index aebfa4003813..e31317deec21 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -159,6 +159,8 @@ static void paz00_i2c_init(void)
159 159
160static void paz00_usb_init(void) 160static void paz00_usb_init(void)
161{ 161{
162 tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_ULPI_RST;
163
162 platform_device_register(&tegra_ehci2_device); 164 platform_device_register(&tegra_ehci2_device);
163 platform_device_register(&tegra_ehci3_device); 165 platform_device_register(&tegra_ehci3_device);
164} 166}
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index f6f5b6a11325..24f1678098dd 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -117,6 +117,8 @@ static void trimslice_usb_init(void)
117 pdata = tegra_ehci1_device.dev.platform_data; 117 pdata = tegra_ehci1_device.dev.platform_data;
118 pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE; 118 pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE;
119 119
120 tegra_ehci2_ulpi_phy_config.reset_gpio = TEGRA_GPIO_PV0;
121
120 platform_device_register(&tegra_ehci3_device); 122 platform_device_register(&tegra_ehci3_device);
121 platform_device_register(&tegra_ehci2_device); 123 platform_device_register(&tegra_ehci2_device);
122 platform_device_register(&tegra_ehci1_device); 124 platform_device_register(&tegra_ehci1_device);
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index bd3035e0cea1..9fcb9a522276 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -439,9 +439,8 @@ static struct resource tegra_usb3_resources[] = {
439 }, 439 },
440}; 440};
441 441
442static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = { 442struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
443 /* All existing boards use GPIO PV0 for phy reset */ 443 .reset_gpio = -1,
444 .reset_gpio = TEGRA_GPIO_PV0,
445 .clk = "cdev2", 444 .clk = "cdev2",
446}; 445};
447 446
diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h
index ec455679b219..4290ea0063ac 100644
--- a/arch/arm/mach-tegra/devices.h
+++ b/arch/arm/mach-tegra/devices.h
@@ -22,6 +22,10 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/platform_data/tegra_usb.h> 23#include <linux/platform_data/tegra_usb.h>
24 24
25#include <mach/usb_phy.h>
26
27extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config;
28
25extern struct tegra_ehci_platform_data tegra_ehci1_pdata; 29extern struct tegra_ehci_platform_data tegra_ehci1_pdata;
26extern struct tegra_ehci_platform_data tegra_ehci2_pdata; 30extern struct tegra_ehci_platform_data tegra_ehci2_pdata;
27extern struct tegra_ehci_platform_data tegra_ehci3_pdata; 31extern struct tegra_ehci_platform_data tegra_ehci3_pdata;