rk: l2c: only init when chip is rockchip
author黄涛 <huangtao@rock-chips.com>
Mon, 6 Jan 2014 02:43:36 +0000 (10:43 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 6 Jan 2014 02:43:36 +0000 (10:43 +0800)
arch/arm/boot/dts/rk3188.dtsi
arch/arm/mach-rockchip/common.c

index a692e3f9c325193314c23e0b0d61685920f599b1..f2c72a5873b7854a79f44c5d9ac01891ce04d439 100755 (executable)
@@ -60,7 +60,7 @@
        };
 
        L2: cache-controller@10138000 {
-               compatible = "arm,pl310-cache";
+               compatible = "rockchip,pl310-cache", "arm,pl310-cache";
                reg = <0x10138000 0x1000>;
                cache-unified;
                cache-level = <2>;
index 93a9b4cb641fbeb065316dc8ebab3deacab14c9c..c84f655431982ae413519b9084016d729a556ef9 100644 (file)
@@ -68,18 +68,13 @@ static int __init rockchip_cpu_axi_init(void)
 }
 early_initcall(rockchip_cpu_axi_init);
 
-static const struct of_device_id pl330_ids[] __initconst = {
-       { .compatible = "arm,pl310-cache" },
-       {}
-};
-
 static int __init rockchip_pl330_l2_cache_init(void)
 {
        struct device_node *np;
        void __iomem *base;
        u32 aux[2] = { 0, ~0 }, prefetch, power;
 
-       np = of_find_matching_node(NULL, pl330_ids);
+       np = of_find_compatible_node(NULL, NULL, "rockchip,pl310-cache");
        if (!np)
                return -ENODEV;