Re: [PATCH 2.6.10-rc2] ppc32: Add usb support to IBM stb04xxx platforms
From: Eugene Surovegin <hidden>
Date: 2005-03-31 21:08:10
From: Eugene Surovegin <hidden>
Date: 2005-03-31 21:08:10
On Thu, Mar 31, 2005 at 01:47:30PM -0700, Dale Farnsworth wrote: [snip]
===================================================================--- 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); + #ifdef CONFIG_DEBUG_BRINGUP printk("\n"); printk("machine\t: %s\n", PPC4xx_MACHINE_NAME);
Dale, please, don't mess with UIC registers directly, there is a cleaner way to set this up. Take a look at how this is done in other 4xx ports (ppc4xx_core_uic_cfg & ppc4xx_uic_ext_irq_cfg). -- Eugene