From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-omap@vger.kernel.org,
"Högander Jouni" <jouni.hogander@nokia.com>,
"Tony Lindgren" <tony@atomide.com>
Subject: [PATCH 10/10] ARM: OMAP2: Clock: Combine 34xx l3_icks and l4_icks
Date: Tue, 19 Aug 2008 11:40:01 +0300 [thread overview]
Message-ID: <1219135201-10282-11-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1219135201-10282-10-git-send-email-tony@atomide.com>
From: Högander Jouni <jouni.hogander@nokia.com>
E.g dss_l3_ick and dss_l4_ick have same gating control. Having own
clock for both of them causes race condition between enable / disable.
This patch combines this kind of clocks and names new clock as <module>_ick.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index bb01e20..c38a8a0 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1189,27 +1189,34 @@ static const struct clksel gfx_l3_clksel[] = {
{ .parent = NULL }
};
-static struct clk gfx_l3_fck = {
- .name = "gfx_l3_fck",
+/* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */
+static struct clk gfx_l3_ck = {
+ .name = "gfx_l3_ck",
.parent = &l3_ick,
.init = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
.enable_bit = OMAP_EN_GFX_SHIFT,
+ .flags = CLOCK_IN_OMAP3430ES1,
+ .recalc = &followparent_recalc,
+};
+
+static struct clk gfx_l3_fck = {
+ .name = "gfx_l3_fck",
+ .parent = &gfx_l3_ck,
+ .init = &omap2_init_clksel_parent,
.clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
.clksel_mask = OMAP_CLKSEL_GFX_MASK,
.clksel = gfx_l3_clksel,
- .flags = CLOCK_IN_OMAP3430ES1 | RATE_PROPAGATES,
+ .flags = CLOCK_IN_OMAP3430ES1 | RATE_PROPAGATES |
+ PARENT_CONTROLS_CLOCK,
.clkdm_name = "gfx_3430es1_clkdm",
.recalc = &omap2_clksel_recalc,
};
static struct clk gfx_l3_ick = {
.name = "gfx_l3_ick",
- .parent = &l3_ick,
- .init = &omap2_init_clk_clkdm,
- .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
- .enable_bit = OMAP_EN_GFX_SHIFT,
- .flags = CLOCK_IN_OMAP3430ES1,
+ .parent = &gfx_l3_ck,
+ .flags = CLOCK_IN_OMAP3430ES1 | PARENT_CONTROLS_CLOCK,
.clkdm_name = "gfx_3430es1_clkdm",
.recalc = &followparent_recalc,
};
@@ -2153,19 +2160,9 @@ static struct clk cam_mclk = {
.recalc = &omap2_clksel_recalc,
};
-static struct clk cam_l3_ick = {
- .name = "cam_l3_ick",
- .parent = &l3_ick,
- .init = &omap2_init_clk_clkdm,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
- .enable_bit = OMAP3430_EN_CAM_SHIFT,
- .flags = CLOCK_IN_OMAP343X,
- .clkdm_name = "cam_clkdm",
- .recalc = &followparent_recalc,
-};
-
-static struct clk cam_l4_ick = {
- .name = "cam_l4_ick",
+static struct clk cam_ick = {
+ /* Handles both L3 and L4 clocks */
+ .name = "cam_ick",
.parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
@@ -2199,19 +2196,9 @@ static struct clk usbhost_48m_fck = {
.recalc = &followparent_recalc,
};
-static struct clk usbhost_l3_ick = {
- .name = "usbhost_l3_ick",
- .parent = &l3_ick,
- .init = &omap2_init_clk_clkdm,
- .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
- .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
- .flags = CLOCK_IN_OMAP3430ES2,
- .clkdm_name = "usbhost_clkdm",
- .recalc = &followparent_recalc,
-};
-
-static struct clk usbhost_l4_ick = {
- .name = "usbhost_l4_ick",
+static struct clk usbhost_ick = {
+ /* Handles both L3 and L4 clocks */
+ .name = "usbhost_ick",
.parent = &l4_ick,
.init = &omap2_init_clk_clkdm,
.enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
@@ -3093,6 +3080,7 @@ static struct clk *onchip_34xx_clks[] __initdata = {
&l3_ick,
&l4_ick,
&rm_ick,
+ &gfx_l3_ck,
&gfx_l3_fck,
&gfx_l3_ick,
&gfx_cg1_ck,
@@ -3174,12 +3162,10 @@ static struct clk *onchip_34xx_clks[] __initdata = {
&dss2_alwon_fck,
&dss_ick,
&cam_mclk,
- &cam_l3_ick,
- &cam_l4_ick,
+ &cam_ick,
&usbhost_120m_fck,
&usbhost_48m_fck,
- &usbhost_l3_ick,
- &usbhost_l4_ick,
+ &usbhost_ick,
&usbhost_sar_fck,
&usim_fck,
&gpt1_fck,
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-08-19 8:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 15:19 [PATCH 0/0] Power domain and clock domain patches for omap Tony Lindgren
2008-07-16 15:19 ` [PATCH 01/10] ARM: OMAP2: Powerdomain: Add base OMAP2/3 powerdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 02/10] ARM: OMAP2: Powerdomain: Add OMAP2/3 common powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 03/10] ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 04/10] ARM: OMAP: Powerdomain: Add OMAP3 powerdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 05/10] ARM: OMAP2: Clockdomain: Add base OMAP2/3 clockdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 06/10] ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 07/10] ARM: OMAP2: Clockdomain: Encode OMAP2/3 clockdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 08/10] ARM: OMAP2: Clockdomain: Associate clocks with clockdomains Tony Lindgren
2008-07-16 15:19 ` [PATCH 09/10] ARM: OMAP2: Clockdomain: Integrate OMAP3 clocks with clockdomain code Tony Lindgren
2008-07-16 15:19 ` [PATCH 10/10] ARM: OMAP2: Clock: Combine 34xx l3_icks and l4_icks Tony Lindgren
2008-07-21 22:29 ` [PATCH 0/0] Power domain and clock domain patches for omap Russell King - ARM Linux
2008-07-25 0:53 ` David Brownell
2008-08-18 16:34 ` Russell King - ARM Linux
2008-08-19 8:39 ` git-pull request for omap2-clock branch Tony Lindgren
2008-08-19 8:39 ` [PATCH 01/10] ARM: OMAP2: Powerdomain: Add base OMAP2/3 powerdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 02/10] ARM: OMAP2: Powerdomain: Add OMAP2/3 common powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 03/10] ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 04/10] ARM: OMAP: Powerdomain: Add OMAP3 powerdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 05/10] ARM: OMAP2: Clockdomain: Add base OMAP2/3 clockdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 06/10] ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code Tony Lindgren
2008-08-19 8:39 ` [PATCH 07/10] ARM: OMAP2: Clockdomain: Encode OMAP2/3 clockdomains Tony Lindgren
2008-08-19 8:39 ` [PATCH 08/10] ARM: OMAP2: Clockdomain: Associate clocks with clockdomains Tony Lindgren
2008-08-19 8:40 ` [PATCH 09/10] ARM: OMAP2: Clockdomain: Integrate OMAP3 clocks with clockdomain code Tony Lindgren
2008-08-19 8:40 ` Tony Lindgren [this message]
2008-08-19 9:11 ` git-pull request for omap2-clock branch Russell King - ARM Linux
2008-08-19 21:46 ` [PATCH 0/0] Power domain and clock domain patches for omap Dmitry Baryshkov
2008-08-20 6:38 ` Paul Walmsley
2008-08-20 8:20 ` Dmitry Baryshkov
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=1219135201-10282-11-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=jouni.hogander@nokia.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.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