linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
@ 2013-04-08  1:23 Magnus Damm
  2013-04-08  1:23 ` [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer Magnus Damm
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Magnus Damm @ 2013-04-08  1:23 UTC (permalink / raw)
  To: linux-arm-kernel

ARM: shmobile: r8a7790 Lager arch timer fixes

[PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer 
[PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager

This mini-series contains fixes to start the arch timer on
r8a7790 and the Lager board regardless of boot loader setting.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Written against renesas-next-20130405v2 in renesas.git
 
 arch/arm/mach-shmobile/board-lager.c          |    2 +-
 arch/arm/mach-shmobile/include/mach/r8a7790.h |    1 +
 arch/arm/mach-shmobile/setup-r8a7790.c        |   14 +++++++++++++-
 3 files changed, 15 insertions(+), 2 deletions(-)

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

* [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer
  2013-04-08  1:23 [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Magnus Damm
@ 2013-04-08  1:23 ` Magnus Damm
  2013-04-09  9:27   ` Mark Rutland
  2013-04-08  1:23 ` [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager Magnus Damm
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Magnus Damm @ 2013-04-08  1:23 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Implement a SoC-specific timer init function for
r8a7790 that makes sure the architected timer
is started regardless of boot loader setting.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/r8a7790.h |    1 +
 arch/arm/mach-shmobile/setup-r8a7790.c        |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

--- 0001/arch/arm/mach-shmobile/include/mach/r8a7790.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7790.h	2013-04-08 10:13:38.000000000 +0900
@@ -4,5 +4,6 @@
 void r8a7790_add_standard_devices(void);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
+void r8a7790_timer_init(void);
 
 #endif /* __ASM_R8A7790_H__ */
--- 0001/arch/arm/mach-shmobile/setup-r8a7790.c
+++ work/arch/arm/mach-shmobile/setup-r8a7790.c	2013-04-08 10:13:38.000000000 +0900
@@ -117,6 +117,18 @@ void __init r8a7790_add_standard_devices
 	r8a7790_register_irqc(0);
 }
 
