[PATCH 3/3] board: freescale: p1_p2_rdb_pc: Implement board_reset()
Pali Rohár
pali at kernel.org
Sun May 1 14:23:14 CEST 2022
Do board reset via CPLD's system reset register.
Signed-off-by: Pali Rohár <pali at kernel.org>
---
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index 24b5ec435e4e..53ff121d3b3d 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -83,6 +83,12 @@ struct cpld_data {
#define CPLD_FXS_LED 0x0F
#define CPLD_SYS_RST 0x00
+void board_reset(void)
+{
+ struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+ out_8(&cpld_data->system_rst, 1);
+}
+
void board_cpld_init(void)
{
struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
--
2.20.1
More information about the U-Boot
mailing list