aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-orion/common.c')
-rw-r--r--arch/arm/mach-orion/common.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index 5f0ee4b8a9b7..bbc2b4ec932c 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -17,7 +17,9 @@
17#include <linux/mv643xx_eth.h> 17#include <linux/mv643xx_eth.h>
18#include <linux/mv643xx_i2c.h> 18#include <linux/mv643xx_i2c.h>
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/setup.h>
20#include <asm/timex.h> 21#include <asm/timex.h>
22#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 23#include <asm/mach/map.h>
22#include <asm/arch/hardware.h> 24#include <asm/arch/hardware.h>
23#include "common.h" 25#include "common.h"
@@ -177,8 +179,8 @@ static struct platform_device orion_ehci1 = {
177 179
178static struct resource orion_eth_shared_resources[] = { 180static struct resource orion_eth_shared_resources[] = {
179 { 181 {
180 .start = ORION_ETH_PHYS_BASE, 182 .start = ORION_ETH_PHYS_BASE + 0x2000,
181 .end = ORION_ETH_PHYS_BASE + 0xffff, 183 .end = ORION_ETH_PHYS_BASE + 0x3fff,
182 .flags = IORESOURCE_MEM, 184 .flags = IORESOURCE_MEM,
183 }, 185 },
184}; 186};
@@ -347,3 +349,21 @@ void __init orion_init(void)
347 platform_device_register(&orion_ehci1); 349 platform_device_register(&orion_ehci1);
348 platform_device_register(&orion_i2c); 350 platform_device_register(&orion_i2c);
349} 351}
352
353/*
354 * Many orion-based systems have buggy bootloader implementations.
355 * This is a common fixup for bogus memory tags.
356 */
357void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t,
358 char **from, struct meminfo *meminfo)
359{
360 for (; t->hdr.size; t = tag_next(t))
361 if (t->hdr.tag == ATAG_MEM &&
362 (!t->u.mem.size || t->u.mem.size & ~PAGE_MASK ||
363 t->u.mem.start & ~PAGE_MASK)) {
364 printk(KERN_WARNING
365 "Clearing invalid memory bank %dKB@0x%08x\n",
366 t->u.mem.size / 1024, t->u.mem.start);
367 t->hdr.tag = 0;
368 }
369}