1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-05-07 12:49:24 +00:00
u-boot/arch/powerpc/lib/traps.c
Simon Glass 5ee545a9db ppc: Add a reset_cpu() function
The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.

This is only needed if CONFIG_SYSRESET is disabled.

Since there are lots of reset functions, this one actually just calls
do_reset(). Future refactoring could correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-21 16:07:52 -05:00

29 lines
510 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#include <command.h>
#include <cpu_func.h>
#include <init.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
void trap_init(unsigned long reloc_addr);
int arch_initr_trap(void)
{
trap_init(gd->relocaddr);
return 0;
}
#ifndef CONFIG_SYSRESET
void reset_cpu(void)
{
/* TODO: Refactor all the do_reset calls to be reset_cpu() instead */
do_reset(NULL, 0, 0, NULL);
}
#endif