aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 07:32:49 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:11:33 -0400
commit4fcd3f374a928081d391cd9a570afe3b2c692fdc (patch)
tree04359735b7e279174e8d183c9d87906472fc0987 /arch/arm/mach-kirkwood
parentee9627234dae8d1b8059b2ac39c961ee0932b803 (diff)
ARM: orion: Consolidate USB platform setup code.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/common.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 7c2b5df4aa1c..9e56cbb19184 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -26,7 +26,6 @@
26#include <mach/bridge-regs.h> 26#include <mach/bridge-regs.h>
27#include <plat/audio.h> 27#include <plat/audio.h>
28#include <plat/cache-feroceon-l2.h> 28#include <plat/cache-feroceon-l2.h>
29#include <plat/ehci-orion.h>
30#include <plat/mvsdio.h> 29#include <plat/mvsdio.h>
31#include <plat/orion_nand.h> 30#include <plat/orion_nand.h>
32#include <plat/common.h> 31#include <plat/common.h>
@@ -69,47 +68,13 @@ unsigned int kirkwood_clk_ctrl = CGC_DUNIT | CGC_RESERVED;
69 68
70 69
71/***************************************************************************** 70/*****************************************************************************
72 * EHCI
73 ****************************************************************************/
74static struct orion_ehci_data kirkwood_ehci_data = {
75 .dram = &kirkwood_mbus_dram_info,
76 .phy_version = EHCI_PHY_NA,
77};
78
79static u64 ehci_dmamask = DMA_BIT_MASK(32);
80
81
82/*****************************************************************************
83 * EHCI0 71 * EHCI0
84 ****************************************************************************/ 72 ****************************************************************************/
85static struct resource kirkwood_ehci_resources[] = {
86 {
87 .start = USB_PHYS_BASE,
88 .end = USB_PHYS_BASE + SZ_4K - 1,
89 .flags = IORESOURCE_MEM,
90 }, {
91 .start = IRQ_KIRKWOOD_USB,
92 .end = IRQ_KIRKWOOD_USB,
93 .flags = IORESOURCE_IRQ,
94 },
95};
96
97static struct platform_device kirkwood_ehci = {
98 .name = "orion-ehci",
99 .id = 0,
100 .dev = {
101 .dma_mask = &ehci_dmamask,
102 .coherent_dma_mask = DMA_BIT_MASK(32),
103 .platform_data = &kirkwood_ehci_data,
104 },
105 .resource = kirkwood_ehci_resources,
106 .num_resources = ARRAY_SIZE(kirkwood_ehci_resources),
107};
108
109void __init kirkwood_ehci_init(void) 73void __init kirkwood_ehci_init(void)
110{ 74{
111 kirkwood_clk_ctrl |= CGC_USB0; 75 kirkwood_clk_ctrl |= CGC_USB0;
112 platform_device_register(&kirkwood_ehci); 76 orion_ehci_init(&kirkwood_mbus_dram_info,
77 USB_PHYS_BASE, IRQ_KIRKWOOD_USB);
113} 78}
114 79
115 80