Correct iTCO Watchdog for Apollo Lake
Subsystems (2)
cover Correct iTCO Watchdog for Apollo Lake
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(-)
Signature · 1 line
2.7.3
PATCH 1/2 watchdog: iTCO-wdt handle 5th variation for Apollo Lake
The Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
--- drivers/watchdog/iTCO_wdt.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/watchdog/iTCO_wdt.c +4 -0
@@ -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 */
Signature · 1 line
2.7.3
PATCH 2/2 x86: Fix Apollo Lake Watchdog address in PMC driver
In reply to Yong, JonathanThe TCO I/O base is 40h rather than the usual 30h, and the re_reboot bit is at ACPIBASE+8.
--- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/platform/x86/intel_pmc_ipc.c +6 -4
@@ -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 0x4static 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) {
Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Guenter Roeck
maintainerRe: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 3 lines · Jonathan
The TCO I/O base is 40h rather than the usual 30h, and the
re_rebootbit is at ACPIBASE+8.
Does this mean that the code never worked, or in other words that it was never tested, or are there now other chips which used the old definitions which no longer work after this patch has been applied ?
Quoted 38 lines
Signed-off-by Yong, Jonathan <[email protected]>--- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/platform/x86/intel_pmc_ipc.c +4
-2@@ -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 0x4static 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
drivers/platform/x86/intel_pmc_ipc.c static int ipc_create_tco_device(void) · line 581
Quoted 10 lines
drivers/platform/x86/intel_pmc_ipc.c +2
-2@@ -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) {
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 8 lines · Guenter Roeck
Quoted 3 lines · Jonathan
The TCO I/O base is 40h rather than the usual 30h, and the
re_rebootbit is at ACPIBASE+8.Does this mean that the code never worked, or in other words that it was never tested, or are there now other chips which used the old definitions which no longer work after this patch has been applied ?
To my knowledge, it has never worked since 30h is claimed by ACPI GPE0_BLK.
With this patch, watchdog ioctl is working properly with WDIOC_SETTIMEOUT, WDIOC_GETTIMEOUT and WDIOC_GETTIMELEFT as expected.
Guenter Roeck
maintainerRe: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 6 lines · Jonathan
Quoted 5 lines · Guenter Roeck
Quoted 3 lines · Jonathan
The TCO I/O base is 40h rather than the usual 30h, and the
re_rebootbit is at ACPIBASE+8.
Quoted 6 lines
Quoted 3 lines
Does this mean that the code never worked, or in other words that it was never tested, or are there now other chips which used the old definitions which no longer work after this patch has been applied ?
To my knowledge, it has never worked since 30h is claimed by ACPI
GPE0_BLK.
Hmm.. Darren will have to take that one. I am not in a position to determine if the new patch is correct or not, and/or if it causes some other platform/architecture to fail. I'll Ack the other patch, and would suggest for Darren to take it as well to keep the two patches together.
Guenter
Quoted 2 lines
With this patch, watchdog ioctl is working properly with
WDIOC_SETTIMEOUT,WDIOC_GETTIMEOUTandWDIOC_GETTIMELEFTas expected.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
In reply to Yong, JonathanQuoted 3 lines · Jonathan
The Apollo Lake Watchdog has the
no_rebootflag in the 4th bit.Signed-off-by Yong, Jonathan <[email protected]>
Quoted 27 lines
--- drivers/watchdog/iTCO_wdt.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/watchdog/iTCO_wdt.c +4
-0@@ -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 */
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
In reply to Guenter RoeckQuoted 11 lines · Guenter Roeck
Quoted 10 lines · Jonathan
Quoted 8 lines · Guenter Roeck
Quoted 3 lines · Jonathan
The TCO I/O base is 40h rather than the usual 30h, and the
re_rebootbit is at ACPIBASE+8.Does this mean that the code never worked, or in other words that it was never tested, or are there now other chips which used the old definitions which no longer work after this patch has been applied ?
Quoted 6 lines
Quoted 2 lines
To my knowledge, it has never worked since 30h is claimed by ACPI
GPE0_BLK.Hmm.. Darren will have to take that one. I am not in a position to determine if the new patch is correct or not, and/or if it causes some other platform/architecture to fail. I'll Ack the other patch, and would suggest for Darren to take it as well to keep the two patches together.
I actually have the same exact question :-)
The history of this driver is for Apollo Lake, so the question is if there exist v3 and v5 APL products, or if we only need to concern ourselves with v5 in the upstream driver.
Especially given the "I don't know if this is the right way" in the cover letter, I will need an Acked-by at the very least from Qipeng.
Jonathan, please remember to Cc ALL the maintainers and all the lists listed by get_maintainers when sending patches:
$ scripts/get_maintainer.pl -f drivers/platform/x86/intel_pmc_ipc.c Zha Qipeng <[email protected]> (maintainer:INTEL PMC/P-Unit IPC DRIVER) Darren Hart <[email protected]> (maintainer:X86 PLATFORM DRIVERS) [email protected] (open list:INTEL PMC/P-Unit IPC DRIVER) [email protected] (open list)
In particular, ALL patches MUST cc LKML.
Quoted 11 lines
Guenter
Quoted 2 lines
With this patch, watchdog ioctl is working properly with
WDIOC_SETTIMEOUT,WDIOC_GETTIMEOUTandWDIOC_GETTIMELEFTas expected.--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 8 lines · Darren Hart
The history of this driver is for Apollo Lake, so the question is if there exist v3 and v5 APL products, or if we only need to concern ourselves with v5 in the upstream driver.
Especially given the "I don't know if this is the right way" in the cover letter, I will need an Acked-by at the very least from Qipeng.
Hi Qipeng,
Do you know the history behind drivers/platform/x86/intel_pmc_ipc.c? Were the specs based on earlier prototypes?
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 8 lines · Jonathan
Quoted 7 lines · Darren Hart
The history of this driver is for Apollo Lake, so the question is if there exist
v3 and v5 APL products, or if we only need to concern ourselves with v5 in the
upstream driver.
Quoted 9 lines
Quoted 3 lines
Especially given the "I don't know if this is the right way" in the cover letter, I will need an Acked-by at the very least from Qipeng.
Hi Qipeng,
Do you know the history behind
drivers/platform/x86/intel_pmc_ipc.c? Were the specs based on earlier prototypes?
Qipeng, ping?
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 13 lines · Jonathan
Quoted 12 lines · Jonathan
Quoted 10 lines · Darren Hart
The history of this driver is for Apollo Lake, so the question is if there exist
v3 and v5 APL products, or if we only need to concern ourselves with v5 in the
upstream driver.Especially given the "I don't know if this is the right way" in the cover letter, I will need an Acked-by at the very least from Qipeng.
Quoted 8 lines
Quoted 5 lines
Hi Qipeng,
Do you know the history behind
drivers/platform/x86/intel_pmc_ipc.c? Were the specs based on earlier prototypes?Qipeng, ping?
Jonathan, can you follow-up with Qiping (possibly internally) and get back to the list with a definitive response? Getting these into 4.7-rc would be good so we don't have to push it back via stable, but we need to be sure it's the right fix.
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
Re: [PATCH 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
Quoted 7 lines · Darren Hart
Quoted 7 lines
Quoted 6 lines
Hi Qipeng,
Do you know the history behind
drivers/platform/x86/intel_pmc_ipc.c? Were the specs based on earlier prototypes?
Quoted 8 lines
Quoted 2 lines
Qipeng, ping?
Jonathan, can you follow-up with Qiping (possibly internally) and get back to the list with a definitive response? Getting these into 4.7-rc would be good so we don't have to push it back via stable, but we need to be sure it's the right fix.
I checked with Qipeng, the 0x30h offset was based on an earlier internal prototype, 0x40h should be OK for Apollo Lake.
v2 cover Correct iTCO Watchdog for Apollo Lake
In reply to Yong, JonathanThese 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(-)
Signature · 1 line
2.7.3
PATCH v2 2/2 x86: Fix Apollo Lake Watchdog address in PMC driver
The TCO I/O base is 40h rather than the usual 30h, and the re_reboot bit is at ACPIBASE+8.
--- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/platform/x86/intel_pmc_ipc.c +6 -4
@@ -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 0x4static 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) {
Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/2 watchdog: iTCO-wdt handle 5th variation for Apollo Lake
In reply to Yong, JonathanThe Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
--- drivers/watchdog/iTCO_wdt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/watchdog/iTCO_wdt.c +2 -0
@@ -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 */
Signature · 1 line
2.7.3
PATCH v2 1/2 watchdog: iTCO-wdt handle 5th variation for Apollo Lake
In reply to Yong, JonathanThe Apollo Lake Watchdog has the no_reboot flag in the 4th bit.
--- drivers/watchdog/iTCO_wdt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/watchdog/iTCO_wdt.c +2 -0
@@ -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 */
Signature · 1 line
2.7.3
v2 cover Correct iTCO Watchdog for Apollo Lake
In reply to Yong, JonathanThese 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(-)
Signature · 1 line
2.7.3
PATCH v2 2/2 x86: Fix Apollo Lake Watchdog address in PMC driver
The TCO I/O base is 40h rather than the usual 30h, and the re_reboot bit is at ACPIBASE+8.
--- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/platform/x86/intel_pmc_ipc.c +6 -4
@@ -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 0x4static 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) {
Signature · 1 line
2.7.3
Quoted 15 lines · 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.cwas 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:
* WatchdogNO_REBOOTbit off-by-one corrected.
Quoted 8 lines
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driverdrivers/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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Guenter Roeck
maintainerQuoted 20 lines · Jonathan
Quoted 19 lines · 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.cwas 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:
* WatchdogNO_REBOOTbit 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
Quoted 8 lines
Quoted 4 lines
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
Darren Hart
Reviewed-byQuoted 26 lines · Guenter Roeck
Quoted 25 lines · Jonathan
Quoted 23 lines · 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.cwas 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:
* WatchdogNO_REBOOTbit off-by-one corrected.Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driverdrivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- drivers/watchdog/iTCO_wdt.c | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-)
Quoted 4 lines
Quoted 3 lines
Ping.
Waiting for an Ack from Darren.
Jonathan verified that the change will not break existing external platforms. I'm happy with it from that perspective.
Guenter, will you take both patches together?
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
Guenter Roeck
maintainerQuoted 30 lines · Darren Hart
Quoted 29 lines · Guenter Roeck
Quoted 28 lines · Jonathan
Quoted 15 lines · 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.cwas 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:
* WatchdogNO_REBOOTbit off-by-one corrected.Quoted 8 lines
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driverdrivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- drivers/watchdog/iTCO_wdt.c | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-)Ping.
Quoted 7 lines
Quoted 1 line
Waiting for an Ack from Darren.
Jonathan verified that the change will not break existing external platforms. I'm happy with it from that perspective.
Guenter, will you take both patches together?
Yes, I'll add them to my queue of patches to send to Wim.
Thanks,
Guenter
Quoted 3 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] watchdog: iTCO-wdt handle 5th variation for Apollo Lake
In reply to Yong, JonathanQuoted 3 lines · Jonathan
The Apollo Lake Watchdog has the
no_rebootflag in the 4th bit.Signed-off-by Yong, Jonathan <[email protected]>
Quoted 25 lines
--- drivers/watchdog/iTCO_wdt.c | 2 ++ 1 file changed, 2 insertions(+)drivers/watchdog/iTCO_wdt.c +2
-0@@ -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 */
Re: [PATCH v2 2/2] x86: Fix Apollo Lake Watchdog address in PMC driver
In reply to Yong, JonathanQuoted 4 lines · Jonathan
The TCO I/O base is 40h rather than the usual 30h, and the
re_rebootbit is at ACPIBASE+8.Signed-off-by Yong, Jonathan <[email protected]>
Quoted 47 lines
--- drivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/platform/x86/intel_pmc_ipc.c +6
-4@@ -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 0x4static 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) {
Hi Jonathan,
Quoted 13 lines
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.cwas 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:
* WatchdogNO_REBOOTbit off-by-one corrected.
Quoted 15 lines
Yong, Jonathan (2):
watchdog: iTCO-wdt handle 5th variation for Apollo Lake
x86: Fix Apollo Lake Watchdog address in PMC driverdrivers/platform/x86/intel_pmc_ipc.c | 10 ++++++---- drivers/watchdog/iTCO_wdt.c | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-)Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Wim Van Sebroeck
Both patches have been added to linux-watchdog-next.
Thanks!