Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83494054 authored by Ricky Wu's avatar Ricky Wu Committed by Greg Kroah-Hartman
Browse files

misc: rtsx: init of rts522a add OCP power off when no card is present



commit 920fd8a70619074eac7687352c8f1c6f3c2a64a5 upstream.

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

Cc: stable@vger.kernel.org
Signed-off-by: default avatarRicky Wu <ricky_wu@realtek.com>
Link: https://lore.kernel.org/r/20210204083115.9471-1-ricky_wu@realtek.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d03e9084
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -339,6 +339,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);