19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

06 May, 2019

2 commits

  • Use device managed functions to simplify error handling, reduce
    source code size, improve readability, and reduce the likelyhood of bugs.
    Other improvements as listed 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

    - Drop assignments to otherwise unused variables
    - Drop empty remove function
    - Use devm_add_action_or_reset() for calls to clk_disable_unprepare
    - Introduce local variable 'struct device *dev' and use it instead of
    dereferencing it repeatedly
    - Use devm_watchdog_register_driver() to register watchdog device
    - Replace shutdown function with call to watchdog_stop_on_reboot()

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

    Guenter Roeck
     
  • Use devm_platform_ioremap_resource to reduce source code size,
    improve readability, and reduce the likelyhood of bugs.

    The conversion was done automatically with coccinelle using the
    following semantic patch.

    @r@
    identifier res, pdev;
    expression a;
    expression index;
    expression e;
    @@

    @depends on r@
    identifier r.res;
    @@
    - struct resource *res;
    ... when != res

    @@
    identifier res, pdev;
    expression index;
    expression a;
    @@
    - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
    - a = devm_ioremap_resource(&pdev->dev, res);
    + a = devm_platform_ioremap_resource(pdev, index);

    Cc: Joel Stanley
    Cc: Nicolas Ferre
    Cc: Alexandre Belloni
    Cc: Florian Fainelli
    Cc: Linus Walleij
    Cc: Baruch Siach
    Cc: Keguang Zhang
    Cc: Vladimir Zapolskiy
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: Avi Fishman
    Cc: Nancy Yuen
    Cc: Brendan Higgins
    Cc: Wan ZongShun
    Cc: Michal Simek
    Cc: Sylvain Lemieux
    Cc: Kukjin Kim
    Cc: Barry Song
    Cc: Orson Zhai
    Cc: Patrice Chotard
    Cc: Maxime Coquelin
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: Marc Gonzalez
    Cc: Thierry Reding
    Cc: Shawn Guo
    Signed-off-by: Guenter Roeck
    Acked-by: Alexandre Belloni
    Tested-by: Alexandre Belloni
    Acked-by: Joel Stanley
    Reviewed-by: Linus Walleij
    Acked-by: Maxime Ripard
    Acked-by: Michal Simek (cadence/xilinx wdts)
    Acked-by: Thierry Reding
    Reviewed-by: Florian Fainelli
    Acked-by: Patrice Chotard
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

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
     

25 Feb, 2017

1 commit

  • Declare watchdog_info structures as const as they are only stored in the
    info field of watchdog_device structures. This field is of type const
    struct watchdog_info *, so watchdog_info structures having this property
    can be declared const too.
    Done using Coccinelle:

    @r1 disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct watchdog_info i@p={...};

    @ok@
    identifier r1.i;
    position p;
    struct watchdog_device obj;
    @@
    obj.info=&i@p;

    @bad@
    position p!={r1.p,ok.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct watchdog_info i;

    Signed-off-by: Bhumika Goyal
    Acked-by: Florian Fainelli
    Acked-by: Baruch Siach
    Reviewed-by: Guenter Roeck
    Acked-by: Adam Thomson
    Signed-off-by: Guenter Roeck

    Bhumika Goyal
     

01 Mar, 2016

1 commit


13 Dec, 2015

1 commit


10 Sep, 2015

1 commit

  • Commit c631f20068 ("watchdog: imgpdc: Add reboot support") introduced
    a restart handler but forgot to unregister it on driver removal. Fix it.

    Fixes: c631f20068 ("watchdog: imgpdc: Add reboot support")
    Reported-by: Ariel D'Alessandro
    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     

22 Jun, 2015

5 commits

  • This watchdog hardware can be configured in terms of power-of-two
    clock cycles. Therefore, the watchdog timeout configured by the user
    will be rounded-up to the next possible hardware timeout.

    This commit adds a comment explaining this.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • Maximum timeout is currently set in clock cycles, but the watchdog
    core expects it to be in seconds. Fix it.

    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Ezequiel Garcia
     
  • Register a restart handler that will restart the system by writing
    to the watchdog's SOFT_RESET register.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Ezequiel Garcia
    Tested-by: Ezequiel Garcia
    Cc: James Hogan
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Andrew Bresticker
     
  • Set up the watchdog for the specified timeout before attempting to start it.

    Signed-off-by: Naidu Tellapati
    Signed-off-by: Andrew Bresticker
    Reviewed-by: Ezequiel Garcia
    Tested-by: Ezequiel Garcia
    Cc: James Hogan
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Andrew Bresticker
     
  • Since the heartbeat is statically initialized to its default value,
    watchdog_init_timeout() will never look in the device-tree for a
    timeout-sec value. Instead of statically initializing heartbeat,
    fall back to the default timeout value if watchdog_init_timeout()
    fails.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Ezequiel Garcia
    Tested-by: Ezequiel Garcia
    Cc: James Hogan
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Andrew Bresticker
     

27 Mar, 2015

2 commits

  • The IMG PDC watchdog driver heartbeat module parameter has no default so
    it is initialised to zero. This results in the following warning during
    probe:

    imgpdc-wdt 2006000.wdt: Initial timeout out of range! setting max timeout

    The module parameter description implies that the default value should
    be PDC_WDT_DEF_TIMEOUT, which isn't yet used, so initialise it to that.

    Also tweak the heartbeat module parameter description for consistency.

    Fixes: 93937669e9b5 ("watchdog: ImgTec PDC Watchdog Timer Driver")
    Signed-off-by: James Hogan
    Cc: Ezequiel Garcia
    Cc: Naidu Tellapati
    Cc: Jude Abraham
    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    James Hogan
     
  • The IMG PDC watchdog probe function calls pdc_wdt_stop() prior to
    watchdog_set_drvdata(), causing a NULL pointer dereference when
    pdc_wdt_stop() retrieves the struct pdc_wdt_dev pointer using
    watchdog_get_drvdata() and reads the register base address through it.

    Fix by moving the watchdog_set_drvdata() call earlier, to where various
    other pdc_wdt->wdt_dev fields are initialised.

    Fixes: 93937669e9b5 ("watchdog: ImgTec PDC Watchdog Timer Driver")
    Signed-off-by: James Hogan
    Cc: Ezequiel Garcia
    Cc: Naidu Tellapati
    Cc: Jude Abraham
    Cc: linux-watchdog@vger.kernel.org
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    James Hogan
     

18 Feb, 2015

1 commit

  • This commit adds support for ImgTec PowerDown Controller Watchdog Timer.

    Reviewed-by: Andrew Bresticker
    Signed-off-by: Naidu Tellapati
    Signed-off-by: Jude Abraham
    [ezequiel: Minor style fixes]
    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Naidu Tellapati