From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: [PATCH v2 6/7] mmc: sdhci-acpi: Remove special handling for GPD win/pocket devices
Date: Mon, 22 Nov 2021 18:05:35 +0100 [thread overview]
Message-ID: <20211122170536.7725-7-hdegoede@redhat.com> (raw)
In-Reply-To: <20211122170536.7725-1-hdegoede@redhat.com>
Remove the special sdhci_acpi_no_fixup_child_power() helper which was
added to avoid triggering an ACPI tables bug on the GPD win/pocket
devices.
The ACPI child-device triggering this bug has now been added to the
acpi_device_override_status() quirk table, so that its status
field is set to all 0 (instead of the wrong return value from the _STA
ACPI method). This removes the need for the special handling in
the sdhci-acpi code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- No changes in v2 of this patch-series
---
drivers/mmc/host/sdhci-acpi.c | 61 ++---------------------------------
1 file changed, 3 insertions(+), 58 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index f1ef0d28b0dd..1461aae13c19 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -34,7 +34,6 @@
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/iosf_mbi.h>
-#include <linux/pci.h>
#endif
#include "sdhci.h"
@@ -250,16 +249,6 @@ static bool sdhci_acpi_byt(void)
return x86_match_cpu(byt);
}
-static bool sdhci_acpi_cht(void)
-{
- static const struct x86_cpu_id cht[] = {
- X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT, NULL),
- {}
- };
-
- return x86_match_cpu(cht);
-}
-
#define BYT_IOSF_SCCEP 0x63
#define BYT_IOSF_OCP_NETCTRL0 0x1078
#define BYT_IOSF_OCP_TIMEOUT_BASE GENMASK(10, 8)
@@ -304,43 +293,6 @@ static bool sdhci_acpi_byt_defer(struct device *dev)
return false;
}
-static bool sdhci_acpi_cht_pci_wifi(unsigned int vendor, unsigned int device,
- unsigned int slot, unsigned int parent_slot)
-{
- struct pci_dev *dev, *parent, *from = NULL;
-
- while (1) {
- dev = pci_get_device(vendor, device, from);
- pci_dev_put(from);
- if (!dev)
- break;
- parent = pci_upstream_bridge(dev);
- if (ACPI_COMPANION(&dev->dev) && PCI_SLOT(dev->devfn) == slot &&
- parent && PCI_SLOT(parent->devfn) == parent_slot &&
- !pci_upstream_bridge(parent)) {
- pci_dev_put(dev);
- return true;
- }
- from = dev;
- }
-
- return false;
-}
-
-/*
- * GPDwin uses PCI wifi which conflicts with SDIO's use of
- * acpi_device_fix_up_power() on child device nodes. Identifying GPDwin is
- * problematic, but since SDIO is only used for wifi, the presence of the PCI
- * wifi card in the expected slot with an ACPI companion node, is used to
- * indicate that acpi_device_fix_up_power() should be avoided.
- */
-static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
-{
- return sdhci_acpi_cht() &&
- acpi_dev_hid_uid_match(adev, "80860F14", "2") &&
- sdhci_acpi_cht_pci_wifi(0x14e4, 0x43ec, 0, 28);
-}
-
#else
static inline void sdhci_acpi_byt_setting(struct device *dev)
@@ -352,11 +304,6 @@ static inline bool sdhci_acpi_byt_defer(struct device *dev)
return false;
}
-static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
-{
- return false;
-}
-
#endif
static int bxt_get_cd(struct mmc_host *mmc)
@@ -861,11 +808,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
/* Power on the SDHCI controller and its children */
acpi_device_fix_up_power(device);
- if (!sdhci_acpi_no_fixup_child_power(device)) {
- list_for_each_entry(child, &device->children, node)
- if (child->status.present && child->status.enabled)
- acpi_device_fix_up_power(child);
- }
+ list_for_each_entry(child, &device->children, node)
+ if (child->status.present && child->status.enabled)
+ acpi_device_fix_up_power(child);
if (sdhci_acpi_byt_defer(dev))
return -EPROBE_DEFER;
--
2.33.1
next prev parent reply other threads:[~2021-11-22 17:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 17:05 [PATCH v2 0/7] ACPI: acpi_device_override_status() changes Hans de Goede
2021-11-22 17:05 ` [PATCH v2 1/7] ACPI / x86: Drop PWM2 device on Lenovo Yoga Book from always present table Hans de Goede
2021-11-22 17:05 ` [PATCH v2 2/7] ACPI: Change acpi_device_always_present() into acpi_device_override_status() Hans de Goede
2021-11-22 17:05 ` [PATCH v2 3/7] ACPI / x86: Allow specifying acpi_device_override_status() quirks by path Hans de Goede
2021-11-22 17:05 ` [PATCH v2 4/7] ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win Hans de Goede
2021-11-22 17:05 ` [PATCH v2 5/7] ACPI / x86: Add PWM2 on the Xiaomi Mi Pad 2 to the always_present list Hans de Goede
2021-11-22 17:05 ` Hans de Goede [this message]
2021-11-24 15:16 ` [PATCH v2 6/7] mmc: sdhci-acpi: Remove special handling for GPD win/pocket devices Adrian Hunter
2021-11-22 17:05 ` [PATCH v2 7/7] mmc: sdhci-acpi: Use the new soc_intel_is_byt() helper Hans de Goede
2021-11-24 15:16 ` Adrian Hunter
2021-11-23 11:13 ` [PATCH v2 0/7] ACPI: acpi_device_override_status() changes Ulf Hansson
2021-11-23 14:33 ` Hans de Goede
2021-11-25 9:51 ` Adrian Hunter
2021-12-01 19:15 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211122170536.7725-7-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox