The generic GPIO reset driver has two entries in the match table:
"gpio-poweroff", "gpio-reset". Only the first entry is considered by
fdt_reset_init().
Define "gpio-poweroff" and "gpio-reset" as compatibility strings of two
separate reset drivers. They still can share code.
Fixes:
e3d6919d10d7 ("lib: utils/reset: Add generic GPIO reset driver")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/reset/fdt_reset.h>
+extern struct fdt_reset fdt_poweroff_gpio;
extern struct fdt_reset fdt_reset_gpio;
extern struct fdt_reset fdt_reset_sifive_test;
extern struct fdt_reset fdt_reset_htif;
extern struct fdt_reset fdt_reset_thead;
static struct fdt_reset *reset_drivers[] = {
+ &fdt_poweroff_gpio,
&fdt_reset_gpio,
&fdt_reset_sifive_test,
&fdt_reset_htif,
if (rc)
return rc;
}
- break;
}
return 0;
return 0;
}
-static const struct fdt_match gpio_reset_match[] = {
+static const struct fdt_match gpio_poweroff_match[] = {
{ .compatible = "gpio-poweroff", .data = (void *)FALSE },
+ { },
+};
+
+struct fdt_reset fdt_poweroff_gpio = {
+ .match_table = gpio_poweroff_match,
+ .init = gpio_reset_init,
+};
+
+static const struct fdt_match gpio_reset_match[] = {
{ .compatible = "gpio-restart", .data = (void *)TRUE },
{ },
};