@@ -920,7 +929,13 @@ static int pwrap_probe(struct platform_device *pdev)/* Initialize watchdog, may not be done by the bootloader */pwrap_writel(wrp,0xf,PWRAP_WDT_UNIT);-pwrap_writel(wrp,0xffffffff,PWRAP_WDT_SRC_EN);+/*+*SinceSTAUPDwasnotusedonmt8173platform,+*soSTAUPDofWDT_SRCwhichshouldbeturnedoff+*/+wdt_src=pwrap_is_mt8135(wrp)?+PWRAP_WDT_SRC_MASK_ALL:PWRAP_WDT_SRC_MASK_NO_STAUPD;+pwrap_writel(wrp,wdt_src,PWRAP_WDT_SRC_EN);pwrap_writel(wrp,0x1,PWRAP_TIMER_EN);pwrap_writel(wrp,~((1<<31)|(1<<1)),PWRAP_INT_EN);
From: Daniel Kurtz <hidden> Date: 2016-01-20 10:32:50
On Tue, Jan 19, 2016 at 8:52 PM, Henry Chen [off-list ref] wrote:
Since STAUPD interrupts aren't handled on mt8173, disable watchdog timeout
monitor of STAUPD to avoid WDT_INT triggered by STAUPD.
Signed-off-by: Henry Chen <redacted>
@@ -920,7 +929,13 @@ static int pwrap_probe(struct platform_device *pdev)/* Initialize watchdog, may not be done by the bootloader */pwrap_writel(wrp,0xf,PWRAP_WDT_UNIT);-pwrap_writel(wrp,0xffffffff,PWRAP_WDT_SRC_EN);+/*+*SinceSTAUPDwasnotusedonmt8173platform,+*soSTAUPDofWDT_SRCwhichshouldbeturnedoff+*/
It is a little awkward that "!pwrap_is_mt8135(wrp)" means mt8173. Is
this always true?
Why aren't we clearing STAUPD for mt8135 too?
I assume it is because mt8135 does not define this bit?
What about other devices that are not mt8135 or mt8173?
Perhaps change the comment to:
"This driver does not use STAUPD, so clear this WDT SRC for all
devices for which it exists to avoid unhandled interrupts"
Other than that, this patch is:
Reviewed-by: Daniel Kurtz <redacted>
From: Henry Chen <hidden> Date: 2016-01-20 11:11:59
On Wed, 2016-01-20 at 02:32 -0800, Daniel Kurtz wrote:
On Tue, Jan 19, 2016 at 8:52 PM, Henry Chen [off-list ref] wrote:
quoted
Since STAUPD interrupts aren't handled on mt8173, disable watchdog timeout
monitor of STAUPD to avoid WDT_INT triggered by STAUPD.
Signed-off-by: Henry Chen <redacted>
@@ -920,7 +929,13 @@ static int pwrap_probe(struct platform_device *pdev)/* Initialize watchdog, may not be done by the bootloader */pwrap_writel(wrp,0xf,PWRAP_WDT_UNIT);-pwrap_writel(wrp,0xffffffff,PWRAP_WDT_SRC_EN);+/*+*SinceSTAUPDwasnotusedonmt8173platform,+*soSTAUPDofWDT_SRCwhichshouldbeturnedoff+*/
It is a little awkward that "!pwrap_is_mt8135(wrp)" means mt8173. Is
this always true?
Why aren't we clearing STAUPD for mt8135 too?
I assume it is because mt8135 does not define this bit?
What about other devices that are not mt8135 or mt8173?
MT8135 used STAUPD because it have pwrap event pin and it was different
with mt8173. pwrap event have been removed on mt8173, so it no need to
set STAUPD.
Henry
Perhaps change the comment to:
"This driver does not use STAUPD, so clear this WDT SRC for all
devices for which it exists to avoid unhandled interrupts"
Other than that, this patch is:
Reviewed-by: Daniel Kurtz <redacted>
On Wed, 2016-01-20 at 02:32 -0800, Daniel Kurtz wrote:
quoted
On Tue, Jan 19, 2016 at 8:52 PM, Henry Chen [off-list ref] wrote:
quoted
Since STAUPD interrupts aren't handled on mt8173, disable watchdog timeout
monitor of STAUPD to avoid WDT_INT triggered by STAUPD.
Signed-off-by: Henry Chen <redacted>
@@ -920,7 +929,13 @@ static int pwrap_probe(struct platform_device *pdev)/* Initialize watchdog, may not be done by the bootloader */pwrap_writel(wrp,0xf,PWRAP_WDT_UNIT);-pwrap_writel(wrp,0xffffffff,PWRAP_WDT_SRC_EN);+/*+*SinceSTAUPDwasnotusedonmt8173platform,+*soSTAUPDofWDT_SRCwhichshouldbeturnedoff+*/
It is a little awkward that "!pwrap_is_mt8135(wrp)" means mt8173. Is
this always true?
Why aren't we clearing STAUPD for mt8135 too?
I assume it is because mt8135 does not define this bit?
What about other devices that are not mt8135 or mt8173?
MT8135 used STAUPD because it have pwrap event pin and it was different
with mt8173. pwrap event have been removed on mt8173, so it no need to
set STAUPD.
I think we already had this discussion once. It seems as if there are
different versions of pmic-wrapper. An older version used by mt8135 and
e.g. mt6589 and a newer one used by mt8173.
So I agree with Daniel that we should check pwrap_is_mt8173 instead.
Apart from that the patch looks good.
Regards,
Matthias
Henry
quoted
Perhaps change the comment to:
"This driver does not use STAUPD, so clear this WDT SRC for all
devices for which it exists to avoid unhandled interrupts"
quoted
Other than that, this patch is:
Reviewed-by: Daniel Kurtz <redacted>
From: Henry Chen <hidden> Date: 2016-01-21 10:29:24
On Thu, 2016-01-21 at 10:18 +0100, Matthias Brugger wrote:
On 20/01/16 12:11, Henry Chen wrote:
quoted
On Wed, 2016-01-20 at 02:32 -0800, Daniel Kurtz wrote:
quoted
On Tue, Jan 19, 2016 at 8:52 PM, Henry Chen [off-list ref] wrote:
quoted
Since STAUPD interrupts aren't handled on mt8173, disable watchdog timeout
monitor of STAUPD to avoid WDT_INT triggered by STAUPD.
Signed-off-by: Henry Chen <redacted>
@@ -920,7 +929,13 @@ static int pwrap_probe(struct platform_device *pdev)/* Initialize watchdog, may not be done by the bootloader */pwrap_writel(wrp,0xf,PWRAP_WDT_UNIT);-pwrap_writel(wrp,0xffffffff,PWRAP_WDT_SRC_EN);+/*+*SinceSTAUPDwasnotusedonmt8173platform,+*soSTAUPDofWDT_SRCwhichshouldbeturnedoff+*/
It is a little awkward that "!pwrap_is_mt8135(wrp)" means mt8173. Is
this always true?
Why aren't we clearing STAUPD for mt8135 too?
I assume it is because mt8135 does not define this bit?
What about other devices that are not mt8135 or mt8173?
MT8135 used STAUPD because it have pwrap event pin and it was different
with mt8173. pwrap event have been removed on mt8173, so it no need to
set STAUPD.
I think we already had this discussion once. It seems as if there are
different versions of pmic-wrapper. An older version used by mt8135 and
e.g. mt6589 and a newer one used by mt8173.
So I agree with Daniel that we should check pwrap_is_mt8173 instead.
Apart from that the patch looks good.
Ok, I will send a patch to change that, thanks.
Henry
Regards,
Matthias
quoted
Henry
quoted
Perhaps change the comment to:
"This driver does not use STAUPD, so clear this WDT SRC for all
devices for which it exists to avoid unhandled interrupts"
quoted
Other than that, this patch is:
Reviewed-by: Daniel Kurtz <redacted>