setup.c (34adb28d500e644cc260da4ceb66ba6dc0beaf93) setup.c (15d45cce3a0e0716fa49c768f887c6406dfb91f7)
1/*
2 * Copyright 2000, 2007-2008 MontaVista Software Inc.
3 * Author: MontaVista Software, Inc. <source@mvista.com
4 *
5 * Updates to 2.6, Pete Popov, Embedded Alley Solutions, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 58 unchanged lines hidden (view full) ---

67 ioport_resource.start = IOPORT_RESOURCE_START;
68 ioport_resource.end = IOPORT_RESOURCE_END;
69 iomem_resource.start = IOMEM_RESOURCE_START;
70 iomem_resource.end = IOMEM_RESOURCE_END;
71}
72
73#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_PCI)
74/* This routine should be valid for all Au1x based boards */
1/*
2 * Copyright 2000, 2007-2008 MontaVista Software Inc.
3 * Author: MontaVista Software, Inc. <source@mvista.com
4 *
5 * Updates to 2.6, Pete Popov, Embedded Alley Solutions, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 58 unchanged lines hidden (view full) ---

67 ioport_resource.start = IOPORT_RESOURCE_START;
68 ioport_resource.end = IOPORT_RESOURCE_END;
69 iomem_resource.start = IOMEM_RESOURCE_START;
70 iomem_resource.end = IOMEM_RESOURCE_END;
71}
72
73#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_PCI)
74/* This routine should be valid for all Au1x based boards */
75phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
75phys_addr_t __fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size)
76{
77 unsigned long start = ALCHEMY_PCI_MEMWIN_START;
78 unsigned long end = ALCHEMY_PCI_MEMWIN_END;
79
80 /* Don't fixup 36-bit addresses */
81 if ((phys_addr >> 32) != 0)
82 return phys_addr;
83
84 /* Check for PCI memory window */
85 if (phys_addr >= start && (phys_addr + size - 1) <= end)
76{
77 unsigned long start = ALCHEMY_PCI_MEMWIN_START;
78 unsigned long end = ALCHEMY_PCI_MEMWIN_END;
79
80 /* Don't fixup 36-bit addresses */
81 if ((phys_addr >> 32) != 0)
82 return phys_addr;
83
84 /* Check for PCI memory window */
85 if (phys_addr >= start && (phys_addr + size - 1) <= end)
86 return (phys_t)(AU1500_PCI_MEM_PHYS_ADDR + phys_addr);
86 return (phys_addr_t)(AU1500_PCI_MEM_PHYS_ADDR + phys_addr);
87
88 /* default nop */
89 return phys_addr;
90}
91EXPORT_SYMBOL(__fixup_bigphys_addr);
92#endif
87
88 /* default nop */
89 return phys_addr;
90}
91EXPORT_SYMBOL(__fixup_bigphys_addr);
92#endif