Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / plat-samsung / dev-usb.c
blob9e13a54aff92c949c8153494846661e18a6b05ec
1 /* linux/arch/arm/plat-s3c/dev-usb.c
3 * Copyright 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
7 * S3C series device definition for USB host
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/gfp.h>
15 #include <linux/kernel.h>
16 #include <linux/string.h>
17 #include <linux/platform_device.h>
18 #include <linux/export.h>
20 #include <mach/irqs.h>
21 #include <mach/map.h>
23 #include <plat/devs.h>
24 #include <plat/usb-control.h>
26 static struct resource s3c_usb_resource[] = {
27 [0] = {
28 .start = S3C_PA_USBHOST,
29 .end = S3C_PA_USBHOST + 0x100 - 1,
30 .flags = IORESOURCE_MEM,
32 [1] = {
33 .start = IRQ_USBH,
34 .end = IRQ_USBH,
35 .flags = IORESOURCE_IRQ,
39 static u64 s3c_device_usb_dmamask = 0xffffffffUL;
41 struct platform_device s3c_device_ohci = {
42 .name = "s3c2410-ohci",
43 .id = -1,
44 .num_resources = ARRAY_SIZE(s3c_usb_resource),
45 .resource = s3c_usb_resource,
46 .dev = {
47 .dma_mask = &s3c_device_usb_dmamask,
48 .coherent_dma_mask = 0xffffffffUL
52 EXPORT_SYMBOL(s3c_device_ohci);
54 /**
55 * s3c_ohci_set_platdata - initialise OHCI device platform data
56 * @info: The platform data.
58 * This call copies the @info passed in and sets the device .platform_data
59 * field to that copy. The @info is copied so that the original can be marked
60 * __initdata.
62 void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
64 s3c_set_platdata(info, sizeof(struct s3c2410_hcd_info),
65 &s3c_device_ohci);