lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1451478961-5668-1-git-send-email-henryc.chen@mediatek.com>
Date:	Wed, 30 Dec 2015 20:36:01 +0800
From:	Henry Chen <henryc.chen@...iatek.com>
To:	Matthias Brugger <matthias.bgg@...il.com>
CC:	Sascha Hauer <s.hauer@...gutronix.de>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-mediatek@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>,
	Henry Chen <henryc.chen@...iatek.com>
Subject: [PATCH] soc: mediatek: PMIC wrap: Enable STAUPD_PRD before WDT_SRC_EN enabled.

The STAUPD_TRIG will be enable when WDT_INT enable on probe function, if
doesn't enable STAUPD_PRD together, interrupt will be triggered because
STAUPD timeout. To avoid unexpected interrupt, enable periodic status
update which will be updated to PMIC every selected time period.

Signed-off-by: Henry Chen <henryc.chen@...iatek.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index a8cde17..6e5c20f 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -904,6 +904,11 @@ static int pwrap_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
+	/*
+	 * Enable periodic status update which will be updated to PMIC
+	 * every selected time period.
+	 */
+	pwrap_writel(wrp, 0x5, PWRAP_STAUPD_PRD);
 	/* Initialize watchdog, may not be done by the bootloader */
 	pwrap_writel(wrp, 0xf, PWRAP_WDT_UNIT);
 	pwrap_writel(wrp, 0xffffffff, PWRAP_WDT_SRC_EN);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