summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Wood <brian.j.wood@intel.com>2015-10-15 18:31:32 -0700
committerBeare, Bruce J <bruce.j.beare@intel.com>2015-10-20 18:19:36 +0100
commit10b61c25bb69b905ca5adfd78831c7028ade254b (patch)
treeeee2fa4ece0a44aa6329f061ba84dcac607f53d2
parentdb2cca679f63ddf0f1cc07aec45343dfadab96a9 (diff)
downloadintel-10b61c25bb69b905ca5adfd78831c7028ade254b.tar.gz
Revert "REVERT_ME: Debugging/workaround for SCU watchdog timer setting"
This reverts commit 4a333994888f39ee3b380fe22092ef42cc1c06af. Change-Id: Id8a19b8b6b3fe9b38494391af761d3a8ca682a7c Signed-off-by: Brian Wood <brian.j.wood@intel.com> Reviewed-on: https://android.intel.com/424749
-rw-r--r--drivers/platform/x86/Makefile4
-rw-r--r--drivers/platform/x86/intel_scu_ipc.c3
-rw-r--r--drivers/watchdog/Makefile3
-rw-r--r--drivers/watchdog/intel-mid_wdt.c56
4 files changed, 5 insertions, 61 deletions
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index c55f5102a22..7d82ebfcca9 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -2,10 +2,6 @@
# Makefile for linux/drivers/platform/x86
# x86 Platform-Specific Drivers
#
-
-# enable pr_debug
-ccflags-y += -DDEBUG
-
obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o
obj-$(CONFIG_ASUS_WMI) += asus-wmi.o
obj-$(CONFIG_ASUS_NB_WMI) += asus-nb-wmi.o
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index 3ff5c332a0d..f19ad213672 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -344,9 +344,6 @@ int intel_scu_ipc_raw_cmd(int cmd, int sub, u32 *in, int inlen, u32 *out,
{
int i, err;
- pr_debug("%s: DEBUG: cmd=%d, sub=%d, in=%u, inlen=%d, out=%u, "
- "outlen=%d, dptr=%u, sptr=%u\n", __func__,
- cmd, sub, in, inlen, out, outlen, dptr, sptr);
if (ipcdev.pdev == NULL)
return -ENODEV;
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index 6762d88dc83..e5b56bca6cf 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -2,9 +2,6 @@
# Makefile for the WatchDog device drivers.
#
-# enable pr_debug
-ccflags-y += -DDEBUG
-
# The WatchDog Timer Driver Core.
watchdog-objs += watchdog_core.o watchdog_dev.o
obj-$(CONFIG_WATCHDOG_CORE) += watchdog.o
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index a54f54e7341..e12243c2d03 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -22,29 +22,12 @@
#include <asm/intel_scu_ipc.h>
#include <asm/intel-mid.h>
-/* For debugging watchdog */
-/*
-#include <linux/delay.h>
-#include <linux/workqueue.h>
-
-static void testwq_work_handler(struct work_struct *w);
-static struct workqueue_struct *wq = 0;
-static DECLARE_WORK(testwq_work, testwq_work_handler);
-*/
-/* End of debugging */
-
#define IPC_WATCHDOG 0xf8
#define MID_WDT_PRETIMEOUT 15
#define MID_WDT_TIMEOUT_MIN (1 + MID_WDT_PRETIMEOUT)
#define MID_WDT_TIMEOUT_MAX 170
-/* Change default watchdog timeout from 90 to 80 for issue seen with
- * SCU setting not being properly set and it using a value of of ~70.
- * Needs further debugging of SCU driver code to trace if its in driver
- * or in SCU Firmware. Will adjust in watchdog driver as workaround.
- #define MID_WDT_DEFAULT_TIMEOUT 90
-*/
-#define MID_WDT_DEFAULT_TIMEOUT 80
+#define MID_WDT_DEFAULT_TIMEOUT 90
/* SCU watchdog messages */
enum {
@@ -55,39 +38,18 @@ enum {
static inline int wdt_command(int sub, u32 *in, int inlen)
{
- pr_debug("%s: DEBUG: WATCHDOG calling intel_scu_ipc_command() "
- "with IPC_WATCHDOG\n", __func__);
return intel_scu_ipc_command(IPC_WATCHDOG, sub, in, inlen, NULL, 0);
}
-/* Workqueue handler function for debugging watchdog */
-/*
-static void testwq_work_handler(struct work_struct *w)
-{
- while(1) {
- pr_debug("%s: DEBUG: (USING WORKQUEUE TO KICK) WATCHDOG: "
- "executing SCU_WATCHDOG_KEEPALIVE\n",
- __func__);
- wdt_command(SCU_WATCHDOG_KEEPALIVE, NULL, 0);
- mdelay(30000);
- }
-}
-*/
-
static int wdt_start(struct watchdog_device *wd)
{
int ret, in_size;
- /* Increase timeout due to SCU not setting watchdog correctly
- * and misreporting to userspace watchdog daemon
- */
- /* int timeout = wd->timeout; */
- int timeout = wd->timeout + MID_WDT_PRETIMEOUT;
+ int timeout = wd->timeout;
struct ipc_wd_start {
u32 pretimeout;
u32 timeout;
} ipc_wd_start = { timeout - MID_WDT_PRETIMEOUT, timeout };
- pr_debug("%s: DEBUG: WATCHDOG\n", __func__);
/*
* SCU expects the input size for watchdog IPC to
* be based on 4 bytes
@@ -106,8 +68,7 @@ static int wdt_start(struct watchdog_device *wd)
static int wdt_ping(struct watchdog_device *wd)
{
int ret;
- pr_debug("%s: DEBUG: WATCHDOG sending SCU_WATCHDOG_KEEPALIVE "
- "to SCU\n", __func__);
+
ret = wdt_command(SCU_WATCHDOG_KEEPALIVE, NULL, 0);
if (ret) {
struct device *dev = watchdog_get_drvdata(wd);
@@ -120,7 +81,7 @@ static int wdt_ping(struct watchdog_device *wd)
static int wdt_stop(struct watchdog_device *wd)
{
int ret;
- pr_debug("%s: DEBUG: WATCHDOG\n", __func__);
+
ret = wdt_command(SCU_WATCHDOG_STOP, NULL, 0);
if (ret) {
struct device *dev = watchdog_get_drvdata(wd);
@@ -156,7 +117,6 @@ static int mid_wdt_probe(struct platform_device *pdev)
struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
int ret;
- pr_debug("%s: DEBUG: WATCHDOG\n", __func__);
if (!pdata) {
dev_err(&pdev->dev, "missing platform data\n");
return -EINVAL;
@@ -197,18 +157,12 @@ static int mid_wdt_probe(struct platform_device *pdev)
}
dev_info(&pdev->dev, "Intel MID watchdog device probed\n");
- /* Workqueue for debugging watchdog */
- /* if (!wq)
- wq = create_singlethread_workqueue("testwq");
- if (wq)
- queue_work(wq, &testwq_work);
- */
+
return 0;
}
static int mid_wdt_remove(struct platform_device *pdev)
{
- pr_debug("%s: DEBUG: WATCHDOG\n", __func__);
struct watchdog_device *wd = platform_get_drvdata(pdev);
watchdog_unregister_device(wd);
return 0;