Lines Matching +full:hs200 +full:- +full:cmd +full:- +full:int +full:- +full:delay
1 // SPDX-License-Identifier: GPL-2.0
3 * sdhci-pci-arasan.c - Driver for Arasan PCI Controller with
12 #include <linux/delay.h>
15 #include "sdhci-pci.h"
77 * Controller has no specific bits for HS200/HS.
93 static int arasan_phy_addr_poll(struct sdhci_host *host, u32 offset, u32 mask) in arasan_phy_addr_poll()
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()
116 static int arasan_phy_read(struct sdhci_host *host, u8 offset, u8 *data) in arasan_phy_read()
118 int ret; in arasan_phy_read()
129 static int arasan_phy_sts_poll(struct sdhci_host *host, u32 offset, u32 mask) in arasan_phy_sts_poll()
131 int ret; in arasan_phy_sts_poll()
140 return -EBUSY; in arasan_phy_sts_poll()
144 return -EBUSY; in arasan_phy_sts_poll()
149 static int arasan_phy_init(struct sdhci_host *host) in arasan_phy_init()
151 int ret; in arasan_phy_init()
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()
189 static int arasan_phy_set(struct sdhci_host *host, u8 mode, u8 otap, in arasan_phy_set()
193 int ret; in arasan_phy_set()
239 return -EBUSY; in arasan_phy_set()
244 static int arasan_select_phy_clock(struct sdhci_host *host) in arasan_select_phy_clock()
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()
300 static int arasan_pci_probe_slot(struct sdhci_pci_slot *slot) in arasan_pci_probe_slot()
302 int err; in arasan_pci_probe_slot()
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()
311 static void arasan_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) in arasan_sdhci_set_clock()