enable TCM
author黄涛 <huangtao@rock-chips.com>
Mon, 10 May 2010 08:46:32 +0000 (08:46 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:34:49 +0000 (13:34 +0800)
arch/arm/Kconfig
arch/arm/mach-rk2818/board-midsdk.c
arch/arm/mach-rk2818/include/mach/memory.h
arch/arm/mm/init.c

index b252195a9708bb8002e50d88b935627f2b854ac6..270b2c28b2c79576748c27e2b18871c1be332b78 100644 (file)
@@ -705,6 +705,7 @@ config ARCH_RK2818
         bool "Rockchip soc rk2818"
         select CPU_ARM926T
         select CPU_CP15_MMU
+       select HAVE_TCM
        select HAVE_CLK
        select COMMON_CLKDEV
         select GENERIC_TIME
index 36ef1d27cb1fb977c95d220241e3040bc1917d65..0b69e57183e6b28e70078a97a1a5911c37f67c89 100644 (file)
@@ -129,14 +129,7 @@ static struct map_desc rk2818_io_desc[] __initdata = {
                .length         = 0xa0000,                      ///apb bus i2s i2c spi no map in this
                .type           = MT_DEVICE
        },
-       
-    {
-               .virtual        = 0xff400000,           /* for itcm , vir = phy , for reboot */
-               .pfn            = __phys_to_pfn(0xff400000),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }
-               
+
 };
 
 static struct platform_device *devices[] __initdata = {
index dba9818eb166c48b53b20fe7b7724a544a75dc6a..2749a563886ef610baef6b3cb61dcdddcbcefdab 100644 (file)
 #define __virt_to_bus(x)       __virt_to_phys(x)
 #define __bus_to_virt(x)       __phys_to_virt(x)
 
+/*
+ * TCM memory whereabouts
+ */
+#define ITCM_OFFSET    0xff400000
+#define ITCM_END       0xff401fff
+#define DTCM_OFFSET    0xff404000
+#define DTCM_END       0xff407fff
+
 #endif
 
index 52c40d15567242177b40c5c60943cf63c18e3ee1..94945dbf78a058586ddb1c8c9694e804a7f0517c 100644 (file)
@@ -632,10 +632,10 @@ void __init mem_init(void)
 void free_initmem(void)
 {
 #ifdef CONFIG_HAVE_TCM
-       extern char *__tcm_start, *__tcm_end;
+       extern char __tcm_start, __tcm_end;
 
-       totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)),
-                                   __phys_to_pfn(__pa(__tcm_end)),
+       totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
+                                   __phys_to_pfn(__pa(&__tcm_end)),
                                    "TCM link");
 #endif