10 Sep, 2015

1 commit

  • /sys/class/watchdog/watchdogn/device/modalias can help to identify the
    driver/module for a given watchdog node. However, many wdt devices do not
    set their parent and so, we do not see an entry for device in sysfs for
    such devices.

    This patch fixes parent of watchdog_device so that
    /sys/class/watchdog/watchdogn/device is populated.

    Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not
    have any parent. Not sure, how we can identify driver for these devices.

    Signed-off-by: Pratyush Anand
    Reviewed-by: Johannes Thumshirn
    Acked-by: Guenter Roeck
    Acked-by: H Hartley Sweeten
    Acked-by: Lee Jones
    Acked-by: Lubomir Rintel
    Acked-by: Maxime Coquelin
    Acked-by: Thierry Reding
    Acked-by: Viresh Kumar
    Acked-by: Linus Walleij
    Signed-off-by: Wim Van Sebroeck

    Pratyush Anand
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

26 Nov, 2014

1 commit

  • The 25 MHz reference clock has better stability so its use is prefered over the
    core clock. Change the Armada 375 clock initialization to use this reference
    clock. To ensure the driver is compatible with an old devicetree, also provide
    a fallback path which will silently return to the previous behavior.

    While here, add the clock specification to the binding documentation.

    Acked-by: Jason Cooper
    Acked-by: Gregory CLEMENT
    Acked-by: Wim Van Sebroeck
    Reviewed-by: Thomas Petazzoni
    Tested-by: Thomas Petazzoni
    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Daniel Lezcano

    Ezequiel Garcia
     

20 Oct, 2014

1 commit


11 Jun, 2014

6 commits

  • This commit adds support for the Armada 375 and Armada 380 SoCs.

    This SoC variant has a second RSTOUT register, in addition to the already
    existent, which is shared with the system-controller. To handle this RSTOUT,
    we introduce a new MMIO register 'rstout_mask' to be required on
    'armada-{375,380}-watchdog' new compatible string.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Jason Gunthorpe
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • In order to support other SoCs, it's needed to have a different enabled()
    implementation for each SoC. This commit adds no functionality, and it
    consists of preparation work.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Jason Gunthorpe
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • In order to support other SoCs, it's needed to have a different stop()
    implementation for each SoC. This commit adds no functionality, and it
    consists of preparation work.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Jason Gunthorpe
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • The RSTOUT register on the Armada 370 SoC variant is a dedicated register
    (not shared across orthogonal subsystems) and so it's not needed to write
    it atomically.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Jason Gunthorpe
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • Separate the RSTOUT register mapping for the different compatible strings
    supported by the driver. This allows to use devm_ioremap on SoC variants that
    share the RSTOUT register, and devm_ioremap_resource (which requests the MMIO
    region) on SoCs that have a dedicated RSTOUT register.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Jason Gunthorpe
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • Follow-up patches will extend the registers ioremap and request
    to handle SoC-specific quirks on the RSTOUT register. Therefore,
    in order to keep the code readable, this commit introduces a special
    function for this.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Acked-by: Jason Cooper
    Tested-by: Sebastian Hesselbarth
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     

06 Apr, 2014

1 commit

  • Pull ARM SoC driver changes from Arnd Bergmann:
    "These changes are mostly for ARM specific device drivers that either
    don't have an upstream maintainer, or that had the maintainer ask us
    to pick up the changes to avoid conflicts.

    A large chunk of this are clock drivers (bcm281xx, exynos, versatile,
    shmobile), aside from that, reset controllers for STi as well as a
    large rework of the Marvell Orion/EBU watchdog driver are notable"

    * tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
    Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac."
    Revert "net: stmmac: Add SOCFPGA glue driver"
    ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
    ARM: STi: Add reset controller support to mach-sti Kconfig
    drivers: reset: stih416: add softreset controller
    drivers: reset: stih415: add softreset controller
    drivers: reset: Reset controller driver for STiH416
    drivers: reset: Reset controller driver for STiH415
    drivers: reset: STi SoC system configuration reset controller support
    dts: socfpga: Add sysmgr node so the gmac can use to reference
    dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
    reset: Add optional resets and stubs
    ARM: shmobile: r7s72100: fix bus clock calculation
    Power: Reset: Generalize qnap-poweroff to work on Synology devices.
    dts: socfpga: Update clock entry to support multiple parents
    ARM: socfpga: Update socfpga_defconfig
    dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
    net: stmmac: Add SOCFPGA glue driver
    watchdog: orion_wdt: Use %pa to print 'phys_addr_t'
    drivers: cci: Export CCI PMU revision
    ...

    Linus Torvalds
     

31 Mar, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Signed-off-by: Paul Gortmaker
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: linux-watchdog@vger.kernel.org

    Paul Gortmaker
     

26 Feb, 2014

1 commit

  • When building an ARM multi_v7_defconfig with LPAE option selected we get the
    following build warning:

    drivers/watchdog/orion_wdt.c:272:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=]

    Fix it by using %pa to print 'phys_addr_t'.

    Reported-by: Olof's autobuilder
    Reviewed-by: Guenter Roeck
    Acked-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Signed-off-by: Fabio Estevam
    Signed-off-by: Jason Cooper

    Fabio Estevam
     

22 Feb, 2014

12 commits

  • Using the added infrastructure for handling SoC differences,
    this commit adds support for the watchdog controller available
    in Armada 370 and Armada XP SoCs.

    Also, and because the AXP clock initialization uses of_clk_get_by_name,
    this commit changes the orion clock initialization to use clk_get() and
    adds a proper clk_put() on the common exit/error paths.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • To handle differences between SoCs this commit adds per-compatible
    string start() function for the watchdog kick-off. This is preparation
    work and makes no functionality changes to the current driver.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • Following the introduction of the compatible-data field,
    it's now possible to further abstract the clock initialization.
    This will allow to support SoC with a different clock setup.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • This commit adds an orion_watchdog_data structure to hold compatible-data
    information. This allows to remove the driver-wide definition and to
    be able to add support for multiple compatible-strings in the future.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • In order to prepare to support multiple compatible-strings, this
    commit adds a device structure to hold the driver's state.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • After adding the IRQ request, the BRIDGE_CAUSE bit should be cleared by the
    bridge interrupt controller. There's no longer a need to do it in the watchdog
    driver, so we can simply remove it.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • In order to support other SoC, it's required to distinguish
    the 'control' timer register, from the 'rstout' register
    that enables system reset on watchdog expiration.

    To prevent a compatibility break, this commit adds a fallback
    to a hardcoded RSTOUT address.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • DT-enabled plaforms, where the irqchip driver for the brigde interrupt
    controller is available, can handle the watchdog IRQ properly. Therefore,
    request the interrupt and add a dummy handler that merely calls panic().

    This is done in order to have an initial 'ack' of the interruption,
    which clears the watchdog state.

    Furthermore, since some platforms don't have such IRQ, this commit
    makes the interrupt specification optional.

    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • Having the watchdog initially fully stopped is important to avoid
    any spurious watchdog triggers, in case the registers are not in
    its reset state.

    If the watchdog rstout is enabled and the watchdog counter running,
    this initial stop is not performed, to comply with the 'nowayout'
    parameter.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • These are not used anywhere so it's safe to remove them.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • Since the timer control register is shared with the clocksource driver,
    use the recently introduced atomic_io_clear_set() to access such register.
    Given the watchdog core already provides serialization for all the
    watchdog ops, this commit allows to remove the spinlock entirely.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     
  • This commit adds a check for clk_prepare_enable success and introduces
    an error path to disable the clock properly.

    Reviewed-by: Guenter Roeck
    Tested-by: Sebastian Hesselbarth
    Tested-by: Willy Tarreau
    Signed-off-by: Ezequiel Garcia
    Acked-by: Wim Van Sebroeck
    Tested-By: Jason Gunthorpe
    Signed-off-by: Jason Cooper

    Ezequiel Garcia
     

10 Dec, 2013

1 commit


18 Nov, 2013

2 commits

  • I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
    and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.

    Either the device is enumerated and the driver already has a module
    alias (e.g. PCI, USB etc.) that will get the right driver loaded
    automatically.

    Or the device is not enumerated and loading its driver will lead to
    more or less intrusive hardware poking. Such hardware poking should be
    limited to a bare minimum, so the user should really decide which
    drivers should be tried and in what order. Trying them all in
    arbitrary order can't do any good.

    On top of that, loading that many drivers at once bloats the kernel
    log. Also many drivers will stay loaded afterward, bloating the output
    of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
    loaded as a dependency) can't even be unloaded!

    If defining char-major-10-130 is needed then it should happen in
    user-space.

    Signed-off-by: Jean Delvare
    Acked-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: Stephen Warren
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: Zwane Mwaikambo
    Cc: Jim Cromie

    Jean Delvare
     
  • of_match_ptr() is a macro used to avoid undefined reference error if
    CONFIG_OF is used to selectively compile in or out the
    data structure. It is defined as follows:

    #ifdef CONFIG_OF
    #define of_match_ptr(ptr) ptr
    #else
    #define of_match_ptr(ptr) NULL
    #endif

    In the case of this series, none of the drivers use CONFIG_OF macro to
    compile out the data structure (i.e., the data structure is always
    defined).
    Hence the use of of_match_ptr() does not make any sense. Thus removing
    it to make the code look simpler for readability.

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

    Sachin Kamat
     

12 Jul, 2013

2 commits

  • 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
     

01 Mar, 2013

2 commits

  • this patchset add the timeout-sec property to the following drivers:
    orion_wdt, pnx4008_wdt, s3c2410_wdt and at91sam9_wdt.

    The at91sam9_wdt is tested on evk-pr3,
    the other drivers are compile tested only.

    Signed-off-by: Fabio Porcedda
    Cc: Andrew Lunn
    Cc: Jason Cooper
    Cc: Wolfram Sang
    Cc: Masanari Iida
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: Andrew Victor
    Cc: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Nicolas Ferre
    Signed-off-by: Wim Van Sebroeck

    Fabio Porcedda
     
  • ...so that it's automatically picked up on relevant platforms.
    Tested on Kirkwood-based GuruPlug.

    Signed-off-by: Lubomir Rintel
    Signed-off-by: Wim Van Sebroeck

    Lubomir Rintel
     

20 Dec, 2012

1 commit


29 Nov, 2012

4 commits


03 Aug, 2012

1 commit

  • Pull arm-soc Marvell Orion device-tree updates from Olof Johansson:
    "This contains a set of device-tree conversions for Marvell Orion
    platforms that were staged early but took a few tries to get the
    branch into a format where it was suitable for us to pick up.

    Given that most people working on these platforms are hobbyists with
    limited time, we were a bit more flexible with merging it even though
    it came in late."

    * tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
    ARM: Kirkwood: Replace mrvl with marvell
    ARM: Kirkwood: Describe GoFlex Net LEDs and SATA in DT.
    ARM: Kirkwood: Describe Dreamplug LEDs in DT.
    ARM: Kirkwood: Describe iConnects LEDs in DT.
    ARM: Kirkwood: Describe iConnects temperature sensor in DT.
    ARM: Kirkwood: Describe IB62x0 LEDs in DT.
    ARM: Kirkwood: Describe IB62x0 gpio-keys in DT.
    ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
    ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
    ARM: Kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
    ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
    ARM: Kirkwood: Use DT to configure SATA device.
    ARM: kirkwood: use devicetree for SPI on dreamplug
    ARM: kirkwood: Add LS-XHL and LS-CHLv2 support
    ARM: Kirkwood: Initial DTS support for Kirkwood GoFlex Net
    ARM: Kirkwood: Add basic device tree support for QNAP TS219.
    ATA: sata_mv: Add device tree support
    ARM: Orion: DTify the watchdog timer.
    ARM: Orion: Add arch support needed for I2C via DT.
    ARM: kirkwood: use devicetree for orion-spi
    ...

    Conflicts:
    drivers/watchdog/orion_wdt.c

    Linus Torvalds
     

27 Jul, 2012

1 commit


23 Jul, 2012

1 commit