diff options
author | Yu Chien Peter Lin <peterlin@andestech.com> | 2022-10-14 03:32:47 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-10-23 07:59:23 +0300 |
commit | 8234fc1bdf4629fc0fec41ebc2e091c407ef8d6a (patch) | |
tree | 99b85e606ba6d59473b4d6a60037e69e8618b1a9 /platform | |
parent | ef9f02e7fba47412d6c057ba78fd3d89cb4e5fc3 (diff) | |
download | opensbi-8234fc1bdf4629fc0fec41ebc2e091c407ef8d6a.tar.xz |
lib: utils/reset: Add Andes fdt reset driver support
Add ATCWDT200 as reset device of AE350 platform, this driver requires
SMU to program the reset vector registers before triggering WDT software
restart signal.
dts example:
smu@f0100000 {
compatible = "andestech,atcsmu";
reg = <0x00000000 0xf0100000 0x00000000 0x00001000>;
};
wdt: wdt@f0500000 {
compatible = "andestech,atcwdt200";
reg = <0x00000000 0xf0500000 0x00000000 0x00001000>;
interrupts = <3 4>;
interrupt-parent = <&plic0>;
clock-frequency = <15000000>;
};
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/andes/ae350/Kconfig | 2 | ||||
-rw-r--r-- | platform/andes/ae350/platform.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/platform/andes/ae350/Kconfig b/platform/andes/ae350/Kconfig index f6f50eb..8486f08 100644 --- a/platform/andes/ae350/Kconfig +++ b/platform/andes/ae350/Kconfig @@ -8,6 +8,8 @@ config PLATFORM_ANDES_AE350 select FDT_SERIAL_UART8250 select FDT_TIMER select FDT_TIMER_PLMT + select FDT_RESET + select FDT_RESET_ATCWDT200 default y if PLATFORM_ANDES_AE350 diff --git a/platform/andes/ae350/platform.c b/platform/andes/ae350/platform.c index 79736c0..c6a8eeb 100644 --- a/platform/andes/ae350/platform.c +++ b/platform/andes/ae350/platform.c @@ -18,6 +18,7 @@ #include <sbi_utils/fdt/fdt_helper.h> #include <sbi_utils/fdt/fdt_fixup.h> #include <sbi_utils/irqchip/plic.h> +#include <sbi_utils/reset/fdt_reset.h> #include <sbi_utils/serial/fdt_serial.h> #include <sbi_utils/timer/fdt_timer.h> #include "platform.h" @@ -37,6 +38,8 @@ static int ae350_final_init(bool cold_boot) if (!cold_boot) return 0; + fdt_reset_init(); + fdt = fdt_get_address(); fdt_fixups(fdt); |