* [PATCH 0/2] Correct iTCO Watchdog for Apollo Lake
@ 2016-05-18 3:26 Yong, Jonathan
2016-05-18 3:26 ` [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Yong, Jonathan @ 2016-05-18 3:26 UTC (permalink / raw)
To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA
Cc: qipeng.zha-ral2JQCrhuEAvxtiuMwx3w,
jonathan.yong-ral2JQCrhuEAvxtiuMwx3w
These patches fix the iTCO watchdog for Apollo Lake.
I changed the watchdog memory io to only use 4 bytes rather
the whole region, I'm not sure if that is the correct way.
Let me know if the patches need changes.
Please CC me as I am not subscribed, thanks.
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driver
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
drivers/watchdog/iTCO_wdt.c | 4 ++++
2 files changed, 10 insertions(+), 4 deletions(-)
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 26+ messages in thread* [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
2016-05-18 3:26 [PATCH 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
@ 2016-05-18 3:26 ` Yong, Jonathan
2016-05-18 14:37 ` Guenter Roeck
[not found] ` <1463541972-19758-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
` (2 subsequent siblings)
3 siblings, 1 reply; 26+ messages in thread
From: Yong, Jonathan @ 2016-05-18 3:26 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86; +Cc: qipeng.zha, jonathan.yong
The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
---
drivers/watchdog/iTCO_wdt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 0acc6c5..eccba32 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -150,6 +150,9 @@ static inline u32 no_reboot_bit(void)
u32 enable_bit;
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
+ enable_bit = 0x00000008;
+ break;
case 3:
enable_bit = 0x00000010;
break;
@@ -512,6 +515,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
/* Clear out the (probably old) status */
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
case 4:
outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
--
2.7.3
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
2016-05-18 3:26 ` [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
@ 2016-05-18 14:37 ` Guenter Roeck
0 siblings, 0 replies; 26+ messages in thread
From: Guenter Roeck @ 2016-05-18 14:37 UTC (permalink / raw)
To: Yong, Jonathan, linux-watchdog, platform-driver-x86; +Cc: qipeng.zha
On 05/17/2016 08:26 PM, Yong, Jonathan wrote:
> The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
>
> Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/iTCO_wdt.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index 0acc6c5..eccba32 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -150,6 +150,9 @@ static inline u32 no_reboot_bit(void)
> u32 enable_bit;
>
> switch (iTCO_wdt_private.iTCO_version) {
> + case 5:
> + enable_bit = 0x00000008;
> + break;
> case 3:
> enable_bit = 0x00000010;
> break;
> @@ -512,6 +515,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
>
> /* Clear out the (probably old) status */
> switch (iTCO_wdt_private.iTCO_version) {
> + case 5:
> case 4:
> outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
> outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
>
^ permalink raw reply [flat|nested] 26+ messages in thread
[parent not found: <1463541972-19758-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
[not found] ` <1463541972-19758-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-05-18 3:26 ` Yong, Jonathan
[not found] ` <1463541972-19758-3-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 26+ messages in thread
From: Yong, Jonathan @ 2016-05-18 3:26 UTC (permalink / raw)
To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA
Cc: qipeng.zha-ral2JQCrhuEAvxtiuMwx3w,
jonathan.yong-ral2JQCrhuEAvxtiuMwx3w
The TCO I/O base is 40h rather than the usual 30h, and the re_reboot
bit is at ACPIBASE+8.
Signed-off-by: Yong, Jonathan <jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index 6f497e8..b86e1bc 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -85,7 +85,7 @@
* platform device and to export resources for those functions.
*/
#define TCO_DEVICE_NAME "iTCO_wdt"
-#define SMI_EN_OFFSET 0x30
+#define SMI_EN_OFFSET 0x40
#define SMI_EN_SIZE 4
#define TCO_BASE_OFFSET 0x60
#define TCO_REGS_SIZE 16
@@ -94,6 +94,8 @@
#define TELEM_SSRAM_SIZE 240
#define TELEM_PMC_SSRAM_OFFSET 0x1B00
#define TELEM_PUNIT_SSRAM_OFFSET 0x1A00
+#define TCO_PMC_OFFSET 0x8
+#define TCO_PMC_SIZE 0x4
static const int iTCO_version = 3;
@@ -502,7 +504,7 @@ static struct resource tco_res[] = {
static struct itco_wdt_platform_data tco_info = {
.name = "Apollo Lake SoC",
- .version = 3,
+ .version = 5,
};
#define TELEMETRY_RESOURCE_PUNIT_SSRAM 0
@@ -572,8 +574,8 @@ static int ipc_create_tco_device(void)
res->end = res->start + SMI_EN_SIZE - 1;
res = tco_res + TCO_RESOURCE_GCR_MEM;
- res->start = ipcdev.gcr_base;
- res->end = res->start + ipcdev.gcr_size - 1;
+ res->start = ipcdev.gcr_base + TCO_PMC_OFFSET;
+ res->end = res->start + TCO_PMC_SIZE - 1;
ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res));
if (ret) {
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake
2016-05-18 3:26 [PATCH 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
2016-05-18 3:26 ` [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
[not found] ` <1463541972-19758-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-06-17 0:33 ` Yong, Jonathan
2016-06-17 0:33 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
[not found] ` <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-17 0:36 ` Yong, Jonathan
3 siblings, 2 replies; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:33 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86
Cc: qipeng.zha, linux, dvhart, linux-kernel.vger.kernel.org,
jonathan.yong
These patches fix the iTCO watchdog for Apollo Lake.
I changed the watchdog memory io to only use 4 bytes rather
the whole region, I'm not sure if that is the correct way.
The previous 0x30h offset in intel_pmc_ipc.c was for based
on the earlier BXT-M platform. Apollo Lake has it at 0x40h.
Let me know if the patches need changes.
Please CC me as I am not subscribed, thanks.
Changes since v1:
* Watchdog NO_REBOOT bit off-by-one corrected.
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driver
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
drivers/watchdog/iTCO_wdt.c | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
--
2.7.3
^ permalink raw reply [flat|nested] 26+ messages in thread* [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
2016-06-17 0:33 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
@ 2016-06-17 0:33 ` Yong, Jonathan
2016-06-23 13:39 ` Guenter Roeck
[not found] ` <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
1 sibling, 1 reply; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:33 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86
Cc: qipeng.zha, linux, dvhart, linux-kernel.vger.kernel.org,
jonathan.yong
The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
---
drivers/watchdog/iTCO_wdt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 0acc6c5..54cab18 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -150,6 +150,7 @@ static inline u32 no_reboot_bit(void)
u32 enable_bit;
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
case 3:
enable_bit = 0x00000010;
break;
@@ -512,6 +513,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
/* Clear out the (probably old) status */
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
case 4:
outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
--
2.7.3
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
2016-06-17 0:33 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
@ 2016-06-23 13:39 ` Guenter Roeck
0 siblings, 0 replies; 26+ messages in thread
From: Guenter Roeck @ 2016-06-23 13:39 UTC (permalink / raw)
To: Yong, Jonathan, linux-watchdog, platform-driver-x86
Cc: qipeng.zha, dvhart, linux-kernel.vger.kernel.org
On 06/16/2016 05:33 PM, Yong, Jonathan wrote:
> The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
>
> Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/iTCO_wdt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index 0acc6c5..54cab18 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -150,6 +150,7 @@ static inline u32 no_reboot_bit(void)
> u32 enable_bit;
>
> switch (iTCO_wdt_private.iTCO_version) {
> + case 5:
> case 3:
> enable_bit = 0x00000010;
> break;
> @@ -512,6 +513,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
>
> /* Clear out the (probably old) status */
> switch (iTCO_wdt_private.iTCO_version) {
> + case 5:
> case 4:
> outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
> outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
>
^ permalink raw reply [flat|nested] 26+ messages in thread
[parent not found: <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
[not found] ` <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-06-17 0:33 ` Yong, Jonathan
2016-06-23 13:39 ` Guenter Roeck
2016-07-17 20:16 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Wim Van Sebroeck
1 sibling, 1 reply; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:33 UTC (permalink / raw)
To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA
Cc: qipeng.zha-ral2JQCrhuEAvxtiuMwx3w, linux-0h96xk9xTtrk1uMJSBkQmQ,
dvhart-wEGCiKHe2LqWVfeAwA7xHQ,
linux-kernel.vger.kernel.org-u79uwXL29TY76Z2rM5mHXA,
jonathan.yong-ral2JQCrhuEAvxtiuMwx3w
The TCO I/O base is 40h rather than the usual 30h, and the re_reboot
bit is at ACPIBASE+8.
Signed-off-by: Yong, Jonathan <jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index 6f497e8..b86e1bc 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -85,7 +85,7 @@
* platform device and to export resources for those functions.
*/
#define TCO_DEVICE_NAME "iTCO_wdt"
-#define SMI_EN_OFFSET 0x30
+#define SMI_EN_OFFSET 0x40
#define SMI_EN_SIZE 4
#define TCO_BASE_OFFSET 0x60
#define TCO_REGS_SIZE 16
@@ -94,6 +94,8 @@
#define TELEM_SSRAM_SIZE 240
#define TELEM_PMC_SSRAM_OFFSET 0x1B00
#define TELEM_PUNIT_SSRAM_OFFSET 0x1A00
+#define TCO_PMC_OFFSET 0x8
+#define TCO_PMC_SIZE 0x4
static const int iTCO_version = 3;
@@ -502,7 +504,7 @@ static struct resource tco_res[] = {
static struct itco_wdt_platform_data tco_info = {
.name = "Apollo Lake SoC",
- .version = 3,
+ .version = 5,
};
#define TELEMETRY_RESOURCE_PUNIT_SSRAM 0
@@ -572,8 +574,8 @@ static int ipc_create_tco_device(void)
res->end = res->start + SMI_EN_SIZE - 1;
res = tco_res + TCO_RESOURCE_GCR_MEM;
- res->start = ipcdev.gcr_base;
- res->end = res->start + ipcdev.gcr_size - 1;
+ res->start = ipcdev.gcr_base + TCO_PMC_OFFSET;
+ res->end = res->start + TCO_PMC_SIZE - 1;
ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res));
if (ret) {
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
2016-06-17 0:33 ` [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
@ 2016-06-23 13:39 ` Guenter Roeck
0 siblings, 0 replies; 26+ messages in thread
From: Guenter Roeck @ 2016-06-23 13:39 UTC (permalink / raw)
To: Yong, Jonathan, linux-watchdog, platform-driver-x86
Cc: qipeng.zha, dvhart, linux-kernel.vger.kernel.org
On 06/16/2016 05:33 PM, Yong, Jonathan wrote:
> The TCO I/O base is 40h rather than the usual 30h, and the re_reboot
> bit is at ACPIBASE+8.
>
> Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
> index 6f497e8..b86e1bc 100644
> --- a/drivers/platform/x86/intel_pmc_ipc.c
> +++ b/drivers/platform/x86/intel_pmc_ipc.c
> @@ -85,7 +85,7 @@
> * platform device and to export resources for those functions.
> */
> #define TCO_DEVICE_NAME "iTCO_wdt"
> -#define SMI_EN_OFFSET 0x30
> +#define SMI_EN_OFFSET 0x40
> #define SMI_EN_SIZE 4
> #define TCO_BASE_OFFSET 0x60
> #define TCO_REGS_SIZE 16
> @@ -94,6 +94,8 @@
> #define TELEM_SSRAM_SIZE 240
> #define TELEM_PMC_SSRAM_OFFSET 0x1B00
> #define TELEM_PUNIT_SSRAM_OFFSET 0x1A00
> +#define TCO_PMC_OFFSET 0x8
> +#define TCO_PMC_SIZE 0x4
>
> static const int iTCO_version = 3;
>
> @@ -502,7 +504,7 @@ static struct resource tco_res[] = {
>
> static struct itco_wdt_platform_data tco_info = {
> .name = "Apollo Lake SoC",
> - .version = 3,
> + .version = 5,
> };
>
> #define TELEMETRY_RESOURCE_PUNIT_SSRAM 0
> @@ -572,8 +574,8 @@ static int ipc_create_tco_device(void)
> res->end = res->start + SMI_EN_SIZE - 1;
>
> res = tco_res + TCO_RESOURCE_GCR_MEM;
> - res->start = ipcdev.gcr_base;
> - res->end = res->start + ipcdev.gcr_size - 1;
> + res->start = ipcdev.gcr_base + TCO_PMC_OFFSET;
> + res->end = res->start + TCO_PMC_SIZE - 1;
>
> ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res));
> if (ret) {
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake
[not found] ` <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-17 0:33 ` [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
@ 2016-07-17 20:16 ` Wim Van Sebroeck
2016-07-18 0:00 ` Yong, Jonathan
1 sibling, 1 reply; 26+ messages in thread
From: Wim Van Sebroeck @ 2016-07-17 20:16 UTC (permalink / raw)
To: Yong, Jonathan
Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA,
qipeng.zha-ral2JQCrhuEAvxtiuMwx3w, linux-0h96xk9xTtrk1uMJSBkQmQ,
dvhart-wEGCiKHe2LqWVfeAwA7xHQ,
linux-kernel.vger.kernel.org-u79uwXL29TY76Z2rM5mHXA
Hi Jonathan,
> These patches fix the iTCO watchdog for Apollo Lake.
> I changed the watchdog memory io to only use 4 bytes rather
> the whole region, I'm not sure if that is the correct way.
>
> The previous 0x30h offset in intel_pmc_ipc.c was for based
> on the earlier BXT-M platform. Apollo Lake has it at 0x40h.
>
> Let me know if the patches need changes.
> Please CC me as I am not subscribed, thanks.
>
> Changes since v1:
> * Watchdog NO_REBOOT bit off-by-one corrected.
>
> Yong, Jonathan (2):
> watchdog: iTCO-wdt handle 5th variation for Apollo Lake
> x86: Fix Apollo Lake Watchdog address in PMC driver
>
> drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
> drivers/watchdog/iTCO_wdt.c | 2 ++
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> --
> 2.7.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Both patches have been added to linux-watchdog-next.
Kind regards,
Wim.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake
2016-05-18 3:26 [PATCH 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
` (2 preceding siblings ...)
2016-06-17 0:33 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
@ 2016-06-17 0:36 ` Yong, Jonathan
2016-06-17 0:36 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
` (2 more replies)
3 siblings, 3 replies; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:36 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86
Cc: qipeng.zha, linux, dvhart, linux-kernel, jonathan.yong
These patches fix the iTCO watchdog for Apollo Lake.
I changed the watchdog memory io to only use 4 bytes rather
the whole region, I'm not sure if that is the correct way.
The previous 0x30h offset in intel_pmc_ipc.c was for based
on the earlier BXT-M platform. Apollo Lake has it at 0x40h.
Let me know if the patches need changes.
Please CC me as I am not subscribed, thanks.
* Resent, typo in linux-kernel email address
Changes since v1:
* Watchdog NO_REBOOT bit off-by-one corrected.
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driver
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
drivers/watchdog/iTCO_wdt.c | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
--
2.7.3
^ permalink raw reply [flat|nested] 26+ messages in thread* [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
2016-06-17 0:36 ` Yong, Jonathan
@ 2016-06-17 0:36 ` Yong, Jonathan
2016-06-17 0:36 ` [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
[not found] ` <1466123817-50679-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2 siblings, 0 replies; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:36 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86
Cc: qipeng.zha, linux, dvhart, linux-kernel, jonathan.yong
The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
---
drivers/watchdog/iTCO_wdt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 0acc6c5..54cab18 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -150,6 +150,7 @@ static inline u32 no_reboot_bit(void)
u32 enable_bit;
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
case 3:
enable_bit = 0x00000010;
break;
@@ -512,6 +513,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
/* Clear out the (probably old) status */
switch (iTCO_wdt_private.iTCO_version) {
+ case 5:
case 4:
outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
--
2.7.3
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
2016-06-17 0:36 ` Yong, Jonathan
2016-06-17 0:36 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
@ 2016-06-17 0:36 ` Yong, Jonathan
[not found] ` <1466123817-50679-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2 siblings, 0 replies; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-17 0:36 UTC (permalink / raw)
To: linux-watchdog, platform-driver-x86
Cc: qipeng.zha, linux, dvhart, linux-kernel, jonathan.yong
The TCO I/O base is 40h rather than the usual 30h, and the re_reboot
bit is at ACPIBASE+8.
Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
---
drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index 6f497e8..b86e1bc 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -85,7 +85,7 @@
* platform device and to export resources for those functions.
*/
#define TCO_DEVICE_NAME "iTCO_wdt"
-#define SMI_EN_OFFSET 0x30
+#define SMI_EN_OFFSET 0x40
#define SMI_EN_SIZE 4
#define TCO_BASE_OFFSET 0x60
#define TCO_REGS_SIZE 16
@@ -94,6 +94,8 @@
#define TELEM_SSRAM_SIZE 240
#define TELEM_PMC_SSRAM_OFFSET 0x1B00
#define TELEM_PUNIT_SSRAM_OFFSET 0x1A00
+#define TCO_PMC_OFFSET 0x8
+#define TCO_PMC_SIZE 0x4
static const int iTCO_version = 3;
@@ -502,7 +504,7 @@ static struct resource tco_res[] = {
static struct itco_wdt_platform_data tco_info = {
.name = "Apollo Lake SoC",
- .version = 3,
+ .version = 5,
};
#define TELEMETRY_RESOURCE_PUNIT_SSRAM 0
@@ -572,8 +574,8 @@ static int ipc_create_tco_device(void)
res->end = res->start + SMI_EN_SIZE - 1;
res = tco_res + TCO_RESOURCE_GCR_MEM;
- res->start = ipcdev.gcr_base;
- res->end = res->start + ipcdev.gcr_size - 1;
+ res->start = ipcdev.gcr_base + TCO_PMC_OFFSET;
+ res->end = res->start + TCO_PMC_SIZE - 1;
ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res));
if (ret) {
--
2.7.3
^ permalink raw reply related [flat|nested] 26+ messages in thread[parent not found: <1466123817-50679-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake
[not found] ` <1466123817-50679-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-06-22 4:53 ` Yong, Jonathan
2016-06-22 6:01 ` Guenter Roeck
0 siblings, 1 reply; 26+ messages in thread
From: Yong, Jonathan @ 2016-06-22 4:53 UTC (permalink / raw)
To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA
Cc: qipeng.zha-ral2JQCrhuEAvxtiuMwx3w, linux-0h96xk9xTtrk1uMJSBkQmQ,
dvhart-wEGCiKHe2LqWVfeAwA7xHQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 06/17/2016 08:36, Yong, Jonathan wrote:
> These patches fix the iTCO watchdog for Apollo Lake.
> I changed the watchdog memory io to only use 4 bytes rather
> the whole region, I'm not sure if that is the correct way.
>
> The previous 0x30h offset in intel_pmc_ipc.c was for based
> on the earlier BXT-M platform. Apollo Lake has it at 0x40h.
>
> Let me know if the patches need changes.
> Please CC me as I am not subscribed, thanks.
>
> * Resent, typo in linux-kernel email address
>
> Changes since v1:
> * Watchdog NO_REBOOT bit off-by-one corrected.
>
> Yong, Jonathan (2):
> watchdog: iTCO-wdt handle 5th variation for Apollo Lake
> x86: Fix Apollo Lake Watchdog address in PMC driver
>
> drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
> drivers/watchdog/iTCO_wdt.c | 2 ++
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
Ping.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake
2016-06-22 4:53 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
@ 2016-06-22 6:01 ` Guenter Roeck
[not found] ` <576A299D.5010300-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 26+ messages in thread
From: Guenter Roeck @ 2016-06-22 6:01 UTC (permalink / raw)
To: Yong, Jonathan, linux-watchdog, platform-driver-x86
Cc: qipeng.zha, dvhart, linux-kernel
On 06/21/2016 09:53 PM, Yong, Jonathan wrote:
> On 06/17/2016 08:36, Yong, Jonathan wrote:
>> These patches fix the iTCO watchdog for Apollo Lake.
>> I changed the watchdog memory io to only use 4 bytes rather
>> the whole region, I'm not sure if that is the correct way.
>>
>> The previous 0x30h offset in intel_pmc_ipc.c was for based
>> on the earlier BXT-M platform. Apollo Lake has it at 0x40h.
>>
>> Let me know if the patches need changes.
>> Please CC me as I am not subscribed, thanks.
>>
>> * Resent, typo in linux-kernel email address
>>
>> Changes since v1:
>> * Watchdog NO_REBOOT bit off-by-one corrected.
>>
>> Yong, Jonathan (2):
>> watchdog: iTCO-wdt handle 5th variation for Apollo Lake
>> x86: Fix Apollo Lake Watchdog address in PMC driver
>>
>> drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++----
>> drivers/watchdog/iTCO_wdt.c | 2 ++
>> 2 files changed, 8 insertions(+), 4 deletions(-)
>>
>
> Ping.
>
>
Waiting for an Ack from Darren.
Guenter
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2016-07-18 0:00 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 3:26 [PATCH 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
2016-05-18 3:26 ` [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
2016-05-18 14:37 ` Guenter Roeck
[not found] ` <1463541972-19758-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-05-18 3:26 ` [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
[not found] ` <1463541972-19758-3-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-05-18 4:03 ` Guenter Roeck
2016-05-18 4:48 ` Yong, Jonathan
[not found] ` <573BF421.2020503-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-05-18 14:37 ` Guenter Roeck
[not found] ` <573C7E0C.7050304-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-05-24 20:13 ` Darren Hart
[not found] ` <20160524201316.GA5857-EK61lajVJsRSq9BJjBFyUp/QNRX+jHPU@public.gmane.org>
2016-05-25 7:55 ` Yong, Jonathan
[not found] ` <57455A8B.1090807-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-02 8:28 ` Yong, Jonathan
2016-06-07 22:03 ` Darren Hart
[not found] ` <20160607220323.GA28348-EK61lajVJsRSq9BJjBFyUp/QNRX+jHPU@public.gmane.org>
2016-06-13 4:42 ` Yong, Jonathan
2016-06-17 0:33 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
2016-06-17 0:33 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
2016-06-23 13:39 ` Guenter Roeck
[not found] ` <1466123612-50633-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-17 0:33 ` [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
2016-06-23 13:39 ` Guenter Roeck
2016-07-17 20:16 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Wim Van Sebroeck
2016-07-18 0:00 ` Yong, Jonathan
2016-06-17 0:36 ` Yong, Jonathan
2016-06-17 0:36 ` [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation " Yong, Jonathan
2016-06-17 0:36 ` [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver Yong, Jonathan
[not found] ` <1466123817-50679-1-git-send-email-jonathan.yong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-22 4:53 ` [PATCH v2 0/2] Correct iTCO Watchdog for Apollo Lake Yong, Jonathan
2016-06-22 6:01 ` Guenter Roeck
[not found] ` <576A299D.5010300-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-06-23 5:02 ` Darren Hart
[not found] ` <20160623050218.GC3379-EK61lajVJsRSq9BJjBFyUp/QNRX+jHPU@public.gmane.org>
2016-06-23 13:37 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox