Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci-pci-gli: Enable short circuit protection mechanism of GL9755

Short circuit protection mechanism of GL9755 is disabled by HW default
setting. Enable short circuit protection to prevent GL9755 from being
damaged by short circuit or over current.

Signed-off-by: Renius Chen <reniuschengl@gmail.com>
Link: https://lore.kernel.org/r/20210225111307.62975-1-reniuschengl@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Renius Chen and committed by
Ulf Hansson
f46b54cc f410ee0a

+8
+8
drivers/mmc/host/sdhci-pci-gli.c
··· 123 123 #define PCI_GLI_9755_PLLSSC 0x68 124 124 #define PCI_GLI_9755_PLLSSC_PPM GENMASK(15, 0) 125 125 126 + #define PCI_GLI_9755_SerDes 0x70 127 + #define PCI_GLI_9755_SCP_DIS BIT(19) 128 + 126 129 #define GLI_MAX_TUNING_LOOP 40 127 130 128 131 /* Genesys Logic chipset */ ··· 549 546 value &= ~PCI_GLI_9755_LFCLK; 550 547 value &= ~PCI_GLI_9755_DMACLK; 551 548 pci_write_config_dword(pdev, PCI_GLI_9755_PECONF, value); 549 + 550 + /* enable short circuit protection */ 551 + pci_read_config_dword(pdev, PCI_GLI_9755_SerDes, &value); 552 + value &= ~PCI_GLI_9755_SCP_DIS; 553 + pci_write_config_dword(pdev, PCI_GLI_9755_SerDes, value); 552 554 553 555 gl9755_wt_off(pdev); 554 556 }