aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/pb1000
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@telecomint.eu>2007-09-25 11:07:24 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-09 07:47:48 -0400
commitf708631ac75c901b20c7622be9abdbc29d4d2dd7 (patch)
tree5738ad6272a715fbe5db5b3bcc3be8b62aa2d113 /arch/mips/au1000/pb1000
parent378a545954abfec1c9499203206e0ffb5c2118d2 (diff)
[MIPS] Alchemy: Fix USB initialization.
This patch fixes a wrong ifdef in the board setup code, leading to the GPIO pin not being pulled high, and thus the USB switch not being powered at all. This finishes the rename of CONFIG_USB_OHCI to CONFIG_USB_OHCI_HCD, which started in 2005 (before 2.6.12-rc2), then probably because things were working anyway for most people got forgotten. [Ralf: Paolo's original patch didn't fix the module case, Florian's patch only fixed MTX1 etc. so this is a combined patch plus some cleanups.] Cc: Giuseppe Patanè <giuseppe.patane@tvblob.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000/pb1000')
-rw-r--r--arch/mips/au1000/pb1000/board_setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c
index 824cfafaff92..0aed89114bfc 100644
--- a/arch/mips/au1000/pb1000/board_setup.c
+++ b/arch/mips/au1000/pb1000/board_setup.c
@@ -54,7 +54,7 @@ void __init board_setup(void)
54 au_writel(0, SYS_PINSTATERD); 54 au_writel(0, SYS_PINSTATERD);
55 udelay(100); 55 udelay(100);
56 56
57#ifdef CONFIG_USB_OHCI 57#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
58 /* zero and disable FREQ2 */ 58 /* zero and disable FREQ2 */
59 sys_freqctrl = au_readl(SYS_FREQCTRL0); 59 sys_freqctrl = au_readl(SYS_FREQCTRL0);
60 sys_freqctrl &= ~0xFFF00000; 60 sys_freqctrl &= ~0xFFF00000;
@@ -102,7 +102,7 @@ void __init board_setup(void)
102 /* 102 /*
103 * Route 48MHz FREQ2 into USB Host and/or Device 103 * Route 48MHz FREQ2 into USB Host and/or Device
104 */ 104 */
105#ifdef CONFIG_USB_OHCI 105#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); 106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
107#endif 107#endif
108 au_writel(sys_clksrc, SYS_CLKSRC); 108 au_writel(sys_clksrc, SYS_CLKSRC);
@@ -116,7 +116,7 @@ void __init board_setup(void)
116 au_writel(pin_func, SYS_PINFUNC); 116 au_writel(pin_func, SYS_PINFUNC);
117 au_writel(0x2800, SYS_TRIOUTCLR); 117 au_writel(0x2800, SYS_TRIOUTCLR);
118 au_writel(0x0030, SYS_OUTPUTCLR); 118 au_writel(0x0030, SYS_OUTPUTCLR);
119#endif // defined (CONFIG_USB_OHCI) 119#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */
120 120
121 // make gpio 15 an input (for interrupt line) 121 // make gpio 15 an input (for interrupt line)
122 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100); 122 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100);