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