All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: "Andrew F . Davis" <afd@ti.com>, Dave Gerlach <d-gerlach@ti.com>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Keerthy <j-keerthy@ti.com>, Nishanth Menon <nm@ti.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Roger Quadros <rogerq@ti.com>, Suman Anna <s-anna@ti.com>,
	Tero Kristo <t-kristo@ti.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: [PATCH 1/9] ARM: OMAP2+: Check for inited flag
Date: Mon, 26 Oct 2020 13:10:41 +0200	[thread overview]
Message-ID: <20201026111049.54835-2-tony@atomide.com> (raw)
In-Reply-To: <20201026111049.54835-1-tony@atomide.com>

If we have no hwmods configured and omap_hwmod_init() is not called,
we don't want to call omap_hwmod_setup_all() as it will fail with
checks for configured MPU at least.

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

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -627,6 +627,9 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh)
 {
 	struct clk_hw_omap *clk;
 
+	if (!oh)
+		return NULL;
+
 	if (oh->clkdm) {
 		return oh->clkdm;
 	} else if (oh->_clk) {
@@ -3677,6 +3680,9 @@ static void __init omap_hwmod_setup_earlycon_flags(void)
  */
 static int __init omap_hwmod_setup_all(void)
 {
+	if (!inited)
+		return 0;
+
 	_ensure_mpu_hwmod_is_setup(NULL);
 
 	omap_hwmod_for_each(_init, NULL);
-- 
2.29.1

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Nishanth Menon <nm@ti.com>, Tero Kristo <t-kristo@ti.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Dave Gerlach <d-gerlach@ti.com>, Stephen Boyd <sboyd@kernel.org>,
	Keerthy <j-keerthy@ti.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Andrew F . Davis" <afd@ti.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Roger Quadros <rogerq@ti.com>
Subject: [PATCH 1/9] ARM: OMAP2+: Check for inited flag
Date: Mon, 26 Oct 2020 13:10:41 +0200	[thread overview]
Message-ID: <20201026111049.54835-2-tony@atomide.com> (raw)
In-Reply-To: <20201026111049.54835-1-tony@atomide.com>

If we have no hwmods configured and omap_hwmod_init() is not called,
we don't want to call omap_hwmod_setup_all() as it will fail with
checks for configured MPU at least.

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

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -627,6 +627,9 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh)
 {
 	struct clk_hw_omap *clk;
 
+	if (!oh)
+		return NULL;
+
 	if (oh->clkdm) {
 		return oh->clkdm;
 	} else if (oh->_clk) {
@@ -3677,6 +3680,9 @@ static void __init omap_hwmod_setup_earlycon_flags(void)
  */
 static int __init omap_hwmod_setup_all(void)
 {
+	if (!inited)
+		return 0;
+
 	_ensure_mpu_hwmod_is_setup(NULL);
 
 	omap_hwmod_for_each(_init, NULL);
-- 
2.29.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-26 11:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 11:10 [PATCH 0/9] Genpd related code changes to drop am335x pdata Tony Lindgren
2020-10-26 11:10 ` Tony Lindgren
2020-10-26 11:10 ` Tony Lindgren [this message]
2020-10-26 11:10   ` [PATCH 1/9] ARM: OMAP2+: Check for inited flag Tony Lindgren
2020-10-26 11:10 ` [PATCH 2/9] ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 3/9] clk: ti: am33xx: Keep am3 l3 main clock always on for genpd Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 4/9] bus: ti-sysc: Support modules without control registers Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 5/9] bus: ti-sysc: Implement GPMC debug quirk to drop platform data Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 6/9] soc: ti: omap-prm: Add pm_clk for genpd Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 7/9] soc: ti: omap-prm: am3: add genpd support for remaining PRM instances Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 8/9] soc: ti: pm33xx: Enable basic PM runtime support for genpd Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:10 ` [PATCH 9/9] remoteproc/wkup_m3: Use reset control driver if available Tony Lindgren
2020-10-26 11:10   ` Tony Lindgren
2020-10-26 11:35   ` Philipp Zabel
2020-10-26 11:35     ` Philipp Zabel
2020-10-26 13:02     ` Tony Lindgren
2020-10-26 13:02       ` Tony Lindgren
2020-10-26 13:13 ` [PATCH 0/9] Genpd related code changes to drop am335x pdata Tony Lindgren
2020-10-26 13:13   ` Tony Lindgren
2020-11-10 11:20 [PATCHv2 " Tony Lindgren
2020-11-10 11:20 ` [PATCH 1/9] ARM: OMAP2+: Check for inited flag Tony Lindgren
2020-11-10 11:20   ` Tony Lindgren

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=20201026111049.54835-2-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=afd@ti.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=d-gerlach@ti.com \
    --cc=faiz_abbas@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nm@ti.com \
    --cc=p.zabel@pengutronix.de \
    --cc=peter.ujfalusi@ti.com \
    --cc=rogerq@ti.com \
    --cc=s-anna@ti.com \
    --cc=sboyd@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.