Commit 8c68b56
mmc: sdhci-pci-gli: GL9767: Fix low power mode on the set clock function
On sdhci_gl9767_set_clock(), the vendor header space(VHS) is read-only
after calling gl9767_disable_ssc_pll() and gl9767_set_ssc_pll_205mhz().
So the low power negotiation mode cannot be enabled again.
Introduce gl9767_set_low_power_negotiation() function to fix it.
The explanation process is as below.
static void sdhci_gl9767_set_clock()
{
...
gl9767_vhs_write();
...
value |= PCIE_GLI_9767_CFG_LOW_PWR_OFF;
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value); <--- (a)
gl9767_disable_ssc_pll(); <--- (b)
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
if (clock == 0)
return; <-- (I)
...
if (clock == 200000000 && ios->timing == MMC_TIMING_UHS_SDR104) {
...
gl9767_set_ssc_pll_205mhz(); <--- (c)
}
...
value &= ~PCIE_GLI_9767_CFG_LOW_PWR_OFF;
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value); <-- (II)
gl9767_vhs_read();
}
(a) disable low power negotiation mode. When return on (I), the low power
mode is disabled. After (b) and (c), VHS is read-only, the low power mode
cannot be enabled on (II).
Reported-by: Georg Gottleuber <[email protected]>
Fixes: d275435 ("mmc: sdhci-pci-gli: Set SDR104's clock to 205MHz and enable SSC for GL9767")
Signed-off-by: Ben Chuang <[email protected]>
Tested-by: Georg Gottleuber <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>1 parent 8e929cb commit 8c68b56
1 file changed
+21
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
895 | 911 | | |
896 | 912 | | |
897 | 913 | | |
898 | 914 | | |
899 | 915 | | |
900 | | - | |
901 | 916 | | |
902 | 917 | | |
903 | 918 | | |
904 | 919 | | |
905 | 920 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
| 921 | + | |
912 | 922 | | |
913 | 923 | | |
914 | 924 | | |
915 | | - | |
| 925 | + | |
| 926 | + | |
916 | 927 | | |
| 928 | + | |
917 | 929 | | |
918 | 930 | | |
919 | 931 | | |
| |||
922 | 934 | | |
923 | 935 | | |
924 | 936 | | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
| 937 | + | |
931 | 938 | | |
932 | 939 | | |
933 | 940 | | |
| |||
0 commit comments