* Copyright (C) 2021 Renesas Electronics Corporation
*/
+#include <asm/armv8/cpu.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/processor.h>
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);
* Copyright (C) 2015 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*/
+#include <asm/armv8/cpu.h>
#include <dm.h>
#include <fdt_support.h>
#include <hang.h>
void __weak 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 if (cputype == 0xd07)
+ else if (is_cortex_a57())
writel(RST_CA57_CODE, RST_CA57RESCNT);
else
hang();