diff options
author | Apelete Seketeli <apelete@seketeli.net> | 2013-12-19 16:11:43 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-24 16:39:46 -0500 |
commit | c330fd90b1b8fa6a8152de27f1252432e39f2dc0 (patch) | |
tree | 940bb5330d6b421ce5482aab31730155754e0278 /arch/mips/jz4740/platform.c | |
parent | 14a17836ca6891dfe3ff90f9a1f4528480e64a9b (diff) |
MIPS: jz4740: update platform data for JZ4740 usb device controller
The platform data already available in tree for JZ4740 USB Device
Controller was previously used by an out-of-tree USB gadget driver
which was not relying on the musb driver and was written by Ingenic
and the Qi-Hardware community.
Update platform data for JZ4740 USB device controller to be used with
musb driver.
Signed-off-by: Apelete Seketeli <apelete@seketeli.net>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6265/
Diffstat (limited to 'arch/mips/jz4740/platform.c')
-rw-r--r-- | arch/mips/jz4740/platform.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c index df65677f3d0b..1be41e2a685d 100644 --- a/arch/mips/jz4740/platform.c +++ b/arch/mips/jz4740/platform.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | 23 | ||
24 | #include <linux/usb/musb.h> | ||
25 | |||
24 | #include <asm/mach-jz4740/platform.h> | 26 | #include <asm/mach-jz4740/platform.h> |
25 | #include <asm/mach-jz4740/base.h> | 27 | #include <asm/mach-jz4740/base.h> |
26 | #include <asm/mach-jz4740/irq.h> | 28 | #include <asm/mach-jz4740/irq.h> |
@@ -56,29 +58,35 @@ struct platform_device jz4740_usb_ohci_device = { | |||
56 | .resource = jz4740_usb_ohci_resources, | 58 | .resource = jz4740_usb_ohci_resources, |
57 | }; | 59 | }; |
58 | 60 | ||
59 | /* UDC (USB gadget controller) */ | 61 | /* USB Device Controller */ |
60 | static struct resource jz4740_usb_gdt_resources[] = { | 62 | struct platform_device jz4740_udc_xceiv_device = { |
61 | { | 63 | .name = "usb_phy_gen_xceiv", |
62 | .start = JZ4740_UDC_BASE_ADDR, | 64 | .id = 0, |
63 | .end = JZ4740_UDC_BASE_ADDR + 0x1000 - 1, | 65 | }; |
64 | .flags = IORESOURCE_MEM, | 66 | |
67 | static struct resource jz4740_udc_resources[] = { | ||
68 | [0] = { | ||
69 | .start = JZ4740_UDC_BASE_ADDR, | ||
70 | .end = JZ4740_UDC_BASE_ADDR + 0x10000 - 1, | ||
71 | .flags = IORESOURCE_MEM, | ||
65 | }, | 72 | }, |
66 | { | 73 | [1] = { |
67 | .start = JZ4740_IRQ_UDC, | 74 | .start = JZ4740_IRQ_UDC, |
68 | .end = JZ4740_IRQ_UDC, | 75 | .end = JZ4740_IRQ_UDC, |
69 | .flags = IORESOURCE_IRQ, | 76 | .flags = IORESOURCE_IRQ, |
77 | .name = "mc", | ||
70 | }, | 78 | }, |
71 | }; | 79 | }; |
72 | 80 | ||
73 | struct platform_device jz4740_udc_device = { | 81 | struct platform_device jz4740_udc_device = { |
74 | .name = "jz-udc", | 82 | .name = "musb-jz4740", |
75 | .id = -1, | 83 | .id = -1, |
76 | .dev = { | 84 | .dev = { |
77 | .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, | 85 | .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, |
78 | .coherent_dma_mask = DMA_BIT_MASK(32), | 86 | .coherent_dma_mask = DMA_BIT_MASK(32), |
79 | }, | 87 | }, |
80 | .num_resources = ARRAY_SIZE(jz4740_usb_gdt_resources), | 88 | .num_resources = ARRAY_SIZE(jz4740_udc_resources), |
81 | .resource = jz4740_usb_gdt_resources, | 89 | .resource = jz4740_udc_resources, |
82 | }; | 90 | }; |
83 | 91 | ||
84 | /* MMC/SD controller */ | 92 | /* MMC/SD controller */ |