linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock
@ 2012-04-25 21:13 Rafael J. Wysocki
  2012-05-07  1:12 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Kuninori Morimoto
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-04-25 21:13 UTC (permalink / raw)
  To: linux-sh

On Monday, April 02, 2012, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Applied to the r8a7740 branch of the renesas.git tree.

Thanks,
Rafael


> ---
>  arch/arm/mach-shmobile/clock-r8a7740.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
> index 3b35b9a..4a659f2e 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7740.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7740.c
> @@ -257,7 +257,7 @@ enum {
>  	MSTP222,
>  	MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
>  
> -	MSTP329, MSTP323,
> +	MSTP329, MSTP328, MSTP323,
>  
>  	MSTP_NR
>  };
> @@ -280,6 +280,7 @@ static struct clk mstp_clks[MSTP_NR] = {
>  	[MSTP200] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB],	SMSTPCR2,  0, 0), /* SCIFA4 */
>  
>  	[MSTP329] = SH_CLK_MSTP32(&r_clk,		SMSTPCR3, 29, 0), /* CMT10 */
> +	[MSTP328] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3, 28, 0), /* FSI */
>  	[MSTP323] = SH_CLK_MSTP32(&div6_clks[DIV6_SUB],	SMSTPCR3, 23, 0), /* IIC1 */
>  };
>  
> @@ -334,6 +335,7 @@ static struct clk_lookup lookups[] = {
>  	CLKDEV_DEV_ID("sh-sci.6",		&mstp_clks[MSTP230]),
>  
>  	CLKDEV_DEV_ID("sh_cmt.10",		&mstp_clks[MSTP329]),
> +	CLKDEV_DEV_ID("sh_fsi2",		&mstp_clks[MSTP328]),
>  	CLKDEV_DEV_ID("i2c-sh_mobile.1",	&mstp_clks[MSTP323]),
>  };
>  
> 


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

* [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
@ 2012-05-07  1:12 ` Kuninori Morimoto
  2012-05-07  4:10 ` Simon Horman
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2012-05-07  1:12 UTC (permalink / raw)
  To: linux-sh

If the clocks is always same value as the parent clock,
we can use followparent_recalc() for .recalc

Reported-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/clock-r8a7740.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 89a2f9d..81b54a6 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -188,11 +188,6 @@ static struct clk *usb24s_parents[] = {
 	[1] = &extal2_clk
 };
 
-static unsigned long usb24s_recalc(struct clk *clk)
-{
-	return clk->parent->rate;
-};
-
 static int usb24s_enable(struct clk *clk)
 {
 	__raw_writel(__raw_readl(USBCKCR) & ~(1 << 8), USBCKCR);
@@ -234,7 +229,7 @@ static int usb24s_set_parent(struct clk *clk, struct clk *parent)
 }
 
 static struct sh_clk_ops usb24s_clk_ops = {
-	.recalc		= usb24s_recalc,
+	.recalc		= followparent_recalc,
 	.enable		= usb24s_enable,
 	.disable	= usb24s_disable,
 	.set_parent	= usb24s_set_parent,
-- 
1.7.5.4


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

* Re: [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
  2012-05-07  1:12 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Kuninori Morimoto
@ 2012-05-07  4:10 ` Simon Horman
  2012-05-07  5:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Kuninori Morimoto
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2012-05-07  4:10 UTC (permalink / raw)
  To: linux-sh

On Sun, May 06, 2012 at 06:12:41PM -0700, Kuninori Morimoto wrote:
> If the clocks is always same value as the parent clock,
> we can use followparent_recalc() for .recalc
> 
> Reported-by: Paul Mundt <lethal@linux-sh.org>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Reviewed-by: Simon Horman <horms@verge.net.au>

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

* [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
  2012-05-07  1:12 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Kuninori Morimoto
  2012-05-07  4:10 ` Simon Horman
@ 2012-05-07  5:58 ` Kuninori Morimoto
  2012-05-07  6:23 ` Simon Horman
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2012-05-07  5:58 UTC (permalink / raw)
  To: linux-sh

armadillo800eva board is using sh-eth, but clock-r8a7740 didn't care it.
This clock was enabled by boot-loader.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |    1 +
 arch/arm/mach-shmobile/clock-r8a7740.c         |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 0cfaec5..e750ea6 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -321,6 +321,7 @@ static struct resource sh_eth_resources[] = {
 
 static struct platform_device sh_eth_device = {
 	.name = "sh-eth",
+	.id = -1,
 	.dev = {
 		.platform_data = &sh_eth_platdata,
 	},
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 81b54a6..26eea5f 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -352,6 +352,7 @@ enum {
 
 	MSTP329, MSTP328, MSTP323, MSTP320,
 	MSTP314, MSTP313, MSTP312,
+	MSTP309,
 
 	MSTP416, MSTP415, MSTP407, MSTP406,
 
@@ -382,6 +383,7 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3, 14, 0), /* SDHI0 */
 	[MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3, 13, 0), /* SDHI1 */
 	[MSTP312] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3, 12, 0), /* MMC */
+	[MSTP309] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3,  9, 0), /* GEther */
 
 	[MSTP416] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR4, 16, 0), /* USBHOST */
 	[MSTP415] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR4, 15, 0), /* SDHI2 */
@@ -447,6 +449,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0",	&mstp_clks[MSTP314]),
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1",	&mstp_clks[MSTP313]),
 	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
+	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
 
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),
 
