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>
This commit is contained in:
Samuel Holland
2024-11-11 14:02:53 -08:00
committed by Anup Patel
parent 1f8db2f18f
commit 6d9ad492db
11 changed files with 26 additions and 61 deletions

View File

@@ -111,7 +111,7 @@ static const struct fdt_match atcwdt200_reset_match[] = {
{},
};
struct fdt_reset fdt_reset_atcwdt200 = {
const struct fdt_driver fdt_reset_atcwdt200 = {
.match_table = atcwdt200_reset_match,
.init = atcwdt200_reset_init,
};