summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/pcm038
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-03 21:59:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-13 22:18:47 +0100
commit3be7b966ed7be54590e27e67a7f6b197d85b38f8 (patch)
treeb1c8e9c43ab5ed3e462fad4fb2829b5a3f4f936b /arch/arm/boards/pcm038
parent70f42048a1c88d3681bed78dbb6095f2e29aa9cf (diff)
downloadbarebox-3be7b966ed7be54590e27e67a7f6b197d85b38f8.tar.gz
barebox-3be7b966ed7be54590e27e67a7f6b197d85b38f8.tar.xz
pcm038: Stop ongoing ULPI transfers before registering the transceiver
The ULPI lines are normally input to the USB port. In order to configure the ULPI transceiver properly the ongoing transfers must be stopped. This can be done by configuring the the STP pin as gpio output and drinving it high. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/pcm038')
-rw-r--r--arch/arm/boards/pcm038/pcm970.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/boards/pcm038/pcm970.c b/arch/arm/boards/pcm038/pcm970.c
index 7b25110d7a..a50a1f2e97 100644
--- a/arch/arm/boards/pcm038/pcm970.c
+++ b/arch/arm/boards/pcm038/pcm970.c
@@ -160,7 +160,7 @@ static int pcm970_init(void)
PA1_PF_USBH2_DIR,
PA2_PF_USBH2_DATA7,
PA3_PF_USBH2_NXT,
- PA4_PF_USBH2_STP,
+ 4 | GPIO_PORTA | GPIO_GPIO | GPIO_OUT,
PD19_AF_USBH2_DATA4,
PD20_AF_USBH2_DATA3,
PD21_AF_USBH2_DATA6,
@@ -176,8 +176,14 @@ static int pcm970_init(void)
/* Configure SJA1000 on cs4 */
imx27_setup_weimcs(4, 0x0000DCF6, 0x444A0301, 0x44443302);
- if (IS_ENABLED(CONFIG_USB))
+ if (IS_ENABLED(CONFIG_USB)) {
+ /* Stop ULPI */
+ gpio_direction_output(4, 1);
+ mdelay(1);
+ imx_gpio_mode(PA4_PF_USBH2_STP);
+
imx27_add_usbh2(&pcm970_usbh2_pdata);
+ }
#ifdef CONFIG_DISK_INTF_PLATFORM_IDE
pcm970_ide_init();