All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
@ 2013-05-06 21:11 ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Arnd, Olof,

The following two patches fix a couple issues in the Tegra20 clock driver
that show up on specific platforms. They were sent a little late for 3.9,
and I forgot to include them for 3.10 since they weren't reposted:-(

Patch 1 is clearly a bug-fix. Someone pedantic could argue that patch 2
is a new feature since it's the last piece to enabling AC'97 support, but
I'd argue that it's a bug in the clock driver that it didn't support this
clock when it was first written:-)

These patches logically belong to Tegra's for-3.10/clk branch, but feel
free to apply them where is easiest; it'd be fine to defer them to a post-
3.10-rc1 fixes branch too if you want.

Lucas Stach (2):
  clk: tegra: remove USB from clk init table
  clk: tegra: add ac97 controller clock

 drivers/clk/tegra/clk-tegra20.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
@ 2013-05-06 21:11 ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: linux-arm-kernel

From: Stephen Warren <swarren@nvidia.com>

Arnd, Olof,

The following two patches fix a couple issues in the Tegra20 clock driver
that show up on specific platforms. They were sent a little late for 3.9,
and I forgot to include them for 3.10 since they weren't reposted:-(

Patch 1 is clearly a bug-fix. Someone pedantic could argue that patch 2
is a new feature since it's the last piece to enabling AC'97 support, but
I'd argue that it's a bug in the clock driver that it didn't support this
clock when it was first written:-)

These patches logically belong to Tegra's for-3.10/clk branch, but feel
free to apply them where is easiest; it'd be fine to defer them to a post-
3.10-rc1 fixes branch too if you want.

Lucas Stach (2):
  clk: tegra: remove USB from clk init table
  clk: tegra: add ac97 controller clock

 drivers/clk/tegra/clk-tegra20.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] clk: tegra: remove USB from clk init table
  2013-05-06 21:11 ` Stephen Warren
@ 2013-05-06 21:11     ` Stephen Warren
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Lucas Stach,
	Stephen Warren

From: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>

The USB clocks are just clock gates, so no need to set a specific clock.
In fact trying to set a specific clock is just a NOP if the requested
clockrate is the same as those of the parent (clk_m) or will trigger a
WARN_ON() if rates don't match up.

As we are not setting a specific rate, nor activating the clocks at
init, there is no point in keeping the the usb entries in the clock init
table.

Signed-off-by: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
Acked-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Prashant Gaikwad <pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Acked-by: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Tested-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/clk/tegra/clk-tegra20.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index b0405b6..ecfe532 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -1234,9 +1234,6 @@ static __initdata struct tegra_clk_init_table init_table[] = {
 	{uartc, pll_p, 0, 0},
 	{uartd, pll_p, 0, 0},
 	{uarte, pll_p, 0, 0},
-	{usbd, clk_max, 12000000, 0},
-	{usb2, clk_max, 12000000, 0},
-	{usb3, clk_max, 12000000, 0},
 	{pll_a, clk_max, 56448000, 1},
 	{pll_a_out0, clk_max, 11289600, 1},
 	{cdev1, clk_max, 0, 1},
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/2] clk: tegra: remove USB from clk init table
@ 2013-05-06 21:11     ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: linux-arm-kernel

From: Lucas Stach <dev@lynxeye.de>

The USB clocks are just clock gates, so no need to set a specific clock.
In fact trying to set a specific clock is just a NOP if the requested
clockrate is the same as those of the parent (clk_m) or will trigger a
WARN_ON() if rates don't match up.

As we are not setting a specific rate, nor activating the clocks at
init, there is no point in keeping the the usb entries in the clock init
table.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/clk/tegra/clk-tegra20.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index b0405b6..ecfe532 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -1234,9 +1234,6 @@ static __initdata struct tegra_clk_init_table init_table[] = {
 	{uartc, pll_p, 0, 0},
 	{uartd, pll_p, 0, 0},
 	{uarte, pll_p, 0, 0},
-	{usbd, clk_max, 12000000, 0},
-	{usb2, clk_max, 12000000, 0},
-	{usb3, clk_max, 12000000, 0},
 	{pll_a, clk_max, 56448000, 1},
 	{pll_a_out0, clk_max, 11289600, 1},
 	{cdev1, clk_max, 0, 1},
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] clk: tegra: add ac97 controller clock
  2013-05-06 21:11 ` Stephen Warren
@ 2013-05-06 21:11     ` Stephen Warren
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: arm-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Lucas Stach,
	Stephen Warren

From: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>

AC97 controller clock is hardwired to pll_a_out0.

Signed-off-by: Lucas Stach <dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
Acked-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Prashant Gaikwad <pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Acked-by: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Tested-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/clk/tegra/clk-tegra20.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index ecfe532..2547bc0 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -872,6 +872,14 @@ static void __init tegra20_periph_clk_init(void)
 	struct clk *clk;
 	int i;
 
+	/* ac97 */
+	clk = tegra_clk_register_periph_gate("ac97", "pll_a_out0",
+				    TEGRA_PERIPH_ON_APB,
+				    clk_base, 0, 3, &periph_l_regs,
+				    periph_clk_enb_refcnt);
+	clk_register_clkdev(clk, NULL, "tegra20-ac97");
+	clks[ac97] = clk;
+
 	/* apbdma */
 	clk = tegra_clk_register_periph_gate("apbdma", "pclk", 0, clk_base,
 				    0, 34, &periph_h_regs,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] clk: tegra: add ac97 controller clock
@ 2013-05-06 21:11     ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-06 21:11 UTC (permalink / raw)
  To: linux-arm-kernel

From: Lucas Stach <dev@lynxeye.de>

