diff options
Diffstat (limited to 'arch/mips/momentum/ocelot_c/setup.c')
-rw-r--r-- | arch/mips/momentum/ocelot_c/setup.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c index 9c0c462af650..0b6b2338cfb4 100644 --- a/arch/mips/momentum/ocelot_c/setup.c +++ b/arch/mips/momentum/ocelot_c/setup.c | |||
@@ -69,8 +69,7 @@ | |||
69 | #include "ocelot_c_fpga.h" | 69 | #include "ocelot_c_fpga.h" |
70 | 70 | ||
71 | unsigned long marvell_base; | 71 | unsigned long marvell_base; |
72 | extern unsigned long mv64340_sram_base; | 72 | unsigned int cpu_clock; |
73 | unsigned long cpu_clock; | ||
74 | 73 | ||
75 | /* These functions are used for rebooting or halting the machine*/ | 74 | /* These functions are used for rebooting or halting the machine*/ |
76 | extern void momenco_ocelot_restart(char *command); | 75 | extern void momenco_ocelot_restart(char *command); |
@@ -119,7 +118,6 @@ void PMON_v2_setup(void) | |||
119 | add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M); | 118 | add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M); |
120 | 119 | ||
121 | marvell_base = 0xfffffffff4000000; | 120 | marvell_base = 0xfffffffff4000000; |
122 | mv64340_sram_base = 0xfffffffffe000000; | ||
123 | #else | 121 | #else |
124 | /* marvell and extra space */ | 122 | /* marvell and extra space */ |
125 | add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K); | 123 | add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K); |
@@ -129,7 +127,6 @@ void PMON_v2_setup(void) | |||
129 | add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M); | 127 | add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M); |
130 | 128 | ||
131 | marvell_base = 0xf4000000; | 129 | marvell_base = 0xf4000000; |
132 | mv64340_sram_base = 0xfe000000; | ||
133 | #endif | 130 | #endif |
134 | } | 131 | } |
135 | 132 | ||
@@ -346,22 +343,20 @@ void __init plat_mem_setup(void) | |||
346 | } | 343 | } |
347 | } | 344 | } |
348 | 345 | ||
349 | #ifndef CONFIG_64BIT | 346 | /* |
350 | /* This needs to be one of the first initcalls, because no I/O port access | 347 | * This needs to be one of the first initcalls, because no I/O port access |
351 | can work before this */ | 348 | * can work before this |
349 | */ | ||
352 | static int io_base_ioremap(void) | 350 | static int io_base_ioremap(void) |
353 | { | 351 | { |
354 | /* we're mapping PCI accesses from 0xc0000000 to 0xf0000000 */ | 352 | void __iomem * io_remap_range = ioremap(0xc0000000UL, 0x10000); |
355 | void *io_remap_range = ioremap(0xc0000000, 0x30000000); | ||
356 | 353 | ||
357 | if (!io_remap_range) { | 354 | if (!io_remap_range) |
358 | panic("Could not ioremap I/O port range"); | 355 | panic("Could not ioremap I/O port range"); |
359 | } | 356 | |
360 | printk("io_remap_range set at 0x%08x\n", (uint32_t)io_remap_range); | 357 | set_io_port_base((unsigned long) io_remap_range); |
361 | set_io_port_base(io_remap_range - 0xc0000000); | ||
362 | 358 | ||
363 | return 0; | 359 | return 0; |
364 | } | 360 | } |
365 | 361 | ||
366 | module_init(io_base_ioremap); | 362 | module_init(io_base_ioremap); |
367 | #endif | ||