Skip to contentSkip to conversation

clk: ux500: Make mtu driver use apb_pclock

PATCH New Ulf Hansson 6 participants 12 messages Oct 24, 2012 – Nov 16, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

From: Ulf Hansson <[email protected]>

The apb clock was before the "common" clock driver for ux500 was merged, handled internally by the clock driver. Now this clock needs to be managed from the mtu driver as a separate clock.

This patches is based in 3.7 rc2.

It is important the "ARM nomadik patch" is merged together with the clock patch to not break boot. Therefore I suggest this series to go through Mike Turquettes clock tree.

Ulf Hansson (2):
clk: ux500: Register mtu apb_pclocks
ARM: plat-nomadik: Use apb_pclock in mtu driver

 arch/arm/plat-nomadik/timer.c |    8 +++++++-
 drivers/clk/ux500/u8500_clk.c |    9 +++------
 2 files changed, 10 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/2 clk: ux500: Register mtu apb_pclocks

From: Ulf Hansson <[email protected]>

---
 drivers/clk/ux500/u8500_clk.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/clk/ux500/u8500_clk.c +3 -6
index 4ec6f60..8ca3227 100644
@@ -160,12 +160,6 @@ void u8500_clk_init(void)
 	clk = clk_reg_prcmu_gate("uiccclk", NULL, PRCMU_UICCCLK, CLK_IS_ROOT);
 	clk_register_clkdev(clk, NULL, "uicc");
 
-	/*
-	 * FIXME: The MTU clocks might need some kind of "parent muxed join"
-	 * and these have no K-clocks. For now, we ignore the missing
-	 * connection to the corresponding P-clocks, p6_mtu0_clk and
-	 * p6_mtu1_clk. Instead timclk is used which is the valid parent.
-	 */
 	clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, CLK_IS_ROOT);
 	clk_register_clkdev(clk, NULL, "mtu0");
 	clk_register_clkdev(clk, NULL, "mtu1");
@@ -402,8 +396,11 @@ void u8500_clk_init(void)
 
 	clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", U8500_CLKRST6_BASE,
 				BIT(6), 0);
+	clk_register_clkdev(clk, "apb_pclk", "mtu0");
+
 	clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", U8500_CLKRST6_BASE,
 				BIT(7), 0);
