]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
cfa291b7 NI |
2 | /* |
3 | * (C) Copyright 2012 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> | |
4 | * (C) Copyright 2012 Renesas Solutions Corp. | |
cfa291b7 NI |
5 | */ |
6 | #include <common.h> | |
7 | #include <asm/io.h> | |
8 | ||
9 | u32 rmobile_get_cpu_type(void) | |
10 | { | |
11 | u32 id; | |
12 | u32 type; | |
13 | struct r8a7740_hpb *hpb = (struct r8a7740_hpb *)HPB_BASE; | |
14 | ||
15 | id = readl(hpb->cccr); | |
16 | type = (id >> 8) & 0xFF; | |
17 | ||
18 | return type; | |
19 | } | |
20 | ||
62d0b6ba | 21 | u32 rmobile_get_cpu_rev(void) |
cfa291b7 NI |
22 | { |
23 | u32 id; | |
24 | u32 rev; | |
25 | struct r8a7740_hpb *hpb = (struct r8a7740_hpb *)HPB_BASE; | |
26 | ||
27 | id = readl(hpb->cccr); | |
28 | rev = (id >> 4) & 0xF; | |
29 | ||
30 | return rev; | |
31 | } |