Patchwork [U-Boot,3/4] arm: rmobile: kzm9g: fix CPU info

login
register
mail settings
Submitter Tetsuyuki Kobayashi
Date July 26, 2012, 4:24 a.m.
Message ID <1343276661-22803-4-git-send-email-koba@kmckk.co.jp>
Download mbox | patch
Permalink /patch/173326/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Tetsuyuki Kobayashi - July 26, 2012, 4:24 a.m.
From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>

CPU info register was read wrongly by mistake. And function rmobile_get_cpu_rev() was not called properly.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
 arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c |    6 +++---
 arch/arm/cpu/armv7/rmobile/cpu_info.c        |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Nobuhiro Iwamatsu - July 27, 2012, 2:26 a.m.
Applied my rmobile branch.

Thanks.
  Nobuhiro


On Thu, Jul 26, 2012 at 1:24 PM, Tetsuyuki Kobayshi <koba@kmckk.co.jp> wrote:
> From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
>
> CPU info register was read wrongly by mistake. And function rmobile_get_cpu_rev() was not called properly.
>
> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
> ---
>  arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c |    6 +++---
>  arch/arm/cpu/armv7/rmobile/cpu_info.c        |    2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
> index f5273cf..a715efa 100644
> --- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
> +++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
> @@ -30,19 +30,19 @@ u32 rmobile_get_cpu_type(void)
>         u32 type;
>         struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
>
> -       id = readl(hpb->cccr);
> +       id = readl(&hpb->cccr);
>         type = (id >> 8) & 0xFF;
>
>         return type;
>  }
>
> -u32 get_cpu_rev(void)
> +u32 rmobile_get_cpu_rev(void)
>  {
>         u32 id;
>         u32 rev;
>         struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
>
> -       id = readl(hpb->cccr);
> +       id = readl(&hpb->cccr);
>         rev = (id >> 4) & 0xF;
>
>         return rev;
> diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c
> index 2148958..957a4fc 100644
> --- a/arch/arm/cpu/armv7/rmobile/cpu_info.c
> +++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c
> @@ -62,7 +62,7 @@ int print_cpuinfo(void)
>                 break;
>         default:
>                 printf("CPU: Renesas Electronics CPU rev %d\n",
> -                               get_cpu_rev());
> +                               rmobile_get_cpu_rev());
>                 break;
>         }
>         return 0;
> --
> 1.7.9.5
>

Patch

diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
index f5273cf..a715efa 100644
--- a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
@@ -30,19 +30,19 @@  u32 rmobile_get_cpu_type(void)
 	u32 type;
 	struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
 
-	id = readl(hpb->cccr);
+	id = readl(&hpb->cccr);
 	type = (id >> 8) & 0xFF;
 
 	return type;
 }
 
-u32 get_cpu_rev(void)
+u32 rmobile_get_cpu_rev(void)
 {
 	u32 id;
 	u32 rev;
 	struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
 
-	id = readl(hpb->cccr);
+	id = readl(&hpb->cccr);
 	rev = (id >> 4) & 0xF;
 
 	return rev;
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c b/arch/arm/cpu/armv7/rmobile/cpu_info.c
index 2148958..957a4fc 100644
--- a/arch/arm/cpu/armv7/rmobile/cpu_info.c
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c
@@ -62,7 +62,7 @@  int print_cpuinfo(void)
 		break;
 	default:
 		printf("CPU: Renesas Electronics CPU rev %d\n",
-				get_cpu_rev());
+				rmobile_get_cpu_rev());
 		break;
 	}
 	return 0;