18 Apr, 2019

11 commits


27 Feb, 2019

1 commit

  • [ Upstream commit 3aa8b8bbc142eeaac89891de584535ceb7fce405 ]

    These files need
    #include
    to compile correctly.

    Fixes: ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h")
    Signed-off-by: NeilBrown
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Sasha Levin

    NeilBrown
     

13 Feb, 2019

1 commit

  • [ Upstream commit e990e12741877e9bfac402ca468f4007a75f6e2a ]

    The datasheet says we must stop the timer before changing the clock
    divider. This can happen when the restart handler is called while the
    watchdog is running.

    Signed-off-by: Wolfram Sang
    Reviewed-by: Fabrizio Castro
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Sasha Levin

    Wolfram Sang
     

23 Aug, 2018

1 commit

  • Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    recently exposed a brittle part of the build for supporting non-gcc
    compilers.

    Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and
    __GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't
    added compiler specific checks for __clang__ or __INTEL_COMPILER.

    This is brittle, as they happened to get compatibility by posing as a
    certain version of GCC. This broke when upgrading the minimal version
    of GCC required to build the kernel, to a version above what ICC and
    Clang claim to be.

    Rather than always including compiler-gcc.h then undefining or
    redefining macros in compiler-intel.h or compiler-clang.h, let's
    separate out the compiler specific macro definitions into mutually
    exclusive headers, do more proper compiler detection, and keep shared
    definitions in compiler_types.h.

    Fixes: cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
    Reported-by: Masahiro Yamada
    Suggested-by: Eli Friedman
    Suggested-by: Joe Perches
    Signed-off-by: Nick Desaulniers
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     

19 Aug, 2018

1 commit

  • Pull watchdog updates from Wim Van Sebroeck:

    - add MEN 16z069 IP-Core driver

    - renesas-wdt: add support for the R8A77990 wdt

    - stm32_iwdg: Add stm32mp1 support and pclk feature

    - sp805_wdt, orion_wdt, sprd_wdt: several improvements

    - imx2_wdt, stmp3xxx: switch to SPDX identifier

    * tag 'linux-watchdog-4.19-rc1' of git://www.linux-watchdog.org/linux-watchdog:
    watchdog: fix dependencies of menz69_wdt.o
    watchdog: sp805: Add clock-frequency property
    watchdog: add driver for the MEN 16z069 IP-Core
    watchdog: sprd_wdt: Remove redundant dev_err call in sprd_wdt_probe()
    watchdog: stmp3xxx: Switch to SPDX identifier
    watchdog: imx2_wdt: Switch to SPDX identifier
    watchdog: sp805: set WDOG_HW_RUNNING when appropriate
    watchdog: sp805: add 'timeout-sec' DT property support
    dt-bindings: watchdog: Add optional 'timeout-sec' property for sp805
    dt-bindings: watchdog: Consolidate SP805 binding docs
    watchdog: orion_wdt: Mark watchdog as active when running at probe
    watchdog: stm32: add pclk feature for stm32mp1
    dt-bindings: watchdog: add stm32mp1 support
    dt-bindings: watchdog: renesas-wdt: Add support for the R8A77990 wdt

    Linus Torvalds
     

06 Aug, 2018

2 commits

  • Currently menz69_wdt.ko has a dependency on MCB or COMPILE_TEST. But
    it actually needs symbols exported by MCB so the || COMPILE_TEST is
    wrong.

    Signed-off-by: Johannes Thumshirn
    Reported-by: Randy Dunlap
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Johannes Thumshirn
     
  • Use clock-frequency property given in _DSD object
    of ACPI device to calculate Watchdog rate as binding
    clock devices are not available as device tree.

    Note: There is no formal review process for _DSD
    properties

    Signed-off-by: Srinath Mannam
    Reviewed-by: Guenter Roeck
    Reviewed-by: Ray Jui
    Reviewed-by: Scott Branden
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Srinath Mannam
     

02 Aug, 2018

8 commits


07 Jul, 2018

