Thread (3 messages) flat view 3 messages, 2 authors, 2005-08-09

Re: [PATH] ppc32: Add usb support to IBM stb04xxx platforms

From: Eugene Surovegin <hidden>
Date: 2005-08-09 19:03:21

On Tue, Aug 09, 2005 at 11:53:27AM -0700, Dale Farnsworth wrote:
[snip]
quoted hunk ↗ jump to hunk
Index: linux-2.5-usb-405/arch/ppc/platforms/4xx/redwood5.c
===================================================================
--- linux-2.5-usb-405.orig/arch/ppc/platforms/4xx/redwood5.c
+++ linux-2.5-usb-405/arch/ppc/platforms/4xx/redwood5.c
@@ -52,8 +52,18 @@
 void __init
 redwood5_setup_arch(void)
 {
+	u32 mask;
+
 	ppc4xx_setup_arch();
 
+	/*
+	 * Set up USB interrupt as positive polarity and level-sensitive.
+	 * Firmware should do this, but apparently does not.
+	 */
+	mask = 1 << (31 - USB0_IRQ);
+	mtdcr(DCRN_UIC_PR(UIC0), mfdcr(DCRN_UIC_PR(UIC0)) | mask);
+	mtdcr(DCRN_UIC_TR(UIC0), mfdcr(DCRN_UIC_TR(UIC0)) & ~mask);
+
Please, DO NOT DO THIS. 

There is a way to configure UIC settings without messing with UIC 
registers directly. Refer to asm-ppc/ppc4xx_pic.h and other 4xx board 
ports for more information.

-- 
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help