16 #include <linux/kernel.h>
17 #include <linux/module.h>
19 #include <linux/device.h>
20 #include <linux/pci.h>
21 #include <linux/sched.h>
22 #include <linux/watchdog.h>
29 static const u8 mei_start_wd_params[] = { 0x02, 0x12, 0x13, 0x10 };
30 static const u8 mei_stop_wd_params[] = { 0x02, 0x02, 0x14, 0x10 };
33 {0x05, 0x02, 0x51, 0x10},
34 {0x05, 0x02, 0x52, 0x10},
35 {0x07, 0x02, 0x01, 0x10}
41 #define INTEL_AMT_WATCHDOG_ID "INTCAMT"
45 0x9D, 0xA9, 0x15, 0x14, 0xCB,
50 dev_dbg(&dev->
pdev->dev,
"wd: set timeout=%d.\n", timeout);
78 dev_info(&dev->
pdev->dev,
"wd: failed to find the client\n");
83 dev_err(&dev->
pdev->dev,
"wd: failed to connect to the client\n");
85 dev->
wd_cl.host_client_id = 0;
157 dev_err(&dev->
pdev->dev,
"wd: send stop failed\n");
172 dev_dbg(&dev->
pdev->dev,
"wd: stop completed ret=%d.\n", ret);
178 "wd: stop failed to complete ret=%d.\n", ret);
197 dev = watchdog_get_drvdata(wd_dev);
205 "wd: dev_state != MEI_DEV_ENABLED dev_state = %s\n",
212 "MEI Driver is not connected to Watchdog Client\n");
216 mei_wd_set_start_timeout(dev, dev->
wd_timeout);
235 dev = watchdog_get_drvdata(wd_dev);
258 dev = watchdog_get_drvdata(wd_dev);
287 "wd: mei_flow_ctrl_reduce() failed.\n");
309 static int mei_wd_ops_set_timeout(
struct watchdog_device *wd_dev,
unsigned int timeout)
313 dev = watchdog_get_drvdata(wd_dev);
325 mei_wd_set_start_timeout(dev, dev->
wd_timeout);
337 .start = mei_wd_ops_start,
338 .stop = mei_wd_ops_stop,
339 .ping = mei_wd_ops_ping,
340 .set_timeout = mei_wd_ops_set_timeout,
362 "wd: unable to register watchdog device.\n");
368 "wd: successfully register watchdog interface.\n");
370 watchdog_set_drvdata(&amt_wd_dev, dev);
378 watchdog_set_drvdata(&amt_wd_dev,
NULL);