Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Abraham and committed by
Greg Kroah-Hartman
f6568045 4a98f590

+27
+27
arch/arm/mach-s3c2416/mach-smdk2416.c
··· 23 23 #include <linux/mtd/partitions.h> 24 24 #include <linux/gpio.h> 25 25 #include <linux/fb.h> 26 + #include <linux/delay.h> 26 27 27 28 #include <asm/mach/arch.h> 28 29 #include <asm/mach/map.h> ··· 36 35 #include <plat/regs-serial.h> 37 36 #include <mach/regs-gpio.h> 38 37 #include <mach/regs-lcd.h> 38 + #include <mach/regs-s3c2443-clock.h> 39 39 40 40 #include <mach/idle.h> 41 41 #include <mach/leds-gpio.h> ··· 49 47 #include <plat/cpu.h> 50 48 #include <plat/nand.h> 51 49 #include <plat/sdhci.h> 50 + #include <plat/udc.h> 52 51 53 52 #include <plat/regs-fb-v4.h> 54 53 #include <plat/fb.h> ··· 124 121 } 125 122 }; 126 123 124 + void smdk2416_hsudc_gpio_init(void) 125 + { 126 + s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_UP); 127 + s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_NONE); 128 + s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(1)); 129 + s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 0); 130 + } 131 + 132 + void smdk2416_hsudc_gpio_uninit(void) 133 + { 134 + s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 1); 135 + s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_NONE); 136 + s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(0)); 137 + } 138 + 139 + struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = { 140 + .epnum = 9, 141 + .gpio_init = smdk2416_hsudc_gpio_init, 142 + .gpio_uninit = smdk2416_hsudc_gpio_uninit, 143 + }; 144 + 127 145 struct s3c_fb_pd_win smdk2416_fb_win[] = { 128 146 [0] = { 129 147 /* think this is the same as the smdk6410 */ ··· 210 186 &s3c_device_i2c0, 211 187 &s3c_device_hsmmc0, 212 188 &s3c_device_hsmmc1, 189 + &s3c_device_usb_hsudc, 213 190 }; 214 191 215 192 static void __init smdk2416_map_io(void) ··· 227 202 228 203 s3c_sdhci0_set_platdata(&smdk2416_hsmmc0_pdata); 229 204 s3c_sdhci1_set_platdata(&smdk2416_hsmmc1_pdata); 205 + 206 + s3c24xx_hsudc_set_platdata(&smdk2416_hsudc_platdata); 230 207 231 208 gpio_request(S3C2410_GPB(4), "USBHost Power"); 232 209 gpio_direction_output(S3C2410_GPB(4), 1);