26 Sep, 2014

1 commit


06 Aug, 2014

1 commit


31 Mar, 2014

2 commits

  • On some hardware platforms, the it87_wdt watchdog resets the machine
    despite the watchdog daemon running and writing to /dev/watchdog.

    This is due to Consumer IR buffer underrun interrupts being used as
    triggers to reset the timer. On some buggy hardware implementations
    such as the iEi AFL-12A-N270 single-board computer, this method does
    not work.

    However, resetting the timer by writing its original timeout value in
    its configuration register over and over again suppresses the unwanted
    reboots.

    Add a module option (nocir), 0 by default in order not to break existing
    setups. Setting it to 1 enables the workaround.

    Fixes bug #42801 .
    Tested primarily on Linux 3.5.7, applies cleanly on Linux 3.13.5.

    Signed-off-by: Marc van der Wal
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marc van der Wal
     
  • Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30 and
    later). This driver will configure one watchdog timer that will reset the
    system in the case of a watchdog timeout.

    This driver binds to the nvidia,tegra30-timer device node and gets its
    register base from there.

    Signed-off-by: Andrew Chew
    Reviewed-by: Guenter Roeck
    Tested-by: Stephen Warren
    Reviewed-by: Stephen Warren
    Signed-off-by: Wim Van Sebroeck

    Andrew Chew
     

12 Jul, 2013

1 commit

  • Interrupt request doesn't use the right API: The TWD watchdog uses a per-cpu
    interrupt (usually interrupt #30), and the GIC configuration should flag it as
    such. With this setup, request_irq() should fail, and the right API is
    request_percpu_irq(), together with enable_percpu_irq()/disable_percpu_irq().

    Nothing ensures the userspace ioctl() will end-up kicking the watchdog on the
    right CPU.

    There are no users of this driver since a long time and it makes more sense to
    get rid of it as nobody is looking to fix it.

    In case somebody wakes up after this has been removed and needs it, please
    revert this driver and pick these updates (These were never pushed to mainline):

    http://comments.gmane.org/gmane.linux.ports.arm.kernel/245998

    Signed-off-by: Viresh Kumar
    Acked-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Viresh Kumar
     

01 Mar, 2013

1 commit

  • Add support for watchdog drivers to initialize/set the timeout field
    of the watchdog_device structure. The timeout field is initialised
    either with the module timeout parameter value (if valid) or with the
    timeout-sec dt property (if valid). If both are invalid the initial
    value is unchanged.

    Signed-off-by: Fabio Porcedda
    Acked-by: Nicolas Ferre
    Signed-off-by: Wim Van Sebroeck

    Fabio Porcedda
     

29 Aug, 2012

1 commit


30 May, 2012

5 commits

  • This driver adds support for the watchdog functionality provided by
    the Dialog Semiconductor DA9052 PMIC chip.

    Tested on samsung smdkv6410 and i.mx53 QS boards.

    Signed-off-by: Anthony Olech
    Signed-off-by: Ashish Jangam
    Signed-off-by: Wim Van Sebroeck

    Ashish Jangam
     
  • If a driver's watchdog_device struct is part of a dynamically allocated
    struct (which it often will be), merely locking the module is not enough,
    even with a drivers module locked, the driver can be unbound from the device,
    examples:
    1) The root user can unbind it through sysfd
    2) The i2c bus master driver being unloaded for an i2c watchdog

    I will gladly admit that these are corner cases, but we still need to handle
    them correctly.

    The fix for this consists of 2 parts:
    1) Add ref / unref operations, so that the driver can refcount the struct
    holding the watchdog_device struct and delay freeing it until any
    open filehandles referring to it are closed
    2) Most driver operations will do IO on the device and the driver should not
    do any IO on the device after it has been unbound. Rather then letting each
    driver deal with this internally, it is better to ensure at the watchdog
    core level that no operations (other then unref) will get called after
    the driver has called watchdog_unregister_device(). This actually is the
    bulk of this patch.

    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Hans de Goede
     
  • This patch fixes some potential multithreading issues, despite only
    allowing one process to open the /dev/watchdog device, we can still get
    called multiple times at the same time, since a program could be using thread,
    or could share the fd after a fork.

    This causes 2 potential problems:
    1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
    if these 2 race, the watchdog could be stopped while the active
    bit indicates it is running or visa versa.

    2) Most watchdog_dev drivers probably assume that only one
    watchdog-op will get called at a time, this is not necessary
    true atm.

    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Hans de Goede
     
  • Create the watchdog class and it's associated devices.

    Signed-off-by: Alan Cox
    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Alan Cox
     
  • We keep the old /dev/watchdog interface file for the first watchdog via
    miscdev. This is basically a cut and paste of the relevant interface code
    from the rtc driver layer tweaked for watchdog.

    Revised to fix problems noted by Hans de Goede

    Signed-off-by: Alan Cox
    Signed-off-by: Hans de Goede
    Signed-off-by: Tomas Winkler
    Signed-off-by: Wim Van Sebroeck

    Alan Cox
     

23 May, 2012

3 commits


28 Mar, 2012

3 commits

  • This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there
    is another function pointer added to struct watchdog_ops, which can be passed by
    drivers to support this IOCTL.

    Related documentation is updated too.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Linus Walleij
    Signed-off-by: Wim Van Sebroeck

    Viresh Kumar
     
  • When a set_timeout operation succeeds this does not necessarily mean that
    the exact timeout requested has been achieved, because the watchdog does not
    necessarily have a 1 second resolution. So rather then have the core set
    the timeout member of the watchdog_device struct to the exact requested
    value, instead the driver should set it to the actually achieved timeout value.

    Signed-off-by: Hans de Goede
    Signed-off-by: Wim Van Sebroeck

    Hans de Goede
     
  • The 00-index file in the watchdog directory is, like many others,
    outdated (conversion-howto is missing) and doesn't contain worthwhile
    additional information. As it seems to be a maintenance burden without
    much gain, simply remove it.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     

21 Feb, 2012

1 commit


06 Jan, 2012

3 commits


06 Nov, 2011

1 commit


28 Jul, 2011

9 commits


31 Mar, 2011

1 commit


02 Jul, 2010

1 commit


25 May, 2010

1 commit

  • Move the limited watchdog driver help from kernel-parameters.txt
    to Documentation/watchdog/watchdog-parameters.txt and add info to it
    for all watchdog drivers except the ones that have driver-specific
    files already.

    Correct minor comments and MODULE_PARM_DESC() text in 2 places.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Wim Van Sebroeck

    Randy Dunlap
     

06 Apr, 2010

1 commit

  • In the watchdog-test program and watchdog-api.txt, pass the values to
    the WDIOC_SETOPTIONS ioctl as a pointer to an integer containing the
    values intead of directly in the third ioctl argument. The actual
    watchdog drivers in drivers/watchdog don't read the options directly
    from the argument but use get_user and copy_from_user.

    Signed-off-by: James Hogan
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Andrew Morton

    James Hogan
     

04 Apr, 2010

1 commit


23 Sep, 2009

1 commit


23 Jun, 2009

1 commit


18 Jun, 2009

1 commit