Samuel Holland
6d9ad492db
lib: utils/reset: Use fdt_driver for initialization
...
The reset driver subsystem does not need any extra data, so it can use
`struct fdt_driver` directly. The generic fdt_reset_init() performs a
best-effort initialization of all matching DT nodes. Platform-specific
logic expects exactly one DT node to match a single driver. This is
accomplished by using fdt_driver_init_one() with a local list containing
that one driver.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com >
Reviewed-by: Anup Patel <anup@brainfault.org >
2024-11-28 17:48:17 +05:30
Samuel Holland
57a0479302
lib: utils/reset: Constify FDT pointers in parsing functions
...
Indicate that none of these functions modify the devicetree by
constifying the parameter type.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com >
Reviewed-by: Andrew Jones <ajones@ventanamicro.com >
Reviewed-by: Anup Patel <anup@brainfault.org >
2024-08-24 13:02:42 +05:30
Yu Chien Peter Lin
7aaeeab9e7
lib: reset/fdt_reset_atcwdt200: Use defined macros and function in atcsmu.h
...
Reuse the smu related macros and function in atcsmu.h.
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com >
Reviewed-by: Anup Patel <anup@brainfault.org >
2023-01-22 17:33:13 +05:30
Yu Chien Peter Lin
8234fc1bdf
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 >
2022-10-23 10:29:23 +05:30