From: Tero Kristo <t-kristo@ti.com> To: linux-omap@vger.kernel.org, tony@atomide.com Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3b 3/5] ARM: omap2+: clockdomain: add clkdm_xlate_address Date: Tue, 30 May 2017 17:47:47 +0300 [thread overview] Message-ID: <1496155669-1677-4-git-send-email-t-kristo@ti.com> (raw) In-Reply-To: <1496155669-1677-1-git-send-email-t-kristo@ti.com> This new function can be used to get the physical address of a clockdomain. Required for mapping the clkctrl clocks under hwmod without modification to DT data. Signed-off-by: Tero Kristo <t-kristo@ti.com> --- arch/arm/mach-omap2/clockdomain.c | 8 ++++++++ arch/arm/mach-omap2/clockdomain.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b79b1ca..5189264 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -1224,6 +1224,14 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) return 0; } +u32 clkdm_xlate_address(struct clockdomain *clkdm) +{ + if (arch_clkdm->clkdm_xlate_address) + return arch_clkdm->clkdm_xlate_address(clkdm); + + return 0; +} + /** * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm * @clkdm: struct clockdomain * diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 24667a5..827f01e 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -175,6 +175,7 @@ struct clkdm_ops { void (*clkdm_deny_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); + u32 (*clkdm_xlate_address)(struct clockdomain *clkdm); }; int clkdm_register_platform_funcs(struct clkdm_ops *co); @@ -213,6 +214,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); +u32 clkdm_xlate_address(struct clockdomain *clkdm); extern void __init omap242x_clockdomains_init(void); extern void __init omap243x_clockdomains_init(void); -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo) To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3b 3/5] ARM: omap2+: clockdomain: add clkdm_xlate_address Date: Tue, 30 May 2017 17:47:47 +0300 [thread overview] Message-ID: <1496155669-1677-4-git-send-email-t-kristo@ti.com> (raw) In-Reply-To: <1496155669-1677-1-git-send-email-t-kristo@ti.com> This new function can be used to get the physical address of a clockdomain. Required for mapping the clkctrl clocks under hwmod without modification to DT data. Signed-off-by: Tero Kristo <t-kristo@ti.com> --- arch/arm/mach-omap2/clockdomain.c | 8 ++++++++ arch/arm/mach-omap2/clockdomain.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index b79b1ca..5189264 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -1224,6 +1224,14 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) return 0; } +u32 clkdm_xlate_address(struct clockdomain *clkdm) +{ + if (arch_clkdm->clkdm_xlate_address) + return arch_clkdm->clkdm_xlate_address(clkdm); + + return 0; +} + /** * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm * @clkdm: struct clockdomain * diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 24667a5..827f01e 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -175,6 +175,7 @@ struct clkdm_ops { void (*clkdm_deny_idle)(struct clockdomain *clkdm); int (*clkdm_clk_enable)(struct clockdomain *clkdm); int (*clkdm_clk_disable)(struct clockdomain *clkdm); + u32 (*clkdm_xlate_address)(struct clockdomain *clkdm); }; int clkdm_register_platform_funcs(struct clkdm_ops *co); @@ -213,6 +214,7 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); +u32 clkdm_xlate_address(struct clockdomain *clkdm); extern void __init omap242x_clockdomains_init(void); extern void __init omap243x_clockdomains_init(void); -- 1.9.1
next prev parent reply other threads:[~2017-05-30 14:47 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-30 14:47 [PATCHv3b 0/5] ARM: OMAP2+: preparation for clk/clkctrl support Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 1/5] ARM: OMAP2+: timer: add support for fetching fck handle from DT Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 2/5] ARM: OMAP4: hwmod_data: add opt clks for dss_hdmi and dss_venc Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` Tero Kristo [this message] 2017-05-30 14:47 ` [PATCHv3b 3/5] ARM: omap2+: clockdomain: add clkdm_xlate_address Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 18:10 ` Tony Lindgren 2017-05-30 18:10 ` Tony Lindgren 2017-05-31 14:36 ` Tero Kristo 2017-05-31 14:36 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 5/5] ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 18:15 ` Tony Lindgren 2017-05-30 18:15 ` Tony Lindgren 2017-05-31 14:40 ` Tero Kristo 2017-05-31 14:40 ` Tero Kristo 2017-05-30 18:16 ` [PATCHv3b 0/5] ARM: OMAP2+: preparation for clk/clkctrl support Tony Lindgren 2017-05-30 18:16 ` Tony Lindgren 2017-05-31 14:40 ` Tero Kristo 2017-05-31 14:40 ` Tero Kristo
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=1496155669-1677-4-git-send-email-t-kristo@ti.com \ --to=t-kristo@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --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: 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.