Nobuhiro Iwamatsu | 4a495bc | 2013-11-21 17:07:45 +0900 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | u32 rmobile_get_cpu_type(void) |
| 14 | { |
| 15 | u32 product; |
| 16 | |
| 17 | product = readl(PRR); |
| 18 | |
| 19 | return (u32)((product & 0x00007F00) >> 8); |
| 20 | } |
| 21 | |
| 22 | u32 rmobile_get_cpu_rev_integer(void) |
| 23 | { |
| 24 | u32 product; |
| 25 | |
| 26 | product = readl(PRR); |
| 27 | |
| 28 | return (u32)((product & 0x000000F0) >> 4); |
| 29 | } |