15 Jan, 2016

4 commits


23 Oct, 2015

1 commit

  • commit 0919e4445190da18496d31aac08b90828a47d45f upstream.

    Commit f2147de33470 ("watchdog: sunxi: support parameterized compatible
    strings") introduced a regression in sunxi_wdt_start(), by which
    the system reset function of the watchdog is not enabled upon
    starting the watchdog. As a result, the system is not reset when the
    watchdog expires. Fix it.

    Fixes: f2147de33470 ("watchdog: sunxi: support parameterized compatible strings")
    Signed-off-by: Francesco Lavra
    Acked-by: Maxime Ripard
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Greg Kroah-Hartman

    Francesco Lavra
     

04 Aug, 2015

1 commit

  • commit 530c11d432727c697629ad5f9d00ee8e2864d453 upstream.

    The omap watchdog has the annoying behaviour that writes to most
    registers don't have any effect when the watchdog is already running.
    Quoting the AM335x reference manual:

    To modify the timer counter value (the WDT_WCRR register),
    prescaler ratio (the WDT_WCLR[4:2] PTV bit field), delay
    configuration value (the WDT_WDLY[31:0] DLY_VALUE bit field), or
    the load value (the WDT_WLDR[31:0] TIMER_LOAD bit field), the
    watchdog timer must be disabled by using the start/stop sequence
    (the WDT_WSPR register).

    Currently the timer is stopped in the .probe callback but still there
    are possibilities that yield to a situation where omap_wdt_start is
    entered with the timer running (e.g. when /dev/watchdog is closed
    without stopping and then reopened). In such a case programming the
    timeout silently fails!

    To circumvent this stop the timer before reprogramming.

    Assuming one of the first things the watchdog user does is setting the
    timeout explicitly nothing too bad should happen because this explicit
    setting works fine.

    Fixes: 7768a13c252a ("[PATCH] OMAP: Add Watchdog driver support")
    Signed-off-by: Uwe Kleine-König
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

23 Apr, 2015

2 commits

  • Pull watchdog updates from Wim Van Sebroeck:
    "This contains following changes:

    - Octeon: convert to watchdog-API and apply some fixes
    - Cadence wdt: remove dependency on ARCH
    - add DT bindings for qcom + msm
    - bcm281xx: Remove use of seq_printf return value
    - stmp3xxx_rtc_wdt + pnx4008_wdt: fix broken email addresses"

    * git://www.linux-watchdog.org/linux-watchdog:
    watchdog: stmp3xxx_rtc_wdt: fix broken email address
    watchdog: pnx4008_wdt: fix broken email address
    watchdog: octeon: use fixed length string for register names
    watchdog: octeon: fix some trivial coding style issues
    watchdog: octeon: convert to WATCHDOG_CORE API
    watchdog: cadence: Remove Kconfig dependency on ARCH
    ARM: msm: add watchdog entries to DT timer binding doc
    ARM: qcom: add description of KPSS WDT for IPQ8064
    watchdog: qcom: use timer devicetree binding
    watchdog: bcm281xx: Remove use of seq_printf return value

    Linus Torvalds
     
  • Pull ARM SoC driver updates from Olof Johansson:
    "Driver updates for v4.1. Some of these are for drivers/soc, where we
    find more and more SoC-specific drivers these days. Some are for
    other driver subsystems where we have received acks from the
    appropriate maintainers.

    The larger parts of this branch are:

    - MediaTek support for their PMIC wrapper interface, a high-level
    interface for talking to the system PMIC over a dedicated I2C
    interface.

    - Qualcomm SCM driver has been moved to drivers/firmware. It's used
    for CPU up/down and needs to be in a shared location for arm/arm64
    common code.

    - cleanup of ARM-CCI PMU code.

    - another set of cleanusp to the OMAP GPMC code"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
    soc/mediatek: Remove unused variables
    clocksource: atmel-st: select MFD_SYSCON
    soc: mediatek: Add PMIC wrapper for MT8135 and MT8173 SoCs
    arm-cci: Fix CCI PMU event validation
    arm-cci: Split the code for PMU vs driver support
    arm-cci: Get rid of secure transactions for PMU driver
    arm-cci: Abstract the CCI400 PMU specific definitions
    arm-cci: Rearrange code for splitting PMU vs driver code
    drivers: cci: reject groups spanning multiple HW PMUs
    ARM: at91: remove useless include
    clocksource: atmel-st: remove mach/hardware dependency
    clocksource: atmel-st: use syscon/regmap
    ARM: at91: time: move the system timer driver to drivers/clocksource
    ARM: at91: properly initialize timer
    ARM: at91: at91rm9200: remove deprecated arm_pm_restart
    watchdog: at91rm9200: implement restart handler
    watchdog: at91rm9200: use the system timer syscon
    mfd: syscon: Add atmel system timer registers definition
    ARM: at91/dt: declare atmel,at91rm9200-st as a syscon
    soc: qcom: gsbi: Add support for ADM CRCI muxing
    ...

    Linus Torvalds
     

22 Apr, 2015

8 commits


15 Apr, 2015

1 commit

  • Pull s390 updates from Martin Schwidefsky:
    "The major change in this merge is the removal of the support for
    31-bit kernels. Naturally 31-bit user space will continue to work via
    the compat layer.

    And then some cleanup, some improvements and bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (23 commits)
    s390/smp: wait until secondaries are active & online
    s390/hibernate: fix save and restore of kernel text section
    s390/cacheinfo: add missing facility check
    s390/syscalls: simplify syscall_get_arch()
    s390/irq: enforce correct irqclass_sub_desc array size
    s390: remove "64" suffix from mem64.S and swsusp_asm64.S
    s390/ipl: cleanup macro usage
    s390/ipl: cleanup shutdown_action attributes
    s390/ipl: cleanup bin attr usage
    s390/uprobes: fix address space annotation
    s390: add missing arch_release_task_struct() declaration
    s390: make couple of functions and variables static
    s390/maccess: improve s390_kernel_write()
    s390/maccess: remove potentially broken probe_kernel_write()
    s390/watchdog: support for KVM hypervisors and delete pr_info messages
    s390/watchdog: enable KEEPALIVE for /dev/watchdog
    s390/dasd: remove setting of scheduler from driver
    s390/traps: panic() instead of die() on translation exception
    s390: remove test_facility(2) (== z/Architecture mode active) checks
    s390/cmpxchg: simplify cmpxchg_double
    ...

    Linus Torvalds
     

10 Apr, 2015

1 commit


04 Apr, 2015

1 commit

  • …inux into next/drivers

    Merge "arm-cci PMU updates for 4.1" from Will Deacon:

    CCI-400 PMU updates

    This series reworks some of the CCI-400 PMU code so that it can be used
    on both ARM and ARM64-based systems, without the need to boot in secure
    mode on the latter. This paves the way for CCI-500 support in future.

    * tag 'arm-perf-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux:
    arm-cci: Fix CCI PMU event validation
    arm-cci: Split the code for PMU vs driver support
    arm-cci: Get rid of secure transactions for PMU driver
    arm-cci: Abstract the CCI400 PMU specific definitions
    arm-cci: Rearrange code for splitting PMU vs driver code
    drivers: cci: reject groups spanning multiple HW PMUs
    + Linux 4.0-rc4

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

03 Apr, 2015

1 commit

  • If the target sleep state of the system is not an ACPI sleep state
    (S1, S2 or S3), the TCO watchdog needs to be stopped during system
    suspend, because it may not be possible to ping it any more after
    timekeeping has been suspended (suspend-to-idle does that for
    one example).

    For this reason, provide ->suspend_noirq and ->resume_noirq
    callbacks for the iTCO watchdog driver and use them to stop
    and restart the watchdog during system suspend and resume,
    respectively, if the system is not going to enter an ACPI
    sleep state (in which case the watchdog will be stopped
    by the platform firmware before the state is entered).

    Reported-and-tested-by: Borun Fu
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Guenter Roeck

    Rafael J. Wysocki
     

27 Mar, 2015

3 commits

  • The IMG PDC watchdog driver heartbeat module parameter has no default so
    it is initialised to zero. This results in the following warning during
    probe:

    imgpdc-wdt 2006000.wdt: Initial timeout out of range! setting max timeout

    The module parameter description implies that the default value should
    be PDC_WDT_DEF_TIMEOUT, which isn't yet used, so initialise it to that.

    Also tweak the heartbeat module parameter description for consistency.

    Fixes: 93937669e9b5 ("watchdog: ImgTec PDC Watchdog Timer Driver")
    Signed-off-by: James Hogan
    Cc: Ezequiel Garcia
    Cc: Naidu Tellapati
    Cc: Jude Abraham
    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    James Hogan
     
  • The IMG PDC watchdog probe function calls pdc_wdt_stop() prior to
    watchdog_set_drvdata(), causing a NULL pointer dereference when
    pdc_wdt_stop() retrieves the struct pdc_wdt_dev pointer using
    watchdog_get_drvdata() and reads the register base address through it.

    Fix by moving the watchdog_set_drvdata() call earlier, to where various
    other pdc_wdt->wdt_dev fields are initialised.

    Fixes: 93937669e9b5 ("watchdog: ImgTec PDC Watchdog Timer Driver")
    Signed-off-by: James Hogan
    Cc: Ezequiel Garcia
    Cc: Naidu Tellapati
    Cc: Jude Abraham
    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    James Hogan
     
  • "ret" should be signed for the error handling to work correctly. This
    doesn't matter much in real life since mtk_wdt_set_timeout() always
    succeeds.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Matthias Brugger
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Dan Carpenter
     

25 Mar, 2015

2 commits

  • This patch extends the diag288 watchdog driver to be able to deal with KVM
    hypervisors. Only z/VM needs special handling, we can use the same interface
    as on LPAR. Remove all pr_info output to avoid misconception. Because there
    is no value in these messages and only the pr_err messages make sense.

    Signed-off-by: Xu Wang
    Reviewed-by: David Hildenbrand
    Acked-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Xu Wang
     
  • There's no reason why we wouldn't want to be able to send a keep alive
    message to /dev/watchdog (feed dog) for the s390 diag288 watchdog, so
    let's enable the WDIOF_KEEPALIVEPING option.

    Signed-off-by: Xu Wang
    Signed-off-by: Martin Schwidefsky

    Xu Wang
     

17 Mar, 2015

2 commits


06 Mar, 2015

1 commit

  • The watchdog interrupt (only used when activating software watchdog)
    shouldn't be suspended when entering suspend mode, because it is shared
    with a timer device (which request the line with IRQF_NO_SUSPEND) and once
    the watchdog "Mode Register" has been written, it cannot be changed (which
    means we cannot disable the watchdog interrupt when entering suspend).

    Signed-off-by: Boris Brezillon
    Reviewed-by: Alexandre Belloni
    Acked-by: Guenter Roeck
    Acked-by: Nicolas Ferre
    Signed-off-by: Rafael J. Wysocki

    Boris BREZILLON
     

18 Feb, 2015

12 commits

  • BCM5301X (ARCH_BCM_5301X) is a new Broadcom architecture using the same
    SoC bus driver (bcma) as BCM47XX but based on ARM instead of MIPS.

    Signed-off-by: Rafał Miłecki
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Rafał Miłecki
     
  • Add DT support to the jz4740 driver. Simple of_match_ptr. No other
    modification for probe needed

    Signed-off-by: Zubair Lutfullah Kakakhel
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Zubair Lutfullah Kakakhel
     
  • The dw_wdt_set_top() function takes in a value in seconds. In
    dw_wdt_open() we were calling it with a value that's supposed to
    represent the maximum value programmed into the "top" register with a
    comment saying that we were trying to set the watchdog to its maximum
    value. Instead we ended up setting the watchdog to ~15 seconds.

    Let's fix this. However, setting things to the "max" gives me an 86
    second watchdog in the system I'm looking at. 86 seconds feels a
    little too long. We'll explicitly choose 30 seconds as a more
    reasonable value.

    NOTE: Ideally this driver should be transitioned to be a real watchdog
    driver. Then we could use "watchdog_init_timeout" and let the timeout
    be specified in a number of ways (device tree, module parameter, etc).
    This patch should be considered a bit of a stopgap solution.

    Signed-off-by: Doug Anderson
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Doug Anderson
     
  • On some dw_wdt implementations the "top" register may be initted to 0
    at bootup. In such a case, each "pat" of the watchdog will reset the
    timer to 0xffff. That's pretty short.

    The input clock of the wdt can be any of a wide range of values. On
    an rk3288 system, I've seen the wdt clock be 24.75 MHz. That means
    each tick is ~40ns and we'll count to 0xffff in ~2.6ms.

    Because of the above two facts, it's a really good idea to pat the
    watchdog after initting the "top" register properly and before
    enabling the watchdog. If you don't then there's no way we'll get the
    next heartbeat in time.

    Jisheng Zhang fixed this problem on some dw_wdt versions by using the
    TOP_INIT feature. However, the dw_wdt on rk3288 doesn't have TOP_INIT
    so it's a good idea to also pat the watchdog manually.

    Signed-off-by: Doug Anderson
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Doug Anderson
     
  • The watchdog functionality in both chips is almost identical to NCT6779.

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     
  • Just like in case of other watchdog drivers, use the new kernel core
    API to provide restart support.

    Signed-off-by: Rafał Miłecki
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Rafał Miłecki
     
  • On some chips, like the TPS386000, the trigger cannot be disabled
    and the CPU must keep toggling the line at all times. Add a switch
    "always_running" to keep toggling the GPIO line regardless of the
    state of the soft part of the watchdog. The "armed" member keeps
    track of whether a timeout must also cause a reset.

    Signed-off-by: Mike Looijmans
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Mike Looijmans
     
  • Register a restart handler for the da9063 watchdog. System restart is
    triggered by sending the shutdown command to the PMIC.
    As more-suitable restart handlers may exist, the priority of the
    watchdog restart handler is set to 128.

    The actual restart method was inspired by a platform-specific patch from
    the BSP by Hisashi Nakamura .

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Steve Twiss
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Geert Uytterhoeven
     
  • This patch adds a driver for the Mediatek SoC integrated
    watchdog. This driver supports watchdog and software reset
    for mt65xx and mt81xx SoCs.

    Signed-off-by: Matthias Brugger
    Tested-by: Eddie Huang
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Matthias Brugger
     
  • This allows testing the watchdog easily with distros just by
    doing pkill -9 watchdog.

    Reported-by: Thomas Dziedzic
    Signed-off-by: Tony Lindgren
    Acked-by: Aaro Koskinen
    Reviewed-by: Felipe Balbi
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Tony Lindgren
     
  • Replace device_reset() with devm_reset_control_get() + reset_control_deassert().
    Make use of watchdog_init_timeout() instead of setting the timeout manually.

    Signed-off-by: John Crispin
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    John Crispin
     
  • allow_kdump was enabled as default since following commit.

    commit a089361cf5f1d6a5295aa5385238bd044998e1e9,
    watchdog: hpwdt: Unregister NMI events on exit.

    But the initialization message was not modified.
    So it still shows

    HP Watchdog Timer Driver: NMI decoding initialized,
    allow kernel dump: ON (default = 0/OFF)
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Masanari Iida