mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
linux-watchdog 5.4-rc7 tag
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAl3GikoACgkQ+iyteGJfRsoJrwCeKcV3lXSF4pnmHPK9yjP3bL5Y leMAnjgQrVHljuShcBCzgNgb1I/Ln/BB =ziku -----END PGP SIGNATURE----- Merge tag 'linux-watchdog-5.4-rc7' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - cpwd: fix build regression - pm8916_wdt: fix pretimeout registration flow - meson: Fix the wrong value of left time - imx_sc_wdt: Pretimeout should follow SCU firmware format - bd70528: Add MODULE_ALIAS to allow module auto loading * tag 'linux-watchdog-5.4-rc7' of git://www.linux-watchdog.org/linux-watchdog: watchdog: bd70528: Add MODULE_ALIAS to allow module auto loading watchdog: imx_sc_wdt: Pretimeout should follow SCU firmware format watchdog: meson: Fix the wrong value of left time watchdog: pm8916_wdt: fix pretimeout registration flow watchdog: cpwd: fix build regression
This commit is contained in:
commit
4aba1a7ed5
@ -288,3 +288,4 @@ module_platform_driver(bd70528_wdt);
|
||||
MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>");
|
||||
MODULE_DESCRIPTION("BD70528 watchdog driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:bd70528-wdt");
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/io.h>
|
||||
@ -473,6 +474,11 @@ static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return cpwd_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
|
||||
}
|
||||
|
||||
static ssize_t cpwd_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
@ -497,7 +503,7 @@ static ssize_t cpwd_read(struct file *file, char __user *buffer,
|
||||
static const struct file_operations cpwd_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.unlocked_ioctl = cpwd_ioctl,
|
||||
.compat_ioctl = compat_ptr_ioctl,
|
||||
.compat_ioctl = cpwd_compat_ioctl,
|
||||
.open = cpwd_open,
|
||||
.write = cpwd_write,
|
||||
.read = cpwd_read,
|
||||
|
@ -99,8 +99,14 @@ static int imx_sc_wdt_set_pretimeout(struct watchdog_device *wdog,
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
|
||||
/*
|
||||
* SCU firmware calculates pretimeout based on current time
|
||||
* stamp instead of watchdog timeout stamp, need to convert
|
||||
* the pretimeout to SCU firmware's timeout value.
|
||||
*/
|
||||
arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_SET_PRETIME_WDOG,
|
||||
pretimeout * 1000, 0, 0, 0, 0, 0, &res);
|
||||
(wdog->timeout - pretimeout) * 1000, 0, 0, 0,
|
||||
0, 0, &res);
|
||||
if (res.a0)
|
||||
return -EACCES;
|
||||
|
||||
|
@ -89,8 +89,8 @@ static unsigned int meson_gxbb_wdt_get_timeleft(struct watchdog_device *wdt_dev)
|
||||
|
||||
reg = readl(data->reg_base + GXBB_WDT_TCNT_REG);
|
||||
|
||||
return ((reg >> GXBB_WDT_TCNT_CNT_SHIFT) -
|
||||
(reg & GXBB_WDT_TCNT_SETUP_MASK)) / 1000;
|
||||
return ((reg & GXBB_WDT_TCNT_SETUP_MASK) -
|
||||
(reg >> GXBB_WDT_TCNT_CNT_SHIFT)) / 1000;
|
||||
}
|
||||
|
||||
static const struct watchdog_ops meson_gxbb_wdt_ops = {
|
||||
|
@ -163,9 +163,17 @@ static int pm8916_wdt_probe(struct platform_device *pdev)
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq > 0) {
|
||||
if (devm_request_irq(dev, irq, pm8916_wdt_isr, 0, "pm8916_wdt",
|
||||
wdt))
|
||||
irq = 0;
|
||||
err = devm_request_irq(dev, irq, pm8916_wdt_isr, 0,
|
||||
"pm8916_wdt", wdt);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
wdt->wdev.info = &pm8916_wdt_pt_ident;
|
||||
} else {
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
wdt->wdev.info = &pm8916_wdt_ident;
|
||||
}
|
||||
|
||||
/* Configure watchdog to hard-reset mode */
|
||||
@ -177,7 +185,6 @@ static int pm8916_wdt_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
wdt->wdev.info = (irq > 0) ? &pm8916_wdt_pt_ident : &pm8916_wdt_ident,
|
||||
wdt->wdev.ops = &pm8916_wdt_ops,
|
||||
wdt->wdev.parent = dev;
|
||||
wdt->wdev.min_timeout = PM8916_WDT_MIN_TIMEOUT;
|
||||
|
Loading…
Reference in New Issue
Block a user