]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver
authorBenoit Cousson <b-cousson@ti.com>
Fri, 12 Aug 2011 11:48:47 +0000 (13:48 +0200)
committerBenoit Cousson <b-cousson@ti.com>
Tue, 4 Oct 2011 20:29:39 +0000 (22:29 +0200)
Used the main OCP node to add bindings with the l3_noc driver.
Remove l3_noc static device creation if DT is populated.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
arch/arm/boot/dts/omap4.dtsi
arch/arm/mach-omap2/devices.c

index d4131e36aefbc2cec3e9a284e69f436610f180b1..b85a39debbeaf0b592a705eb491d192a9deb2127 100644 (file)
         * hierarchy.
         */
        ocp {
-               compatible = "simple-bus";
+               compatible = "ti,omap4-l3-noc", "simple-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
+               ti,hwmods = "l3_main_1", "l3_main_2", "l3_main_3";
 
                gic: interrupt-controller@48241000 {
                        compatible = "arm,cortex-a9-gic";
index 2d4a1998d5d9b0298b8ee33ec51dc8152bc5b0f7..0f8e0eb181665c7d082425cf2b667f4ad88cf3e8 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/of.h>
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -77,6 +78,10 @@ static int __init omap4_l3_init(void)
        struct platform_device *pdev;
        char oh_name[L3_MODULES_MAX_LEN];
 
+       /* If dtb is there, the devices will be created dynamically */
+       if (of_have_populated_dt())
+               return -ENODEV;
+
        /*
         * To avoid code running on other OMAPs in
         * multi-omap builds