2 * arch/ppc/syslib/ibm44x_common.c
4 * PPC44x system library
6 * Matt Porter <mporter@mvista.com>
7 * Copyright 2002-2003 MontaVista Software Inc.
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
15 #include <linux/config.h>
16 #include <linux/types.h>
17 #include <asm/ibm44x.h>
20 phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
22 phys_addr_t page_4gb = 0;
25 * Trap the least significant 32-bit portions of an
26 * address in the 440's 36-bit address space. Fix
27 * them up with the appropriate ERPN
29 if ((addr >= PPC44x_IO_LO) && (addr < PPC44x_IO_HI))
30 page_4gb = PPC44x_IO_PAGE;
31 else if ((addr >= PPC44x_PCICFG_LO) && (addr < PPC44x_PCICFG_HI))
32 page_4gb = PPC44x_PCICFG_PAGE;
33 else if ((addr >= PPC44x_PCIMEM_LO) && (addr < PPC44x_PCIMEM_HI))
34 page_4gb = PPC44x_PCIMEM_PAGE;
36 return (page_4gb | addr);