* [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
@ 2012-03-06 8:55 Peter Ujfalusi
2012-03-09 15:45 ` Peter Ujfalusi
0 siblings, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2012-03-06 8:55 UTC (permalink / raw)
To: Tony Lindgren, Paul Walmsley; +Cc: linux-omap, Jarkko Nikula, linux-arm-kernel
CLKS signal for McBSP ports can be selected from internal (PRCM) or external
(ABE_CLKS pin) source.
To be able to use existing code we need to create clock aliases consistent
among OMAP2/3/4.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi,
this patch should fix the clock reparenting on OMAP4 for McBSP ports.
Regards,
Peter
arch/arm/mach-omap2/clock44xx_data.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 08e86d7..7e76ac3 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3120,6 +3120,10 @@ static struct clk auxclkreq5_ck = {
static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X),
CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X),
+ CLK("omap-mcbsp.1", "pad_fck", &pad_clks_ck, CK_443X),
+ CLK("omap-mcbsp.2", "pad_fck", &pad_clks_ck, CK_443X),
+ CLK("omap-mcbsp.3", "pad_fck", &pad_clks_ck, CK_443X),
+ CLK("omap-mcbsp.4", "pad_fck", &pad_clks_ck, CK_443X),
CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X),
CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X),
CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X),
@@ -3254,12 +3258,16 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X),
CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
+ CLK("omap-mcbsp.1", "prcm_fck", &mcbsp1_sync_mux_ck, CK_443X),
CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_443X),
CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
+ CLK("omap-mcbsp.2", "prcm_fck", &mcbsp2_sync_mux_ck, CK_443X),
CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_443X),
CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
+ CLK("omap-mcbsp.3", "prcm_fck", &mcbsp3_sync_mux_ck, CK_443X),
CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_443X),
CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
+ CLK("omap-mcbsp.4", "prcm_fck", &mcbsp4_sync_mux_ck, CK_443X),
CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_443X),
CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X),
CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_443X),
--
1.7.8.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-06 8:55 [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks Peter Ujfalusi
@ 2012-03-09 15:45 ` Peter Ujfalusi
2012-03-09 18:00 ` Tony Lindgren
0 siblings, 1 reply; 7+ messages in thread
From: Peter Ujfalusi @ 2012-03-09 15:45 UTC (permalink / raw)
To: Tony Lindgren, Paul Walmsley; +Cc: linux-omap, linux-arm-kernel, Jarkko Nikula
Hi Paul, Tony,
On 03/06/2012 10:55 AM, Peter Ujfalusi wrote:
> CLKS signal for McBSP ports can be selected from internal (PRCM) or external
> (ABE_CLKS pin) source.
> To be able to use existing code we need to create clock aliases consistent
> among OMAP2/3/4.
Would you be able to take a look at this patch?
Thanks,
Péter
--
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] 7+ messages in thread
* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-09 15:45 ` Peter Ujfalusi
@ 2012-03-09 18:00 ` Tony Lindgren
2012-03-09 18:02 ` Paul Walmsley
0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2012-03-09 18:00 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Paul Walmsley, linux-omap, linux-arm-kernel, Jarkko Nikula
* Peter Ujfalusi <peter.ujfalusi@ti.com> [120309 07:47]:
> Hi Paul, Tony,
>
> On 03/06/2012 10:55 AM, Peter Ujfalusi wrote:
> > CLKS signal for McBSP ports can be selected from internal (PRCM) or external
> > (ABE_CLKS pin) source.
> > To be able to use existing code we need to create clock aliases consistent
> > among OMAP2/3/4.
>
> Would you be able to take a look at this patch?
To me this looks safe to merge via ASoC tree, assuming Paul
acks it too, and it does not cause merge conflicts with
Paul's changes:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-09 18:00 ` Tony Lindgren
@ 2012-03-09 18:02 ` Paul Walmsley
2012-03-09 18:04 ` Paul Walmsley
0 siblings, 1 reply; 7+ messages in thread
From: Paul Walmsley @ 2012-03-09 18:02 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Peter Ujfalusi, linux-omap, linux-arm-kernel, Jarkko Nikula
On Fri, 9 Mar 2012, Tony Lindgren wrote:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [120309 07:47]:
> > Hi Paul, Tony,
> >
> > On 03/06/2012 10:55 AM, Peter Ujfalusi wrote:
> > > CLKS signal for McBSP ports can be selected from internal (PRCM) or external
> > > (ABE_CLKS pin) source.
> > > To be able to use existing code we need to create clock aliases consistent
> > > among OMAP2/3/4.
> >
> > Would you be able to take a look at this patch?
>
> To me this looks safe to merge via ASoC tree, assuming Paul
> acks it too, and it does not cause merge conflicts with
> Paul's changes:
>
> Acked-by: Tony Lindgren <tony@atomide.com>
Please let's not merge this one yet. It should not be necessary to change
the clkdev aliases, this change should occur in the hwmod code.
- Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-09 18:02 ` Paul Walmsley
@ 2012-03-09 18:04 ` Paul Walmsley
2012-03-10 7:08 ` Paul Walmsley
0 siblings, 1 reply; 7+ messages in thread
From: Paul Walmsley @ 2012-03-09 18:04 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Peter Ujfalusi, linux-omap, linux-arm-kernel, Jarkko Nikula
On Fri, 9 Mar 2012, Paul Walmsley wrote:
> Please let's not merge this one yet. It should not be necessary to change
> the clkdev aliases, this change should occur in the hwmod code.
Sorry, sent this too quickly. Not the hwmod code, but the opt_clks
aliases in the hwmod data.
- Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-09 18:04 ` Paul Walmsley
@ 2012-03-10 7:08 ` Paul Walmsley
2012-03-12 9:53 ` Peter Ujfalusi
0 siblings, 1 reply; 7+ messages in thread
From: Paul Walmsley @ 2012-03-10 7:08 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Tony Lindgren, linux-omap, linux-arm-kernel, Jarkko Nikula
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3699 bytes --]
Hello Péter
could you please try this patch instead of the clkdev change?
It is based on my 'hwmod_enable_remaining_hwmods_devel_3.4' branch, but
the basic idea should work on v3.3-rc6 as well.
If it works for you, please let us know and we can queue this up along
with the hwmod data changes. Probably we should replace the changelog
also with the one from your patch, it might be a little more useful?
Suggestions welcome.
- Paul
From: Paul Walmsley <paul@pwsan.com>
Date: Fri, 9 Mar 2012 23:28:28 -0700
Subject: [PATCH] ARM: OMAP4: hwmod data: add McBSP parent clock aliases
Add optional parent clocks for the OMAP4 McBSP modules so the driver
can switch between parent clocks.
Based on a patch from Péter Ujfalusi <peter.ujfalusi@ti.com>.
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index e029992..b4a061d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -1921,6 +1921,11 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
{ .dma_req = -1 }
};
+static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
+ { .role = "pad_fck", .clk = "pad_clks_ck" },
+ { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
+};
+
static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
.name = "mcbsp1",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -1935,6 +1940,8 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
+ .opt_clks = mcbsp1_opt_clks,
+ .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
};
/* mcbsp2 */
@@ -1949,6 +1956,11 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
{ .dma_req = -1 }
};
+static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
+ { .role = "pad_fck", .clk = "pad_clks_ck" },
+ { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
+};
+
static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
.name = "mcbsp2",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -1963,6 +1975,8 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
+ .opt_clks = mcbsp2_opt_clks,
+ .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
};
/* mcbsp3 */
@@ -1977,6 +1991,11 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
{ .dma_req = -1 }
};
+static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
+ { .role = "pad_fck", .clk = "pad_clks_ck" },
+ { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
+};
+
static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
.name = "mcbsp3",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -1991,6 +2010,8 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
+ .opt_clks = mcbsp3_opt_clks,
+ .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
};
/* mcbsp4 */
@@ -2005,6 +2026,11 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
{ .dma_req = -1 }
};
+static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
+ { .role = "pad_fck", .clk = "pad_clks_ck" },
+ { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
+};
+
static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
.name = "mcbsp4",
.class = &omap44xx_mcbsp_hwmod_class,
@@ -2019,6 +2045,8 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
+ .opt_clks = mcbsp4_opt_clks,
+ .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
};
/*
--
1.7.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks
2012-03-10 7:08 ` Paul Walmsley
@ 2012-03-12 9:53 ` Peter Ujfalusi
0 siblings, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2012-03-12 9:53 UTC (permalink / raw)
To: Paul Walmsley; +Cc: Tony Lindgren, linux-omap, linux-arm-kernel, Jarkko Nikula
Hello Paul,
On 03/10/2012 09:08 AM, Paul Walmsley wrote:
>
> Hello Péter
>
> could you please try this patch instead of the clkdev change?
>
> It is based on my 'hwmod_enable_remaining_hwmods_devel_3.4' branch, but
> the basic idea should work on v3.3-rc6 as well.
>
> If it works for you, please let us know and we can queue this up along
> with the hwmod data changes. Probably we should replace the changelog
> also with the one from your patch, it might be a little more useful?
> Suggestions welcome.
Unfortunately I can not test the McBSP on OMAP4 at the moment. The patch
looks good, and as far as I can see it will be perfect for OMAP4.
Thank you.
In case you need:
> From: Paul Walmsley <paul@pwsan.com>
> Date: Fri, 9 Mar 2012 23:28:28 -0700
> Subject: [PATCH] ARM: OMAP4: hwmod data: add McBSP parent clock aliases
>
> Add optional parent clocks for the OMAP4 McBSP modules so the driver
> can switch between parent clocks.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.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 [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-12 9:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 8:55 [PATCH] ARM: OMAP4: clock: Add aliases for McBSP fclk clocks Peter Ujfalusi
2012-03-09 15:45 ` Peter Ujfalusi
2012-03-09 18:00 ` Tony Lindgren
2012-03-09 18:02 ` Paul Walmsley
2012-03-09 18:04 ` Paul Walmsley
2012-03-10 7:08 ` Paul Walmsley
2012-03-12 9:53 ` Peter Ujfalusi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox