1=========================
2Mellanox watchdog drivers
3=========================
4
5for x86 based system switches
6=============================
7
8This driver provides watchdog functionality for various Mellanox
9Ethernet and Infiniband switch systems.
10
11Mellanox watchdog device is implemented in a programmable logic device.
12
13There are 2 types of HW watchdog implementations.
14
15Type 1:
16  Actual HW timeout can be defined as a power of 2 msec.
17  e.g. timeout 20 sec will be rounded up to 32768 msec.
18  The maximum timeout period is 32 sec (32768 msec.),
19  Get time-left isn't supported
20
21Type 2:
22  Actual HW timeout is defined in sec. and it's the same as
23  a user-defined timeout.
24  Maximum timeout is 255 sec.
25  Get time-left is supported.
26
27Type 1 HW watchdog implementation exist in old systems and
28all new systems have type 2 HW watchdog.
29Two types of HW implementation have also different register map.
30
31Mellanox system can have 2 watchdogs: main and auxiliary.
32Main and auxiliary watchdog devices can be enabled together
33on the same system.
34There are several actions that can be defined in the watchdog:
35system reset, start fans on full speed and increase register counter.
36The last 2 actions are performed without a system reset.
37Actions without reset are provided for auxiliary watchdog device,
38which is optional.
39Watchdog can be started during a probe, in this case it will be
40pinged by watchdog core before watchdog device will be opened by
41user space application.
42Watchdog can be initialised in nowayout way, i.e. oncse started
43it can't be stopped.
44
45This mlx-wdt driver supports both HW watchdog implementations.
46
47Watchdog driver is probed from the common mlx_platform driver.
48Mlx_platform driver provides an appropriate set of registers for
49Mellanox watchdog device, identity name (mlx-wdt-main or mlx-wdt-aux),
50initial timeout, performed action in expiration and configuration flags.
51watchdog configuration flags: nowayout and start_at_boot, hw watchdog
52version - type1 or type2.
53The driver checks during initialization if the previous system reset
54was done by the watchdog. If yes, it makes a notification about this event.
55
56Access to HW registers is performed through a generic regmap interface.
57