From: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org> To: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org, nm-l0cyMroinI0@public.gmane.org, rnayak-l0cyMroinI0@public.gmane.org, bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org, mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: [PATCHv8 28/36] ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm Date: Wed, 9 Oct 2013 18:30:59 +0300 [thread overview] Message-ID: <1381332668-962-29-git-send-email-t-kristo@ti.com> (raw) In-Reply-To: <1381332668-962-1-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org> If the main clock for a hwmod is of basic clock type, it is illegal to type cast this to clk_hw_omap and will result in bogus data. Fixed by checking the clock flags before attempting the type cast. Signed-off-by: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org> Tested-by: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org> Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> --- arch/arm/mach-omap2/omap_hwmod.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index d35145d..5f8f587 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -656,6 +656,8 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh) if (oh->clkdm) { return oh->clkdm; } else if (oh->_clk) { + if (__clk_get_flags(oh->_clk) & CLK_IS_BASIC) + return NULL; clk = to_clk_hw_omap(__clk_get_hw(oh->_clk)); return clk->clkdm; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo) To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv8 28/36] ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm Date: Wed, 9 Oct 2013 18:30:59 +0300 [thread overview] Message-ID: <1381332668-962-29-git-send-email-t-kristo@ti.com> (raw) In-Reply-To: <1381332668-962-1-git-send-email-t-kristo@ti.com> If the main clock for a hwmod is of basic clock type, it is illegal to type cast this to clk_hw_omap and will result in bogus data. Fixed by checking the clock flags before attempting the type cast. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index d35145d..5f8f587 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -656,6 +656,8 @@ static struct clockdomain *_get_clkdm(struct omap_hwmod *oh) if (oh->clkdm) { return oh->clkdm; } else if (oh->_clk) { + if (__clk_get_flags(oh->_clk) & CLK_IS_BASIC) + return NULL; clk = to_clk_hw_omap(__clk_get_hw(oh->_clk)); return clk->clkdm; } -- 1.7.9.5
next prev parent reply other threads:[~2013-10-09 15:30 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 ` Tero Kristo [this message] 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:31 ` [PATCHv8 29/36] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name Tero Kristo 2013-10-09 15:31 ` 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-29-git-send-email-t-kristo@ti.com \ --to=t-kristo-l0cymroini0@public.gmane.org \ --cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=nm-l0cyMroinI0@public.gmane.org \ --cc=paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org \ --cc=rnayak-l0cyMroinI0@public.gmane.org \ --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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: linkBe 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.