ARM: OMAP2+: Remove unused legacy code for interconnects
authorTony Lindgren <tony@atomide.com>
Wed, 31 May 2017 22:51:37 +0000 (15:51 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 8 Jun 2017 11:15:10 +0000 (04:15 -0700)
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_device.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

index f989145480c8fcd0c947beaadeefe6955896a434..ef9ffb8ac9126d6cc744475d9a12f2f90994404e 100644 (file)
@@ -65,7 +65,7 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias,
 
        r = clk_get_sys(NULL, clk_name);
 
-       if (IS_ERR(r) && of_have_populated_dt()) {
+       if (IS_ERR(r)) {
                struct of_phandle_args clkspec;
 
                clkspec.np = of_find_node_by_name(NULL, clk_name);
@@ -953,9 +953,6 @@ static int __init omap_device_late_init(void)
 {
        bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
 
-       WARN(!of_have_populated_dt(),
-               "legacy booting deprecated, please update to boot with .dts\n");
-
        return 0;
 }
 omap_late_initcall_sync(omap_device_late_init);
index 8bcea0d83fa09e8e4985d81697097d1756d34931..0f7afdaf80d3c11a51edc753a38d4b8fee57aafb 100644 (file)
@@ -2334,24 +2334,21 @@ static int __init _init(struct omap_hwmod *oh, void *data)
 {
        int r, index;
        struct device_node *np = NULL;
+       struct device_node *bus;
 
        if (oh->_state != _HWMOD_STATE_REGISTERED)
                return 0;
 
-       if (of_have_populated_dt()) {
-               struct device_node *bus;
-
-               bus = of_find_node_by_name(NULL, "ocp");
-               if (!bus)
-                       return -ENODEV;
+       bus = of_find_node_by_name(NULL, "ocp");
+       if (!bus)
+               return -ENODEV;
 
-               r = of_dev_hwmod_lookup(bus, oh, &index, &np);
-               if (r)
-                       pr_debug("omap_hwmod: %s missing dt data\n", oh->name);
-               else if (np && index)
-                       pr_warn("omap_hwmod: %s using broken dt data from %s\n",
-                               oh->name, np->name);
-       }
+       r = of_dev_hwmod_lookup(bus, oh, &index, &np);
+       if (r)
+               pr_debug("omap_hwmod: %s missing dt data\n", oh->name);
+       else if (np && index)
+               pr_warn("omap_hwmod: %s using broken dt data from %s\n",
+                       oh->name, np->name);
 
        r = _init_mpu_rt_base(oh, NULL, index, np);
        if (r < 0) {
index 1c6ca4d5fa2d9513614c6105748dd1b5eb2590a2..c3276436b0aead51c20f6e158e5e4a8c01042718 100644 (file)
@@ -3204,8 +3204,7 @@ int __init omap3xxx_hwmod_init(void)
         * If DT information is missing, enable them only for GP devices.
         */
 
-       if (of_have_populated_dt())
-               bus = of_find_node_by_name(NULL, "ocp");
+       bus = of_find_node_by_name(NULL, "ocp");
 
        if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
                r = omap_hwmod_register_links(h_sham);