22 Feb, 2014

1 commit


08 Feb, 2014

1 commit

  • On archs like S390 or um this driver cannot build nor work.
    Make it depend on HAS_IOMEM to bypass build failures.

    drivers/built-in.o: In function `dw_wdt_drv_probe':
    drivers/watchdog/dw_wdt.c:302: undefined reference to `devm_ioremap_resource'

    Signed-off-by: Richard Weinberger
    Signed-off-by: Wim Van Sebroeck

    Richard Weinberger
     

29 Jan, 2014

27 commits

  • If the watchdog has already triggered for whatever reason, it won't restart
    unless the trigger is reset.

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

    Guenter Roeck
     
  • Major difference is that the watchdog control and counter registers
    are different on both chips.

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

    Guenter Roeck
     
  • Instead of requiring the user to provide an IO address per module
    parameter, auto-detect it as well as supported chips.

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

    Guenter Roeck
     
  • Try to reset the watchdog counter 4 or 2 times more often than actually
    requested, to avoid spurious watchdog reset.
    If this is not possible because of the min_heartbeat value, reset it at
    the min_heartbeat period.

    Signed-off-by: Boris BREZILLON
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Boris BREZILLON
     
  • Use the min_heartbeat value instead of the calculated heartbeat value for
    the first watchdog reset to avoid spurious watchdog reset.

    Resetting the watchdog counter during init might lead to a watchdog fault
    reset because the watchdog counter has to be running for at least
    min_heartbeat.

    Resetting the watchdog counter after heartbeat might lead to a watchdog
    timeout reset because the watchdog counter is running for more than
    max_heartbeat time.

    Using min_heartbeat instead of heartbeat does not guarantee that the
    watchdog won't trigger a reset, but at least it reduces the chances to be
    in such a case.

    Signed-off-by: Boris BREZILLON
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Boris BREZILLON
     
  • Fix the secs_to_ticks macro in case 0 is passed as an argument.

    Signed-off-by: Boris BREZILLON
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Boris BREZILLON
     
  • The at91sam9 watchdog timer can only be configured once, and the current
    implementation tries to configure it in a static way:
    - 2 seconds timeout
    - wdt restart every 500ms

    If the timer has already been configured with different values, it returns an
    error and do not create any watchdog device.

    This is not critical if the watchdog is disabled, but if it has been enabled with
    different timeout values it will lead to a SoC reset.

    This patch series tries to address this issue by adapting the heartbeat value
    according the WDT timer config:
    - it first tries to configure the timer as requested.
    - if it fails it fallbacks to the current config, adapting its heartbeat timer
    to the needs

    This patch series also move to a dynamically allocated at91wdt device instead
    of the static instance.

    It adds a new at91 wdt type: software. This new type make use of the at91 wdt
    interrupt to trigger a software reboot.

    Finally it adds several properties to the device tree bindings.

    Signed-off-by: Boris BREZILLON
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Boris BREZILLON
     
  • Add sp805_wdt depends on ARM64.

    Signed-off-by: Naresh Bhat
    Acked-by: Viresh Kumar
    Signed-off-by: Wim Van Sebroeck

    Naresh Bhat
     
  • mach-moxart lacks a separate register for reset; as a workaround,
    add a function that can be hooked to arm_pm_restart.

    Signed-off-by: Jonas Jensen
    Acked-by: Arnd Bergmann
    Signed-off-by: Wim Van Sebroeck

    Jonas Jensen
     
  • Convert mpc8xxx_wdt.c to the new watchdog API.

    Signed-off-by: Christophe Leroy
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Christophe Leroy
     
  • 'sirfsoc_wdt_of_match' is always compiled in. Hence the
    helper macro is not needed.

    Signed-off-by: Sachin Kamat
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Sachin Kamat
     
  • This patch is being submitted to output a general string when the panic comes
    in that informs the user of the possible places to look for the source of the
    NMI. Because various systems log the message in different places this would
    give a single display of where to go look instead of code that acts on all
    these different server names or IDs.

    Signed-off-by: Thomas Mingarelli
    Signed-off-by: Wim Van Sebroeck

    Thomas Mingarelli
     
  • There is nothing ARM specific in this driver, and we intend to use it on the
    Xtensa architecture. Also, clk.h now includes stubs for !CONFIG_HAVE_CLK, so
    the driver should build anyway.

    Signed-off-by: Baruch Siach
    Acked-by: Jamie Iles
    Signed-off-by: Wim Van Sebroeck

    Baruch Siach
     
  • We should set watchdog timer to be disabled in low power mode,
    as there is no service running in background, otherwise, system
    will reset unexpected.

    Signed-off-by: Anson Huang
    Acked-by: Shawn Guo
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Anson Huang
     
  • A good watchdog driver is supposed to report when it was responsible
    for resetting the system. Implement this for the s3c2410, at least on
    exynos5250 and exynos5420 where we already have a pointer to the PMU
    registers to read the information.

    Note that exynos4 SoCs also provide the reset status, but providing
    that is left as an exercise for future changes and is not plumbed up
    in this patch series. Also note the exynos4 SoCs don't appear to need
    any PMU config, which is why this patch separates the concepts of
    having PMU Registers vs. needing PMU Config.

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

    Doug Anderson
     
  • Add device tree support for exynos5250 and 5420 SoCs and use syscon regmap interface
    to configure AUTOMATIC_WDT_RESET_DISABLE and MASK_WDT_RESET_REQUEST registers of PMU
    to mask/unmask enable/disable of watchdog in probe and s2r scenarios.

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

    Leela Krishna Amudala
     
  • The existing watchdog timeout worked OK but didn't deal with
    rounding in an ideal way when dividing out all of its clocks.

    Specifically if you had a timeout of 32 seconds and an input clock of
    66666666, you'd end up setting a timeout of 31.9998 seconds and
    reporting a timeout of 31 seconds.

    Specifically DBG printouts showed:
    s3c2410wdt_set_heartbeat: count=16666656, timeout=32, freq=520833
    s3c2410wdt_set_heartbeat: timeout=32, divisor=255, count=16666656 (0000ff4f)
    and the final timeout reported to the user was:
    ((count / divisor) * divisor) / freq
    (0xff4f * 255) / 520833 = 31 (truncated from 31.9998)
    the technically "correct" value is:
    (0xff4f * 255) / (66666666.0 / 128) = 31.9998

    By using "DIV_ROUND_UP" we can be a little more correct.
    s3c2410wdt_set_heartbeat: count=16666688, timeout=32, freq=520834
    s3c2410wdt_set_heartbeat: timeout=32, divisor=255, count=16666688 (0000ff50)
    and the final timeout reported to the user:
    (0xff50 * 255) / 520834 = 32
    the technically "correct" value is:
    (0xff50 * 255) / (66666666.0 / 128) = 32.0003

    We'll use a DIV_ROUND_UP to solve this, generally erroring on the side
    of reporting shorter values to the user and setting the watchdog to
    slightly longer than requested:
    * Round input frequency up to assume watchdog is counting faster.
    * Round divisions by divisor up to give us extra time.

    At the same time we can avoid a for loop by just doing the right math.

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

    Doug Anderson
     
  • On modern SoCs the watchdog timer is parented on a clock that doesn't
    change every time we have a cpufreq change. That means we don't need
    to constantly adjust the watchdog timer, so avoid registering for and
    dealing with cpufreq transitions unless we've actually got
    CONFIG_ARM_S3C24XX_CPUFREQ defined.

    Note that this is more than just an optimization. The s3c2410
    watchdog driver actually pats the watchdog on every CPU frequency
    change. On modern systems these happen many times per second (even in
    a system where "nothing" is happening). That effectively makes any
    userspace watchdog program useless (the watchdog is constantly patted
    by the kernel). If we need ARM_S3C24XX_CPUFREQ defined on a
    multiplatform kernel we'll need to make sure that kernel supports
    common clock and change this to user common clock framework.

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

    Doug Anderson
     
  • This patch adds a watchdog driver for devices controlled through GPIO,
    (Analog Devices ADM706, Maxim MAX823, National NE555 etc).

    Signed-off-by: Alexander Shiyan
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Alexander Shiyan
     
  • The keystone arch uses the same IP watchdog, so add "ti,keystone-wdt"
    compatible and correct identity.

    The Keystone arch is using clocks in DT and source clock for watchdog
    has to be specified, so add this to binding.

    Signed-off-by: Ivan Khoronzhuk
    Acked-by: Santosh Shilimkar
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ivan Khoronzhuk
     
  • Currently, the davinci watchdog can be read while counting,
    so we can add ability to report the remaining time before
    the system will reboot.

    Signed-off-by: Ivan Khoronzhuk
    Acked-by: Santosh Shilimkar
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ivan Khoronzhuk
     
  • Some SoCs, like Keystone 2, can support more than one WDT and each
    watchdog device has to use it's own base address, clock source,
    watchdog device, so add new davinci_wdt_device structure to hold
    device data.

    Signed-off-by: Ivan Khoronzhuk
    Acked-by: Santosh Shilimkar
    Reviewed-by: Guenter roeck
    Signed-off-by: Wim Van Sebroeck

    Ivan Khoronzhuk
     
  • To reduce code duplicate and increase code readability use WDT core
    code to handle WDT interface.

    Remove io_lock as the WDT core uses mutex to lock each wdt device.
    Remove wdt_state as the WDT core tracks state with its own variable.

    The watchdog_init_timeout() can read timeout value from timeout-sec
    property if the passed value is out of bounds. The heartbeat is
    initialized in next way. If heartbeat is not set thought module
    parameter, try to read it's value from WDT node timeout-sec property.
    If node has no one, use default value.

    The heartbeat is hold in wdd->timeout by WDT core, so use it in
    order to set timeout period.

    Davinci WDT can't be stopped and once it's expired - it can be
    rearmed only after hardware reset, that's why nowayout feature
    is enforced.

    Signed-off-by: Ivan Khoronzhuk
    Acked-by: Santosh Shilimkar
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ivan Khoronzhuk
     
  • This change introduces debugfs support for the BCM281xx watchdog driver.

    Signed-off-by: Markus Mayer
    Signed-off-by: Wim Van Sebroeck

    Markus Mayer
     
  • This commit adds support for the watchdog timer used on the BCM281xx
    family of SoCs.

    Signed-off-by: Markus Mayer
    Reviewed-by: Matt Porter
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Markus Mayer
     
  • It is valid for a watchdog driver to have 0 for a "min" and "max"
    timeout if the driver doesn't need the core to enforce the concepts of
    min and max. The s3c2410_wdt driver is one such driver. Specifically
    it can be hard for that driver to come up with a static "max" on all
    platforms without a lot more information since the input clock on
    S3C2410 and S3C2440 can change with DVFS.

    As written, watchdog_init_timeout() will not ever read "timeout-sec"
    on these drivers since watchdog_timeout_invalid() will _never_ return
    true. Change to not consider a timeout_parm of 0 as valid even if
    min/max aren't specified by the driver. Also handle the case when
    there is no min/max and no "timeout-sec" property.

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

    Doug Anderson
     
  • Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
    is not preferred.

    Signed-off-by: Jingoo Han
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Jingoo Han
     

24 Jan, 2014

1 commit

  • Pull ARM driver updates from Olof Johansson:
    "Updates of SoC-near drivers and other driver updates that makes more
    sense to take through our tree.

    The largest part of this is a conversion of device registration for
    some renesas shmobile/sh devices over to use resources. This has
    required coordination with the corresponding arch/sh changes, and
    we've agreed to merge the arch/sh changes through our tree.

    Added in this branch is support for Trusted Foundations secure
    firmware, which is what is used on many of the commercial Nvidia Tegra
    products that are in the market, including the Nvidia Shield. The
    code is local to arch/arm at this time since it's uncertain whether it
    will be shared with arm64 longer-term, if needed we will refactor
    later.

    A couple of new RTC drivers used on ARM boards, merged through our
    tree on request by the RTC maintainer.

    ... plus a bunch of smaller updates across the board, gpio conversions
    for davinci, etc"

    * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
    watchdog: davinci: rename platform driver to davinci-wdt
    tty: serial: Limit msm_serial_hs driver to platforms that use it
    mmc: msm_sdcc: Limit driver to platforms that use it
    usb: phy: msm: Move mach dependent code to platform data
    clk: versatile: fixup IM-PD1 clock implementation
    clk: versatile: pass a name to ICST clock provider
    ARM: integrator: pass parent IRQ to the SIC
    irqchip: versatile FPGA: support cascaded interrupts from DT
    gpio: davinci: don't create irq_domain in case of unbanked irqs
    gpio: davinci: use chained_irq_enter/chained_irq_exit API
    gpio: davinci: add OF support
    gpio: davinci: remove unused variable intc_irq_num
    gpio: davinci: convert to use irqdomain support.
    gpio: introduce GPIO_DAVINCI kconfig option
    gpio: davinci: get rid of DAVINCI_N_GPIO
    gpio: davinci: use {readl|writel}_relaxed() instead of __raw_*
    serial: sh-sci: Add OF support
    serial: sh-sci: Add device tree bindings documentation
    serial: sh-sci: Remove platform data mapbase and irqs fields
    serial: sh-sci: Remove platform data scbrr_algo_id field
    ...

    Linus Torvalds
     

