aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChrister Weinigel <christer@weinigel.se>2008-07-07 13:12:42 -0400
committerBen Dooks <ben-linux@fluff.org>2008-07-07 13:13:03 -0400
commitd088e5fe586287da003341e7bbfdad15e0f432f7 (patch)
tree7d90305f2ace431ddbea571277e716e7b562cb19
parent196a047574e1465b89bc41fda573efc9b9be70e5 (diff)
[ARM] Acer n30: USB bus pull-up support.
Add support for the USB D+ pull up on the Acer N30. This is needed for the USB gadget to work properly. Signed-off-by: Christer Weinigel <christer@weinigel.se> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index fc54e07ccac5..8edc0c0eb043 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -41,6 +41,7 @@
41#include <asm/plat-s3c24xx/cpu.h> 41#include <asm/plat-s3c24xx/cpu.h>
42#include <asm/plat-s3c24xx/devs.h> 42#include <asm/plat-s3c24xx/devs.h>
43#include <asm/plat-s3c24xx/s3c2410.h> 43#include <asm/plat-s3c24xx/s3c2410.h>
44#include <asm/plat-s3c24xx/udc.h>
44 45
45static struct map_desc n30_iodesc[] __initdata = { 46static struct map_desc n30_iodesc[] __initdata = {
46 /* nothing here yet */ 47 /* nothing here yet */
@@ -74,6 +75,29 @@ static struct s3c2410_uartcfg n30_uartcfgs[] = {
74 }, 75 },
75}; 76};
76 77
78static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
79{
80 switch (cmd)
81 {
82 case S3C2410_UDC_P_ENABLE :
83 s3c2410_gpio_setpin(S3C2410_GPB3, 1);
84 break;
85 case S3C2410_UDC_P_DISABLE :
86 s3c2410_gpio_setpin(S3C2410_GPB3, 0);
87 break;
88 case S3C2410_UDC_P_RESET :
89 break;
90 default:
91 break;
92 }
93}
94
95static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = {
96 .udc_command = n30_udc_pullup,
97 .vbus_pin = S3C2410_GPG1,
98 .vbus_pin_inverted = 0,
99};
100
77static struct platform_device *n30_devices[] __initdata = { 101static struct platform_device *n30_devices[] __initdata = {
78 &s3c_device_lcd, 102 &s3c_device_lcd,
79 &s3c_device_wdt, 103 &s3c_device_wdt,
@@ -107,6 +131,7 @@ static void __init n30_init_irq(void)
107static void __init n30_init(void) 131static void __init n30_init(void)
108{ 132{
109 s3c_device_i2c.dev.platform_data = &n30_i2ccfg; 133 s3c_device_i2c.dev.platform_data = &n30_i2ccfg;
134 s3c24xx_udc_set_platdata(&n30_udc_cfg);
110 135
111 /* Turn off suspend on both USB ports, and switch the 136 /* Turn off suspend on both USB ports, and switch the
112 * selectable USB port to USB device mode. */ 137 * selectable USB port to USB device mode. */