14 Oct, 2013

3 commits

  • This driver has a section mismatch, for probe and remove functions,
    leading to the following warning during the compilation.

    WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
    reference from the variable sunxi_wdt_driver to the function
    .init.text:sunxi_wdt_probe()
    The variable sunxi_wdt_driver references
    the function __init sunxi_wdt_probe()

    Signed-off-by: Maxime Ripard
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Maxime Ripard
     
  • STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
    handles [9:8] bits. Thus, it should be fixed in order to handle
    [5:4] bits.

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

    Jingoo Han
     
  • Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
    interruptible deadlock.

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

    Dan Carpenter
     

11 Oct, 2013

1 commit

  • This patch is to prevent hpwdt from loading on any auxilary iLO devices defined
    after the initial (or main) iLO device. All auxilary iLO devices will have a
    subsystem device ID set to 0x1979 in order for hpwdt to differentiate between
    the two types.

    Signed-off-by: Thomas Mingarelli
    Tested-by: Lisa Mitchell
    Signed-off-by: Wim Van Sebroeck

    Mingarelli, Thomas
     

12 Sep, 2013

2 commits

  • Pull watchdog updates from Wim Van Sebroeck:
    - New watchdog driver for Allwinner A10/A13
    - some devm_ioremap_resource simplifications
    - a s3c2410_wdt change that removes the global variables

    * git://www.linux-watchdog.org/linux-watchdog:
    watchdog: s3c2410_wdt: simplify use of devm_ioremap_resource
    watchdog: simplify platform_get_resource_byname/devm_ioremap_resource
    watchdog: ts72xx_wdt: simplify use of devm_ioremap_resource
    watchdog: nuc900_wdt.c: simplify use of devm_ioremap_resource
    watchdog: sunxi: New watchdog driver for Allwinner A10/A13
    watchdog: s3c2410_wdt: remove the global variables

    Linus Torvalds
     
  • We cannot assume that the inline assembler code always ends up in the same
    file as the original C file. So make any assembler labels that are called
    with "extern" by C global

    Signed-off-by: Andi Kleen
    Cc: Wim Van Sebroeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

11 Sep, 2013

6 commits

  • Remove unneeded error handling on the result of a call to
    platform_get_resource when the value is passed to devm_ioremap_resource.

    Move the call to platform_get_resource adjacent to the call to
    devm_ioremap_resource to make the connection between them more clear.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression pdev,res,n,e,e1;
    expression ret != 0;
    identifier l;
    @@

    - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    ... when != res
    - if (res == NULL) { ... \(goto l;\|return ret;\) }
    ... when != res
    + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    e = devm_ioremap_resource(e1, res);
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • Remove unneeded error handling on the result of a call to
    platform_get_resource_byname when the value is passed to devm_ioremap_resource.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression pdev,res,e,e1;
    expression ret != 0;
    identifier l;
    @@

    res = platform_get_resource_byname(...);
    - if (res == NULL) { ... \(goto l;\|return ret;\) }
    e = devm_ioremap_resource(e1, res);
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • Remove unneeded error handling on the result of a call to
    platform_get_resource when the value is passed to devm_ioremap_resource.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression pdev,res,n,e,e1;
    expression ret != 0;
    identifier l;
    @@

    - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    ... when != res
    - if (res == NULL) { ... \(goto l;\|return ret;\) }
    ... when != res
    + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    e = devm_ioremap_resource(e1, res);
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • Remove unneeded error handling on the result of a call to
    platform_get_resource when the value is passed to devm_ioremap_resource.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression pdev,res,n,e,e1;
    expression ret != 0;
    identifier l;
    @@

    - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    ... when != res
    - if (res == NULL) { ... \(goto l;\|return ret;\) }
    ... when != res
    + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
    e = devm_ioremap_resource(e1, res);
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Acked-by: Wan Zongshun
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • This patch adds the driver for the watchdog found in the Allwinner A10 and
    A13 SoCs. It has DT-support and uses the new watchdog framework.

    Signed-off-by: Carlo Caione
    Acked-by: Maxime Ripard
    Signed-off-by: Wim Van Sebroeck

    Carlo Caione
     
  • This patch removes the global variables in the driver file and
    group them into a structure.

    Signed-off-by: Leela Krishna Amudala
    Reviewed-by: Tomasz Figa
    Acked-by: Kukjin Kim
    Signed-off-by: Wim Van Sebroeck

    Leela Krishna Amudala
     

