diff options
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index d068f1431c40..8e468e3a6015 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/platform_data/usb-ehci-orion.h> | 34 | #include <linux/platform_data/usb-ehci-orion.h> |
35 | #include <plat/time.h> | 35 | #include <plat/time.h> |
36 | #include <plat/common.h> | 36 | #include <plat/common.h> |
37 | #include <plat/addr-map.h> | ||
38 | #include "common.h" | 37 | #include "common.h" |
39 | 38 | ||
40 | /***************************************************************************** | 39 | /***************************************************************************** |
@@ -174,7 +173,8 @@ void __init orion5x_xor_init(void) | |||
174 | ****************************************************************************/ | 173 | ****************************************************************************/ |
175 | static void __init orion5x_crypto_init(void) | 174 | static void __init orion5x_crypto_init(void) |
176 | { | 175 | { |
177 | orion5x_setup_sram_win(); | 176 | mvebu_mbus_add_window("sram", ORION5X_SRAM_PHYS_BASE, |
177 | ORION5X_SRAM_SIZE); | ||
178 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, | 178 | orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, |
179 | SZ_8K, IRQ_ORION5X_CESA); | 179 | SZ_8K, IRQ_ORION5X_CESA); |
180 | } | 180 | } |
@@ -193,6 +193,9 @@ void __init orion5x_wdt_init(void) | |||
193 | ****************************************************************************/ | 193 | ****************************************************************************/ |
194 | void __init orion5x_init_early(void) | 194 | void __init orion5x_init_early(void) |
195 | { | 195 | { |
196 | u32 rev, dev; | ||
197 | const char *mbus_soc_name; | ||
198 | |||
196 | orion_time_set_base(TIMER_VIRT_BASE); | 199 | orion_time_set_base(TIMER_VIRT_BASE); |
197 | 200 | ||
198 | /* | 201 | /* |
@@ -201,6 +204,46 @@ void __init orion5x_init_early(void) | |||
201 | * the allocations won't fail. | 204 | * the allocations won't fail. |
202 | */ | 205 | */ |
203 | init_dma_coherent_pool_size(SZ_1M); | 206 | init_dma_coherent_pool_size(SZ_1M); |
207 | |||
208 | /* Initialize the MBUS driver */ | ||
209 | orion5x_pcie_id(&dev, &rev); | ||
210 | if (dev == MV88F5281_DEV_ID) | ||
211 | mbus_soc_name = "marvell,orion5x-88f5281-mbus"; | ||
212 | else if (dev == MV88F5182_DEV_ID) | ||
213 | mbus_soc_name = "marvell,orion5x-88f5182-mbus"; | ||
214 | else if (dev == MV88F5181_DEV_ID) | ||
215 | mbus_soc_name = "marvell,orion5x-88f5181-mbus"; | ||
216 | else if (dev == MV88F6183_DEV_ID) | ||
217 | mbus_soc_name = "marvell,orion5x-88f6183-mbus"; | ||
218 | else | ||
219 | mbus_soc_name = NULL; | ||
220 | mvebu_mbus_init(mbus_soc_name, ORION5X_BRIDGE_WINS_BASE, | ||
221 | ORION5X_BRIDGE_WINS_SZ, | ||
222 | ORION5X_DDR_WINS_BASE, ORION5X_DDR_WINS_SZ); | ||
223 | } | ||
224 | |||
225 | void orion5x_setup_wins(void) | ||
226 | { | ||
227 | /* | ||
228 | * The PCIe windows will no longer be statically allocated | ||
229 | * here once Orion5x is migrated to the pci-mvebu driver. | ||
230 | */ | ||
231 | mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_IO_PHYS_BASE, | ||
232 | ORION5X_PCIE_IO_SIZE, | ||
233 | ORION5X_PCIE_IO_BUS_BASE, | ||
234 | MVEBU_MBUS_PCI_IO); | ||
235 | mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_MEM_PHYS_BASE, | ||
236 | ORION5X_PCIE_MEM_SIZE, | ||
237 | MVEBU_MBUS_NO_REMAP, | ||
238 | MVEBU_MBUS_PCI_MEM); | ||
239 | mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_IO_PHYS_BASE, | ||
240 | ORION5X_PCI_IO_SIZE, | ||
241 | ORION5X_PCI_IO_BUS_BASE, | ||
242 | MVEBU_MBUS_PCI_IO); | ||
243 | mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_MEM_PHYS_BASE, | ||
244 | ORION5X_PCI_MEM_SIZE, | ||
245 | MVEBU_MBUS_NO_REMAP, | ||
246 | MVEBU_MBUS_PCI_MEM); | ||
204 | } | 247 | } |
205 | 248 | ||
206 | int orion5x_tclk; | 249 | int orion5x_tclk; |
@@ -282,7 +325,7 @@ void __init orion5x_init(void) | |||
282 | /* | 325 | /* |
283 | * Setup Orion address map | 326 | * Setup Orion address map |
284 | */ | 327 | */ |
285 | orion5x_setup_cpu_mbus_bridge(); | 328 | orion5x_setup_wins(); |
286 | 329 | ||
287 | /* Setup root of clk tree */ | 330 | /* Setup root of clk tree */ |
288 | clk_init(); | 331 | clk_init(); |