mmc: Add some flags for Intel host controllers
Adrian Hunter
maintainercover mmc: Add some flags for Intel host controllers
Hi
Here are some patches to add some flags for Intel
host controllers.
Adrian Hunter (4):
mmc: sdhci-pci: Add SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC to BYT
mmc: sdhci-acpi: Add SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
mmc: sdhci-pci: Add two host capabilities for BYT
mmc: sdhci-acpi: Add two host capabilities for Intel
Regards
Adrian
Adrian Hunter
maintainerPATCH 1/4 mmc: sdhci-pci: Add SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC to BYT
SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC actually causes standard-compliant behaviour by causing the flagging of the last DMA transfer descriptor as the end instead of there being an additional nop descriptor which is flagged as the end. Consequently, it is better to have the quirk. Add it for BYT.
--- drivers/mmc/host/sdhci-pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-pci.c +3 -0
@@ -294,11 +294,13 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = { .allow_runtime_pm = true, .probe_slot = byt_emmc_probe_slot, + .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .quirks2 =SDHCI_QUIRK2_PRESET_VALUE_BROKEN |SDHCI_QUIRK2_STOP_WITH_TC , };static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = { + .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .quirks2 =SDHCI_QUIRK2_HOST_OFF_CARD_ON |SDHCI_QUIRK2_PRESET_VALUE_BROKEN , .allow_runtime_pm = true,
@@ -306,6 +308,7 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = { };static const struct sdhci_pci_fixes sdhci_intel_byt_sd = { + .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .quirks2 =SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |SDHCI_QUIRK2_PRESET_VALUE_BROKEN |SDHCI_QUIRK2_STOP_WITH_TC ,
Signature · 1 line
1.9.1
Adrian Hunter
maintainerPATCH 2/4 mmc: sdhci-acpi: Add SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
In reply to Adrian HunterSDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC actually causes standard-compliant behaviour by causing the flagging of the last DMA transfer descriptor as the end instead of there being an additional nop descriptor which is flagged as the end. Consequently, it is better to have the quirk.
--- drivers/mmc/host/sdhci-acpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-acpi.c +4 -1
@@ -206,12 +206,14 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = { MMC_CAP_HW_RESET | MMC_CAP_1_8V_DDR, .caps2 = MMC_CAP2_HC_ERASE_SZ, .flags = SDHCI_ACPI_RUNTIME_PM, + .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | SDHCI_QUIRK2_STOP_WITH_TC, .probe_slot = sdhci_acpi_emmc_probe_slot, };static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = { - .quirks =SDHCI_QUIRK_BROKEN_CARD_DETECTION , + .quirks =SDHCI_QUIRK_BROKEN_CARD_DETECTION | +SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .quirks2 =SDHCI_QUIRK2_HOST_OFF_CARD_ON , .caps =MMC_CAP_NONREMOVABLE |MMC_CAP_POWER_OFF_CARD , .flags =SDHCI_ACPI_RUNTIME_PM ,
@@ -222,6 +224,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = { .flags =SDHCI_ACPI_SD_CD |SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL |SDHCI_ACPI_RUNTIME_PM , + .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC , .quirks2 =SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |SDHCI_QUIRK2_STOP_WITH_TC , .probe_slot = sdhci_acpi_sd_probe_slot,
Signature · 1 line
1.9.1
Adrian Hunter
maintainerPATCH 3/4 mmc: sdhci-pci: Add two host capabilities for BYT
In reply to Adrian HunterBYT host controllers are capable of doing the bus
width test and of waiting while busy, so add the
capability flags.
--- drivers/mmc/host/sdhci-pci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-pci.c +8 -2
@@ -269,7 +269,9 @@ static void sdhci_pci_int_hw_reset(struct sdhci_host *host)static int byt_emmc_probe_slot (struct sdhci_pci_slot *slot) { slot->host->mmc->caps |=MMC_CAP_8_BIT_DATA |MMC_CAP_NONREMOVABLE | -MMC_CAP_HW_RESET |MMC_CAP_1_8V_DDR ; +MMC_CAP_HW_RESET |MMC_CAP_1_8V_DDR | +MMC_CAP_BUS_WIDTH_TEST | +MMC_CAP_WAIT_WHILE_BUSY ; slot->host->mmc->caps2 |=MMC_CAP2_HC_ERASE_SZ ; slot->hw_reset = sdhci_pci_int_hw_reset;if (slot->chip->pdev->device ==PCI_DEVICE_ID_INTEL_BSW_EMMC )
@@ -279,12 +281,16 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)static int byt_sdio_probe_slot (struct sdhci_pci_slot *slot) { - slot->host->mmc->caps |=MMC_CAP_POWER_OFF_CARD |MMC_CAP_NONREMOVABLE ; + slot->host->mmc->caps |=MMC_CAP_POWER_OFF_CARD |MMC_CAP_NONREMOVABLE | +MMC_CAP_BUS_WIDTH_TEST | +MMC_CAP_WAIT_WHILE_BUSY ;return 0 ; }static int byt_sd_probe_slot (struct sdhci_pci_slot *slot) { + slot->host->mmc->caps |=MMC_CAP_BUS_WIDTH_TEST | +MMC_CAP_WAIT_WHILE_BUSY ; slot->cd_con_id =NULL ; slot->cd_idx =0 ; slot->cd_override_level = true;
Signature · 1 line
1.9.1
Adrian Hunter
maintainerPATCH 4/4 mmc: sdhci-acpi: Add two host capabilities for Intel
In reply to Adrian HunterIntel host controllers are capable of doing the bus width test and of waiting while busy, so add the capability flags.
--- drivers/mmc/host/sdhci-acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-acpi.c +5 -2
@@ -203,7 +203,8 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = { .chip = &sdhci_acpi_chip_int, .caps =MMC_CAP_8_BIT_DATA |MMC_CAP_NONREMOVABLE | -MMC_CAP_HW_RESET |MMC_CAP_1_8V_DDR , +MMC_CAP_HW_RESET |MMC_CAP_1_8V_DDR | +MMC_CAP_BUS_WIDTH_TEST |MMC_CAP_WAIT_WHILE_BUSY , .caps2 =MMC_CAP2_HC_ERASE_SZ , .flags =SDHCI_ACPI_RUNTIME_PM , .quirks =SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC ,
@@ -215,7 +216,8 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = { .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON, - .caps = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD, + .caps =MMC_CAP_NONREMOVABLE |MMC_CAP_POWER_OFF_CARD | + MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_WAIT_WHILE_BUSY, .flags = SDHCI_ACPI_RUNTIME_PM, .pm_caps = MMC_PM_KEEP_POWER, .probe_slot = sdhci_acpi_sdio_probe_slot,
@@ -227,6 +229,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = { .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON | SDHCI_QUIRK2_STOP_WITH_TC, + .caps = MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_WAIT_WHILE_BUSY, .probe_slot = sdhci_acpi_sd_probe_slot, };
Signature · 1 line
1.9.1
Ulf Hansson
AppliedQuoted 11 lines · Adrian Hunter
Hi
Here are some patches to add some flags for Intel
host controllers.Adrian Hunter (4):
mmc: sdhci-pci: AddSDHCI_QUIRK_NO_ENDATTR_IN_NOPDESCto BYT
mmc: sdhci-acpi: AddSDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
mmc: sdhci-pci: Add two host capabilities for BYT
mmc: sdhci-acpi: Add two host capabilities for Intel
Thanks! Applied for next.
Kind regards
Uffe