14 Jul, 2013

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "MIPS updates:

    - All the things that didn't make 3.10.
    - Removes the Windriver PPMC platform. Nobody will miss it.
    - Remove a workaround from kernel/irq/irqdomain.c which was there
    exclusivly for MIPS. Patch by Grant Likely.
    - More small improvments for the SEAD 3 platform
    - Improvments on the BMIPS / SMP support for the BCM63xx series.
    - Various cleanups of dead leftovers.
    - Platform support for the Cavium Octeon-based EdgeRouter Lite.

    Two large KVM patchsets didn't make it for this pull request because
    their respective authors are vacationing"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits)
    MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER
    MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions
    MIPS: SEAD3: Disable L2 cache on SEAD-3.
    MIPS: BCM63xx: Enable second core SMP on BCM6328 if available
    MIPS: BCM63xx: Add SMP support to prom.c
    MIPS: define write{b,w,l,q}_relaxed
    MIPS: Expose missing pci_io{map,unmap} declarations
    MIPS: Malta: Update GCMP detection.
    Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
    MIPS: APSP: Remove
    SSB: Kconfig: Amend SSB_EMBEDDED dependencies
    MIPS: microMIPS: Fix improper definition of ISA exception bit.
    MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
    MIPS: Declare emulate_load_store_microMIPS as a static function.
    MIPS: Fix typos and cleanup comment
    MIPS: Cleanup indentation and whitespace
    MIPS: BMIPS: support booting from physical CPU other than 0
    MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
    MIPS: GIC: Fix gic_set_affinity infinite loop
    MIPS: Don't save/restore OCTEON wide multiplier state on syscalls.
    ...

    Linus Torvalds
     

13 Jul, 2013

1 commit


12 Jul, 2013

