diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:49 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:11:33 -0400 |
commit | 4fcd3f374a928081d391cd9a570afe3b2c692fdc (patch) | |
tree | 04359735b7e279174e8d183c9d87906472fc0987 /arch/arm/mach-orion5x/common.c | |
parent | ee9627234dae8d1b8059b2ac39c961ee0932b803 (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-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 66 |
1 files changed, 4 insertions, 62 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 5c7e39164c5e..2132eafa7ccc 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <mach/bridge-regs.h> | 28 | #include <mach/bridge-regs.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/orion5x.h> | 30 | #include <mach/orion5x.h> |
31 | #include <plat/ehci-orion.h> | ||
32 | #include <plat/orion_nand.h> | 31 | #include <plat/orion_nand.h> |
33 | #include <plat/time.h> | 32 | #include <plat/time.h> |
34 | #include <plat/common.h> | 33 | #include <plat/common.h> |
@@ -68,79 +67,22 @@ void __init orion5x_map_io(void) | |||
68 | 67 | ||
69 | 68 | ||
70 | /***************************************************************************** | 69 | /***************************************************************************** |
71 | * EHCI | ||
72 | ****************************************************************************/ | ||
73 | static struct orion_ehci_data orion5x_ehci_data = { | ||
74 | .dram = &orion5x_mbus_dram_info, | ||
75 | .phy_version = EHCI_PHY_ORION, | ||
76 | }; | ||
77 | |||
78 | static u64 ehci_dmamask = DMA_BIT_MASK(32); | ||
79 | |||
80 | |||
81 | /***************************************************************************** | ||
82 | * EHCI0 | 70 | * EHCI0 |
83 | ****************************************************************************/ | 71 | ****************************************************************************/ |
84 | static struct resource orion5x_ehci0_resources[] = { | ||
85 | { | ||
86 | .start = ORION5X_USB0_PHYS_BASE, | ||
87 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, { | ||
90 | .start = IRQ_ORION5X_USB0_CTRL, | ||
91 | .end = IRQ_ORION5X_USB0_CTRL, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | static struct platform_device orion5x_ehci0 = { | ||
97 | .name = "orion-ehci", | ||
98 | .id = 0, | ||
99 | .dev = { | ||
100 | .dma_mask = &ehci_dmamask, | ||
101 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
102 | .platform_data = &orion5x_ehci_data, | ||
103 | }, | ||
104 | .resource = orion5x_ehci0_resources, | ||
105 | .num_resources = ARRAY_SIZE(orion5x_ehci0_resources), | ||
106 | }; | ||
107 | |||
108 | void __init orion5x_ehci0_init(void) | 72 | void __init orion5x_ehci0_init(void) |
109 | { | 73 | { |
110 | platform_device_register(&orion5x_ehci0); | 74 | orion_ehci_init(&orion5x_mbus_dram_info, |
75 | ORION5X_USB0_PHYS_BASE, IRQ_ORION5X_USB0_CTRL); | ||
111 | } | 76 | } |
112 | 77 | ||
113 | 78 | ||
114 | /***************************************************************************** | 79 | /***************************************************************************** |
115 | * EHCI1 | 80 | * EHCI1 |
116 | ****************************************************************************/ | 81 | ****************************************************************************/ |
117 | static struct resource orion5x_ehci1_resources[] = { | ||
118 | { | ||
119 | .start = ORION5X_USB1_PHYS_BASE, | ||
120 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, | ||
121 | .flags = IORESOURCE_MEM, | ||
122 | }, { | ||
123 | .start = IRQ_ORION5X_USB1_CTRL, | ||
124 | .end = IRQ_ORION5X_USB1_CTRL, | ||
125 | .flags = IORESOURCE_IRQ, | ||
126 | }, | ||
127 | }; | ||
128 | |||
129 | static struct platform_device orion5x_ehci1 = { | ||
130 | .name = "orion-ehci", | ||
131 | .id = 1, | ||
132 | .dev = { | ||
133 | .dma_mask = &ehci_dmamask, | ||
134 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
135 | .platform_data = &orion5x_ehci_data, | ||
136 | }, | ||
137 | .resource = orion5x_ehci1_resources, | ||
138 | .num_resources = ARRAY_SIZE(orion5x_ehci1_resources), | ||
139 | }; | ||
140 | |||
141 | void __init orion5x_ehci1_init(void) | 82 | void __init orion5x_ehci1_init(void) |
142 | { | 83 | { |
143 | platform_device_register(&orion5x_ehci1); | 84 | orion_ehci_1_init(&orion5x_mbus_dram_info, |
85 | ORION5X_USB1_PHYS_BASE, IRQ_ORION5X_USB1_CTRL); | ||
144 | } | 86 | } |
145 | 87 | ||
146 | 88 | ||