Patchwork [U-Boot,v4,7/7] arm: rmobile: kzm9g: enable reset command

login
register
mail settings
Submitter Tetsuyuki Kobayashi
Date July 17, 2012, 5:13 a.m.
Message ID <1342501992-10042-8-git-send-email-koba@kmckk.co.jp>
Download mbox | patch
Permalink /patch/171333/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Tetsuyuki Kobayashi - July 17, 2012, 5:13 a.m.
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>

Do soft power on reset in U-Boot reset command.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
Changes for v4:
 - New

 arch/arm/include/asm/arch-rmobile/sh73a0.h |    4 ++++
 board/kmc/kzm9g/kzm9g.c                    |    2 ++
 2 files changed, 6 insertions(+)
Nobuhiro Iwamatsu - July 19, 2012, 11:48 p.m.
Applied to my arm/rmobile branch.
Thank you.

Best regards,
  Nobuhiro

2012/7/17 Tetsuyuki Kobayshi <koba@kmckk.co.jp>:
> From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
>
> Do soft power on reset in U-Boot reset command.
>
> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
> ---
> Changes for v4:
>  - New
>
>  arch/arm/include/asm/arch-rmobile/sh73a0.h |    4 ++++
>  board/kmc/kzm9g/kzm9g.c                    |    2 ++
>  2 files changed, 6 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-rmobile/sh73a0.h b/arch/arm/include/asm/arch-rmobile/sh73a0.h
> index 74d1c48..6a6c237 100644
> --- a/arch/arm/include/asm/arch-rmobile/sh73a0.h
> +++ b/arch/arm/include/asm/arch-rmobile/sh73a0.h
> @@ -41,6 +41,10 @@
>  #define SRESCR (CPG_BASE + 0x1018)
>  #define PCLKCR (CPG_BASE + 0x1020)
>
> +/* SYSC */
> +#define SYSC_BASE   (0xE6180000)
> +#define RESCNT2        (SYSC_BASE + 0x8020)
> +
>  /* BSC */
>  #define BSC_BASE (0xFEC10000)
>
> diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
> index ed530fd..66bac69 100644
> --- a/board/kmc/kzm9g/kzm9g.c
> +++ b/board/kmc/kzm9g/kzm9g.c
> @@ -372,4 +372,6 @@ int board_eth_init(bd_t *bis)
>
>  void reset_cpu(ulong addr)
>  {
> +       /* Soft Power On Reset */
> +       writel((1 << 31), RESCNT2);
>  }
> --
> 1.7.9.5
>

Patch

diff --git a/arch/arm/include/asm/arch-rmobile/sh73a0.h b/arch/arm/include/asm/arch-rmobile/sh73a0.h
index 74d1c48..6a6c237 100644
--- a/arch/arm/include/asm/arch-rmobile/sh73a0.h
+++ b/arch/arm/include/asm/arch-rmobile/sh73a0.h
@@ -41,6 +41,10 @@ 
 #define SRESCR	(CPG_BASE + 0x1018)
 #define PCLKCR	(CPG_BASE + 0x1020)
 
+/* SYSC */
+#define SYSC_BASE   (0xE6180000)
+#define RESCNT2	(SYSC_BASE + 0x8020)
+
 /* BSC */
 #define BSC_BASE (0xFEC10000)
 
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index ed530fd..66bac69 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -372,4 +372,6 @@  int board_eth_init(bd_t *bis)
 
 void reset_cpu(ulong addr)
 {
+	/* Soft Power On Reset */
+	writel((1 << 31), RESCNT2);
 }