diff options
author | Tom Rini <trini@konsulko.com> | 2016-08-20 11:35:28 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-20 16:40:34 -0400 |
commit | c98b171e1098f94b2ff7720c45a25a602882f876 (patch) | |
tree | e89e772841c83c5600a5288216b78b05840d903d /arch/arm/mach-rmobile/cpu_info-rcar.c | |
parent | f835706c2957a4c77fc0c6fece9f38a6587b4cad (diff) | |
parent | 798dc6be7feabce33676877f85d307f571a9ec15 (diff) |
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh
[trini: Drop CMD_BOOTI as it's now on by default on ARM64]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-rmobile/cpu_info-rcar.c')
-rw-r--r-- | arch/arm/mach-rmobile/cpu_info-rcar.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-rmobile/cpu_info-rcar.c b/arch/arm/mach-rmobile/cpu_info-rcar.c new file mode 100644 index 0000000000..42ee30fbe7 --- /dev/null +++ b/arch/arm/mach-rmobile/cpu_info-rcar.c @@ -0,0 +1,26 @@ +/* + * arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c + * + * Copyright (C) 2013,2014 Renesas Electronics Corporation + * + * SPDX-License-Identifier: GPL-2.0 + */ +#include <common.h> +#include <asm/io.h> + +#define PRR 0xFF000044 + +u32 rmobile_get_cpu_type(void) +{ + return (readl(PRR) & 0x00007F00) >> 8; +} + +u32 rmobile_get_cpu_rev_integer(void) +{ + return ((readl(PRR) & 0x000000F0) >> 4) + 1; +} + +u32 rmobile_get_cpu_rev_fraction(void) +{ + return readl(PRR) & 0x0000000F; +} |