17 Jan, 2014

1 commit


09 Jan, 2014

1 commit


08 Jan, 2014

1 commit

  • CONFIG_USB_DEBUG is going away, and all of the other USB drivers no
    longer rely on "debug" module parameters for debugging lines, so move
    the pcwd_usb driver to use the dynamic debug infrastructure to be more
    in line with the rest of the kernel.

    Signed-off-by: Greg Kroah-Hartman
    Cc: Wim Van Sebroeck
    Reviewed-by: Guenter Roeck

    Greg Kroah-Hartman
     

10 Dec, 2013

2 commits

  • If loaded with isapnp = 0 the driver explodes. This is catching
    people out now and then. What should happen in the working case is
    a complete mystery and the code appears terminally confused, but we
    can at least make the error path work properly.

    Signed-off-by: Alan Cox
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Partially-Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=53991

    Alan
     
  • After commit 487722cf2 (watchdog: Get rid of MODULE_ALIAS_MISCDEV
    statements) the affected drivers no longer need to include miscdevice.h.
    Only exception is rt2880_wdt.c which never needed it.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Jean Delvare
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

19 Nov, 2013

4 commits


18 Nov, 2013

1 commit

  • All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
    Need to use endian neutral functions to read/write h/w registers.
    I.e instead of __raw_read[lw] and __raw_write[lw] functions code
    need to use read[lw]_relaxed and write[lw]_relaxed functions.
    If the first simply reads/writes register, the second will byteswap
    it if host operates in BE mode.

    Changes are trivial sed like replacement of __raw_xxx functions
    with xxx_relaxed variant.

    Signed-off-by: Victor Kamensky
    Signed-off-by: Taras Kondratiuk
    Acked-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Victor Kamensky