26 commits

  • This patch is being created to use the UEFI bits in the type 219 SMBIOS
    record in order to decide whether or not to execute BIOS code. This is a
    better solution than to depend on the iCRU bit since not all future servers
    will use iCRU.

    Signed-off-by: Thomas Mingarelli
    Signed-off-by: Wim Van Sebroeck
    ----
    drivers/watchdog/hpwdt.c | 9 ++++++---
    1 files changed, 6 insertions(+), 3 deletions(-)

    Mingarelli, Thomas
     
  • In watchdog_ping(), 'start' is called automatically when 'ping' function call
    is not configured.
    Softdog driver has same handling in both cases - start and ping, so 'ping' OPS
    can be removed.

    Signed-off-by: Milo(Woogyom) Kim
    Signed-off-by: Wim Van Sebroeck

    Kim, Milo
     
  • This patch adds the driver for the watchdog devices found on MEN Mikro
    Elektronik A21 VMEbus CPU Carrier Boards. It has DT-support and uses the
    watchdog framework.

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

    Johannes Thumshirn
     
  • The bits in BRIDGE_CAUSE are documented as RW0C - read, write 0 to
    clear. If we read the register, mask off the watchdog bit, and
    write it back, we're actually clearing every interrupt which wasn't
    pending at the time we read the register - and that is racy.

    Fix this to only write ~WATCHDOG_BIT to the register, which means
    we write as zero only the watchdog bit.

    Signed-off-by: Russell King
    Acked-by: Jason Cooper
    Tested-by: Andrew Lunn
    Signed-off-by: Wim Van Sebroeck

    Russell King
     
  • The watchdog infrastructure in Dove is no different from that in
    Orion5x or Kirkwood, so let's enable it for Dove. The only things
    missing are a few register settings in Dove's bridge-regs.h.

    Rather than duplicating the same register bit masks for the RSTOUTn_MASK
    and BRIDGE_CAUSE registers, move the definitions into the watchdog
    driver itself.

    Signed-off-by: Russell King
    Acked-by: Jason Cooper
    Tested-by: Andrew Lunn
    Signed-off-by: Wim Van Sebroeck

    Russell King
     
  • This adds a driver for watchdog timer hardware present on Broadcom BCM2835 SoC,
    used in Raspberry Pi and Roku 2 devices.

    Signed-off-by: Lubomir Rintel
    Tested-by: Stephen Warren
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-watchdog@vger.kernel.org
    Cc: devicetree-discuss@lists.ozlabs.org

    Lubomir Rintel
     
  • 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
     
  • Watchdog 1.01.a is also compatible with 1.00.a.
    Add the origin version to compatible list.

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

    Michal Simek
     
  • - Remove reference for IP version
    - Fix header coding style
    - Remove notes which are visible from the code
    - Fix driver license according to header

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

    Michal Simek
     
  • Kernel has nice helpers to dump buffers.

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Andy Shevchenko
     
  • A watchdog device may be stopped from userspace using WDIOC_SETOPTIONS
    ioctl and flag WDIOS_DISABLECARD. If the device is closed after this
    operation, watchdog_release() is called and status bits checked for
    stopping it. Besides, if the device has not been unregistered a critical
    message "watchdog did not stop!" is printed, although the ioctl may have
    successfully stopped it already.

    Without the patch a user application sample code like this will successfully
    stop the watchdog, but the kernel will output the message
    "watchdog did not stop!":

    wd_fd = open("/dev/watchdog", O_RDWR);

    flags = WDIOS_DISABLECARD;
    ioctl(wd_fd, WDIOC_SETOPTIONS, &flags);

    close(wd_fd);

    Signed-off-by: Hector Palacios
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Hector Palacios
     
  • In preparation to switching the jz4740 clk driver to the common clk framework
    make sure to pass the device to clk_get().

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Wim Van Sebroeck

    Lars-Peter Clausen
     
  • Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
    driver is bound) removes the need to set driver data field to
    NULL.

    Signed-off-by: Sachin Kamat
    Cc: Timo Kokkonen
    Signed-off-by: Wim Van Sebroeck

    Sachin Kamat
     
  • Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
    driver is bound) removes the need to set driver data field to
    NULL.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Wim Van Sebroeck

    Sachin Kamat
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

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

    Jingoo Han
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

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

    Jingoo Han
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

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

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer
    dev_pm_ops structure allows better control over power management.

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

    Jingoo Han
     
  • dev_err()/dev_info() are more preferred than pr_err()/pr_info().

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

    Jingoo Han
     
  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

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

    Jingoo Han
     
  • Use devm_gpio_request_one() to make cleanup paths simpler.
    Also, GPIOF_DIR_OUT | GPIOF_INIT_LOW is replaced with
    GPIOF_OUT_INIT_LOW.

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

    Jingoo Han
     
  • Use devm_gpio_request_one() to make cleanup paths simpler.

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

    Jingoo Han
     
  • Use devm_clk_get() to make cleanup paths more simple.

    Signed-off-by: Jingoo Han
    Acked-by: Viresh Kumar
    Signed-off-by: Wim Van Sebroeck

    Jingoo Han
     
  • Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
    driver is bound) removes the need to set driver data field to
    NULL.

    Signed-off-by: Sachin Kamat
    Cc: Paul Mundt
    Signed-off-by: Wim Van Sebroeck

    Sachin Kamat
     
  • Use devm_clk_get() to make cleanup paths more simple.

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

    Jingoo Han
     
  • Use devm_clk_get() to make cleanup paths more simple.

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

    Jingoo Han