Skip to contentSkip to conversation

mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

PATCH Superseded Azhar Shaikh 3 participants 8 messages Mar 28, 2017 – Mar 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

---
 drivers/mmc/host/sdhci-acpi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-acpi.c +2 -4
index 9dcb704..a15d237 100644
@@ -263,10 +263,8 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 
 	/* Platform specific code during sd probe slot goes here */
 
-	if (hid && !strcmp(hid, "80865ACA")) {
+	if (hid && !strcmp(hid, "80865ACA"))
 		host->mmc_host_ops.get_cd = bxt_get_cd;
-		host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
-	}
 
 	return 0;
 }
@@ -302,7 +300,7 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 	.quirks  = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
 		   SDHCI_QUIRK2_STOP_WITH_TC,
-	.caps    = MMC_CAP_WAIT_WHILE_BUSY,
+	.caps    = MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_AGGRESSIVE_PM,
 	.probe_slot	= sdhci_acpi_sd_probe_slot,
 };
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

---
 drivers/mmc/host/sdhci-pci-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +3 -4
index 86560d5..4a58a80 100644
@@ -423,16 +423,15 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)
 
 static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 {
-	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
+	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY |
+				 MMC_CAP_AGGRESSIVE_PM;
 	slot->cd_idx = 0;
 	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_GLK_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;
-	}
 
 	return 0;
 }
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/2 mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

In reply to Azhar Shaikh

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-acpi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-acpi.c +2 -4
index 665c5f3..c6a9a1b 100644
@@ -263,10 +263,8 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 
 	/* Platform specific code during sd probe slot goes here */
 
-	if (hid && !strcmp(hid, "80865ACA")) {
+	if (hid && !strcmp(hid, "80865ACA"))
 		host->mmc_host_ops.get_cd = bxt_get_cd;
-		host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
-	}
 
 	return 0;
 }
@@ -302,7 +300,7 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 	.quirks  = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
 		   SDHCI_QUIRK2_STOP_WITH_TC,
-	.caps    = MMC_CAP_WAIT_WHILE_BUSY,
+	.caps    = MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_AGGRESSIVE_PM,
 	.probe_slot	= sdhci_acpi_sd_probe_slot,
 };
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH v2 2/2 mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-pci-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +3 -4
index 6c0440e..833072b 100644
@@ -630,16 +630,15 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)
 static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 {
 	byt_read_dsm(slot);
-	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
+	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY |
+				 MMC_CAP_AGGRESSIVE_PM;
 	slot->cd_idx = 0;
 	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_GLK_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;
-	}
 
 	return 0;
 }
Signature · 1 line
1.9.1
maintainer Acked-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

Quoted 4 lines · Azhar Shaikh

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

Quoted 33 lines

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-pci-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +3 -4
index 6c0440e..833072b 100644
@@ -630,16 +630,15 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)
 static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 {
 	byt_read_dsm(slot);
-	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
+	slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY |
+				 MMC_CAP_AGGRESSIVE_PM;
 	slot->cd_idx = 0;
 	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_GLK_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;
-	}
 
 	return 0;
 }
maintainer Acked-by on v2 1/2
#6 lore raw
In reply to Azhar Shaikh
Quoted 4 lines · Azhar Shaikh

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

Quoted 34 lines

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-acpi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-acpi.c +2 -4
index 665c5f3..c6a9a1b 100644
@@ -263,10 +263,8 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 
 	/* Platform specific code during sd probe slot goes here */
 
-	if (hid && !strcmp(hid, "80865ACA")) {
+	if (hid && !strcmp(hid, "80865ACA"))
 		host->mmc_host_ops.get_cd = bxt_get_cd;
-		host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
-	}
 
 	return 0;
 }
@@ -302,7 +300,7 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 	.quirks  = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
 		   SDHCI_QUIRK2_STOP_WITH_TC,
-	.caps    = MMC_CAP_WAIT_WHILE_BUSY,
+	.caps    = MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_AGGRESSIVE_PM,
 	.probe_slot	= sdhci_acpi_sd_probe_slot,
 };
 
Applied
#5 lore raw

Re: [PATCH v2 2/2] mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

In reply to Azhar Shaikh
Quoted 4 lines · Azhar Shaikh

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

Thanks, applied for next!

Kind regards
Uffe

Quoted 35 lines

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-pci-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-pci-core.c +3 -5
index 6c0440e..833072b 100644
@@ -630,16 +630,15 @@ static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)
 static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
 {
        byt_read_dsm(slot);
-       slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
+       slot->host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY |
+                                MMC_CAP_AGGRESSIVE_PM;
        slot->cd_idx = 0;
        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_GLK_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;
-       }
 
        return 0;
 }
--

1.9.1

Applied
#7 lore raw
In reply to Azhar Shaikh
Quoted 4 lines · Azhar Shaikh

Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers.

Thanks, applied for next!

Kind regards
Uffe

Quoted 36 lines

---
Changes in v2:
- Rebased the patch on top of 'next' branch.
- No code change.

 drivers/mmc/host/sdhci-acpi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-acpi.c +2 -5
index 665c5f3..c6a9a1b 100644
@@ -263,10 +263,8 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
 
        /* Platform specific code during sd probe slot goes here */
 
-       if (hid && !strcmp(hid, "80865ACA")) {
+       if (hid && !strcmp(hid, "80865ACA"))
                host->mmc_host_ops.get_cd = bxt_get_cd;
-               host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
-       }
 
        return 0;
 }
@@ -302,7 +300,7 @@ static int sdhci_acpi_sd_probe_slot(struct platform_device *pdev,
        .quirks  = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
        .quirks2 = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON |
                   SDHCI_QUIRK2_STOP_WITH_TC,
-       .caps    = MMC_CAP_WAIT_WHILE_BUSY,
+       .caps    = MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_AGGRESSIVE_PM,
        .probe_slot     = sdhci_acpi_sd_probe_slot,
 };
 
--

1.9.1