arm: rmobile: kzm9g: fix CPU info
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Wed, 25 Jul 2012 18:24:20 +0000 (18:24 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 3 Oct 2012 00:04:24 +0000 (02:04 +0200)
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>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
arch/arm/cpu/armv7/rmobile/cpu_info.c

index 3086dd80fa8dcc84070dc544e7b5881c3a424586..13ad7424c0829e575f6756f18d830a61c7a6bd2a 100644 (file)
@@ -29,19 +29,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;
index 214895859a3ee0cdaf2c0ddafdae239eb10dd400..957a4fc9dfcee12ea6b1c573f976a4a6d7b87482 100644 (file)
@@ -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;