Lines Matching +full:wdt +full:- +full:timer +full:- +full:index
17 #include <wdt.h>
47 writel(priv->timeout, priv->reg + priv->wdt_counter_offset); in orion_wdt_reset()
57 priv->timeout = (u32) timeout; in orion_wdt_start()
60 reg = readl(priv->reg + TIMER_CTRL); in orion_wdt_start()
62 writel(reg, priv->reg + TIMER_CTRL); in orion_wdt_start()
65 writel(priv->timeout, priv->reg + priv->wdt_counter_offset); in orion_wdt_start()
68 reg = readl(priv->reg + TIMER_A370_STATUS); in orion_wdt_start()
70 writel(reg, priv->reg + TIMER_A370_STATUS); in orion_wdt_start()
72 /* Enable watchdog timer */ in orion_wdt_start()
73 reg = readl(priv->reg + TIMER_CTRL); in orion_wdt_start()
75 writel(reg, priv->reg + TIMER_CTRL); in orion_wdt_start()
78 reg = readl(priv->rstout); in orion_wdt_start()
80 writel(reg, priv->rstout); in orion_wdt_start()
82 reg = readl(priv->rstout_mask); in orion_wdt_start()
84 writel(reg, priv->rstout_mask); in orion_wdt_start()
95 reg = readl(priv->rstout_mask); in orion_wdt_stop()
97 writel(reg, priv->rstout_mask); in orion_wdt_stop()
99 reg = readl(priv->rstout); in orion_wdt_stop()
101 writel(reg, priv->rstout); in orion_wdt_stop()
103 /* Disable watchdog timer */ in orion_wdt_stop()
104 reg = readl(priv->reg + TIMER_CTRL); in orion_wdt_stop()
106 writel(reg, priv->reg + TIMER_CTRL); in orion_wdt_stop()
111 static inline bool save_reg_from_ofdata(struct udevice *dev, int index, in save_reg_from_ofdata() argument
118 gd->fdt_blob, dev_of_offset(dev), "reg", index, &off, true); in save_reg_from_ofdata()
134 if (!save_reg_from_ofdata(dev, 0, &priv->reg, in orion_wdt_ofdata_to_platdata()
135 &priv->wdt_counter_offset)) in orion_wdt_ofdata_to_platdata()
138 if (!save_reg_from_ofdata(dev, 1, &priv->rstout, NULL)) in orion_wdt_ofdata_to_platdata()
141 if (!save_reg_from_ofdata(dev, 2, &priv->rstout_mask, NULL)) in orion_wdt_ofdata_to_platdata()
146 debug("%s: Could not determine Orion wdt IO addresses\n", __func__); in orion_wdt_ofdata_to_platdata()
147 return -ENXIO; in orion_wdt_ofdata_to_platdata()
152 debug("%s: Probing wdt%u\n", __func__, dev->seq); in orion_wdt_probe()
165 { .compatible = "marvell,armada-380-wdt" },