Nobuhiro Iwamatsu | c6ccb47 | 2013-11-21 17:06:45 +0900 | [diff] [blame] | 1 | /* |
Nobuhiro Iwamatsu | 091bc06 | 2014-03-28 11:07:39 +0900 | [diff] [blame] | 2 | * arch/arm/cpu/armv7/rmobile/cpu_info-rcar.c |
Nobuhiro Iwamatsu | c6ccb47 | 2013-11-21 17:06:45 +0900 | [diff] [blame] | 3 | * |
Nobuhiro Iwamatsu | 091bc06 | 2014-03-28 11:07:39 +0900 | [diff] [blame] | 4 | * Copyright (C) 2013,2014 Renesas Electronics Corporation |
Nobuhiro Iwamatsu | c6ccb47 | 2013-11-21 17:06:45 +0900 | [diff] [blame] | 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0 |
| 7 | */ |
| 8 | #include <common.h> |
| 9 | #include <asm/io.h> |
| 10 | |
| 11 | #define PRR 0xFF000044 |
| 12 | |
| 13 | u32 rmobile_get_cpu_type(void) |
| 14 | { |
| 15 | return (readl(PRR) & 0x00007F00) >> 8; |
| 16 | } |
| 17 | |
| 18 | u32 rmobile_get_cpu_rev_integer(void) |
| 19 | { |
Nobuhiro Iwamatsu | 3486332 | 2014-03-28 11:12:49 +0900 | [diff] [blame^] | 20 | return ((readl(PRR) & 0x000000F0) >> 4) + 1; |
Nobuhiro Iwamatsu | c6ccb47 | 2013-11-21 17:06:45 +0900 | [diff] [blame] | 21 | } |