aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2011-05-28 09:54:35 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-07 03:59:56 -0400
commit2e7b1bfcb98dd232faf85b4a0a2611a49454c2ea (patch)
tree680063e75a9d9ab77bbfe5c1edd5dbeadf831504 /arch/arm/mach-mx5
parent58f45e3c6f4fd2b9b9d7d43af71409a79a4b4cf6 (diff)
ARM: mx5/mx51_babbage: Move GPIO initialization for USB PHY Reset line to common place
The USB PHY Reset GPIO can be configured in the same place as the other GPIOs. While at it rename the pin as BABBAGE_USB_PHY_RESET to make clearer its purpose. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index c7b3fabf50f9..7b919bc8549c 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -36,7 +36,7 @@
36 36
37#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) 37#define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7)
38#define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) 38#define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27)
39#define BABBAGE_PHY_RESET IMX_GPIO_NR(2, 5) 39#define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5)
40#define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) 40#define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14)
41#define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) 41#define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21)
42#define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) 42#define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24)
@@ -110,6 +110,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
110 /* USB HUB reset line*/ 110 /* USB HUB reset line*/
111 MX51_PAD_GPIO1_7__GPIO1_7, 111 MX51_PAD_GPIO1_7__GPIO1_7,
112 112
113 /* USB PHY reset line */
114 MX51_PAD_EIM_D21__GPIO2_5,
115
113 /* FEC */ 116 /* FEC */
114 MX51_PAD_EIM_EB2__FEC_MDIO, 117 MX51_PAD_EIM_EB2__FEC_MDIO,
115 MX51_PAD_EIM_EB3__FEC_RDATA1, 118 MX51_PAD_EIM_EB3__FEC_RDATA1,
@@ -172,7 +175,6 @@ static struct imxi2c_platform_data babbage_hsi2c_data = {
172static int gpio_usbh1_active(void) 175static int gpio_usbh1_active(void)
173{ 176{
174 iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; 177 iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27;
175 iomux_v3_cfg_t phyreset_gpio = MX51_PAD_EIM_D21__GPIO2_5;
176 int ret; 178 int ret;
177 179
178 /* Set USBH1_STP to GPIO and toggle it */ 180 /* Set USBH1_STP to GPIO and toggle it */
@@ -189,14 +191,13 @@ static int gpio_usbh1_active(void)
189 gpio_free(BABBAGE_USBH1_STP); 191 gpio_free(BABBAGE_USBH1_STP);
190 192
191 /* De-assert USB PHY RESETB */ 193 /* De-assert USB PHY RESETB */
192 mxc_iomux_v3_setup_pad(phyreset_gpio); 194 ret = gpio_request(BABBAGE_USB_PHY_RESET, "phy_reset");
193 ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset");
194 195
195 if (ret) { 196 if (ret) {
196 pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret); 197 pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret);
197 return ret; 198 return ret;
198 } 199 }
199 gpio_direction_output(BABBAGE_PHY_RESET, 1); 200 gpio_direction_output(BABBAGE_USB_PHY_RESET, 1);
200 return 0; 201 return 0;
201} 202}
202 203