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>] [day] [month] [year] [list]
Date:   Thu, 4 Feb 2021 16:31:15 +0800
From:   <ricky_wu@...ltek.com>
To:     <arnd@...db.de>, <gregkh@...uxfoundation.org>,
        <ricky_wu@...ltek.com>, <yuehaibing@...wei.com>,
        <ulf.hansson@...aro.org>, <bhelgaas@...gle.com>,
        <linux-kernel@...r.kernel.org>
CC:     <stable@...r.kernel.org>
Subject: [PATCH v2] misc: rtsx: init of rts522a add OCP power off when no card is present

From: Ricky Wu <ricky_wu@...ltek.com>

Power down OCP for power consumption
when no SD/MMC card is present

Cc: stable@...r.kernel.org
Signed-off-by: Ricky Wu <ricky_wu@...ltek.com>
---

v2: update the subject line and description
---
 drivers/misc/cardreader/rts5227.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/misc/cardreader/rts5227.c b/drivers/misc/cardreader/rts5227.c
index 8859011672cb..8200af22b529 100644
--- a/drivers/misc/cardreader/rts5227.c
+++ b/drivers/misc/cardreader/rts5227.c
@@ -398,6 +398,11 @@ static int rts522a_extra_init_hw(struct rtsx_pcr *pcr)
 {
 	rts5227_extra_init_hw(pcr);
 
+	/* Power down OCP for power consumption */
+	if (!pcr->card_exist)
+		rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN,
+				OC_POWER_DOWN);
+
 	rtsx_pci_write_register(pcr, FUNC_FORCE_CTL, FUNC_FORCE_UPME_XMT_DBG,
 		FUNC_FORCE_UPME_XMT_DBG);
 	rtsx_pci_write_register(pcr, PCLK_CTL, 0x04, 0x04);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