Commit | Line | Data |
---|---|---|
6e7eb170 JH |
1 | /* linux/arch/arm/mach-exynos/dev-ohci.c |
2 | * | |
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | |
4 | * http://www.samsung.com | |
5 | * | |
6 | * EXYNOS - OHCI support | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License version 2 as | |
10 | * published by the Free Software Foundation. | |
11 | */ | |
12 | ||
13 | #include <linux/dma-mapping.h> | |
14 | #include <linux/platform_device.h> | |
15 | ||
16 | #include <mach/irqs.h> | |
17 | #include <mach/map.h> | |
436d42c6 | 18 | #include <linux/platform_data/usb-exynos.h> |
6e7eb170 JH |
19 | |
20 | #include <plat/devs.h> | |
21 | #include <plat/usb-phy.h> | |
22 | ||
23 | static struct resource exynos4_ohci_resource[] = { | |
24 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_OHCI, SZ_256), | |
25 | [1] = DEFINE_RES_IRQ(IRQ_USB_HOST), | |
26 | }; | |
27 | ||
28 | static u64 exynos4_ohci_dma_mask = DMA_BIT_MASK(32); | |
29 | ||
30 | struct platform_device exynos4_device_ohci = { | |
31 | .name = "exynos-ohci", | |
32 | .id = -1, | |
33 | .num_resources = ARRAY_SIZE(exynos4_ohci_resource), | |
34 | .resource = exynos4_ohci_resource, | |
35 | .dev = { | |
36 | .dma_mask = &exynos4_ohci_dma_mask, | |
37 | .coherent_dma_mask = DMA_BIT_MASK(32), | |
38 | } | |
39 | }; | |
40 | ||
41 | void __init exynos4_ohci_set_platdata(struct exynos4_ohci_platdata *pd) | |
42 | { | |
43 | struct exynos4_ohci_platdata *npd; | |
44 | ||
45 | npd = s3c_set_platdata(pd, sizeof(struct exynos4_ohci_platdata), | |
46 | &exynos4_device_ohci); | |
47 | ||
48 | if (!npd->phy_init) | |
49 | npd->phy_init = s5p_usb_phy_init; | |
50 | if (!npd->phy_exit) | |
51 | npd->phy_exit = s5p_usb_phy_exit; | |
52 | } |