* [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
@ 2008-04-28 8:29 Högander Jouni
2008-04-28 10:49 ` Felipe Balbi
2008-04-29 6:58 ` Paul Walmsley
0 siblings, 2 replies; 6+ messages in thread
From: Högander Jouni @ 2008-04-28 8:29 UTC (permalink / raw)
To: linux-omap; +Cc: ext Tony Lindgren, ext Paul Walmsley, igor.stoppa
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>
---
arch/arm/mach-omap2/clock34xx.h | 62 +++++++++++++++------------------------
1 files changed, 24 insertions(+), 38 deletions(-)
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 4b1dd71..85afe1e 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1200,27 +1200,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,
};
@@ -2160,19 +2167,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),
@@ -2206,19 +2203,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),
@@ -3094,6 +3081,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,
@@ -3175,12 +3163,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,
--
1.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
2008-04-28 8:29 [PATCH] PRCM: Combine 34xx l3_icks and l4_icks Högander Jouni
@ 2008-04-28 10:49 ` Felipe Balbi
2008-04-29 6:49 ` Högander Jouni
2008-04-29 6:58 ` Paul Walmsley
1 sibling, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2008-04-28 10:49 UTC (permalink / raw)
To: (Högander Jouni)
Cc: linux-omap, ext Tony Lindgren, ext Paul Walmsley, igor.stoppa
On Mon, 28 Apr 2008 11:29:53 +0300, jouni.hogander@nokia.com (Högander
Jouni) wrote:
> 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>
Good, the following patch fixes ehci-omap.c after clock name change :-)
Could you check, please:
From 4102f3ad5db10e662633c0f9ddee6aca43fec8e6 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@nokia.com>
Date: Mon, 28 Apr 2008 13:45:49 +0300
Subject: [PATCH] USB: EHCI: Fix clock name for ehci-omap.c
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Patch from Jouni Högander changed usbhost_l4_ick to
usbhost_ick, fixing in ehci-omap.c
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Jouni Högander <jouni.hogander@nokia.com>
---
drivers/usb/host/ehci-omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 495c979..be93c69 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -73,7 +73,7 @@ struct ehci_omap_clock_defs {
};
/* Clock names as per clock framework: May change so keep as #defs */
-#define USBHOST_ICKL "usbhost_l4_ick"
+#define USBHOST_ICKL "usbhost_ick"
#define USBHOST_120M_FCLK "usbhost_120m_fck"
#define USBHOST_48M_FCLK "usbhost_48m_fck"
#define USBHOST_TLL_ICKL "usbtll_ick"
--
1.5.5.1.57.g5909c
--
Best Regards,
Felipe Balbi
http://felipebalbi.com
me@felipebalbi.com
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
2008-04-28 10:49 ` Felipe Balbi
@ 2008-04-29 6:49 ` Högander Jouni
2008-04-30 0:32 ` Tony Lindgren
0 siblings, 1 reply; 6+ messages in thread
From: Högander Jouni @ 2008-04-29 6:49 UTC (permalink / raw)
To: ext Felipe Balbi
Cc: linux-omap, ext Tony Lindgren, ext Paul Walmsley, igor.stoppa
"ext Felipe Balbi" <me@felipebalbi.com> writes:
> On Mon, 28 Apr 2008 11:29:53 +0300, jouni.hogander@nokia.com (Högander
> Jouni) wrote:
>> 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>
>
> Good, the following patch fixes ehci-omap.c after clock name change
> :-)
Sorry, I should have used grep here. I did it now. There are no
other references to changed clock names than this you pointed out. I
checked caḿ_l3_ick, cam_l4_ick, usbhost_l3_ick, usbhost_l4_ick.
Yes, your patch needs to be applied if "[PATCH] PRCM: Combine 34xx
l3_icks and l4_icks" is applied.
>
> Could you check, please:
>
> From 4102f3ad5db10e662633c0f9ddee6aca43fec8e6 Mon Sep 17 00:00:00 2001
> From: Felipe Balbi <felipe.balbi@nokia.com>
> Date: Mon, 28 Apr 2008 13:45:49 +0300
> Subject: [PATCH] USB: EHCI: Fix clock name for ehci-omap.c
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
>
> Patch from Jouni Högander changed usbhost_l4_ick to
> usbhost_ick, fixing in ehci-omap.c
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> Cc: Jouni Högander <jouni.hogander@nokia.com>
> ---
> drivers/usb/host/ehci-omap.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> index 495c979..be93c69 100644
> --- a/drivers/usb/host/ehci-omap.c
> +++ b/drivers/usb/host/ehci-omap.c
> @@ -73,7 +73,7 @@ struct ehci_omap_clock_defs {
> };
>
> /* Clock names as per clock framework: May change so keep as #defs */
> -#define USBHOST_ICKL "usbhost_l4_ick"
> +#define USBHOST_ICKL "usbhost_ick"
> #define USBHOST_120M_FCLK "usbhost_120m_fck"
> #define USBHOST_48M_FCLK "usbhost_48m_fck"
> #define USBHOST_TLL_ICKL "usbtll_ick"
> --
> 1.5.5.1.57.g5909c
>
>
>
> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> me@felipebalbi.com
>
--
Jouni Högander
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
2008-04-29 6:49 ` Högander Jouni
@ 2008-04-30 0:32 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2008-04-30 0:32 UTC (permalink / raw)
To: Högander Jouni
Cc: ext Felipe Balbi, linux-omap, ext Paul Walmsley, igor.stoppa
* Högander Jouni <jouni.hogander@nokia.com> [080428 23:50]:
> "ext Felipe Balbi" <me@felipebalbi.com> writes:
>
> > On Mon, 28 Apr 2008 11:29:53 +0300, jouni.hogander@nokia.com (Högander
> > Jouni) wrote:
> >> 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>
> >
> > Good, the following patch fixes ehci-omap.c after clock name change
> > :-)
>
> Sorry, I should have used grep here. I did it now. There are no
> other references to changed clock names than this you pointed out. I
> checked caḿ_l3_ick, cam_l4_ick, usbhost_l3_ick, usbhost_l4_ick.
>
> Yes, your patch needs to be applied if "[PATCH] PRCM: Combine 34xx
> l3_icks and l4_icks" is applied.
I've merged this into Jouni's patch.
Tony
> >
> > Could you check, please:
> >
> > From 4102f3ad5db10e662633c0f9ddee6aca43fec8e6 Mon Sep 17 00:00:00 2001
> > From: Felipe Balbi <felipe.balbi@nokia.com>
> > Date: Mon, 28 Apr 2008 13:45:49 +0300
> > Subject: [PATCH] USB: EHCI: Fix clock name for ehci-omap.c
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=utf-8
> > Content-Transfer-Encoding: 8bit
> >
> > Patch from Jouni Högander changed usbhost_l4_ick to
> > usbhost_ick, fixing in ehci-omap.c
> >
> > Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> > Cc: Jouni Högander <jouni.hogander@nokia.com>
> > ---
> > drivers/usb/host/ehci-omap.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> > index 495c979..be93c69 100644
> > --- a/drivers/usb/host/ehci-omap.c
> > +++ b/drivers/usb/host/ehci-omap.c
> > @@ -73,7 +73,7 @@ struct ehci_omap_clock_defs {
> > };
> >
> > /* Clock names as per clock framework: May change so keep as #defs */
> > -#define USBHOST_ICKL "usbhost_l4_ick"
> > +#define USBHOST_ICKL "usbhost_ick"
> > #define USBHOST_120M_FCLK "usbhost_120m_fck"
> > #define USBHOST_48M_FCLK "usbhost_48m_fck"
> > #define USBHOST_TLL_ICKL "usbtll_ick"
> > --
> > 1.5.5.1.57.g5909c
> >
> >
> >
> > --
> > Best Regards,
> >
> > Felipe Balbi
> > http://felipebalbi.com
> > me@felipebalbi.com
> >
>
> --
> Jouni Högander
>
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
2008-04-28 8:29 [PATCH] PRCM: Combine 34xx l3_icks and l4_icks Högander Jouni
2008-04-28 10:49 ` Felipe Balbi
@ 2008-04-29 6:58 ` Paul Walmsley
2008-04-30 0:32 ` Tony Lindgren
1 sibling, 1 reply; 6+ messages in thread
From: Paul Walmsley @ 2008-04-29 6:58 UTC (permalink / raw)
To: Högander Jouni; +Cc: linux-omap, ext Tony Lindgren, igor.stoppa
[-- Attachment #1: Type: TEXT/PLAIN, Size: 501 bytes --]
On Mon, 28 Apr 2008, Högander Jouni wrote:
> 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>
although it's less of a race issue, than it is a convenience issue for
OMAP2/3 device driver folks...
- Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PRCM: Combine 34xx l3_icks and l4_icks
2008-04-29 6:58 ` Paul Walmsley
@ 2008-04-30 0:32 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2008-04-30 0:32 UTC (permalink / raw)
To: Paul Walmsley; +Cc: Högander Jouni, linux-omap, igor.stoppa
* Paul Walmsley <paul@pwsan.com> [080428 23:58]:
> On Mon, 28 Apr 2008, Högander Jouni wrote:
>
> > 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>
>
> although it's less of a race issue, than it is a convenience issue for
> OMAP2/3 device driver folks...
Pushing today, with Felipe's fix merged into this.
Tony
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-30 0:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 8:29 [PATCH] PRCM: Combine 34xx l3_icks and l4_icks Högander Jouni
2008-04-28 10:49 ` Felipe Balbi
2008-04-29 6:49 ` Högander Jouni
2008-04-30 0:32 ` Tony Lindgren
2008-04-29 6:58 ` Paul Walmsley
2008-04-30 0:32 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox