aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/devs.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.ab@samsung.com>2011-05-07 16:26:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-10 17:16:54 -0400
commit4a98f590659113f72c021201781d5b83bc743a7c (patch)
tree791dfc7cbb9d8b10d52745e0c4c8566d6d7bc7aa /arch/arm/plat-s3c24xx/devs.c
parent0a94c6b121c58692a9b6cbe2cd9a26ffdc2c4a82 (diff)
ARM: S3C24XX: Add plaform device definition for USB High-Speed gadget controller.
S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget controller module. This patch adds the following for supporting this controller. 1. Definition for USB High-Speed controller base address. 2. Platform device instantiation. 3. Declaration for platform data structure. 4. Functionality to setup platform data for the controller. 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/plat-s3c24xx/devs.c')
-rw-r--r--arch/arm/plat-s3c24xx/devs.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 268f3ed0a105..73667994518a 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/string.h> 24#include <linux/string.h>
25#include <linux/dma-mapping.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -233,6 +234,46 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
233 } 234 }
234} 235}
235 236
237/* USB High Speed 2.0 Device (Gadget) */
238static struct resource s3c_hsudc_resource[] = {
239 [0] = {
240 .start = S3C2416_PA_HSUDC,
241 .end = S3C2416_PA_HSUDC + S3C2416_SZ_HSUDC - 1,
242 .flags = IORESOURCE_MEM,
243 },
244 [1] = {
245 .start = IRQ_USBD,
246 .end = IRQ_USBD,
247 .flags = IORESOURCE_IRQ,
248 }
249};
250
251static u64 s3c_hsudc_dmamask = DMA_BIT_MASK(32);
252
253struct platform_device s3c_device_usb_hsudc = {
254 .name = "s3c-hsudc",
255 .id = -1,
256 .num_resources = ARRAY_SIZE(s3c_hsudc_resource),
257 .resource = s3c_hsudc_resource,
258 .dev = {
259 .dma_mask = &s3c_hsudc_dmamask,
260 .coherent_dma_mask = DMA_BIT_MASK(32),
261 },
262};
263
264void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
265{
266 struct s3c24xx_hsudc_platdata *npd;
267
268 npd = kmalloc(sizeof(*npd), GFP_KERNEL);
269 if (npd) {
270 memcpy(npd, pd, sizeof(*npd));
271 s3c_device_usb_hsudc.dev.platform_data = npd;
272 } else {
273 printk(KERN_ERR "no memory for udc platform data\n");
274 }
275}
276
236/* IIS */ 277/* IIS */
237 278
238static struct resource s3c_iis_resource[] = { 279static struct resource s3c_iis_resource[] = {