watchdog: dw_wdt: Support devices with asynch clocks
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Sat, 30 May 2020 07:35:55 +0000 (10:35 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 5 Aug 2020 16:42:48 +0000 (18:42 +0200)
commita16f58bf154cdf589cf72cb1596b6217da5872a1
tree5c8359988937f6ebf541b0bef46ee60586d2b719
parent86445535887e580036d0094a849126703a33fd62
watchdog: dw_wdt: Support devices with asynch clocks

DW Watchdog IP core can be synthesised with asynchronous timer/APB
clocks support (WDT_ASYNC_CLK_MODE_ENABLE == 1). In this case
separate clock signals are supposed to be used to feed watchdog timer
and APB interface of the device. Currently the driver supports
the synchronous mode only. Since there is no way to determine which
mode was actually activated for device from its registers, we have to
rely on the platform device configuration data. If optional "pclk"
clock source is supplied, we consider the device working in asynchronous
mode, otherwise the driver falls back to the synchronous configuration.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
Link: https://lore.kernel.org/r/20200530073557.22661-6-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/dw_wdt.c