mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-28 18:11:42 +02:00
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
- sandbox: watchdog: Avoid an error on startup (Simon) - nuvoton: Fix reset/expire function error (Jim)
This commit is contained in:
commit
48bc9de282
@ -975,7 +975,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
wdt-gpio-toggle {
|
wdt-gpio-toggle {
|
||||||
gpios = <&gpio_a 7 0>;
|
gpios = <&gpio_a 8 0>;
|
||||||
compatible = "linux,wdt-gpio";
|
compatible = "linux,wdt-gpio";
|
||||||
hw_margin_ms = <100>;
|
hw_margin_ms = <100>;
|
||||||
hw_algo = "toggle";
|
hw_algo = "toggle";
|
||||||
|
@ -69,15 +69,21 @@ static int npcm_wdt_stop(struct udevice *dev)
|
|||||||
static int npcm_wdt_reset(struct udevice *dev)
|
static int npcm_wdt_reset(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct npcm_wdt_priv *priv = dev_get_priv(dev);
|
struct npcm_wdt_priv *priv = dev_get_priv(dev);
|
||||||
|
u32 val;
|
||||||
|
|
||||||
writel(NPCM_WTR | NPCM_WTRE | NPCM_WTE, priv->regs);
|
val = readl(priv->regs);
|
||||||
|
writel(val | NPCM_WTR, priv->regs);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int npcm_wdt_expire_now(struct udevice *dev, ulong flags)
|
static int npcm_wdt_expire_now(struct udevice *dev, ulong flags)
|
||||||
{
|
{
|
||||||
return npcm_wdt_reset(dev);
|
struct npcm_wdt_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
|
writel(NPCM_WTR | NPCM_WTRE | NPCM_WTE, priv->regs);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int npcm_wdt_of_to_plat(struct udevice *dev)
|
static int npcm_wdt_of_to_plat(struct udevice *dev)
|
||||||
|
@ -54,7 +54,7 @@ static int dm_test_wdt_gpio_toggle(struct unit_test_state *uts)
|
|||||||
*/
|
*/
|
||||||
struct udevice *wdt, *gpio;
|
struct udevice *wdt, *gpio;
|
||||||
const u64 timeout = 42;
|
const u64 timeout = 42;
|
||||||
const int offset = 7;
|
const int offset = 8;
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
ut_assertok(uclass_get_device_by_name(UCLASS_WDT,
|
ut_assertok(uclass_get_device_by_name(UCLASS_WDT,
|
||||||
@ -115,7 +115,7 @@ static int dm_test_wdt_watchdog_reset(struct unit_test_state *uts)
|
|||||||
struct udevice *gpio_wdt, *sandbox_wdt;
|
struct udevice *gpio_wdt, *sandbox_wdt;
|
||||||
struct udevice *gpio;
|
struct udevice *gpio;
|
||||||
const u64 timeout = 42;
|
const u64 timeout = 42;
|
||||||
const int offset = 7;
|
const int offset = 8;
|
||||||
uint reset_count;
|
uint reset_count;
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user