Lines Matching refs:host
50 slot->host->caps = in ricoh_mmc_probe_slot()
113 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA; in mrst_hc_probe_slot()
133 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA; in pch_hc_probe_slot()
142 struct sdhci_host *host = slot->host; in sdhci_pci_sd_cd() local
144 mmc_detect_change(host->mmc, msecs_to_jiffies(200)); in sdhci_pci_sd_cd()
208 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE; in mfd_emmc_probe_slot()
209 slot->host->mmc->caps2 |= MMC_CAP2_BOOTPART_NOACC | in mfd_emmc_probe_slot()
216 slot->host->mmc->caps |= MMC_CAP_POWER_OFF_CARD | MMC_CAP_NONREMOVABLE; in mfd_sdio_probe_slot()
254 static void sdhci_pci_int_hw_reset(struct sdhci_host *host) in sdhci_pci_int_hw_reset() argument
258 reg = sdhci_readb(host, SDHCI_POWER_CONTROL); in sdhci_pci_int_hw_reset()
260 sdhci_writeb(host, reg, SDHCI_POWER_CONTROL); in sdhci_pci_int_hw_reset()
264 sdhci_writeb(host, reg, SDHCI_POWER_CONTROL); in sdhci_pci_int_hw_reset()
271 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE | in byt_emmc_probe_slot()
275 slot->host->mmc->caps2 |= MMC_CAP2_HC_ERASE_SZ; in byt_emmc_probe_slot()
278 slot->host->timeout_clk = 1000; /* 1000 kHz i.e. 1 MHz */ in byt_emmc_probe_slot()
284 slot->host->mmc->caps |= MMC_CAP_POWER_OFF_CARD | MMC_CAP_NONREMOVABLE | in byt_sdio_probe_slot()
292 slot->host->mmc->caps |= MMC_CAP_BUS_WIDTH_TEST | in byt_sd_probe_slot()
337 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE | in intel_mrfl_mmc_probe_slot()
453 static void jmicron_enable_mmc(struct sdhci_host *host, int on) in jmicron_enable_mmc() argument
457 scratch = readb(host->ioaddr + 0xC0); in jmicron_enable_mmc()
464 writeb(scratch, host->ioaddr + 0xC0); in jmicron_enable_mmc()
472 version = readl(slot->host->ioaddr + SDHCI_HOST_VERSION); in jmicron_probe_slot()
482 slot->host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; in jmicron_probe_slot()
487 slot->host->ocr_avail_sd = MMC_VDD_32_33 | MMC_VDD_33_34 | in jmicron_probe_slot()
490 slot->host->ocr_avail_mmc = MMC_VDD_32_33 | MMC_VDD_33_34 | in jmicron_probe_slot()
500 jmicron_enable_mmc(slot->host, 1); in jmicron_probe_slot()
502 slot->host->mmc->caps |= MMC_CAP_BUS_WIDTH_TEST; in jmicron_probe_slot()
514 jmicron_enable_mmc(slot->host, 0); in jmicron_remove_slot()
524 jmicron_enable_mmc(chip->slots[i]->host, 0); in jmicron_suspend()
537 jmicron_enable_mmc(chip->slots[i]->host, 1); in jmicron_resume()
599 u8 board_rev = readb(slot->host->ioaddr + SYSKT_BOARD_REV); in syskt_probe_slot()
600 u8 chip_rev = readb(slot->host->ioaddr + SYSKT_CHIP_REV); in syskt_probe_slot()
606 slot->host->quirks |= SDHCI_QUIRK_FORCE_DMA; in syskt_probe_slot()
608 writeb(SYSKT_POWER_330, slot->host->ioaddr + SYSKT_POWER_DATA); in syskt_probe_slot()
609 writeb(SYSKT_POWER_START, slot->host->ioaddr + SYSKT_POWER_CMD); in syskt_probe_slot()
613 ps = readw(slot->host->ioaddr + SYSKT_POWER_STATUS); in syskt_probe_slot()
621 writeb(0, slot->host->ioaddr + SYSKT_POWER_CMD); in syskt_probe_slot()
648 slot->host->mmc->caps2 |= MMC_CAP2_HS200; in rtsx_probe_slot()
1126 static int sdhci_pci_enable_dma(struct sdhci_host *host) in sdhci_pci_enable_dma() argument
1132 slot = sdhci_priv(host); in sdhci_pci_enable_dma()
1137 (host->flags & SDHCI_USE_SDMA)) { in sdhci_pci_enable_dma()
1142 if (host->flags & SDHCI_USE_64_BIT_DMA) { in sdhci_pci_enable_dma()
1143 if (host->quirks2 & SDHCI_QUIRK2_BROKEN_64_BIT_DMA) { in sdhci_pci_enable_dma()
1144 host->flags &= ~SDHCI_USE_64_BIT_DMA; in sdhci_pci_enable_dma()
1161 static void sdhci_pci_set_bus_width(struct sdhci_host *host, int width) in sdhci_pci_set_bus_width() argument
1165 ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); in sdhci_pci_set_bus_width()
1181 sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); in sdhci_pci_set_bus_width()
1184 static void sdhci_pci_gpio_hw_reset(struct sdhci_host *host) in sdhci_pci_gpio_hw_reset() argument
1186 struct sdhci_pci_slot *slot = sdhci_priv(host); in sdhci_pci_gpio_hw_reset()
1199 static void sdhci_pci_hw_reset(struct sdhci_host *host) in sdhci_pci_hw_reset() argument
1201 struct sdhci_pci_slot *slot = sdhci_priv(host); in sdhci_pci_hw_reset()
1204 slot->hw_reset(host); in sdhci_pci_hw_reset()
1242 ret = sdhci_suspend_host(slot->host); in sdhci_pci_suspend()
1247 slot_pm_flags = slot->host->mmc->pm_flags; in sdhci_pci_suspend()
1249 sdhci_enable_irq_wakeups(slot->host); in sdhci_pci_suspend()
1272 sdhci_resume_host(chip->slots[i]->host); in sdhci_pci_suspend()
1298 ret = sdhci_resume_host(slot->host); in sdhci_pci_resume()
1322 ret = sdhci_runtime_suspend_host(slot->host); in sdhci_pci_runtime_suspend()
1338 sdhci_runtime_resume_host(chip->slots[i]->host); in sdhci_pci_runtime_suspend()
1364 ret = sdhci_runtime_resume_host(slot->host); in sdhci_pci_runtime_resume()
1397 struct sdhci_host *host; in sdhci_pci_probe_slot() local
1420 host = sdhci_alloc_host(&pdev->dev, sizeof(struct sdhci_pci_slot)); in sdhci_pci_probe_slot()
1421 if (IS_ERR(host)) { in sdhci_pci_probe_slot()
1423 return ERR_CAST(host); in sdhci_pci_probe_slot()
1426 slot = sdhci_priv(host); in sdhci_pci_probe_slot()
1429 slot->host = host; in sdhci_pci_probe_slot()
1451 host->hw_name = "PCI"; in sdhci_pci_probe_slot()
1452 host->ops = &sdhci_pci_ops; in sdhci_pci_probe_slot()
1453 host->quirks = chip->quirks; in sdhci_pci_probe_slot()
1454 host->quirks2 = chip->quirks2; in sdhci_pci_probe_slot()
1456 host->irq = pdev->irq; in sdhci_pci_probe_slot()
1458 ret = pci_request_region(pdev, bar, mmc_hostname(host->mmc)); in sdhci_pci_probe_slot()
1464 host->ioaddr = pci_ioremap_bar(pdev, bar); in sdhci_pci_probe_slot()
1465 if (!host->ioaddr) { in sdhci_pci_probe_slot()
1480 slot->host->mmc->caps |= MMC_CAP_HW_RESET; in sdhci_pci_probe_slot()
1488 host->mmc->pm_caps = MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ; in sdhci_pci_probe_slot()
1489 host->mmc->slotno = slotno; in sdhci_pci_probe_slot()
1490 host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP; in sdhci_pci_probe_slot()
1493 mmc_gpiod_request_cd(host->mmc, slot->cd_con_id, slot->cd_idx, in sdhci_pci_probe_slot()
1499 ret = sdhci_add_host(host); in sdhci_pci_probe_slot()
1524 iounmap(host->ioaddr); in sdhci_pci_probe_slot()
1534 sdhci_free_host(host); in sdhci_pci_probe_slot()
1547 scratch = readl(slot->host->ioaddr + SDHCI_INT_STATUS); in sdhci_pci_remove_slot()
1551 sdhci_remove_host(slot->host, dead); in sdhci_pci_remove_slot()
1564 sdhci_free_host(slot->host); in sdhci_pci_remove_slot()