+void __init r8a7790_timer_init(void)
+{
+	void __iomem *cntcr;
+
+	/* make sure arch timer is started by setting bit 0 of CNTCT */
+	cntcr = ioremap(0xe6080000, PAGE_SIZE);
+	iowrite32(1, cntcr);
+	iounmap(cntcr);
+
+	shmobile_timer_init();
+}
+
 #ifdef CONFIG_USE_OF
 void __init r8a7790_add_standard_devices_dt(void)
 {
@@ -131,7 +143,7 @@ static const char *r8a7790_boards_compat
 DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
 	.init_irq	= irqchip_init,
 	.init_machine	= r8a7790_add_standard_devices_dt,
-	.init_time	= shmobile_timer_init,
+	.init_time	= r8a7790_timer_init,
 	.dt_compat	= r8a7790_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */

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

* [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager
  2013-04-08  1:23 [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Magnus Damm
  2013-04-08  1:23 ` [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer Magnus Damm
@ 2013-04-08  1:23 ` Magnus Damm
  2013-04-08  1:29 ` [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Kuninori Morimoto
  2013-04-08  1:33 ` Simon Horman
  3 siblings, 0 replies; 10+ messages in thread
From: Magnus Damm @ 2013-04-08  1:23 UTC (permalink / raw)
  To: linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

Use the r8a7790 timer init function on Lager
to make sure the architected timer is started
regardless of boot loader setting.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-lager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/arch/arm/mach-shmobile/board-lager.c
+++ work/arch/arm/mach-shmobile/board-lager.c	2013-04-08 10:15:49.000000000 +0900
@@ -40,7 +40,7 @@ static const char *lager_boards_compat_d
 
 DT_MACHINE_START(LAGER_DT, "lager")
 	.init_irq	= irqchip_init,
-	.init_time	= shmobile_timer_init,
+	.init_time	= r8a7790_timer_init,
 	.init_machine	= lager_add_standard_devices,
 	.dt_compat	= lager_boards_compat_dt,
 MACHINE_END

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  1:23 [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Magnus Damm
  2013-04-08  1:23 ` [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer Magnus Damm
  2013-04-08  1:23 ` [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager Magnus Damm
@ 2013-04-08  1:29 ` Kuninori Morimoto
  2013-04-08  2:06   ` Simon Horman
  2013-04-09 12:42   ` Simon Horman
  2013-04-08  1:33 ` Simon Horman
  3 siblings, 2 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2013-04-08  1:29 UTC (permalink / raw)
  To: linux-arm-kernel


Hi

> ARM: shmobile: r8a7790 Lager arch timer fixes
> 
> [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer 
> [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager
> 
> This mini-series contains fixes to start the arch timer on
> r8a7790 and the Lager board regardless of boot loader setting.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---

I guess shmobile_timer_init() will be conflict (or compile error)
on next (?) merge window thought...
but, for current code/branch

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>


Best regards
---
Kuninori Morimoto

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  1:23 [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Magnus Damm
                   ` (2 preceding siblings ...)
  2013-04-08  1:29 ` [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Kuninori Morimoto
@ 2013-04-08  1:33 ` Simon Horman
  3 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2013-04-08  1:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 08, 2013 at 10:23:18AM +0900, Magnus Damm wrote:
> ARM: shmobile: r8a7790 Lager arch timer fixes
> 
> [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer 
> [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager
> 
> This mini-series contains fixes to start the arch timer on
> r8a7790 and the Lager board regardless of boot loader setting.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  Written against renesas-next-20130405v2 in renesas.git

Hi Magnus,

I have tested that these patches allow the lager board to boot.
Should I queue them up?

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  1:29 ` [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Kuninori Morimoto
@ 2013-04-08  2:06   ` Simon Horman
  2013-04-08  2:35     ` Kuninori Morimoto
  2013-04-09 12:42   ` Simon Horman
  1 sibling, 1 reply; 10+ messages in thread
From: Simon Horman @ 2013-04-08  2:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 06:29:46PM -0700, Kuninori Morimoto wrote:
> 
> Hi
> 
> > ARM: shmobile: r8a7790 Lager arch timer fixes
> > 
> > [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer 
> > [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager
> > 
> > This mini-series contains fixes to start the arch timer on
> > r8a7790 and the Lager board regardless of boot loader setting.
> > 
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> > ---
> 
> I guess shmobile_timer_init() will be conflict (or compile error)
> on next (?) merge window thought...
> but, for current code/branch

I guess that the solution is to ensure that patch 1 is applied
before patch 2. Am I missing something?

> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  2:06   ` Simon Horman
@ 2013-04-08  2:35     ` Kuninori Morimoto
  2013-04-08  3:32       ` Simon Horman
  0 siblings, 1 reply; 10+ messages in thread
From: Kuninori Morimoto @ 2013-04-08  2:35 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Simon

> > I guess shmobile_timer_init() will be conflict (or compile error)
> > on next (?) merge window thought...
> > but, for current code/branch
> 
> I guess that the solution is to ensure that patch 1 is applied
> before patch 2. Am I missing something?

Sorry for my confusion
I meant shmobile_timer_init() will be removed from ARM SoC side.
But I'm not sure for detail

Best regards
---
Kuninori Morimoto

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  2:35     ` Kuninori Morimoto
@ 2013-04-08  3:32       ` Simon Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2013-04-08  3:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 07:35:53PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > I guess shmobile_timer_init() will be conflict (or compile error)
> > > on next (?) merge window thought...
> > > but, for current code/branch
> > 
> > I guess that the solution is to ensure that patch 1 is applied
> > before patch 2. Am I missing something?
> 
> Sorry for my confusion
> I meant shmobile_timer_init() will be removed from ARM SoC side.
> But I'm not sure for detail

Ah yes.

That already causes multiple breakages in renesas-next.
I have responded to the thread on removing shmobile_timer_init()
accordingly.

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

* [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer
  2013-04-08  1:23 ` [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer Magnus Damm
@ 2013-04-09  9:27   ` Mark Rutland
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Rutland @ 2013-04-09  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

Adding Stephen Boyd and Marc Zyngier to Cc as they're both familiar with the
architected timer.

On Mon, Apr 08, 2013 at 02:23:28AM +0100, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Implement a SoC-specific timer init function for
> r8a7790 that makes sure the architected timer
> is started regardless of boot loader setting.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  arch/arm/mach-shmobile/include/mach/r8a7790.h |    1 +
>  arch/arm/mach-shmobile/setup-r8a7790.c        |   14 +++++++++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> --- 0001/arch/arm/mach-shmobile/include/mach/r8a7790.h
> +++ work/arch/arm/mach-shmobile/include/mach/r8a7790.h	2013-04-08 10:13:38.000000000 +0900
> @@ -4,5 +4,6 @@
>  void r8a7790_add_standard_devices(void);
>  void r8a7790_clock_init(void);
>  void r8a7790_pinmux_init(void);
> +void r8a7790_timer_init(void);
>  
>  #endif /* __ASM_R8A7790_H__ */
> --- 0001/arch/arm/mach-shmobile/setup-r8a7790.c
> +++ work/arch/arm/mach-shmobile/setup-r8a7790.c	2013-04-08 10:13:38.000000000 +0900
> @@ -117,6 +117,18 @@ void __init r8a7790_add_standard_devices
>  	r8a7790_register_irqc(0);
>  }
>  
> +void __init r8a7790_timer_init(void)
> +{
> +	void __iomem *cntcr;
> +
> +	/* make sure arch timer is started by setting bit 0 of CNTCT */

Typo: CNTCT should be CNTCR above.

> +	cntcr = ioremap(0xe6080000, PAGE_SIZE);
> +	iowrite32(1, cntcr);
> +	iounmap(cntcr);
> +
> +	shmobile_timer_init();
> +}

Does this mean you have memory-mapped timers and CP15 timers linked together?

Why do your firmware and bootloader not set this up?

Mark.

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

* [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes
  2013-04-08  1:29 ` [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Kuninori Morimoto
  2013-04-08  2:06   ` Simon Horman
@ 2013-04-09 12:42   ` Simon Horman
  1 sibling, 0 replies; 10+ messages in thread
From: Simon Horman @ 2013-04-09 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 07, 2013 at 06:29:46PM -0700, Kuninori Morimoto wrote:
> 
> Hi
> 
> > ARM: shmobile: r8a7790 Lager arch timer fixes
> > 
> > [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer 
> > [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager
> > 
> > This mini-series contains fixes to start the arch timer on
> > r8a7790 and the Lager board regardless of boot loader setting.
> > 
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> > ---
> 
> I guess shmobile_timer_init() will be conflict (or compile error)
> on next (?) merge window thought...
> but, for current code/branch

[ discussed in another sub-thread ]

> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks.

01/02 queued up in the soc-r8a7790 branch
02/02 queue up in the boards-lager branch,
      which is a merge of renesas-boards3-for-v3.10 and soc-r8a7790

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

end of thread, other threads:[~2013-04-09 12:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08  1:23 [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Magnus Damm
2013-04-08  1:23 ` [PATCH 01/02] ARM: shmobile: force enable of r8a7790 arch timer Magnus Damm
2013-04-09  9:27   ` Mark Rutland
2013-04-08  1:23 ` [PATCH 02/02] ARM: shmobile: use r8a7790 timer setup code on Lager Magnus Damm
2013-04-08  1:29 ` [PATCH 00/02] ARM: shmobile: r8a7790 Lager arch timer fixes Kuninori Morimoto
2013-04-08  2:06   ` Simon Horman
2013-04-08  2:35     ` Kuninori Morimoto
2013-04-08  3:32       ` Simon Horman
2013-04-09 12:42   ` Simon Horman
2013-04-08  1:33 ` Simon Horman

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).