aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2005-09-05 15:47:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-09-05 15:47:53 -0400
commit027da01d734db0ca9dd1a084339dab07ab576935 (patch)
tree8a3dacda10e5bfc1f69c5dde8b920f175ec592d5 /arch
parent9d88347758c58ee5b4ac9cd594b96eaafa5e08bb (diff)
[ARM] 2876/1: N30 - remove task to toggle USB D+ line
Patch from Ben Dooks The n30 machine file is using a kernel thread to change the state of the USB D+ pull-up resistor, which is not the proper way to do this. Once the usb-gadget support for the 24xx is merge, the proper access method will be added. This patch also removes the problem of using HZ for the msleep calls, from Nishanth Aravamudan. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 79044d9bce38..66bf5bb2b3db 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -110,34 +110,24 @@ void __init n30_init_irq(void)
110 s3c24xx_init_irq(); 110 s3c24xx_init_irq();
111} 111}
112 112
113 113/* GPB3 is the line that controls the pull-up for the USB D+ line */
114static int n30_usbstart_thread(void *unused)
115{
116 /* Turn off suspend on both USB ports, and switch the
117 * selectable USB port to USB device mode. */
118 writel(readl(S3C2410_MISCCR) & ~0x00003008, S3C2410_MISCCR);
119
120 /* Turn off the D+ pull up for 3 seconds so that the USB host
121 * at the other end will do a rescan of the USB bus. */
122 s3c2410_gpio_setpin(S3C2410_GPB3, 0);
123
124 msleep_interruptible(3*HZ);
125
126 s3c2410_gpio_setpin(S3C2410_GPB3, 1);
127
128 return 0;
129}
130
131 114
132void __init n30_init(void) 115void __init n30_init(void)
133{ 116{
134 s3c_device_i2c.dev.platform_data = &n30_i2ccfg; 117 s3c_device_i2c.dev.platform_data = &n30_i2ccfg;
135 118
136 kthread_run(n30_usbstart_thread, NULL, "n30_usbstart"); 119 /* Turn off suspend on both USB ports, and switch the
120 * selectable USB port to USB device mode. */
121
122 s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
123 S3C2410_MISCCR_USBSUSPND0 |
124 S3C2410_MISCCR_USBSUSPND1, 0x0);
137} 125}
138 126
139MACHINE_START(N30, "Acer-N30") 127MACHINE_START(N30, "Acer-N30")
140 /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */ 128 /* Maintainer: Christer Weinigel <christer@weinigel.se>,
129 Ben Dooks <ben-linux@fluff.org>
130 */
141 .phys_ram = S3C2410_SDRAM_PA, 131 .phys_ram = S3C2410_SDRAM_PA,
142 .phys_io = S3C2410_PA_UART, 132 .phys_io = S3C2410_PA_UART,
143 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 133 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,