Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+28 -8
+1
drivers/watchdog/bd70528_wdt.c
··· 288 288 MODULE_AUTHOR("Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>"); 289 289 MODULE_DESCRIPTION("BD70528 watchdog driver"); 290 290 MODULE_LICENSE("GPL"); 291 + MODULE_ALIAS("platform:bd70528-wdt");
+7 -1
drivers/watchdog/cpwd.c
··· 26 26 #include <linux/interrupt.h> 27 27 #include <linux/ioport.h> 28 28 #include <linux/timer.h> 29 + #include <linux/compat.h> 29 30 #include <linux/slab.h> 30 31 #include <linux/mutex.h> 31 32 #include <linux/io.h> ··· 474 473 return 0; 475 474 } 476 475 476 + static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 477 + { 478 + return cpwd_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); 479 + } 480 + 477 481 static ssize_t cpwd_write(struct file *file, const char __user *buf, 478 482 size_t count, loff_t *ppos) 479 483 { ··· 503 497 static const struct file_operations cpwd_fops = { 504 498 .owner = THIS_MODULE, 505 499 .unlocked_ioctl = cpwd_ioctl, 506 - .compat_ioctl = compat_ptr_ioctl, 500 + .compat_ioctl = cpwd_compat_ioctl, 507 501 .open = cpwd_open, 508 502 .write = cpwd_write, 509 503 .read = cpwd_read,
+7 -1
drivers/watchdog/imx_sc_wdt.c
··· 99 99 { 100 100 struct arm_smccc_res res; 101 101 102 + /* 103 + * SCU firmware calculates pretimeout based on current time 104 + * stamp instead of watchdog timeout stamp, need to convert 105 + * the pretimeout to SCU firmware's timeout value. 106 + */ 102 107 arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_SET_PRETIME_WDOG, 103 - pretimeout * 1000, 0, 0, 0, 0, 0, &res); 108 + (wdog->timeout - pretimeout) * 1000, 0, 0, 0, 109 + 0, 0, &res); 104 110 if (res.a0) 105 111 return -EACCES; 106 112
+2 -2
drivers/watchdog/meson_gxbb_wdt.c
··· 89 89 90 90 reg = readl(data->reg_base + GXBB_WDT_TCNT_REG); 91 91 92 - return ((reg >> GXBB_WDT_TCNT_CNT_SHIFT) - 93 - (reg & GXBB_WDT_TCNT_SETUP_MASK)) / 1000; 92 + return ((reg & GXBB_WDT_TCNT_SETUP_MASK) - 93 + (reg >> GXBB_WDT_TCNT_CNT_SHIFT)) / 1000; 94 94 } 95 95 96 96 static const struct watchdog_ops meson_gxbb_wdt_ops = {
+11 -4
drivers/watchdog/pm8916_wdt.c
··· 163 163 164 164 irq = platform_get_irq(pdev, 0); 165 165 if (irq > 0) { 166 - if (devm_request_irq(dev, irq, pm8916_wdt_isr, 0, "pm8916_wdt", 167 - wdt)) 168 - irq = 0; 166 + err = devm_request_irq(dev, irq, pm8916_wdt_isr, 0, 167 + "pm8916_wdt", wdt); 168 + if (err) 169 + return err; 170 + 171 + wdt->wdev.info = &pm8916_wdt_pt_ident; 172 + } else { 173 + if (irq == -EPROBE_DEFER) 174 + return -EPROBE_DEFER; 175 + 176 + wdt->wdev.info = &pm8916_wdt_ident; 169 177 } 170 178 171 179 /* Configure watchdog to hard-reset mode */ ··· 185 177 return err; 186 178 } 187 179 188 - wdt->wdev.info = (irq > 0) ? &pm8916_wdt_pt_ident : &pm8916_wdt_ident, 189 180 wdt->wdev.ops = &pm8916_wdt_ops, 190 181 wdt->wdev.parent = dev; 191 182 wdt->wdev.min_timeout = PM8916_WDT_MIN_TIMEOUT;