diff options
Diffstat (limited to 'arch/arm/mach-orion/common.c')
-rw-r--r-- | arch/arm/mach-orion/common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c index 5f0ee4b8a9b7..2d6d413f0235 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" |
@@ -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 | */ | ||
357 | void __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 | } | ||