arm64: renesas: Convert boards over to is_cortex_a() functions

Use generic is_cortex_a() functions instead of open-coded midr_el1 read.
No functional change.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
(cherry picked from commit 46a7999160)

[Cherry-pick fix-up: Dropped changes to gen3-common.c which was deleted in target branch]
This commit is contained in:
Marek Vasut
2025-01-01 20:19:06 +01:00
committed by Simon Glass
parent 86cc4c333f
commit 7f09f9db7e

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2021 Renesas Electronics Corporation
*/
#include <asm/armv8/cpu.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/processor.h>
@@ -66,12 +67,7 @@ int board_init(void)
void reset_cpu(void)
{
unsigned long midr, cputype;
asm volatile("mrs %0, midr_el1" : "=r" (midr));
cputype = (midr >> 4) & 0xfff;
if (cputype == 0xd03)
if (is_cortex_a53())
writel(RST_CA53_CODE, RST_CA53RESCNT);
else
writel(RST_CA57_CODE, RST_CA57RESCNT);