From: Archit Taneja <archit@ti.com>
To: paul@pwsan.com, rnayak@ti.com
Cc: tomi.valkeinen@ti.com, linux-omap@vger.kernel.org,
Archit Taneja <archit@ti.com>
Subject: [RFC 2/2] ARM: OMAP5: hwmod data: Make DSS hwmods share MODULEMODE fields
Date: Mon, 26 May 2014 16:14:55 +0530 [thread overview]
Message-ID: <1401101095-27181-2-git-send-email-archit@ti.com> (raw)
In-Reply-To: <1401101095-27181-1-git-send-email-archit@ti.com>
This is an example which shows how to use new 'shared modulemode' flag.
DSS hwmods share the MODULEMODE field. Add the new HWMOD_OMAP4_MODULEMODE_SHARED
flag, and create a modulemode_shared struct which the DSS hwmods refer to.
This will allow the hwmods to reset properly during boot, and not break things
when the DSS driver runs.
(Note: hdmi and rfbi hwmods still don't reset properly as they don't have their
mainclks as dss_dss_clk, this will be fixed later).
Signed-off-by: Archit Taneja <archit@ti.com>
---
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 46 +++++++++++++++++++++---------
1 file changed, 33 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index e8bdd7a..762d61f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -337,6 +337,9 @@ static struct omap_hwmod omap54xx_dmic_hwmod = {
* 'dss' class
* display sub-system
*/
+
+static struct modulemode_shared dss_modulemode_ref;
+
static struct omap_hwmod_class_sysconfig omap54xx_dss_sysc = {
.rev_offs = 0x0000,
.syss_offs = 0x0014,
@@ -364,9 +367,11 @@ static struct omap_hwmod omap54xx_dss_hwmod = {
.main_clk = "dss_dss_clk",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .context_offs = OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET,
- .modulemode = MODULEMODE_SWCTRL,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .context_offs = OMAP54XX_RM_DSS_DSS_CONTEXT_OFFSET,
+ .modulemode = MODULEMODE_SWCTRL,
+ .flags = HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_opt_clks,
@@ -414,8 +419,11 @@ static struct omap_hwmod omap54xx_dss_dispc_hwmod = {
.main_clk = "dss_dss_clk",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT |
+ HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode = MODULEMODE_SWCTRL,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_dispc_opt_clks,
@@ -456,8 +464,11 @@ static struct omap_hwmod omap54xx_dss_dsi1_a_hwmod = {
.main_clk = "dss_dss_clk",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT |
+ HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode = MODULEMODE_SWCTRL,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_dsi1_a_opt_clks,
@@ -476,8 +487,11 @@ static struct omap_hwmod omap54xx_dss_dsi1_c_hwmod = {
.main_clk = "dss_dss_clk",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT |
+ HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode = MODULEMODE_SWCTRL,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_dsi1_c_opt_clks,
@@ -515,8 +529,11 @@ static struct omap_hwmod omap54xx_dss_hdmi_hwmod = {
.main_clk = "dss_48mhz_clk",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT |
+ HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode = MODULEMODE_SWCTRL,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_hdmi_opt_clks,
@@ -554,8 +571,11 @@ static struct omap_hwmod omap54xx_dss_rfbi_hwmod = {
.clkdm_name = "dss_clkdm",
.prcm = {
.omap4 = {
- .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
- .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
+ .clkctrl_offs = OMAP54XX_CM_DSS_DSS_CLKCTRL_OFFSET,
+ .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT |
+ HWMOD_OMAP4_MODULEMODE_SHARED,
+ .modulemode = MODULEMODE_SWCTRL,
+ .modulemode_ref = &dss_modulemode_ref,
},
},
.opt_clks = dss_rfbi_opt_clks,
--
1.8.3.2
next prev parent reply other threads:[~2014-05-26 10:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 10:26 [PATCH] ARM: OMAP5: DSS hwmod data Tomi Valkeinen
2014-03-12 10:26 ` [PATCH] ARM: OMAP5: Add omap5 DSS related " Tomi Valkeinen
2014-03-12 10:33 ` [PATCH] ARM: OMAP5: DSS " Tomi Valkeinen
2014-03-16 11:41 ` Dmitry Lifshitz
2014-03-17 6:13 ` Tomi Valkeinen
2014-03-17 13:22 ` Dmitry Lifshitz
2014-03-17 13:28 ` Tomi Valkeinen
2014-03-17 14:22 ` Dmitry Lifshitz
2014-03-18 5:29 ` Tomi Valkeinen
2014-03-18 8:19 ` Dmitry Lifshitz
2014-03-18 8:37 ` Tomi Valkeinen
2014-03-18 12:23 ` Dmitry Lifshitz
2014-05-08 4:37 ` Paul Walmsley
2014-05-08 5:48 ` Archit Taneja
2014-05-08 16:01 ` Paul Walmsley
2014-05-09 6:19 ` Archit Taneja
2014-05-09 6:36 ` Tomi Valkeinen
2014-05-14 19:44 ` Paul Walmsley
2014-05-26 10:44 ` [RFC 1/2] ARM: OMAP2+: hwmod: Add refcounting for modulemode shared by multiple hwmods Archit Taneja
2014-05-26 10:44 ` Archit Taneja [this message]
2014-05-27 10:20 ` Rajendra Nayak
2014-05-27 10:49 ` Archit Taneja
2014-06-17 9:54 ` [RFC v2 0/2] arm: omap2+: hwmod: Allow hwmods to share same modulemode register filed Archit Taneja
2014-06-17 9:54 ` [RFC v2 1/2] arm: omap2+: hwmod: Add refcounting for modulemode shared by multiple hwmods Archit Taneja
2014-06-17 9:54 ` [RFC v2 2/2] arm: omap5 hwmod data: Example: Make DSS hwmods share MODULEMODE fields Archit Taneja
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=1401101095-27181-2-git-send-email-archit@ti.com \
--to=archit@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=tomi.valkeinen@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 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).