AC97 controller clock is hardwired to pll_a_out0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/clk/tegra/clk-tegra20.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index ecfe532..2547bc0 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -872,6 +872,14 @@ static void __init tegra20_periph_clk_init(void)
 	struct clk *clk;
 	int i;
 
+	/* ac97 */
+	clk = tegra_clk_register_periph_gate("ac97", "pll_a_out0",
+				    TEGRA_PERIPH_ON_APB,
+				    clk_base, 0, 3, &periph_l_regs,
+				    periph_clk_enb_refcnt);
+	clk_register_clkdev(clk, NULL, "tegra20-ac97");
+	clks[ac97] = clk;
+
 	/* apbdma */
 	clk = tegra_clk_register_periph_gate("apbdma", "pclk", 0, clk_base,
 				    0, 34, &periph_h_regs,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
  2013-05-06 21:11 ` Stephen Warren
@ 2013-05-09 23:55     ` Olof Johansson
  -1 siblings, 0 replies; 10+ messages in thread
From: Olof Johansson @ 2013-05-09 23:55 UTC (permalink / raw)
  To: Stephen Warren
  Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren, mturquette-QSEj5FYQhm4dnm+yROfE0A

On Mon, May 06, 2013 at 03:11:09PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Arnd, Olof,
> 
> The following two patches fix a couple issues in the Tegra20 clock driver
> that show up on specific platforms. They were sent a little late for 3.9,
> and I forgot to include them for 3.10 since they weren't reposted:-(

Applied to fixes now, sorry for missing them earlier.

> Patch 1 is clearly a bug-fix. Someone pedantic could argue that patch 2
> is a new feature since it's the last piece to enabling AC'97 support, but
> I'd argue that it's a bug in the clock driver that it didn't support this
> clock when it was first written:-)

For very early -rc we can be a bit more flexible, so this is ok with me at the
moment.

> These patches logically belong to Tegra's for-3.10/clk branch, but feel
> free to apply them where is easiest; it'd be fine to defer them to a post-
> 3.10-rc1 fixes branch too if you want.

Postponed in effect due to missing them earlier.

Btw, since the drivers have moved and most of the churn is completed, fixes
like these really can go straight to Mike Turquette from here on out.


-Olof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
@ 2013-05-09 23:55     ` Olof Johansson
  0 siblings, 0 replies; 10+ messages in thread
From: Olof Johansson @ 2013-05-09 23:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 06, 2013 at 03:11:09PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> Arnd, Olof,
> 
> The following two patches fix a couple issues in the Tegra20 clock driver
> that show up on specific platforms. They were sent a little late for 3.9,
> and I forgot to include them for 3.10 since they weren't reposted:-(

Applied to fixes now, sorry for missing them earlier.

> Patch 1 is clearly a bug-fix. Someone pedantic could argue that patch 2
> is a new feature since it's the last piece to enabling AC'97 support, but
> I'd argue that it's a bug in the clock driver that it didn't support this
> clock when it was first written:-)

For very early -rc we can be a bit more flexible, so this is ok with me at the
moment.

> These patches logically belong to Tegra's for-3.10/clk branch, but feel
> free to apply them where is easiest; it'd be fine to defer them to a post-
> 3.10-rc1 fixes branch too if you want.

Postponed in effect due to missing them earlier.

Btw, since the drivers have moved and most of the churn is completed, fixes
like these really can go straight to Mike Turquette from here on out.


-Olof

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
  2013-05-09 23:55     ` Olof Johansson
@ 2013-05-10  2:54         ` Stephen Warren
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-10  2:54 UTC (permalink / raw)
  To: Olof Johansson
  Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Stephen Warren, mturquette-QSEj5FYQhm4dnm+yROfE0A

On 05/09/2013 05:55 PM, Olof Johansson wrote:
> On Mon, May 06, 2013 at 03:11:09PM -0600, Stephen Warren wrote:
>> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>> Arnd, Olof,
>>
>> The following two patches fix a couple issues in the Tegra20 clock driver
>> that show up on specific platforms. They were sent a little late for 3.9,
>> and I forgot to include them for 3.10 since they weren't reposted:-(
> 
> Applied to fixes now, sorry for missing them earlier.

Great, thanks. Just to be clear; it was me who missed picking them up; I
don't think they'd been forwarded to you before with all the acks in place.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] ARM: tegra: a couple clock bug-fixes
@ 2013-05-10  2:54         ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2013-05-10  2:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/09/2013 05:55 PM, Olof Johansson wrote:
> On Mon, May 06, 2013 at 03:11:09PM -0600, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Arnd, Olof,
>>
>> The following two patches fix a couple issues in the Tegra20 clock driver
>> that show up on specific platforms. They were sent a little late for 3.9,
>> and I forgot to include them for 3.10 since they weren't reposted:-(
> 
> Applied to fixes now, sorry for missing them earlier.

Great, thanks. Just to be clear; it was me who missed picking them up; I
don't think they'd been forwarded to you before with all the acks in place.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-05-10  2:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-06 21:11 [PATCH 0/2] ARM: tegra: a couple clock bug-fixes Stephen Warren
2013-05-06 21:11 ` Stephen Warren
     [not found] ` <1367874671-11474-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-06 21:11   ` [PATCH 1/2] clk: tegra: remove USB from clk init table Stephen Warren
2013-05-06 21:11     ` Stephen Warren
2013-05-06 21:11   ` [PATCH 2/2] clk: tegra: add ac97 controller clock Stephen Warren
2013-05-06 21:11     ` Stephen Warren
2013-05-09 23:55   ` [PATCH 0/2] ARM: tegra: a couple clock bug-fixes Olof Johansson
2013-05-09 23:55     ` Olof Johansson
     [not found]     ` <20130509235533.GA19697-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2013-05-10  2:54       ` Stephen Warren
2013-05-10  2:54         ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.