[meta-intel] [meta-intel-iot-devkit][daisy] meta-quark-bsp, meta-iot-devkit: enable Intel Quark watchdog timer
Ong Boon Leong
boon.leong.ong at intel.com
Mon Mar 23 00:41:13 PDT 2015
This patch enabels watchdog timer within Intel Quark X1000 SoC.
Following is how this driver can be tested:
1) To read debugfs for the driver
$ cat /sys/kernel/debug/ie6xx_wdt
2) To insmod the timer driver, fix the timeout to 10 seconds and set
resetmode as "warm reset" & "enable reset"
$ insmod ie6xx_wdt timeout=10 resetmode=0x18
3) A quick way to start the watchdog timer is to read the /dev/watchdog0
interface
$ cat /dev/watchdog0
Note: with about settings in (2), you will observe the watchdog time-out
expires and hardware is reset.
4) To continue updating the watchdog time-out value, user is expected to
interact with the timer through its API in Documentation/watchdog/
watchdog-api.tx.
This patch has been tested on Intel Galileo Gen v2 board.
Signed-off-by: Ong Boon Leong <boon.leong.ong at intel.com>
---
.../linux-yocto-quark/iot-devkit-spi/watchdog.cfg | 3 +++
.../linux-yocto-quark/iot-devkit/watchdog.cfg | 3 +++
.../linux/linux-yocto-quark_3.8.bbappend | 1 +
...-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch | 28 ++++++++++++++++++++
.../recipes-kernel/linux/linux-yocto-quark_3.8.bb | 1 +
5 files changed, 36 insertions(+)
create mode 100644 meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit-spi/watchdog.cfg
create mode 100644 meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit/watchdog.cfg
create mode 100644 meta-quark-bsp/recipes-kernel/linux/files/0022-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch
diff --git a/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit-spi/watchdog.cfg b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit-spi/watchdog.cfg
new file mode 100644
index 0000000..0ff1450
--- /dev/null
+++ b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit-spi/watchdog.cfg
@@ -0,0 +1,3 @@
+#CONFIG_WATCHDOG=y
+#CONFIG_WATCHDOG_CORE=y
+#CONFIG_IE6XX_WDT=m
diff --git a/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit/watchdog.cfg b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit/watchdog.cfg
new file mode 100644
index 0000000..9842ebd
--- /dev/null
+++ b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark/iot-devkit/watchdog.cfg
@@ -0,0 +1,3 @@
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_IE6XX_WDT=m
diff --git a/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark_3.8.bbappend b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark_3.8.bbappend
index b01c1a0..53ac6a6 100644
--- a/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark_3.8.bbappend
+++ b/meta-iot-devkit/recipes-kernel/linux/linux-yocto-quark_3.8.bbappend
@@ -41,3 +41,4 @@ SRC_URI += "file://netfilter_redirect.cfg"
SRC_URI += "file://ppp.cfg"
SRC_URI += "file://ftdi_sio.cfg"
SRC_URI += "file://usb_serial.cfg"
+SRC_URI += "file://watchdog.cfg"
diff --git a/meta-quark-bsp/recipes-kernel/linux/files/0022-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch b/meta-quark-bsp/recipes-kernel/linux/files/0022-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch
new file mode 100644
index 0000000..e58946e
--- /dev/null
+++ b/meta-quark-bsp/recipes-kernel/linux/files/0022-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch
@@ -0,0 +1,28 @@
+From 272a78633145646908fc2c18182c38def3176d76 Mon Sep 17 00:00:00 2001
+From: Ong Boon Leong <boon.leong.ong at intel.com>
+Date: Mon, 23 Mar 2015 13:10:04 +0800
+Subject: [PATCH] mfd: lpc_sch: enable Intel Quark X1000 WDT
+
+Intel Quark X1000 uses IE6XX Watchdog timer. So, we enable it
+here through lpc_sch driver probing.
+
+Signed-off-by: Ong Boon Leong <boon.leong.ong at intel.com>
+---
+ drivers/mfd/lpc_sch.c | 1
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/mfd/lpc_sch.c b/drivers/mfd/lpc_sch.c
+index 4afc687..1e88fa3 100644
+--- a/drivers/mfd/lpc_sch.c
++++ b/drivers/mfd/lpc_sch.c
+@@ -183,6 +183,7 @@ static int lpc_sch_probe(struct pci_dev *dev,
+ }
+
+ if (id->device == PCI_DEVICE_ID_INTEL_ITC_LPC
++ || id->device == PCI_DEVICE_ID_INTEL_QUARK_ILB
+ || id->device == PCI_DEVICE_ID_INTEL_CENTERTON_ILB) {
+ pci_read_config_dword(dev, WDTBASE, &base_addr_cfg);
+ if (!(base_addr_cfg & (1 << 31))) {
+--
+1.7.9.5
+
diff --git a/meta-quark-bsp/recipes-kernel/linux/linux-yocto-quark_3.8.bb b/meta-quark-bsp/recipes-kernel/linux/linux-yocto-quark_3.8.bb
index c9bfd39..4c18f0f 100644
--- a/meta-quark-bsp/recipes-kernel/linux/linux-yocto-quark_3.8.bb
+++ b/meta-quark-bsp/recipes-kernel/linux/linux-yocto-quark_3.8.bb
@@ -90,6 +90,7 @@ SRC_URI += "file://0018-Quark-sensors-quark.patch"
SRC_URI += "file://0019-Quark-SC-SPI-quark.patch"
SRC_URI += "file://0020-Quark-IIO-quark.patch"
SRC_URI += "file://0021-Quark-SPI-flash-quark.patch"
+SRC_URI += "file://0022-mfd-lpc_sch-enable-Intel-Quark-X1000-WDT.patch"
SRC_URI += "file://0001-libtraceevent-Remove-hard-coded-include-to-usr-local.patch"
SRC_URI += "file://uart-1.0.patch"
--
1.7.9.5
More information about the meta-intel
mailing list