--- zzzz-none-000/linux-2.6.19.2/arch/mips/momentum/ocelot_c/setup.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/mips/momentum/ocelot_c/setup.c 2007-01-11 07:38:19.000000000 +0000 @@ -69,7 +69,8 @@ #include "ocelot_c_fpga.h" unsigned long marvell_base; -unsigned int cpu_clock; +extern unsigned long mv64340_sram_base; +unsigned long cpu_clock; /* These functions are used for rebooting or halting the machine*/ extern void momenco_ocelot_restart(char *command); @@ -118,6 +119,7 @@ add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M); marvell_base = 0xfffffffff4000000; + mv64340_sram_base = 0xfffffffffe000000; #else /* marvell and extra space */ add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xf4000000, PM_64K); @@ -127,6 +129,7 @@ add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M); marvell_base = 0xf4000000; + mv64340_sram_base = 0xfe000000; #endif } @@ -343,20 +346,22 @@ } } -/* - * This needs to be one of the first initcalls, because no I/O port access - * can work before this - */ +#ifndef CONFIG_64BIT +/* This needs to be one of the first initcalls, because no I/O port access + can work before this */ static int io_base_ioremap(void) { - void __iomem * io_remap_range = ioremap(0xc0000000UL, 0x10000); + /* we're mapping PCI accesses from 0xc0000000 to 0xf0000000 */ + void *io_remap_range = ioremap(0xc0000000, 0x30000000); - if (!io_remap_range) + if (!io_remap_range) { panic("Could not ioremap I/O port range"); - - set_io_port_base((unsigned long) io_remap_range); + } + printk("io_remap_range set at 0x%08x\n", (uint32_t)io_remap_range); + set_io_port_base(io_remap_range - 0xc0000000); return 0; } module_init(io_base_ioremap); +#endif