diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2011-05-07 16:29:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-10 17:16:54 -0400 |
commit | f65680455def9eea074fce58b76006a5ce60e28e (patch) | |
tree | 828af03a6895149dad94261133f1f84e66108033 /arch/arm/mach-s3c2416 | |
parent | 4a98f590659113f72c021201781d5b83bc743a7c (diff) |
ARM: S3C2416: Add support for USB 2.0 High-Speed gadget controller
Add support for USB 2.0 High-Speed gadget controller driver for Samsung's
S3C2416 processor.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-s3c2416')
-rw-r--r-- | arch/arm/mach-s3c2416/mach-smdk2416.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2416/mach-smdk2416.c b/arch/arm/mach-s3c2416/mach-smdk2416.c index 3f83177246c7..ac27ebb31c9b 100644 --- a/arch/arm/mach-s3c2416/mach-smdk2416.c +++ b/arch/arm/mach-s3c2416/mach-smdk2416.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | #include <linux/delay.h> | ||
26 | 27 | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
@@ -35,6 +36,7 @@ | |||
35 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
36 | #include <mach/regs-gpio.h> | 37 | #include <mach/regs-gpio.h> |
37 | #include <mach/regs-lcd.h> | 38 | #include <mach/regs-lcd.h> |
39 | #include <mach/regs-s3c2443-clock.h> | ||
38 | 40 | ||
39 | #include <mach/idle.h> | 41 | #include <mach/idle.h> |
40 | #include <mach/leds-gpio.h> | 42 | #include <mach/leds-gpio.h> |
@@ -47,6 +49,7 @@ | |||
47 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
48 | #include <plat/nand.h> | 50 | #include <plat/nand.h> |
49 | #include <plat/sdhci.h> | 51 | #include <plat/sdhci.h> |
52 | #include <plat/udc.h> | ||
50 | 53 | ||
51 | #include <plat/regs-fb-v4.h> | 54 | #include <plat/regs-fb-v4.h> |
52 | #include <plat/fb.h> | 55 | #include <plat/fb.h> |
@@ -121,6 +124,27 @@ static struct s3c2410_uartcfg smdk2416_uartcfgs[] __initdata = { | |||
121 | } | 124 | } |
122 | }; | 125 | }; |
123 | 126 | ||
127 | void smdk2416_hsudc_gpio_init(void) | ||
128 | { | ||
129 | s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_UP); | ||
130 | s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_NONE); | ||
131 | s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(1)); | ||
132 | s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 0); | ||
133 | } | ||
134 | |||
135 | void smdk2416_hsudc_gpio_uninit(void) | ||
136 | { | ||
137 | s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 1); | ||
138 | s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_NONE); | ||
139 | s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(0)); | ||
140 | } | ||
141 | |||
142 | struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = { | ||
143 | .epnum = 9, | ||
144 | .gpio_init = smdk2416_hsudc_gpio_init, | ||
145 | .gpio_uninit = smdk2416_hsudc_gpio_uninit, | ||
146 | }; | ||
147 | |||
124 | struct s3c_fb_pd_win smdk2416_fb_win[] = { | 148 | struct s3c_fb_pd_win smdk2416_fb_win[] = { |
125 | [0] = { | 149 | [0] = { |
126 | /* think this is the same as the smdk6410 */ | 150 | /* think this is the same as the smdk6410 */ |
@@ -186,6 +210,7 @@ static struct platform_device *smdk2416_devices[] __initdata = { | |||
186 | &s3c_device_i2c0, | 210 | &s3c_device_i2c0, |
187 | &s3c_device_hsmmc0, | 211 | &s3c_device_hsmmc0, |
188 | &s3c_device_hsmmc1, | 212 | &s3c_device_hsmmc1, |
213 | &s3c_device_usb_hsudc, | ||
189 | }; | 214 | }; |
190 | 215 | ||
191 | static void __init smdk2416_map_io(void) | 216 | static void __init smdk2416_map_io(void) |
@@ -203,6 +228,8 @@ static void __init smdk2416_machine_init(void) | |||
203 | s3c_sdhci0_set_platdata(&smdk2416_hsmmc0_pdata); | 228 | s3c_sdhci0_set_platdata(&smdk2416_hsmmc0_pdata); |
204 | s3c_sdhci1_set_platdata(&smdk2416_hsmmc1_pdata); | 229 | s3c_sdhci1_set_platdata(&smdk2416_hsmmc1_pdata); |
205 | 230 | ||
231 | s3c24xx_hsudc_set_platdata(&smdk2416_hsudc_platdata); | ||
232 | |||
206 | gpio_request(S3C2410_GPB(4), "USBHost Power"); | 233 | gpio_request(S3C2410_GPB(4), "USBHost Power"); |
207 | gpio_direction_output(S3C2410_GPB(4), 1); | 234 | gpio_direction_output(S3C2410_GPB(4), 1); |
208 | 235 | ||