All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: linux-omap@vger.kernel.org, paul@pwsan.com, tony@atomide.com,
	nm@ti.com, rnayak@ti.com, bcousson@baylibre.com,
	mturquette@linaro.org
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCHv8 29/36] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name
Date: Wed, 9 Oct 2013 18:31:00 +0300	[thread overview]
Message-ID: <1381332668-962-30-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1381332668-962-1-git-send-email-t-kristo@ti.com>

DT clocks are mostly missing clkdm info now, and this causes an issue with
counter32k which makes its slave idlemode wrong and prevents core idle.

Fixed by initializing the hwmod clkdm pointers for omap3 also which makes
sure the clkdm flag matching logic works properly.

This patch also changes the return value for _init_clkdm to 0 for
incorrect clkdm_name, as this a warning, not a fatal error.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5f8f587..ae33fae 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1546,7 +1546,7 @@ static int _init_clkdm(struct omap_hwmod *oh)
 	if (!oh->clkdm) {
 		pr_warning("omap_hwmod: %s: could not associate to clkdm %s\n",
 			oh->name, oh->clkdm_name);
-		return -EINVAL;
+		return 0;
 	}
 
 	pr_debug("omap_hwmod: %s: associated to clkdm %s\n",
@@ -4117,6 +4117,7 @@ void __init omap_hwmod_init(void)
 		soc_ops.assert_hardreset = _omap2_assert_hardreset;
 		soc_ops.deassert_hardreset = _omap2_deassert_hardreset;
 		soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted;
+		soc_ops.init_clkdm = _init_clkdm;
 	} else if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
 		soc_ops.enable_module = _omap4_enable_module;
 		soc_ops.disable_module = _omap4_disable_module;
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv8 29/36] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name
Date: Wed, 9 Oct 2013 18:31:00 +0300	[thread overview]
Message-ID: <1381332668-962-30-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1381332668-962-1-git-send-email-t-kristo@ti.com>

DT clocks are mostly missing clkdm info now, and this causes an issue with
counter32k which makes its slave idlemode wrong and prevents core idle.

Fixed by initializing the hwmod clkdm pointers for omap3 also which makes
sure the clkdm flag matching logic works properly.

This patch also changes the return value for _init_clkdm to 0 for
incorrect clkdm_name, as this a warning, not a fatal error.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5f8f587..ae33fae 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1546,7 +1546,7 @@ static int _init_clkdm(struct omap_hwmod *oh)
 	if (!oh->clkdm) {
 		pr_warning("omap_hwmod: %s: could not associate to clkdm %s\n",
 			oh->name, oh->clkdm_name);
-		return -EINVAL;
+		return 0;
 	}
 
 	pr_debug("omap_hwmod: %s: associated to clkdm %s\n",
@@ -4117,6 +4117,7 @@ void __init omap_hwmod_init(void)
 		soc_ops.assert_hardreset = _omap2_assert_hardreset;
 		soc_ops.deassert_hardreset = _omap2_deassert_hardreset;
 		soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted;
+		soc_ops.init_clkdm = _init_clkdm;
 	} else if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
 		soc_ops.enable_module = _omap4_enable_module;
 		soc_ops.disable_module = _omap4_disable_module;
-- 
1.7.9.5

  parent reply	other threads:[~2013-10-09 15:31 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 15:30 [PATCHv8 00/36] ARM: OMAP: DT clock conversion Tero Kristo
2013-10-09 15:30 ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 01/36] CLK: TI: Add DPLL clock support Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-13 23:47   ` Paul Walmsley
2013-10-13 23:47     ` Paul Walmsley
2013-10-09 15:30 ` [PATCHv8 02/36] CLK: TI: add DT alias clock registration mechanism Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 03/36] CLK: TI: add autoidle support Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 04/36] CLK: ti: add support for ti divider-clock Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 05/36] clk: ti: add support for TI fixed factor clock Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 06/36] CLK: TI: add support for OMAP gate clock Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 07/36] CLK: TI: add support for clockdomain binding Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 08/36] ARM: dts: omap4 clock data Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 09/36] clk: ti: add mux-gate clock support Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 10/36] clk: ti: add support for basic mux clock Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 11/36] CLK: TI: add omap4 clock init file Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 12/36] ARM: OMAP4: remove old clock data and link in new clock init code Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 13/36] ARM: dts: omap5 clock data Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 14/36] CLK: TI: add omap5 clock init file Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 15/36] CLK: TI: omap5: Initialize USB_DPLL at boot Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 16/36] ARM: dts: dra7 clock data Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 17/36] ARM: dts: clk: Add apll related clocks Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 18/36] ARM: dts: DRA7: Change apll_pcie_m2_ck to fixed factor clock Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 19/36] ARM: dts: DRA7: Add PCIe related clock nodes Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 20/36] CLK: TI: DRA7: Add APLL support Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 21/36] CLK: TI: add dra7 clock init file Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 22/36] ARM: OMAP: DRA7: Enable clock init Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 23/36] ARM: dts: DRA7: link in clock DT data Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 24/36] ARM: dts: am33xx clock data Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 25/36] CLK: TI: add am33xx clock init file Tero Kristo
2013-10-09 15:30   ` Tero Kristo
2013-10-09 15:30 ` [PATCHv8 26/36] ARM: AM33xx: remove old clock data and link in new clock init code Tero Kristo
2013-10-09 15:30   ` Tero Kristo
     [not found] ` <1381332668-962-1-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org>
2013-10-09 15:30   ` [PATCHv8 27/36] CLK: TI: add interface clock support for OMAP3 Tero Kristo
2013-10-09 15:30     ` Tero Kristo
2013-10-09 15:30   ` [PATCHv8 28/36] ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm Tero Kristo
2013-10-09 15:30     ` Tero Kristo
2013-10-09 15:31 ` Tero Kristo [this message]
2013-10-09 15:31   ` [PATCHv8 29/36] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name Tero Kristo
2013-10-09 15:31 ` [PATCHv8 30/36] ARM: dts: omap3 clock data Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 31/36] CLK: TI: add omap3 clock init file Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 32/36] ARM: dts: AM35xx: use DT clock data Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 33/36] ARM: OMAP3: use DT clock init if DT data is available Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 34/36] ARM: dts: am43xx clock data Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 35/36] ARM: dts: AM43xx: link in clock DT data Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:31 ` [PATCHv8 36/36] CLK: TI: add am43xx clock init file Tero Kristo
2013-10-09 15:31   ` Tero Kristo
2013-10-09 15:48 ` [PATCHv8 00/36] ARM: OMAP: DT clock conversion Tony Lindgren
2013-10-09 15:48   ` 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=1381332668-962-30-git-send-email-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=tony@atomide.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.