linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/11] ARM: OMAP2+: Remove unused legacy code for io.c
Date: Wed, 31 May 2017 15:51:34 -0700	[thread overview]
Message-ID: <20170531225139.30723-7-tony@atomide.com> (raw)
In-Reply-To: <20170531225139.30723-1-tony@atomide.com>

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.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/io.c | 59 ++++++++++++------------------------------------
 1 file changed, 14 insertions(+), 45 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -493,67 +493,39 @@ void __init omap3_init_early(void)
 	omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000));
 	omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
 			       OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE));
-	/* XXX: remove these once OMAP3 is DT only */
-	if (!of_have_populated_dt()) {
-		omap2_set_globals_control(
-			OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE));
-		omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE));
-		omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
-				     NULL);
-	}
 	omap2_control_base_init();
 	omap3xxx_check_revision();
 	omap3xxx_check_features();
 	omap2_prcm_base_init();
-	/* XXX: remove these once OMAP3 is DT only */
-	if (!of_have_populated_dt()) {
-		omap3xxx_prm_init(NULL);
-		omap3xxx_cm_init(NULL);
-	}
 	omap3xxx_voltagedomains_init();
 	omap3xxx_powerdomains_init();
 	omap3xxx_clockdomains_init();
 	omap3xxx_hwmod_init();
 	omap_hwmod_init_postsetup();
-	if (!of_have_populated_dt()) {
-		omap3_control_legacy_iomap_init();
-		if (soc_is_am35xx())
-			omap_clk_soc_init = am35xx_clk_legacy_init;
-		else if (cpu_is_omap3630())
-			omap_clk_soc_init = omap36xx_clk_legacy_init;
-		else if (omap_rev() == OMAP3430_REV_ES1_0)
-			omap_clk_soc_init = omap3430es1_clk_legacy_init;
-		else
-			omap_clk_soc_init = omap3430_clk_legacy_init;
-	}
 }
 
 void __init omap3430_init_early(void)
 {
 	omap3_init_early();
-	if (of_have_populated_dt())
-		omap_clk_soc_init = omap3430_dt_clk_init;
+	omap_clk_soc_init = omap3430_dt_clk_init;
 }
 
 void __init omap35xx_init_early(void)
 {
 	omap3_init_early();
-	if (of_have_populated_dt())
-		omap_clk_soc_init = omap3430_dt_clk_init;
+	omap_clk_soc_init = omap3430_dt_clk_init;
 }
 
 void __init omap3630_init_early(void)
 {
 	omap3_init_early();
-	if (of_have_populated_dt())
-		omap_clk_soc_init = omap3630_dt_clk_init;
+	omap_clk_soc_init = omap3630_dt_clk_init;
 }
 
 void __init am35xx_init_early(void)
 {
 	omap3_init_early();
-	if (of_have_populated_dt())
-		omap_clk_soc_init = am35xx_dt_clk_init;
+	omap_clk_soc_init = am35xx_dt_clk_init;
 }
 
 void __init omap3_init_late(void)
@@ -628,8 +600,7 @@ void __init ti816x_init_early(void)
 	ti816x_clockdomains_init();
 	dm816x_hwmod_init();
 	omap_hwmod_init_postsetup();
-	if (of_have_populated_dt())
-		omap_clk_soc_init = dm816x_dt_clk_init;
+	omap_clk_soc_init = dm816x_dt_clk_init;
 }
 #endif
 
@@ -785,21 +756,19 @@ int __init omap_clk_init(void)
 
 	omap2_clk_setup_ll_ops();
 
-	if (of_have_populated_dt()) {
-		ret = omap_control_init();
-		if (ret)
-			return ret;
+	ret = omap_control_init();
+	if (ret)
+		return ret;
 
-		ret = omap_prcm_init();
-		if (ret)
-			return ret;
+	ret = omap_prcm_init();
+	if (ret)
+		return ret;
 
-		of_clk_init(NULL);
+	of_clk_init(NULL);
 
-		ti_dt_clk_init_retry_clks();
+	ti_dt_clk_init_retry_clks();
 
-		ti_dt_clockdomains_setup();
-	}
+	ti_dt_clockdomains_setup();
 
 	ret = omap_clk_soc_init();
 
-- 
2.13.0

  parent reply	other threads:[~2017-05-31 22:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 22:51 [PATCH 00/11] Remove unused omap legacy code Tony Lindgren
2017-05-31 22:51 ` [PATCH 01/11] ARM: OMAP2+: Remove unused legacy code for opp Tony Lindgren
2017-05-31 22:51 ` [PATCH 02/11] ARM: OMAP2+: Remove unused legacy code for timer Tony Lindgren
2017-05-31 22:51 ` [PATCH 03/11] ARM: OMAP2+: Remove unused legacy code for PMU Tony Lindgren
2017-05-31 22:51 ` [PATCH 04/11] ARM: OMAP2+: Remove unused legacy code for device init Tony Lindgren
2017-06-07 22:27   ` Sebastian Reichel
2017-06-08  8:28     ` Tony Lindgren
2017-06-08  9:47       ` Tony Lindgren
2017-06-08 10:55         ` Sebastian Reichel
2017-06-08 11:10           ` Tony Lindgren
2017-05-31 22:51 ` [PATCH 05/11] ARM: OMAP2+: Remove unused legacy code for McBSP Tony Lindgren
2017-06-08  6:20   ` Peter Ujfalusi
2017-05-31 22:51 ` Tony Lindgren [this message]
2017-05-31 22:51 ` [PATCH 07/11] ARM: OMAP2+: Remove unused legacy code for DMA Tony Lindgren
2017-06-08  6:25   ` Peter Ujfalusi
2017-06-08  8:24     ` Tony Lindgren
2017-06-08  9:56       ` Tony Lindgren
2017-06-08 10:37         ` Peter Ujfalusi
2017-06-08 10:45           ` Tony Lindgren
2017-06-08 11:56             ` Bin Liu
2017-05-31 22:51 ` [PATCH 08/11] ARM: OMAP2+: Remove unused legacy code for PRM Tony Lindgren
2017-06-30 10:42   ` Tony Lindgren
2017-07-20 14:45     ` Sebastian Reichel
2017-07-21  5:55       ` Tony Lindgren
2017-05-31 22:51 ` [PATCH 09/11] ARM: OMAP2+: Remove unused legacy code for interconnects Tony Lindgren
2017-05-31 22:51 ` [PATCH 10/11] ARM: OMAP2+: Remove unused legacy code for watchdog Tony Lindgren
2017-05-31 22:51 ` [PATCH 11/11] ARM: OMAP2+: Remove unused legacy code for n8x0 Tony Lindgren
2017-06-08  8:13 ` [PATCH 00/11] Remove unused omap legacy code Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170531225139.30723-7-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).