diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-07-12 16:53:28 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-27 05:42:38 -0400 |
commit | 1dbd30e9890fd69e50b17edd70ca583546b0fe4e (patch) | |
tree | 5b5ab74c1792a81340478f7bbccd053e60a23a5e /arch/arm/mm | |
parent | 07d2a5c721c6aa2bd69812a74c8b3b116abf3e56 (diff) |
ARM: 6225/1: make TCM allocation static and common for all archs
This changes the TCM handling so that a fixed area is reserved at
0xfffe0000-0xfffeffff for TCM. This areas is used by XScale but
XScale does not have TCM so the mechanisms are mutually exclusive.
This change is needed to make TCM detection more dynamic while
still being able to compile code into it, and is a must for the
unified ARM goals: the current TCM allocation at different places
in memory for each machine would be a nightmare if you want to
compile a single image for more than one machine with TCM so it
has to be nailed down in one place.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/init.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 526af48b1271..e00404e6f45b 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -529,6 +529,11 @@ void __init mem_init(void) | |||
529 | { | 529 | { |
530 | unsigned long reserved_pages, free_pages; | 530 | unsigned long reserved_pages, free_pages; |
531 | int i, node; | 531 | int i, node; |
532 | #ifdef CONFIG_HAVE_TCM | ||
533 | /* These pointers are filled in on TCM detection */ | ||
534 | extern u32 dtcm_end; | ||
535 | extern u32 itcm_end; | ||
536 | #endif | ||
532 | 537 | ||
533 | #ifndef CONFIG_DISCONTIGMEM | 538 | #ifndef CONFIG_DISCONTIGMEM |
534 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; | 539 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; |
@@ -612,13 +617,9 @@ void __init mem_init(void) | |||
612 | printk(KERN_NOTICE "Virtual kernel memory layout:\n" | 617 | printk(KERN_NOTICE "Virtual kernel memory layout:\n" |
613 | " vector : 0x%08lx - 0x%08lx (%4ld kB)\n" | 618 | " vector : 0x%08lx - 0x%08lx (%4ld kB)\n" |
614 | #ifdef CONFIG_HAVE_TCM | 619 | #ifdef CONFIG_HAVE_TCM |
615 | #ifdef DTCM_OFFSET | ||
616 | " DTCM : 0x%08lx - 0x%08lx (%4ld kB)\n" | 620 | " DTCM : 0x%08lx - 0x%08lx (%4ld kB)\n" |
617 | #endif | ||
618 | #ifdef ITCM_OFFSET | ||
619 | " ITCM : 0x%08lx - 0x%08lx (%4ld kB)\n" | 621 | " ITCM : 0x%08lx - 0x%08lx (%4ld kB)\n" |
620 | #endif | 622 | #endif |
621 | #endif | ||
622 | " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" | 623 | " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" |
623 | #ifdef CONFIG_MMU | 624 | #ifdef CONFIG_MMU |
624 | " DMA : 0x%08lx - 0x%08lx (%4ld MB)\n" | 625 | " DMA : 0x%08lx - 0x%08lx (%4ld MB)\n" |
@@ -636,12 +637,8 @@ void __init mem_init(void) | |||
636 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + | 637 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + |
637 | (PAGE_SIZE)), | 638 | (PAGE_SIZE)), |
638 | #ifdef CONFIG_HAVE_TCM | 639 | #ifdef CONFIG_HAVE_TCM |
639 | #ifdef DTCM_OFFSET | 640 | MLK(DTCM_OFFSET, (unsigned long) dtcm_end), |
640 | MLK(UL(DTCM_OFFSET), UL(DTCM_END + 1)), | 641 | MLK(ITCM_OFFSET, (unsigned long) itcm_end), |
641 | #endif | ||
642 | #ifdef ITCM_OFFSET | ||
643 | MLK(UL(ITCM_OFFSET), UL(ITCM_END + 1)), | ||
644 | #endif | ||
645 | #endif | 642 | #endif |
646 | MLK(FIXADDR_START, FIXADDR_TOP), | 643 | MLK(FIXADDR_START, FIXADDR_TOP), |
647 | #ifdef CONFIG_MMU | 644 | #ifdef CONFIG_MMU |