Skip to contentSkip to conversation

mmc: sdhci-acpi: Remove unneeded acpi_bus_get_status() call

PATCH RESEND Superseded Hans de Goede 1 participant 2 messages Mar 26, 2017

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#1 lore raw

PATCH RESEND v2 2/2 mmc: sdhci-acpi: Sync quirks with sdhci_intel_byt_* from sdhci-pci-core.c

In reply to Hans de Goede

The sdhci_intel_byt_* and the non _qcom_ sdhci_acpi_slot_ entries in sdhci-acpi.c are for the same mmc host in either pci or acpi mapped mode, so the flags should be the same.

The syncing removes the SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk from sdhci_acpi_slot_int_sdio, this quirk is a nop as this slot also has MMC_CAP_NONREMOVABLE, and adds SDHCI_QUIRK2_PRESET_VALUE_BROKEN to sdhci_acpi_slot_int_sdio and sdhci_acpi_slot_int_sd. Note that sdhci_acpi_slot_int_mmc already has the SDHCI_QUIRK2_PRESET_VALUE_BROKEN quirk, which is another indication that the others need it too.

---
 drivers/mmc/host/sdhci-acpi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mmc/host/sdhci-acpi.c +4 -3
index ae00e4c..9fd8d7a 100644
@@ -286,9 +286,9 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_emmc = {
 };
 
 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,
+	.quirks  = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON |
+		   SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
 	.caps    = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD |
 		   MMC_CAP_WAIT_WHILE_BUSY,
 	.flags   = SDHCI_ACPI_RUNTIME_PM,
@@ -301,6 +301,7 @@ static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sd = {
 		   SDHCI_ACPI_RUNTIME_PM,
 	.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,
 	.caps    = MMC_CAP_WAIT_WHILE_BUSY,
 	.probe_slot	= sdhci_acpi_sd_probe_slot,
Signature · 1 line
2.9.3
#0 lore raw

PATCH RESEND v2 1/2 mmc: sdhci-acpi: Remove unneeded acpi_bus_get_status() call

The acpi-subsys already calls acpi_bus_get_status() and checks that device->status.present is set before even registering the platform_device so out probe function will never get called if device->status.present is false and there is no need for this check.

---
Changes in v2:
-This is a new patch replacing "mmc: sdhci-acpi: Check device status
before calling fix_up_power()"

---
 drivers/mmc/host/sdhci-acpi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/mmc/host/sdhci-acpi.c +0 -3
index 9dcb704..ae00e4c 100644
@@ -398,9 +398,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 		if (child->status.present && child->status.enabled)
 			acpi_device_fix_up_power(child);
 
-	if (acpi_bus_get_status(device) || !device->status.present)
-		return -ENODEV;
-
 	if (sdhci_acpi_byt_defer(dev))
 		return -EPROBE_DEFER;
 
Signature · 1 line
2.9.3