]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-rmobile/cpu_info-rcar.c
2 * arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c
4 * Copyright (C) 2013,2014 Renesas Electronics Corporation
6 * SPDX-License-Identifier: GPL-2.0
11 #define PRR 0xFF000044
12 #define PRR_MASK 0x7fff
13 #define R8A7796_REV_1_0 0x5200
14 #define R8A7796_REV_1_1 0x5210
16 u32
rmobile_get_cpu_type(void)
18 return (readl(PRR
) & 0x00007F00) >> 8;
21 u32
rmobile_get_cpu_rev_integer(void)
23 const u32 prr
= readl(PRR
);
25 if ((prr
& PRR_MASK
) == R8A7796_REV_1_1
)
28 return ((prr
& 0x000000F0) >> 4) + 1;
31 u32
rmobile_get_cpu_rev_fraction(void)
33 const u32 prr
= readl(PRR
);
35 if ((prr
& PRR_MASK
) == R8A7796_REV_1_1
)
38 return prr
& 0x0000000F;