rk30: add cpu axi init
author黄涛 <huangtao@rock-chips.com>
Tue, 27 Mar 2012 09:23:19 +0000 (17:23 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 27 Mar 2012 09:23:39 +0000 (17:23 +0800)
arch/arm/mach-rk30/common.c
arch/arm/mach-rk30/include/mach/io.h
arch/arm/mach-rk30/io.c

index a248992d9827cde86bf73ebc7c1f4104c1d1ca1c..b44b9ad0316b28329d8c22356df90f9de48b7663 100755 (executable)
 #include <mach/iomux.h>
 #include <mach/fiq.h>
 
-
+static void __init rk30_cpu_axi_init(void)
+{
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0088);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0108);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0188);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x0388);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x4008);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x5008);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x6008);
+       writel_relaxed(0xa, RK30_CPU_AXI_BUS_BASE + 0x7008);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7088);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7108);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7188);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7208);
+       writel_relaxed(0x0, RK30_CPU_AXI_BUS_BASE + 0x7288);
+       writel_relaxed(0x3f, RK30_CPU_AXI_BUS_BASE + 0x0014);
+       dsb();
+}
 
 static void __init rk30_l2_cache_init(void)
 {
@@ -68,6 +85,7 @@ void __init rk30_map_io(void)
 {
        rk30_map_common_io();
        rk29_setup_early_printk();
+       rk30_cpu_axi_init();
        rk29_sram_init();
        board_clock_init();
        rk30_l2_cache_init();
index 3cbcf6e1432d9f100b1dcce69dc45f6b6aa17a91..619589191484631dd88368dd7e41532571373f2d 100644 (file)
@@ -72,6 +72,7 @@
 #define RK30_UART1_BASE         RK30_IO_TO_VIRT0(RK30_UART1_PHYS)
 #define RK30_UART1_SIZE         SZ_8K
 #define RK30_CPU_AXI_BUS_PHYS   0x10128000
+#define RK30_CPU_AXI_BUS_BASE   RK30_IO_TO_VIRT0(RK30_CPU_AXI_BUS_PHYS)
 #define RK30_CPU_AXI_BUS_SIZE   SZ_32K
 
 #define RK30_L2C_PHYS           0x10138000
index b370cd6e803587d8cfd33c75faf87ffc98ea921b..e3f05b8de29db831e47039a97db9759d8b838506 100644 (file)
@@ -29,6 +29,7 @@
 
 static struct map_desc rk30_io_desc[] __initdata = {
        RK30_DEVICE(CORE),
+       RK30_DEVICE(CPU_AXI_BUS),
 #if CONFIG_RK_DEBUG_UART == 0
        RK30_DEVICE(UART0),
 #elif CONFIG_RK_DEBUG_UART == 1