upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / plat-s5p / dev-usb.c
1 /*
2  * linux/arch/arm/plat-s5p/dev-usb.c
3  *
4  * Copyright (C) 2010 Samsung Electronics Co.Ltd
5  * Author: Joonyoung Shim <jy0922.shim@samsung.com>
6  *
7  *  This program is free software; you can redistribute  it and/or modify it
8  *  under  the terms of  the GNU General  Public License as published by the
9  *  Free Software Foundation;  either version 2 of the  License, or (at your
10  *  option) any later version.
11  *
12  */
13
14 #include <linux/platform_device.h>
15 #include <mach/irqs.h>
16 #include <mach/map.h>
17 #include <plat/devs.h>
18 #include <plat/usb_ehci.h>
19
20 /* USB Host Controlle EHCI registrations */
21 static struct resource s5p_usb_ehci_resource[] = {
22         [0] = {
23                 .start  = S5P_PA_USB_EHCI,
24                 .end    = S5P_PA_USB_EHCI + S5P_SZ_USB_EHCI - 1,
25                 .flags  = IORESOURCE_MEM,
26         },
27         [1] = {
28                 .start  = IRQ_UHOST,
29                 .end    = IRQ_UHOST,
30                 .flags  = IORESOURCE_IRQ,
31         }
32 };
33
34 static u64 s5p_device_usb_ehci_dmamask = 0xffffffffUL;
35
36 struct platform_device s5p_device_usb_ehci = {
37         .name           = "s5p-ehci",
38         .id             = -1,
39         .num_resources  = ARRAY_SIZE(s5p_usb_ehci_resource),
40         .resource       = s5p_usb_ehci_resource,
41         .dev            = {
42                 .dma_mask = &s5p_device_usb_ehci_dmamask,
43                 .coherent_dma_mask = 0xffffffffUL
44         }
45 };
46
47 void __init s5p_usb_ehci_set_platdata(struct s5p_usb_ehci_platdata *pd)
48 {
49         s3c_set_platdata(pd, sizeof(struct s5p_usb_ehci_platdata),
50                         &s5p_device_usb_ehci);
51 }