Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / plat-s5p / dev-ehci.c
blob200abdc9af62dea4987a3eb073aea58554ad3d0d
1 /*
2 * Copyright (C) 2011 Samsung Electronics Co.Ltd
3 * Author: Joonyoung Shim <jy0922.shim@samsung.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
12 #include <linux/platform_device.h>
13 #include <asm/sizes.h>
14 #include <mach/irqs.h>
15 #include <mach/map.h>
16 #include <plat/devs.h>
17 #include <plat/ehci.h>
18 #include <plat/usb-phy.h>
20 /* USB EHCI Host Controller registration */
21 static struct resource s5p_ehci_resource[] = {
22 [0] = {
23 .start = S5P_PA_EHCI,
24 .end = S5P_PA_EHCI + SZ_256 - 1,
25 .flags = IORESOURCE_MEM,
27 [1] = {
28 .start = IRQ_USB_HOST,
29 .end = IRQ_USB_HOST,
30 .flags = IORESOURCE_IRQ,
34 static u64 s5p_device_ehci_dmamask = 0xffffffffUL;
36 struct platform_device s5p_device_ehci = {
37 .name = "s5p-ehci",
38 .id = -1,
39 .num_resources = ARRAY_SIZE(s5p_ehci_resource),
40 .resource = s5p_ehci_resource,
41 .dev = {
42 .dma_mask = &s5p_device_ehci_dmamask,
43 .coherent_dma_mask = 0xffffffffUL
47 void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
49 struct s5p_ehci_platdata *npd;
51 npd = s3c_set_platdata(pd, sizeof(struct s5p_ehci_platdata),
52 &s5p_device_ehci);
54 if (!npd->phy_init)
55 npd->phy_init = s5p_usb_phy_init;
56 if (!npd->phy_exit)
57 npd->phy_exit = s5p_usb_phy_exit;