-- 
1.7.5.4


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

* Re: [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
                   ` (2 preceding siblings ...)
  2012-05-07  5:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Kuninori Morimoto
@ 2012-05-07  6:23 ` Simon Horman
  2012-05-07 18:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Rafael J. Wysocki
  2012-05-07 18:59 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Rafael J. Wysocki
  5 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2012-05-07  6:23 UTC (permalink / raw)
  To: linux-sh

On Sun, May 06, 2012 at 10:58:41PM -0700, Kuninori Morimoto wrote:
> armadillo800eva board is using sh-eth, but clock-r8a7740 didn't care it.
> This clock was enabled by boot-loader.
> This patch fix it up.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Reviewed-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
                   ` (3 preceding siblings ...)
  2012-05-07  6:23 ` Simon Horman
@ 2012-05-07 18:58 ` Rafael J. Wysocki
  2012-05-07 18:59 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Rafael J. Wysocki
  5 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-05-07 18:58 UTC (permalink / raw)
  To: linux-sh

On Monday, May 07, 2012, Simon Horman wrote:
> On Sun, May 06, 2012 at 06:12:41PM -0700, Kuninori Morimoto wrote:
> > If the clocks is always same value as the parent clock,
> > we can use followparent_recalc() for .recalc
> > 
> > Reported-by: Paul Mundt <lethal@linux-sh.org>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Reviewed-by: Simon Horman <horms@verge.net.au>

Applied to the r8a7740 branch of the renesas.git tree.

Thanks,
Rafael

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

* Re: [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock
  2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
                   ` (4 preceding siblings ...)
  2012-05-07 18:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Rafael J. Wysocki
@ 2012-05-07 18:59 ` Rafael J. Wysocki
  5 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2012-05-07 18:59 UTC (permalink / raw)
  To: linux-sh

On Monday, May 07, 2012, Simon Horman wrote:
> On Sun, May 06, 2012 at 10:58:41PM -0700, Kuninori Morimoto wrote:
> > armadillo800eva board is using sh-eth, but clock-r8a7740 didn't care it.
> > This clock was enabled by boot-loader.
> > This patch fix it up.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Reviewed-by: Simon Horman <horms@verge.net.au>

Applied to the armadillo800eva branch of the renesas.git tree.

Thanks,
Rafael

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

end of thread, other threads:[~2012-05-07 18:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 21:13 [PATCH] ARM: mach-shmobile: clock-r8a7740: add FSI clock Rafael J. Wysocki
2012-05-07  1:12 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Kuninori Morimoto
2012-05-07  4:10 ` Simon Horman
2012-05-07  5:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Kuninori Morimoto
2012-05-07  6:23 ` Simon Horman
2012-05-07 18:58 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s Rafael J. Wysocki
2012-05-07 18:59 ` [PATCH] ARM: mach-shmobile: clock-r8a7740: add sh-eth clock Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).