summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rmobile
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2017-05-13 13:57:38 (GMT)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2017-05-21 19:38:26 (GMT)
commite965c890088c9ee4b43b963530bb1805e49a6d6c (patch)
tree8ce621ccea5b4677cf4715592e019d5cc488d6a9 /arch/arm/mach-rmobile
parentbc271a005122470d33607b772ddab406515855a5 (diff)
downloadu-boot-e965c890088c9ee4b43b963530bb1805e49a6d6c.tar.xz
ARM: rmobile: Handle R8A7796 r1.1 in the PRR code
The R8A7796 r1.1 reports itself as r2.0 , add quirk into the PRR code to fix this report. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/arm/mach-rmobile')
-rw-r--r--arch/arm/mach-rmobile/cpu_info-rcar.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-rmobile/cpu_info-rcar.c b/arch/arm/mach-rmobile/cpu_info-rcar.c
index 42ee30f..c373eef 100644
--- a/arch/arm/mach-rmobile/cpu_info-rcar.c
+++ b/arch/arm/mach-rmobile/cpu_info-rcar.c
@@ -8,7 +8,10 @@
#include <common.h>
#include <asm/io.h>
-#define PRR 0xFF000044
+#define PRR 0xFF000044
+#define PRR_MASK 0x7fff
+#define R8A7796_REV_1_0 0x5200
+#define R8A7796_REV_1_1 0x5210
u32 rmobile_get_cpu_type(void)
{
@@ -17,10 +20,20 @@ u32 rmobile_get_cpu_type(void)
u32 rmobile_get_cpu_rev_integer(void)
{
- return ((readl(PRR) & 0x000000F0) >> 4) + 1;
+ const u32 prr = readl(PRR);
+
+ if ((prr & PRR_MASK) == R8A7796_REV_1_1)
+ return 1;
+ else
+ return ((prr & 0x000000F0) >> 4) + 1;
}
u32 rmobile_get_cpu_rev_fraction(void)
{
- return readl(PRR) & 0x0000000F;
+ const u32 prr = readl(PRR);
+
+ if ((prr & PRR_MASK) == R8A7796_REV_1_1)
+ return 1;
+ else
+ return prr & 0x0000000F;
}