1 commit

  • At over 4000 #includes, is the 9th most
    #included header file in the Linux kernel. It does not need
    , so drop that header and explicitly add
    to source files that need it.

    4146 #include

    After this patch, there are 225 files that use ,
    for a reduction of around 3900 times that
    does not have to be read & parsed.

    225 #include

    This patch was build-tested on 20 different arch-es.

    It also makes these drivers SubmitChecklist#1 compliant.

    Signed-off-by: Randy Dunlap
    Reported-by: kbuild test robot # drivers/media/platform/vimc/
    Reported-by: kbuild test robot # drivers/pinctrl/pinctrl-u300.c
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

13 Jun, 2018

1 commit

  • Pull MIPS updates from James Hogan:
    "These are the main MIPS changes for 4.18.

    Rough overview:

    - MAINTAINERS: Add Paul Burton as MIPS co-maintainer

    - Misc: Generic compiler intrinsics, Y2038 improvements, Perf+MT fixes

    - Platform support: Netgear WNR1000 V3, Microsemi Ocelot integrated
    switch, Ingenic watchdog cleanups

    More detailed summary:

    Maintainers:

    - Add Paul Burton as MIPS co-maintainer, as I soon won't have access
    to much MIPS hardware, nor enough time to properly maintain MIPS on
    my own.

    Miscellaneous:

    - Use generic GCC library routines from lib/
    - Add notrace to generic ucmpdi2 implementation
    - Rename compiler intrinsic selects to GENERIC_LIB_*
    - vmlinuz: Use generic ashldi3

    - y2038: Convert update/read_persistent_clock() to *_clock64()
    - sni: Remove read_persistent_clock()

    - perf: Fix perf with MT counting other threads
    - Probe for per-TC perf counters in cpu-probe.c
    - Use correct VPE ID for VPE tracing

    Minor cleanups:

    - Avoid unneeded built-in.a in DTS dirs

    - sc-debugfs: Re-use kstrtobool_from_user

    - memset.S: Reinstate delay slot indentation

    - VPE: Fix spelling "uneeded" -> "Unneeded"

    Platform support:

    BCM47xx:

    - Add support for Netgear WNR1000 V3

    - firmware: Support small NVRAM partitions

    - Use __initdata for LEDs platform data

    Ingenic:

    - Watchdog driver & platform code improvements:
    - Disable clock after stopping counter
    - Use devm_* functions
    - Drop module remove function
    - Move platform reset code to restart handler in driver
    - JZ4740: Convert watchdog instantiation to DT
    - JZ4780: Fix watchdog DT node
    - qi_lb60_defconfig: Enable watchdog driver

    Microsemi:

    - Ocelot: Add support for integrated switch
    - pcb123: Connect phys to ports"

    * tag 'mips_4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
    MAINTAINERS: Add Paul Burton as MIPS co-maintainer
    MIPS: ptrace: Make FPU context layout comments match reality
    MIPS: memset.S: Reinstate delay slot indentation
    MIPS: perf: Fix perf with MT counting other threads
    MIPS: perf: Use correct VPE ID when setting up VPE tracing
    MIPS: perf: More robustly probe for the presence of per-tc counters
    MIPS: Probe for MIPS MT perf counters per TC
    MIPS: mscc: Connect phys to ports on ocelot_pcb123
    MIPS: mscc: Add switch to ocelot
    MIPS: JZ4740: Drop old platform reset code
    MIPS: qi_lb60: Enable the jz4740-wdt driver
    MIPS: JZ4780: dts: Fix watchdog node
    MIPS: JZ4740: dts: Add bindings for the jz4740-wdt driver
    watchdog: JZ4740: Drop module remove function
    watchdog: JZ4740: Register a restart handler
    watchdog: JZ4740: Use devm_* functions
    watchdog: JZ4740: Disable clock after stopping counter
    MIPS: VPE: Fix spelling mistake: "uneeded" -> "unneeded"
    MIPS: Re-use kstrtobool_from_user()
    MIPS: Convert update_persistent_clock() to update_persistent_clock64()
    ...

    Linus Torvalds
     

07 Jun, 2018

