blob: 2de58ed2734a7470fdd0fc24d8f7247218776506 [file] [log] [blame]
Nobuhiro Iwamatsu4a495bc2013-11-21 17:07:45 +09001/*
2 * arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 *
6 * SPDX-License-Identifier: GPL-2.0
7 */
8#include <common.h>
9#include <asm/io.h>
10
11#define PRR 0xFF000044
12
13u32 rmobile_get_cpu_type(void)
14{
15 u32 product;
16
17 product = readl(PRR);
18
19 return (u32)((product & 0x00007F00) >> 8);
20}
21
22u32 rmobile_get_cpu_rev_integer(void)
23{
24 u32 product;
25
26 product = readl(PRR);
27
28 return (u32)((product & 0x000000F0) >> 4);
29}