Skip to content

Commit

Permalink
[MIPS] Ocelot C: Fix mapping of ioport address range.
Browse files Browse the repository at this point in the history
 o Fix warnings
 o 768MB worth of I/O ports were insane
 o 64-bit kernels don't need special handling because ioremap does the magic

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Nov 6, 2006
1 parent 2002d2b commit ad0b365
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions arch/mips/momentum/ocelot_c/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,25 +344,23 @@ void __init plat_mem_setup(void)
}
}

#ifndef CONFIG_64BIT
/* This needs to be one of the first initcalls, because no I/O port access
can work before this */
/*
* 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)
{
/* we're mapping PCI accesses from 0xc0000000 to 0xf0000000 */
void *io_remap_range = ioremap(0xc0000000, 0x30000000);
void __iomem * io_remap_range = ioremap(0xc0000000UL, 0x10000);

if (!io_remap_range) {
if (!io_remap_range)
panic("Could not ioremap I/O port range");
}
printk("io_remap_range set at 0x%08x\n", (uint32_t)io_remap_range);
set_io_port_base(io_remap_range - 0xc0000000);

set_io_port_base((unsigned long) io_remap_range);

return 0;
}

module_init(io_base_ioremap);
#endif

#if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)

Expand Down

0 comments on commit ad0b365

Please sign in to comment.