ARM: rockchip: rk3288: enable jtag support when rockchip_jtag in kernel cmdline
author黄涛 <huangtao@rock-chips.com>
Tue, 22 Apr 2014 07:17:10 +0000 (15:17 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 22 Apr 2014 07:17:58 +0000 (15:17 +0800)
arch/arm/boot/dts/rk3288-clocks.dtsi
arch/arm/boot/dts/rk3288.dtsi
arch/arm/mach-rockchip/common.c
arch/arm/mach-rockchip/rk3288.c
include/linux/rockchip/common.h

index cfbd99291c4de0626684e45895e669009b6bde99..38fad817c1cac2565662104056514219d3034c59 100755 (executable)
                                                <&clk_l2ram>,           <&aclk_core_m0>,
                                                <&aclk_core_mp>,                <&atclk_core>,
 
-                                               <&pclk_dbg_src>,                <&clk_gates12 8>,
-                                               <&clk_gates12 8>,               <&clk_gates12 8>,
+                                               <&pclk_dbg_src>,                <&pclk_dbg_src>,
+                                               <&pclk_dbg_src>,                <&pclk_dbg_src>,
 
                                                <&dummy>,               <&dummy>,
                                                <&dummy>,               <&dummy>;
                                                "clk_l2ram",            "aclk_core_m0",
                                                "aclk_core_mp",         "atclk_core",
 
-                                               "pclk_dbg_src",         "reserved",     /*"g_dbg_core_clk",*/
-                                               "reserved",             "reserved",             /*"g_cs_dbg_clk",       "g_pclk_core_niu",*/
+                                               "pclk_dbg_src",         "g_dbg_core_clk",
+                                               "g_cs_dbg_clk",         "g_pclk_core_niu",
 
                                                "reserved",             "reserved",
                                                "reserved",             "reserved";
index 4a1e0d801e7d6f5a84bb1976a4aed3d69a3858fb..545c5af90eaaf608b417f7f0916214dc08bb462f 100755 (executable)
                                <&clk_core3>, <&clk_l2ram>,
                                <&aclk_core_m0>, <&aclk_core_mp>,
                                <&atclk_core>, <&pclk_dbg_src>,
+                               <&clk_gates12 9>, <&clk_gates12 10>,
+                               <&clk_gates12 11>,
 
                                /*PD_BUS*/
                                <&aclk_bus>, <&clk_gates0 3>,
index 44abfc4fa7c66c80833c93fbd267d1ba38090e57..e3dce56e33bf78e3addde3f063943150de935051 100755 (executable)
@@ -272,3 +272,11 @@ void __init rockchip_ion_reserve(void)
 #endif
 }
 
+bool rockchip_jtag_enabled = false;
+static int __init rockchip_jtag_enable(char *__unused)
+{
+       rockchip_jtag_enabled = true;
+       printk("rockchip jtag enabled\n");
+       return 1;
+}
+__setup("rockchip_jtag", rockchip_jtag_enable);
index c35572632cbe8c0bb82d6514614d92b6ff975cd4..4299020808ec46a73836a360ebe81898f8fd0786 100644 (file)
@@ -454,7 +454,8 @@ static void __init rk3288_init_cpuidle(void)
 {
        int ret;
 
-       rk3288_cpuidle_driver.states[0].enter = rk3288_cpuidle_enter;
+       if (!rockchip_jtag_enabled)
+               rk3288_cpuidle_driver.states[0].enter = rk3288_cpuidle_enter;
        ret = cpuidle_register(&rk3288_cpuidle_driver, NULL);
        if (ret)
                pr_err("%s: failed to register cpuidle driver: %d\n", __func__, ret);
@@ -470,6 +471,8 @@ static void __init rk3288_init_late(void)
 #ifdef CONFIG_CPU_IDLE
        rk3288_init_cpuidle();
 #endif
+       if (rockchip_jtag_enabled)
+               clk_prepare_enable(clk_get_sys(NULL, "clk_jtag"));
 }
 
 DT_MACHINE_START(RK3288_DT, "Rockchip RK3288 (Flattened Device Tree)")
index 9dbbe4ef8a2f2e482ff4707f8385b1c566a54aa6..c61d19079c97b41f579f29744407a6887448a644 100644 (file)
@@ -9,6 +9,7 @@
                .type           = MT_DEVICE, \
        }
 
+extern bool rockchip_jtag_enabled;
 extern unsigned long rockchip_boot_fn;
 extern struct smp_operations rockchip_smp_ops;