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