From: avinashphilip@ti.com (Philip Avinash)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK
Date: Wed, 2 Jan 2013 18:54:51 +0530 [thread overview]
Message-ID: <1357133094-30806-5-git-send-email-avinashphilip@ti.com> (raw)
In-Reply-To: <1357133094-30806-1-git-send-email-avinashphilip@ti.com>
EHRPWM module requires explicit clock gating of TBCLK from control
module. Hence add TBCLK clock node in clock tree for EHRPWM modules.
Signed-off-by: Philip Avinash <avinashphilip@ti.com>
---
- common clock frame work support
arch/arm/mach-omap2/cclock33xx_data.c | 30 ++++++++++++++++++++++++++++++
arch/arm/mach-omap2/control.h | 8 ++++++++
2 files changed, 38 insertions(+)
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index ea64ad6..7ff9bc9 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -832,6 +832,33 @@ static struct clk_hw_omap wdt1_fck_hw = {
DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops);
+static const char *pwmss_clk_parents[] = {
+ "dpll_per_m2_ck",
+};
+
+static const struct clk_ops ehrpwm_tbclk_ops = {
+ .enable = &omap2_dflt_clk_enable,
+ .disable = &omap2_dflt_clk_disable,
+};
+
+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm0_tbclk, "l4ls_clkdm",
+ 0, NULL, 0,
+ AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
+ AM33XX_PWMSS0_TBCLKEN_SHIFT,
+ NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
+
+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm1_tbclk, "l4ls_clkdm",
+ 0, NULL, 0,
+ AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
+ AM33XX_PWMSS1_TBCLKEN_SHIFT,
+ NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
+
+DEFINE_CLK_OMAP_MUX_GATE(ehrpwm2_tbclk, "l4ls_clkdm",
+ 0, NULL, 0,
+ AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
+ AM33XX_PWMSS2_TBCLKEN_SHIFT,
+ NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
+
/*
* clkdev
*/
@@ -910,6 +937,9 @@ static struct omap_clk am33xx_clks[] = {
CLK(NULL, "clkout2_div_ck", &clkout2_div_ck, CK_AM33XX),
CLK(NULL, "timer_32k_ck", &clkdiv32k_ick, CK_AM33XX),
CLK(NULL, "timer_sys_ck", &sys_clkin_ck, CK_AM33XX),
+ CLK("48300200.ehrpwm", "tbclk", &ehrpwm0_tbclk, CK_AM33XX),
+ CLK("48302200.ehrpwm", "tbclk", &ehrpwm1_tbclk, CK_AM33XX),
+ CLK("48304200.ehrpwm", "tbclk", &ehrpwm2_tbclk, CK_AM33XX),
};
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index 3d944d3..ad4f1d8 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -358,6 +358,14 @@
#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2
#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22)
+/* AM33XX PWMSS Control register */
+#define AM33XX_PWMSS_TBCLK_CLKCTRL 0x664
+
+/* AM33XX PWMSS Control bitfields */
+#define AM33XX_PWMSS0_TBCLKEN_SHIFT 0
+#define AM33XX_PWMSS1_TBCLKEN_SHIFT 1
+#define AM33XX_PWMSS2_TBCLKEN_SHIFT 2
+
/* CONTROL OMAP STATUS register to identify OMAP3 features */
#define OMAP3_CONTROL_OMAP_STATUS 0x044c
--
1.7.9.5
next prev parent reply other threads:[~2013-01-02 13:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-02 13:24 [PATCH 0/7] HWMOD fixes for AM33xx PWM submodules and device tree nodes Philip Avinash
2013-01-02 13:24 ` [PATCH 1/7] ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD entries Philip Avinash
2013-02-08 15:10 ` Paul Walmsley
2013-02-08 15:14 ` Hiremath, Vaibhav
2013-02-12 6:57 ` Philip, Avinash
2013-01-02 13:24 ` [PATCH 2/7] ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem Philip Avinash
2013-01-02 13:24 ` [PATCH 3/7] pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver Philip Avinash
2013-01-02 13:38 ` Thierry Reding
2013-01-10 4:11 ` Philip, Avinash
2013-01-02 13:24 ` Philip Avinash [this message]
2013-02-08 15:06 ` [PATCH 4/7] ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK Paul Walmsley
2013-02-12 6:55 ` Philip, Avinash
2013-01-02 13:24 ` [PATCH 5/7] ARM: dts: AM33XX: Add PWMSS device tree nodes Philip Avinash
2013-01-02 13:24 ` [PATCH 6/7] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evm Philip Avinash
2013-01-02 13:24 ` [PATCH 7/7] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evmsk Philip Avinash
2013-01-10 4:10 ` [PATCH 0/7] HWMOD fixes for AM33xx PWM submodules and device tree nodes Philip, Avinash
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=1357133094-30806-5-git-send-email-avinashphilip@ti.com \
--to=avinashphilip@ti.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).