diff options
Diffstat (limited to 'drivers/watchdog/bcm2835_wdt.c')
-rw-r--r-- | drivers/watchdog/bcm2835_wdt.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index ece80837b5..874315d502 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -10,28 +10,7 @@ #include <restart.h> #include <watchdog.h> -#define PM_RSTC 0x1c -#define PM_RSTS 0x20 -#define PM_WDOG 0x24 - -#define PM_WDOG_RESET 0000000000 -#define PM_PASSWORD 0x5a000000 -#define PM_WDOG_TIME_SET 0x000fffff -#define PM_RSTC_WRCFG_CLR 0xffffffcf -#define PM_RSTC_WRCFG_SET 0x00000030 -#define PM_RSTC_WRCFG_FULL_RESET 0x00000020 -#define PM_RSTC_RESET 0x00000102 - -#define PM_RSTS_HADPOR_SET 0x00001000 -#define PM_RSTS_HADSRH_SET 0x00000400 -#define PM_RSTS_HADSRF_SET 0x00000200 -#define PM_RSTS_HADSRQ_SET 0x00000100 -#define PM_RSTS_HADWRH_SET 0x00000040 -#define PM_RSTS_HADWRF_SET 0x00000020 -#define PM_RSTS_HADWRQ_SET 0x00000010 -#define PM_RSTS_HADDRH_SET 0x00000004 -#define PM_RSTS_HADDRF_SET 0x00000002 -#define PM_RSTS_HADDRQ_SET 0x00000001 +#include <soc/bcm283x/wdt.h> #define SECS_TO_WDOG_TICKS(x) ((x) << 16) @@ -42,7 +21,7 @@ struct bcm2835_wd { struct watchdog wd; void __iomem *base; - struct device_d *dev; + struct device *dev; struct restart_handler restart; }; @@ -81,7 +60,7 @@ static int bcm2835_wd_set_timeout(struct watchdog *wd, unsigned timeout) return 0; } -static int bcm2835_wd_probe(struct device_d *dev) +static int bcm2835_wd_probe(struct device *dev) { struct resource *iores; struct bcm2835_wd *priv; @@ -122,8 +101,9 @@ static __maybe_unused struct of_device_id bcm2835_wd_dt_ids[] = { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, bcm2835_wd_dt_ids); -static struct driver_d bcm2835_wd_driver = { +static struct driver bcm2835_wd_driver = { .name = "bcm2835_wd", .of_compatible = DRV_OF_COMPAT(bcm2835_wd_dt_ids), .probe = bcm2835_wd_probe, |