Lines Matching +full:trim +full:- +full:data +full:- +full:valid
1 // SPDX-License-Identifier: GPL-2.0
3 * sdhci-pci-arasan.c - Driver for Arasan PCI Controller with
15 #include "sdhci-pci.h"
88 /* Arasan private data */
105 return -EBUSY; in arasan_phy_addr_poll()
109 static int arasan_phy_write(struct sdhci_host *host, u8 data, u8 offset) in arasan_phy_write() argument
111 sdhci_writew(host, data, PHY_DAT_REG); in arasan_phy_write()
116 static int arasan_phy_read(struct sdhci_host *host, u8 offset, u8 *data) in arasan_phy_read() argument
124 /* Masking valid data bits */ in arasan_phy_read()
125 *data = sdhci_readw(host, PHY_DAT_REG) & DATA_MASK; in arasan_phy_read()
140 return -EBUSY; in arasan_phy_sts_poll()
144 return -EBUSY; in arasan_phy_sts_poll()
159 return -EBUSY; in arasan_phy_init()
162 return -EBUSY; in arasan_phy_init()
164 /* Program CMD/Data lines */ in arasan_phy_init()
184 return -EBUSY; in arasan_phy_init()
190 u8 drv_type, u8 itap, u8 trim, u8 clk) in arasan_phy_set() argument
226 ret = arasan_phy_write(host, trim, DLL_TRIM); in arasan_phy_set()
239 return -EBUSY; in arasan_phy_set()
250 if (arasan_host->chg_clk == host->mmc->ios.clock) in arasan_select_phy_clock()
253 arasan_host->chg_clk = host->mmc->ios.clock; in arasan_select_phy_clock()
254 if (host->mmc->ios.clock == 200000000) in arasan_select_phy_clock()
256 else if (host->mmc->ios.clock == 100000000) in arasan_select_phy_clock()
258 else if (host->mmc->ios.clock == 50000000) in arasan_select_phy_clock()
263 if (host->mmc_host_ops.hs400_enhanced_strobe) { in arasan_select_phy_clock()
267 switch (host->mmc->ios.timing) { in arasan_select_phy_clock()
280 host->mmc->ios.drv_type, 0x0, in arasan_select_phy_clock()
290 host->mmc->ios.drv_type, 0xa, in arasan_select_phy_clock()
304 slot->host->mmc->caps |= MMC_CAP_NONREMOVABLE | MMC_CAP_8_BIT_DATA; in arasan_pci_probe_slot()
305 err = arasan_phy_init(slot->host); in arasan_pci_probe_slot()
307 return -ENODEV; in arasan_pci_probe_slot()