public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc44x: config GPIOs for USB on canyonlands board
@ 2010-09-23 14:21 Rupjyoti Sarmah
  2010-09-23 18:56 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Rupjyoti Sarmah @ 2010-09-23 14:21 UTC (permalink / raw)
  To: u-boot


The GPIO 16 and 19 reconfiguration should be done once USB is initialized.
So moved the reconfiguration to the USB init  function 

Signed-off-by: Rupjyoti Sarmah <rsarmah@apm.com>
---
 board/amcc/canyonlands/canyonlands.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c
index 158f7bb..1e547f7 100644
--- a/board/amcc/canyonlands/canyonlands.c
+++ b/board/amcc/canyonlands/canyonlands.c
@@ -195,16 +195,6 @@ int board_early_init_f(void)
 	mtdcr(AHB_TOP, 0x8000004B);
 	mtdcr(AHB_BOT, 0x8000004B);
 
-	if (pvr_460ex()) {
-		/*
-		 * Configure USB-STP pins as alternate and not GPIO
-		 * It seems to be neccessary to configure the STP pins as GPIO
-		 * input at powerup (perhaps while USB reset is asserted). So
-		 * we configure those pins to their "real" function now.
-		 */
-		gpio_config(16, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
-		gpio_config(19, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
-	}
 #endif
 
 	return 0;
@@ -222,6 +212,15 @@ int usb_board_init(void)
 	val &= ~(BCSR_USBCTRL_OTG_RST | BCSR_USBCTRL_HOST_RST);
 	out_8(&bcsr_data->usb_ctrl, val);
 
+	/*
+	 * Configure USB-STP pins as alternate and not GPIO
+	 * It seems to be neccessary to configure the STP pins as GPIO
+	 * input at powerup (perhaps while USB reset is asserted). So
+	 * we configure those pins to their "real" function now.
+	 */
+	gpio_config(16, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
+	gpio_config(19, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
+
 	return 0;
 }
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-28 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23 14:21 [U-Boot] [PATCH] ppc44x: config GPIOs for USB on canyonlands board Rupjyoti Sarmah
2010-09-23 18:56 ` Wolfgang Denk
2010-09-24 11:36   ` Rupjyoti Sarmah
2010-09-24 17:26     ` Feng Kan
2010-09-24 17:43       ` Wolfgang Denk
2010-09-24 22:43         ` Feng Kan
2010-09-28 14:16           ` Detlev Zundel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox