mmc: sdhci-pci: Add GLK support and misc
Adrian Hunter
maintainercover mmc: sdhci-pci: Add GLK support and misc
Hi
Here are a couple of small patches.
Adrian Hunter (1):
mmc: sdhci-pci: Add support for Intel GLK
David E. Box (1):
mmc: sdhci-pci: Allow deferred probe for sd card detect gpio
drivers/mmc/host/sdhci-pci-core.c | 42 +++++++++++++++++++++++++++++++++------ drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 39 insertions(+), 6 deletions(-)
Regards
Adrian
Adrian Hunter
maintainerPATCH 1/2 mmc: sdhci-pci: Add support for Intel GLK
Add support for eMMC/SD/SDIO Intel GLK host controllers.
--- drivers/mmc/host/sdhci-pci-core.c | 27 ++++++++++++++++++++++++++- drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 29 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci-core.c +26 -1
@@ -390,7 +390,8 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot) slot->cd_override_level = true;if (slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_BXT_SD || slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_BXTM_SD || - slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_APL_SD ) { + slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_APL_SD || + slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_GLK_SD ) { slot->host->mmc_host_ops.get_cd = bxt_get_cd; slot->host->mmc->caps |=MMC_CAP_AGGRESSIVE_PM ; }
@@ -1277,6 +1278,30 @@ static int amd_probe(struct sdhci_pci_chip *chip) }, { + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_GLK_EMMC, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (kernel_ulong_t)&sdhci_intel_byt_emmc, + }, + + { + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_GLK_SDIO, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (kernel_ulong_t)&sdhci_intel_byt_sdio, + }, + + { + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_GLK_SD, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (kernel_ulong_t)&sdhci_intel_byt_sd, + }, + + { .vendor = PCI_VENDOR_ID_O2, .device = PCI_DEVICE_ID_O2_8120, .subvendor = PCI_ANY_ID,
drivers/mmc/host/sdhci-pci.h +3 -0
@@ -34,6 +34,9 @@#define PCI_DEVICE_ID_INTEL_APL_SD 0x5aca#define PCI_DEVICE_ID_INTEL_APL_EMMC 0x5acc#define PCI_DEVICE_ID_INTEL_APL_SDIO 0x5ad0 +#define PCI_DEVICE_ID_INTEL_GLK_SD 0x31ca +#define PCI_DEVICE_ID_INTEL_GLK_EMMC 0x31cc +#define PCI_DEVICE_ID_INTEL_GLK_SDIO 0x31d0/* * PCI registers
Signature · 1 line
1.9.1
Adrian Hunter
maintainerPATCH 2/2 mmc: sdhci-pci: Allow deferred probe for sd card detect gpio
In reply to Adrian HunterFrom: "David E. Box" <[email protected]>
With commit f35bbf61ab77 ("gpio / ACPI: Return -EPROBE_DEFER if the gpiochip was not found"), a gpio descriptor request can now be deferred if the providing gpio host controller driver hasn't been loaded yet. Allow use in mmc slot probe in order to prevent card detect gpio setup from failing in this case.
--- drivers/mmc/host/sdhci-pci-core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +10 -5
@@ -1760,11 +1760,16 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host->mmc->slotno = slotno; host->mmc->caps2 |=MMC_CAP2_NO_PRESCAN_POWERUP ; -if (slot->cd_idx >=0 && -mmc_gpiod_request_cd (host->mmc, slot->cd_con_id, slot->cd_idx, - slot->cd_override_level,0 ,NULL )) { -dev_warn (&pdev->dev,"failed to setup card detect gpio\n" ); - slot->cd_idx =-1 ; +if (slot->cd_idx >=0 ) { + ret =mmc_gpiod_request_cd (host->mmc, slot->cd_con_id, slot->cd_idx, + slot->cd_override_level,0 ,NULL ); +if (ret == -EPROBE_DEFER ) + goto remove; + +if (ret) { +dev_warn (&pdev->dev,"failed to setup card detect gpio\n" ); + slot->cd_idx =-1 ; + } } ret =sdhci_add_host (host);
Signature · 1 line
1.9.1
Ulf Hansson
AppliedQuoted 8 lines · Adrian Hunter
Hi
Here are a couple of small patches.
Adrian Hunter (1):
mmc: sdhci-pci: Add support for Intel GLK
Quoted 7 lines
David E. Box (1):
mmc: sdhci-pci: Allow deferred probe for sd card detect gpiodrivers/mmc/host/sdhci-pci-core.c | 42 +++++++++++++++++++++++++++++++++------ drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 39 insertions(+), 6 deletions(-)
Thanks, applied for next!
Kind regards
Uffe