+	clk_register_clkdev(clk, "apb_pclk", "mtu1");
 
 	/* PRCC K-clocks
 	 *
Signature · 1 line
1.7.10
#2 lore raw

PATCH 2/2 ARM: plat-nomadik: Use apb_pclock in mtu driver

In reply to Ulf Hansson

From: Ulf Hansson <[email protected]>

---
 arch/arm/plat-nomadik/timer.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/plat-nomadik/timer.c +7 -1
index 9222e55..17c690d 100644
@@ -177,9 +177,15 @@ void nmdk_clksrc_reset(void)
 void __init nmdk_timer_init(void __iomem *base)
 {
 	unsigned long rate;
-	struct clk *clk0;
+	struct clk *clk0, *pclk0;
 
 	mtu_base = base;
+
+	pclk0 = clk_get_sys("mtu0", "apb_pclk");
+	BUG_ON(IS_ERR(pclk0));
+	BUG_ON(clk_prepare(pclk0) < 0);
+	BUG_ON(clk_enable(pclk0) < 0);
+
 	clk0 = clk_get_sys("mtu0", NULL);
 	BUG_ON(IS_ERR(clk0));
 	BUG_ON(clk_prepare(clk0) < 0);
Signature · 1 line
1.7.10
#3 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

In reply to Ulf Hansson
Quoted 11 lines · Ulf Hansson

From: Ulf Hansson <[email protected]>

The apb clock was before the "common" clock driver for ux500 was merged, handled internally by the clock driver. Now this clock needs to be managed from the mtu driver as a separate clock.

This patches is based in 3.7 rc2.

It is important the "ARM nomadik patch" is merged together with the clock patch to not break boot. Therefore I suggest this series to go through Mike Turquettes clock tree.

OK go ahead:

Yours,
Linus Walleij

#4 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoting Linus Walleij (2012-10-24 10:25:26)

Quoted 8 lines · Ulf Hansson
Quoted 7 lines

From: Ulf Hansson <[email protected]>

The apb clock was before the "common" clock driver for ux500 was merged, handled internally by the clock driver. Now this clock needs to be managed from the mtu driver as a separate clock.

Quoted 9 lines
Quoted 5 lines

This patches is based in 3.7 rc2.

It is important the "ARM nomadik patch" is merged together with the clock patch to not break boot. Therefore I suggest this series to go through Mike Turquettes clock tree.

OK go ahead:

I've taken these into clk-next. While the patches are trivial I'd still prefer a changelog in the future. For instance, it would be nice to explain why removing the block comment is OK in the first patch.

Thanks,
Mike

Quoted 2 lines

Yours,
Linus Walleij

#5 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoted 15 lines · Mike Turquette

Quoting Linus Walleij (2012-10-24 10:25:26)

Quoted 14 lines · Ulf Hansson
Quoted 12 lines

From: Ulf Hansson <[email protected]>

The apb clock was before the "common" clock driver for ux500 was merged, handled internally by the clock driver. Now this clock needs to be managed from the mtu driver as a separate clock.

This patches is based in 3.7 rc2.

It is important the "ARM nomadik patch" is merged together with the clock patch to not break boot. Therefore I suggest this series to go through Mike Turquettes clock tree.

Quoted 6 lines
Quoted 2 lines

OK go ahead:

I've taken these into clk-next. While the patches are trivial I'd still prefer a changelog in the future. For instance, it would be nice to explain why removing the block comment is OK in the first patch.

So there may be some collision in linux-next due to this, because I've moved the nomadik timer to drivers/clksrc and deleted the entire plat-nomadik directory.

I don't know quite how ingenious git is in detecting patches on moved files, but if it's causing trouble I think it's better if you could ACK them and we could reubmit them to ARM SoC on the multiplatform branch. i.e. this one:
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=shortlog;h=refs/heads/next/multiplatform

Yours,
Linus Walleij

#6 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoting Linus Walleij (2012-11-11 10:47:46)

Quoted 28 lines · Mike Turquette
Quoted 15 lines

Quoting Linus Walleij (2012-10-24 10:25:26)

Quoted 14 lines · Ulf Hansson
Quoted 12 lines

From: Ulf Hansson <[email protected]>

The apb clock was before the "common" clock driver for ux500 was merged, handled internally by the clock driver. Now this clock needs to be managed from the mtu driver as a separate clock.

This patches is based in 3.7 rc2.

It is important the "ARM nomadik patch" is merged together with the clock patch to not break boot. Therefore I suggest this series to go through Mike Turquettes clock tree.

Quoted 6 lines
Quoted 2 lines

OK go ahead:

I've taken these into clk-next. While the patches are trivial I'd still prefer a changelog in the future. For instance, it would be nice to explain why removing the block comment is OK in the first patch.

So there may be some collision in linux-next due to this, because I've moved the nomadik timer to drivers/clksrc and deleted the entire plat-nomadik directory.

Quoted 7 lines

I don't know quite how ingenious git is in detecting patches on moved files, but if it's causing trouble I think it's better if you could ACK them and we could reubmit them to ARM SoC on the multiplatform branch. i.e. this one:
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=shortlog;h=refs/heads/next/multiplatform

Those patches have my ACK. Do you want to wait to see if something goes boom or would you rather I drop them from clk-next preemptively?

Regards,
Mike

Quoted 7 lines

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#7 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoted 10 lines · Mike Turquette

Quoting Linus Walleij (2012-11-11 10:47:46)

Quoted 7 lines

I don't know quite how ingenious git is in detecting patches on moved files, but if it's causing trouble I think it's better if you could ACK them and we could reubmit them to ARM SoC on the multiplatform branch. i.e. this one:
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=shortlog;h=refs/heads/next/multiplatform

Quoted 2 lines

Those patches have my ACK. Do you want to wait to see if something goes boom or would you rather I drop them from clk-next preemptively?

Hm that's basically a question of how smart git is when merging these trees together.

Arnd, Olof: what is your experience? If one tree is moving files and another tree is patching them, should we try to rebase these onto your branch in ARM SoC and submit them there instead?

Yours,
Linus Walleij

#8 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoted 14 lines · Linus Walleij
Quoted 10 lines · Mike Turquette

Quoting Linus Walleij (2012-11-11 10:47:46)

Quoted 7 lines

I don't know quite how ingenious git is in detecting patches on moved files, but if it's causing trouble I think it's better if you could ACK them and we could reubmit them to ARM SoC on the multiplatform branch. i.e. this one:
http://git.kernel.org/?p=linux/kernel/git/arm/arm-soc.git;a=shortlog;h=refs/heads/next/multiplatform

Quoted 2 lines

Those patches have my ACK. Do you want to wait to see if something goes boom or would you rather I drop them from clk-next preemptively?

Quoted 7 lines

Hm that's basically a question of how smart git is when merging these trees together.

Arnd, Olof: what is your experience? If one tree is moving files and another tree is patching them, should we try to rebase these onto your branch in ARM SoC and submit them there instead?

rename vs change conflicts are usually handled, but not always. The one thing that never works is when part of one file is moved into another file (or two files get merged into one) and another patch changes the same file.

If I understand the problem at hand correctly, the safe solution should be to base the ux500 clk changes on top of c3b9d1db23c4e, which is in the nomadik/plat-removal branch in arm-soc that got merged into next/multiplatform. I would prefer if you use that as a base instead of the larger next/multiplatform branch that also contains vt8500 and other changes.

Arnd

#9 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoted 6 lines · Arnd Bergmann

If I understand the problem at hand correctly, the safe solution should be to base the ux500 clk changes on top of c3b9d1db23c4e, which is in the nomadik/plat-removal branch in arm-soc that got merged into next/multiplatform. I would prefer if you use that as a base instead of the larger next/multiplatform branch that also contains vt8500 and other changes.

OK I'll take a stab at this and see if I can fix it...

Yours,
Linus Walleij

#10 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoting Linus Walleij (2012-11-15 05:29:32)

Quoted 11 lines · Arnd Bergmann
Quoted 7 lines

If I understand the problem at hand correctly, the safe solution should be to base the ux500 clk changes on top of c3b9d1db23c4e, which is in the nomadik/plat-removal branch in arm-soc that got merged into next/multiplatform. I would prefer if you use that as a base instead of the larger next/multiplatform branch that also contains vt8500 and other changes.

OK I'll take a stab at this and see if I can fix it...

I've dropped both of these patches from clk-next.

Regards,
Mike

Quoted 2 lines

Yours,
Linus Walleij

#11 lore raw

cover clk: ux500: Make mtu driver use apb_pclock

Quoted 11 lines · Mike Turquette

Quoting Linus Walleij (2012-11-15 05:29:32)

Quoted 10 lines · Arnd Bergmann
Quoted 7 lines

If I understand the problem at hand correctly, the safe solution should be to base the ux500 clk changes on top of c3b9d1db23c4e, which is in the nomadik/plat-removal branch in arm-soc that got merged into next/multiplatform. I would prefer if you use that as a base instead of the larger next/multiplatform branch that also contains vt8500 and other changes.

OK I'll take a stab at this and see if I can fix it...

Thanks Linus!

Quoted 4 lines
Quoted 1 line

I've dropped both of these patches from clk-next.

Thanks Mike!

Quoted 5 lines

Regards,
Mike

Quoted 2 lines

Yours,
Linus Walleij

Kind regards
Ulf Hansson