mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck: - a null pointer dereference fix for omap_wdt - some clock related fixes for pnx4008 - an underflow fix in wdt_set_timeout() for w83977f_wdt - restart fix for tegra wdt - Kconfig change to support Freescale Layerscape platforms - fix for stopping the mtk_wdt watchdog * git://www.linux-watchdog.org/linux-watchdog: watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog watchdog: Add support for Freescale Layerscape platforms watchdog: tegra: Stop watchdog first if restarting watchdog: w83977f_wdt: underflow in wdt_set_timeout() watchdog: pnx4008: make global wdt_clk static watchdog: pnx4008: fix warnings caused by enabling unprepared clock watchdog: omap_wdt: fix null pointer dereference
This commit is contained in:
commit
d0bc387dbe
@ -446,7 +446,7 @@ config MAX63XX_WATCHDOG
|
||||
|
||||
config IMX2_WDT
|
||||
tristate "IMX2+ Watchdog"
|
||||
depends on ARCH_MXC
|
||||
depends on ARCH_MXC || ARCH_LAYERSCAPE
|
||||
select REGMAP_MMIO
|
||||
select WATCHDOG_CORE
|
||||
help
|
||||
|
@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
|
||||
|
||||
reg = readl(wdt_base + WDT_MODE);
|
||||
reg &= ~WDT_MODE_EN;
|
||||
reg |= WDT_MODE_KEY;
|
||||
iowrite32(reg, wdt_base + WDT_MODE);
|
||||
|
||||
return 0;
|
||||
|
@ -205,7 +205,7 @@ static int omap_wdt_set_timeout(struct watchdog_device *wdog,
|
||||
|
||||
static unsigned int omap_wdt_get_timeleft(struct watchdog_device *wdog)
|
||||
{
|
||||
struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
|
||||
struct omap_wdt_dev *wdev = to_omap_wdt_dev(wdog);
|
||||
void __iomem *base = wdev->base;
|
||||
u32 value;
|
||||
|
||||
|
@ -80,7 +80,7 @@ static unsigned int heartbeat = DEFAULT_HEARTBEAT;
|
||||
|
||||
static DEFINE_SPINLOCK(io_lock);
|
||||
static void __iomem *wdt_base;
|
||||
struct clk *wdt_clk;
|
||||
static struct clk *wdt_clk;
|
||||
|
||||
static int pnx4008_wdt_start(struct watchdog_device *wdd)
|
||||
{
|
||||
@ -161,7 +161,7 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(wdt_clk))
|
||||
return PTR_ERR(wdt_clk);
|
||||
|
||||
ret = clk_enable(wdt_clk);
|
||||
ret = clk_prepare_enable(wdt_clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -184,7 +184,7 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
disable_clk:
|
||||
clk_disable(wdt_clk);
|
||||
clk_disable_unprepare(wdt_clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
|
||||
{
|
||||
watchdog_unregister_device(&pnx4008_wdd);
|
||||
|
||||
clk_disable(wdt_clk);
|
||||
clk_disable_unprepare(wdt_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
|
||||
{
|
||||
wdd->timeout = timeout;
|
||||
|
||||
if (watchdog_active(wdd))
|
||||
if (watchdog_active(wdd)) {
|
||||
tegra_wdt_stop(wdd);
|
||||
return tegra_wdt_start(wdd);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static int wdt_keepalive(void)
|
||||
|
||||
static int wdt_set_timeout(int t)
|
||||
{
|
||||
int tmrval;
|
||||
unsigned int tmrval;
|
||||
|
||||
/*
|
||||
* Convert seconds to watchdog counter time units, rounding up.
|
||||
|
Loading…
Reference in New Issue
Block a user