@@ -1874,6 +1874,36 @@ static void sdhci_msm_reset(struct sdhci_host *host, u8 mask)
1874
1874
sdhci_reset (host , mask );
1875
1875
}
1876
1876
1877
+ #define DRIVER_NAME "sdhci_msm"
1878
+ #define SDHCI_MSM_DUMP (f , x ...) \
1879
+ pr_err("%s: " DRIVER_NAME ": " f, mmc_hostname(host->mmc), ## x)
1880
+
1881
+ void sdhci_msm_dump_vendor_regs (struct sdhci_host * host )
1882
+ {
1883
+ struct sdhci_pltfm_host * pltfm_host = sdhci_priv (host );
1884
+ struct sdhci_msm_host * msm_host = sdhci_pltfm_priv (pltfm_host );
1885
+ const struct sdhci_msm_offset * msm_offset = msm_host -> offset ;
1886
+
1887
+ SDHCI_MSM_DUMP ("----------- VENDOR REGISTER DUMP -----------\n" );
1888
+
1889
+ SDHCI_MSM_DUMP (
1890
+ "DLL sts: 0x%08x | DLL cfg: 0x%08x | DLL cfg2: 0x%08x\n" ,
1891
+ readl_relaxed (host -> ioaddr + msm_offset -> core_dll_status ),
1892
+ readl_relaxed (host -> ioaddr + msm_offset -> core_dll_config ),
1893
+ readl_relaxed (host -> ioaddr + msm_offset -> core_dll_config_2 ));
1894
+ SDHCI_MSM_DUMP (
1895
+ "DLL cfg3: 0x%08x | DLL usr ctl: 0x%08x | DDR cfg: 0x%08x\n" ,
1896
+ readl_relaxed (host -> ioaddr + msm_offset -> core_dll_config_3 ),
1897
+ readl_relaxed (host -> ioaddr + msm_offset -> core_dll_usr_ctl ),
1898
+ readl_relaxed (host -> ioaddr + msm_offset -> core_ddr_config ));
1899
+ SDHCI_MSM_DUMP (
1900
+ "Vndr func: 0x%08x | Vndr func2 : 0x%08x Vndr func3: 0x%08x\n" ,
1901
+ readl_relaxed (host -> ioaddr + msm_offset -> core_vendor_spec ),
1902
+ readl_relaxed (host -> ioaddr +
1903
+ msm_offset -> core_vendor_spec_func2 ),
1904
+ readl_relaxed (host -> ioaddr + msm_offset -> core_vendor_spec3 ));
1905
+ }
1906
+
1877
1907
static const struct sdhci_msm_variant_ops mci_var_ops = {
1878
1908
.msm_readl_relaxed = sdhci_msm_mci_variant_readl_relaxed ,
1879
1909
.msm_writel_relaxed = sdhci_msm_mci_variant_writel_relaxed ,
@@ -1929,6 +1959,7 @@ static const struct sdhci_ops sdhci_msm_ops = {
1929
1959
.write_w = sdhci_msm_writew ,
1930
1960
.write_b = sdhci_msm_writeb ,
1931
1961
.irq = sdhci_msm_cqe_irq ,
1962
+ .dump_vendor_regs = sdhci_msm_dump_vendor_regs ,
1932
1963
};
1933
1964
1934
1965
static const struct sdhci_pltfm_data sdhci_msm_pdata = {
0 commit comments