2 commits

  • Every time da9063_wdt_update_timeout() gets called a timeout_to_sel() is
    made because the timeout argument of update_timeout() is the raw
    register value. Moving the secondraw-value translation into
    da9063_wdt_update_timeout() removes duplicated code.

    Signed-off-by: Marco Felsch
    Acked-by: Steve Twiss
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marco Felsch
     
  • _da9063_wdt_set_timeout() is called by da9063_wdg_set_timeout(),
    da9063_wdg_start() and da9063_wdg_probe() but the name expect only to be
    called by da9063_wdg_set_timeout(). Rename the function to avoid
    misunderstandings.

    Signed-off-by: Marco Felsch
    Acked-by: Steve Twiss
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marco Felsch
     

06 Jun, 2018

4 commits

  • The patch "watchdog: da9062: use protection delay mechanism from core"
    (fb484262) removed the only user of j_time_stamp. This turned into some
    leftover functions that are removed with this patch.

    Signed-off-by: Michael Grzeschik
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Michael Grzeschik
     
  • The watchdog can be enabled in previous steps (e.g. the bootloader). Set
    the driver default timeout value (8s) if the watchdog is already running
    and the HW_RUNNING flag. So the watchdog core framework will ping the
    watchdog till the user space activates the watchdog explicit with the
    desired timeout value.

    Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
    Signed-off-by: Marco Felsch
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marco Felsch
     
  • The DA9063 watchdog has only one register field to store the timeout value
    and to enable the watchdog. The watchdog gets enabled if the value is
    not zero. There is no issue if the watchdog is already running but it
    leads into problems if the watchdog is disabled.

    If the watchdog is disabled and only the timeout value should be prepared
    the watchdog gets enabled too. Add a check to get the current watchdog
    state and update the watchdog timeout value on hw-side only if the
    watchdog is already active.

    Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
    Signed-off-by: Marco Felsch
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marco Felsch
     
  • If the timeout value is set more than once the DA9063 watchdog triggers
    a reset signal which reset the system.

    To update the timeout value we have to disable the watchdog, clear the
    watchdog counter value and write the new timeout value to the watchdog.
    Clearing the counter value is a feature to be on the safe side because the
    data sheet doesn't describe the behaviour of the watchdog counter value
    after a watchdog disabling-enable-sequence.

    The patch is based on Philipp Zabel's previous patch.

    Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
    Signed-off-by: Marco Felsch
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Marco Felsch
     

22 May, 2018

5 commits

  • There is already a mutex in the watchdog core which serializes
    calls to the various API functions.
    So the mutex lock "drv->lock" is unnecessary and can be dropped.

    Signed-off-by: Jia-Ju Bai
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Reviewed-by: Guenter Roeck

    Jia-Ju Bai
     
  • On iLO5 going forward we want to return and not claim the NMI, if
    the NMI was NOT gnerated by the iLO as a result of the watchdog
    timing out or an explicit generate NMI.

    The sense of the test in is inverted and prevents hpwdt_pretimeout
    from claiming NMIs when it should.

    Signed-off-by: Jerry Hoemann
    Fixes: a042229a18ac ("watchdog: hpwdt: Update nmi_panic message.")
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Jerry Hoemann
     
  • Add restart handler for SP805 watchdog so that the driver can be
    used to reboot the system.

    Signed-off-by: Jongsung Kim
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Jongsung Kim
     
  • System restart triggered by watchdog time-out works fine on a Koelsch
    board with R-Car M2-W ES2.0.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Fabrizio Castro
    Reviewed-by: Guenter Roeck
    Reviewed-by: Simon Horman
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Geert Uytterhoeven
     
  • We should get drvdata from struct device directly. Going via
    platform_device is an unneeded step back and forth.

    Signed-off-by: Wolfram Sang
    Acked-by: Michal Simek
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     

15 May, 2018

2 commits

  • When the watchdog was configured for nowayout, and after the
    userspace watchdog daemon closed the dev node without sending the
    magic character, unloading this module stopped the watchdog
    hardware, which was clearly a problem.

    Besides, unloading the module is not possible when the userspace
    watchdog daemon is running, so it's safe to assume that we don't
    need to stop the watchdog hardware in the jz4740_wdt_remove()
    function.

    For this reason, the jz4740_wdt_remove() function can then be
    dropped alltogether.

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil
     
  • The watchdog driver can restart the system by simply configuring the
    hardware for a timeout of 0 seconds.

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil