10 Mar, 2020

1 commit

  • The iTCO_wdt driver only needs ICH_RES_IO_SMI I/O resource when either
    turn_SMI_watchdog_clear_off module parameter is set to match ->iTCO_version
    (or higher), and when legacy iTCO_vendorsupport is set. Modify the driver
    so that ICH_RES_IO_SMI is optional if the two conditions are not met.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wolfram Sang

    Mika Westerberg
     

04 Sep, 2019

1 commit

  • In Intel Cannon Lake PCH the NO_REBOOT bit was moved from the private
    register space to be part of the TCO1_CNT register. For this reason
    introduce another version (6) that uses this register to set and clear
    NO_REBOOT bit.

    Signed-off-by: Mika Westerberg
    Acked-by: Guenter Roeck
    Reviewed-by: Jean Delvare
    Signed-off-by: Wolfram Sang

    Mika Westerberg
     

09 Jul, 2019

1 commit


06 May, 2019

1 commit

  • Various coccinelle driven transformations as detailed below.

    The conversion was done automatically with coccinelle using the
    following semantic patches. The semantic patches and the scripts
    used to generate this commit log are available at
    https://github.com/groeck/coccinelle-patches

    - Use watchdog_stop_on_unregister to stop the watchdog on remove
    - Drop assignments to otherwise unused variables
    - Drop empty remove function

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

    Guenter Roeck
     

02 Oct, 2018

1 commit

  • As the only user of iTCO_vendor_pre_keepalive and
    iTCO_vendor_pre_set_heartbeat has just been removed, we can delete
    these 2 hooks.

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

    Jean Delvare
     

09 Sep, 2017

1 commit


19 May, 2017

1 commit

  • The ICH9 is listed as having TCO v2, and indeed the behavior in the
    datasheet corresponds to v2 (for example the NO_REBOOT flag is
    accessible via the 16KiB-aligned Root Complex Base Address).

    However, the TCO counts twice just like in v1; the documentation
    of the SECOND_TO_STS bit says: "ICH9 sets this bit to 1 to indicate
    that the TIMEOUT bit had been (or is currently) set and a second
    timeout occurred before the TCO_RLD register was written. If this
    bit is set and the NO_REBOOT config bit is 0, then the ICH9 will
    reboot the system after the second timeout. The same can be found
    in the BayTrail (Atom E3800) datasheet, and even HOWTOs around
    the Internet say that it will reboot after _twice_ the specified
    heartbeat.

    I did not find the Apollo Lake datasheet, but because v4/v5 has
    a SECOND_TO_STS bit just like the previous version I'm enabling
    this for Apollo Lake as well.

    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Paolo Bonzini
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Paolo Bonzini
     

29 Apr, 2017

2 commits

  • In some SoCs, setting noreboot bit needs modification to
    PMC GC registers. But not all PMC drivers allow other drivers
    to memory map their GC region. This could create mem request
    conflict in watchdog driver. So this patch adds facility to allow
    PMC drivers to pass noreboot update function to watchdog
    drivers via platform data.

    Signed-off-by: Kuppuswamy Sathyanarayanan
    Acked-by: Guenter Roeck
    Signed-off-by: Andy Shevchenko

    Kuppuswamy Sathyanarayanan
     
  • iTCO_wdt no_reboot_bit set/unset functions has lot of common code between
    them. So merging these two functions into a single update function would
    remove these unnecessary code duplications. This patch fixes this issue
    by creating a no_reboot_bit update function to handle both set/unset
    functions.

    Also checking for iTCO version every time you make no_reboot_bit set/unset
    call is inefficient and makes the code look complex. This can be improved
    by performing this check once during device probe and selecting the
    appropriate no_reboot_bit update function. This patch fixes this issue
    by splitting the update function into multiple helper functions.

    Signed-off-by: Kuppuswamy Sathyanarayanan
    Reviewed-by: Guenter Roeck
    Signed-off-by: Andy Shevchenko

    Kuppuswamy Sathyanarayanan
     

25 Feb, 2017

5 commits


24 Sep, 2016

1 commit


18 Jul, 2016

1 commit


11 Aug, 2015

2 commits

  • The revision of the watchdog hardware in Sunrisepoint necessitates a new
    "version" inside the TCO watchdog driver because some of the register
    layouts have changed.

    Also update the Kconfig entry to select both the LPC and SMBus drivers
    since the TCO device is on the SMBus in Sunrisepoint.

    Signed-off-by: Matt Fleming
    Reviewed-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Matt Fleming
     
  • Intel Sunrisepoint (Skylake PCH) has the iTCO watchdog accessible across
    the SMBus, unlike previous generations of PCH/ICH where it was on the
    LPC bus. Because it's on the SMBus, it doesn't make sense to pass around
    a 'struct lpc_ich_info', and leaking the type of bus into the iTCO
    watchdog driver is kind of backwards anyway.

    This change introduces a new 'struct itco_wdt_platform_data' for use
    inside the iTCO watchdog driver and by the upcoming Intel Sunrisepoint
    code, which neatly avoids having to include lpc_ich headers in the i801
    i2c driver.

    This change is overdue because lpc_ich_info has already found its way
    into other TCO watchdog users, notably the intel_pmc_ipc driver where
    the watchdog actually isn't on the LPC bus as far as I can see.

    A simple translation layer is provided for converting from the existing
    'struct lpc_ich_info' inside the lpc_ich mfd driver.

    Signed-off-by: Matt Fleming
    Acked-by: Darren Hart [drivers/x86 refactoring]
    Reviewed-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Matt Fleming
     

03 Apr, 2015

1 commit

  • If the target sleep state of the system is not an ACPI sleep state
    (S1, S2 or S3), the TCO watchdog needs to be stopped during system
    suspend, because it may not be possible to ping it any more after
    timekeeping has been suspended (suspend-to-idle does that for
    one example).

    For this reason, provide ->suspend_noirq and ->resume_noirq
    callbacks for the iTCO watchdog driver and use them to stop
    and restart the watchdog during system suspend and resume,
    respectively, if the system is not going to enter an ACPI
    sleep state (in which case the watchdog will be stopped
    by the platform firmware before the state is entered).

    Reported-and-tested-by: Borun Fu
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Guenter Roeck

    Rafael J. Wysocki
     

20 Oct, 2014

1 commit


08 Apr, 2014

1 commit

  • Pull MFD updates from Lee Jones:
    "Changes to existing drivers:
    - Use of managed resources - omap, twl4030, ti_am335x_tscadc
    - Advanced error handling - omap
    - Rework clk management - omap
    - Device Tree (re-)work - tc3589x, pm8921, da9055, sec
    - IRC management overhaul and !BROKEN - pm8921
    - Convert to regmap - ssbi, pm8921
    - Use simple power-management ops - ucb1x00
    - Include file clean-up - adp5520, cs5535, janz, lpc_ich,
    - lpc_sch, max14577, mcp-sa11x0, pcf50633-adc, rc5t583,
    rdc321x-southbridge, retu, smsc-ece1099, ti-ssp, ti_am335x_tscadc,
    tps65912, vexpress-config, wm8350, ywm8350
    - Various bug fixes across the subsystem
    - NULL/invalid pointer dereference prevention
    - Resource leak mitigation,
    - Variable used initialised
    - Staticise various containers
    - Enforce return value checks

    New drivers/supported devices:
    - Add support for s2mps14 and s2mpa01 to sec
    - Add support for da9063 (v5) to da9063
    - Add support for atom-c2000 to gpio-ich
    - Add support for come-{mbt10,cbt6,chl6} to kempld
    - Add support for da9053 to da9052
    - Add support for itco-wdt (v3) and baytrail to lpc_ich
    - Add new drivers for tps65218, rtsx_usb, bcm590xx

    (Re-)moved drivers:
    - twl4030 ==> drivers/iio
    - ti-ssp ==> /dev/null"

    * tag 'mfd-for-linus-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (103 commits)
    mfd: wm5110: Correct default for HEADPHONE_DETECT_1
    mfd: arizona: Correct small errors in the DT binding documentation
    mfd: arizona: Mark DSP clocking register as volatile
    mfd: devicetree: bindings: Add pm8xxx RTC description
    mfd: kempld-core: Fix potential hang-up during boot
    mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01
    mfd: tps65910: Fix regmap_irq_chip_data leak on mfd_add_devices fail
    mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail
    mfd: sec-core: Fix I2C dummy device resource leak on probe failure
    mfd: sec-core: Add of_compatible strings for clock MFD cells
    mfd: Remove obsolete ti-ssp driver
    Documentation: mfd: s2mps11: Describe S5M8767 and S2MPS14 clocks
    mfd: bcm590xx: Fix type argument for module device table
    mfd: lpc_ich: Add support for Intel Bay Trail SoC
    mfd: lpc_ich: Add support for NM10 GPIO
    mfd: lpc_ich: Change Avoton to iTCO v3
    watchdog: iTCO_wdt: Add support for v3 silicon
    mfd: lpc_ich: Add support for iTCO v3
    mfd: lpc_ich: Remove lpc_ich_cfg struct use
    mfd: lpc_ich: Only configure watchdog or GPIO when present
    ...

    Linus Torvalds
     

31 Mar, 2014

2 commits

  • The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich
    (the PCI device.) Setting the parent right makes it much easier for
    the user to figure out which driver/module is handling the watchdog
    device node.

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

    Jean Delvare
     
  • Fix the following checkpatch warnings and error:
    WARNING: quoted string split across lines
    WARNING: braces {} are not necessary for single statement blocks
    WARNING: __initdata should be placed after ibmasr_id_table[]
    WARNING: please, no space before tabs
    ERROR: do not initialise statics to 0 or NULL

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

    Jingoo Han
     

19 Mar, 2014

1 commit

  • Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
    functionality:
    - The watchdog timer ticks at 1 second instead of .6 seconds

    - Some 8 and 16-bit registers were combined into 32-bit registers

    - Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)

    - The BOOT_STS field in TCO_STS was removed

    - The NO_REBOOT bit is in the PMC area instead of GCS

    Update the driver to support the above changes and bump the version to
    1.11.

    Signed-off-by: Peter Tyser
    Tested-by: Rajat Jain
    Reviewed-by: Guenter Roeck
    Signed-off-by: Lee Jones

    Peter Tyser
     

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
     
  • Use the wrapper function for retrieving the platform data instead of
    accessing dev->platform_data directly.

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

    Jingoo Han
     

29 Nov, 2012

3 commits

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

16 Sep, 2012

1 commit


23 Jul, 2012

1 commit


29 Jun, 2012

1 commit

  • The recent conversion of iTCO_wdt resulted in the driver no longer
    getting loaded automatically, since it no longer has a
    MODULE_DEVICE_TABLE() included. As the lpc_ich driver now creates a
    platform device, auto-loading can easily be done by having a respective
    module alias in place.

    Signed-off-by: Jan Beulich
    Cc: Aaron Sierra
    Acked-by: Guenter Roeck
    Cc: Samuel Ortiz
    Signed-off-by: Wim Van Sebroeck

    Jan Beulich
     

30 May, 2012

1 commit

  • Fix printk format warnings:

    drivers/watchdog/iTCO_wdt.c:577:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
    drivers/watchdog/iTCO_wdt.c:594:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
    drivers/watchdog/iTCO_wdt.c:600:2: warning: format '%04llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'

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

    Randy Dunlap
     

09 May, 2012

1 commit

  • This patch converts the iTCO_wdt driver to use the multi-function device
    driver model. It uses resources discovered by the lpc_ich driver, so that
    it no longer does its own PCI scanning.

    Signed-off-by: Aaron Sierra
    Signed-off-by: Guenter Roeck
    Signed-off-by: Samuel Ortiz

    Aaron Sierra
     

28 Mar, 2012

2 commits


27 Jan, 2012

1 commit


28 Dec, 2011

1 commit

  • Redhat Bugzilla: Bug 727875 - TCO_EN bit is disabled by TCO driver

    The previous patch breaks reset watchdog behaviour on the older hardware.
    It is therefor better to make sure that the behaviour for older hardware ( Do not turn off SMI clearing watchdog.
    turn_SMI_watchdog_clear_off=1 -> Turn off SMI clearing watchdog when iTCO_version=1
    (ICHO till ICH5 + 6300ESB only)
    turn_SMI_watchdog_clear_off=2 -> Turn off SMI clearing watchdog.

    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     

06 Nov, 2011

1 commit

  • Redhat Bugzilla: Bug 727875 - TCO_EN bit is disabled by TCO driver
    Jiri Slaby: 28d41f53f broke temperature sensors on a ICH10 chipset

    The iTCO_wdt driver disables the SMI. This breaks good working of newer hardware.
    The disabling of the SMI by the TCO logic dates back from the i810-tco driver
    from Nils Faerber (around 28 July 2000). The reason for this was that some BIOSes
    install handlers reset or disable the watchdog timer instead of resetting the system.
    The trick to fix this was to disable the SMI (by clearing the SMI_TCO_EN bit of the
    SMI_EN register) to prevent this from happening.

    This however has strange effects on newer hardware. So we are in a situation that
    a fix for broken old hardware affects newer hardware.

    The correct solution is to make this fix an option (with the new module parameter:
    turn_SMI_watchdog_clear_off) so that the default behaviour is the unfixed version.

    the next patch will be to move this in the start and stop functions of the driver
    and to add a new module parameter for the global_smi_en bit and to get rid of the
    vendor_support code.

    This fix can have an effect on old (typical ICH & ICH2 chipsets) motherboards that
    have a broken BIOS implementation concerning TCO logic. In these case the module
    parameter turn_SMI_watchdog_clear_off=1 will need to be added.

    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     

27 Jul, 2011

1 commit

  • While checking what watchdog drivers usually do in suspend/resume to
    spot common behaviour for the watchdog framework, I found these drivers
    which do nothing but add some cruft. Remove it, it is superfluous. New
    approaches should probably be done with pm_ops anyway.

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

    Wolfram Sang