From 82cec84a81a78e2440276868150ef3fe8373878e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 28 Jan 2009 15:45:55 +0000 Subject: fix-gta03-usb-otg-setup.patch Signed-off-by: Andy Green --- arch/arm/mach-s3c6410/mach-om-gta03.c | 18 ++++++++++++++++++ arch/arm/plat-s3c64xx/Kconfig | 7 +++++++ arch/arm/plat-s3c64xx/Makefile | 2 ++ 3 files changed, 27 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-s3c6410/mach-om-gta03.c b/arch/arm/mach-s3c6410/mach-om-gta03.c index af8be235ecd..211ae668eb0 100644 --- a/arch/arm/mach-s3c6410/mach-om-gta03.c +++ b/arch/arm/mach-s3c6410/mach-om-gta03.c @@ -71,6 +71,10 @@ #include #include +extern struct platform_device s3c_device_usbgadget; + + + #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE @@ -573,6 +577,7 @@ static struct platform_device *om_gta03_devices[] __initdata = { &s3c_device_fb, &s3c_device_i2c0, >a03_device_spi_lcm, + &s3c_device_usbgadget, }; @@ -691,8 +696,19 @@ struct platform_device gta03_device_spi_lcm = { }, }; + + + + + + extern void s3c64xx_init_io(struct map_desc *, int); +struct s3c_plat_otg_data s3c_hs_otg_plat_data = { + .phyclk = 2, /* 12MHz osc */ +}; + + static void __init om_gta03_map_io(void) { s3c64xx_init_io(om_gta03_6410_iodesc, ARRAY_SIZE(om_gta03_6410_iodesc)); @@ -704,6 +720,8 @@ static void __init om_gta03_machine_init(void) { s3c_pm_init(); + s3c_device_usbgadget.dev.platform_data = &s3c_hs_otg_plat_data; + s3c_i2c0_set_platdata(NULL); s3c_fb_set_platdata(&om_gta03_lcd_pdata); diff --git a/arch/arm/plat-s3c64xx/Kconfig b/arch/arm/plat-s3c64xx/Kconfig index 54375a00a7d..38c284bbd3f 100644 --- a/arch/arm/plat-s3c64xx/Kconfig +++ b/arch/arm/plat-s3c64xx/Kconfig @@ -19,6 +19,7 @@ config PLAT_S3C64XX select S3C_GPIO_PULL_UPDOWN select S3C_GPIO_CFG_S3C24XX select S3C_GPIO_CFG_S3C64XX + select S3C64XX_SETUP_USBOTG help Base platform code for any Samsung S3C64XX device @@ -59,4 +60,10 @@ config S3C64XX_SETUP_FB_24BPP help Common setup code for S3C64XX with an 24bpp RGB display helper. +config S3C64XX_SETUP_USBOTG + bool + help + Common setup code for S3C64XX with USB OTG + + endif diff --git a/arch/arm/plat-s3c64xx/Makefile b/arch/arm/plat-s3c64xx/Makefile index 12ac7a50ab7..a79c2547aaa 100644 --- a/arch/arm/plat-s3c64xx/Makefile +++ b/arch/arm/plat-s3c64xx/Makefile @@ -35,3 +35,5 @@ obj-$(CONFIG_PM) += irq-pm.o obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o +obj-$(CONFIG_S3C64XX_SETUP_USBOTG) += dev-usbgadget.o + -- cgit v1.2.3