u-boot/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c
Nobuhiro Iwamatsu bd0550fc5f arm: rmobile: Add support R8A7791
Renesas R8A7791 is CPU with Cortex-A15.
This supports the basic register definition and GPIO and
framework of PFC.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
2013-12-03 09:46:45 +09:00

29 lines
461 B
C

/*
* arch/arm/cpu/armv7/rmobile/cpu_info-r8a7791.c
*
* Copyright (C) 2013 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)
{
u32 product;
product = readl(PRR);
return (u32)((product & 0x00007F00) >> 8);
}
u32 rmobile_get_cpu_rev_integer(void)
{
u32 product;
product = readl(PRR);
return (u32)((product & 0x000000F0) >> 4);
}