diff options
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index f4f04d87df3..d8f57824423 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | 18 | ||
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include <asm/mach-types.h> | ||
20 | #include <asm/arch/gpmc.h> | 21 | #include <asm/arch/gpmc.h> |
21 | 22 | ||
22 | #undef DEBUG | 23 | #undef DEBUG |
@@ -338,19 +339,13 @@ void __init gpmc_mem_init(void) | |||
338 | int cs; | 339 | int cs; |
339 | unsigned long boot_rom_space = 0; | 340 | unsigned long boot_rom_space = 0; |
340 | 341 | ||
341 | if (cpu_is_omap242x()) { | 342 | /* never allocate the first page, to facilitate bug detection; |
342 | u32 l; | 343 | * even if we didn't boot from ROM. |
343 | l = omap_readl(OMAP242X_CONTROL_STATUS); | 344 | */ |
344 | /* In case of internal boot the 1st MB is redirected to the | 345 | boot_rom_space = BOOT_ROM_SPACE; |
345 | * boot ROM memory space. | 346 | /* In apollon the CS0 is mapped as 0x0000 0000 */ |
346 | */ | 347 | if (machine_is_omap_apollon()) |
347 | if (l & (1 << 3)) | 348 | boot_rom_space = 0; |
348 | boot_rom_space = BOOT_ROM_SPACE; | ||
349 | } else | ||
350 | /* We assume internal boot if the mode can't be | ||
351 | * determined. | ||
352 | */ | ||
353 | boot_rom_space = BOOT_ROM_SPACE; | ||
354 | gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space; | 349 | gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space; |
355 | gpmc_mem_root.end = GPMC_MEM_END; | 350 | gpmc_mem_root.end = GPMC_MEM_END; |
356 | 351 | ||