Skip to content

Commit 8339abf

Browse files
jwrdegoederafaeljw
authored andcommitted
mmc: sdhci-acpi: Remove special handling for GPD win/pocket devices
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> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b72cd8e commit 8339abf

1 file changed

Lines changed: 3 additions & 58 deletions

File tree

drivers/mmc/host/sdhci-acpi.c

Lines changed: 3 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <asm/cpu_device_id.h>
3535
#include <asm/intel-family.h>
3636
#include <asm/iosf_mbi.h>
37-
#include <linux/pci.h>
3837
#endif
3938

4039
#include "sdhci.h"
@@ -250,16 +249,6 @@ static bool sdhci_acpi_byt(void)
250249
return x86_match_cpu(byt);
251250
}
252251

253-
static bool sdhci_acpi_cht(void)
254-
{
255-
static const struct x86_cpu_id cht[] = {
256-
X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT, NULL),
257-
{}
258-
};
259-
260-
return x86_match_cpu(cht);
261-
}
262-
263252
#define BYT_IOSF_SCCEP 0x63
264253
#define BYT_IOSF_OCP_NETCTRL0 0x1078
265254
#define BYT_IOSF_OCP_TIMEOUT_BASE GENMASK(10, 8)
@@ -304,43 +293,6 @@ static bool sdhci_acpi_byt_defer(struct device *dev)
304293
return false;
305294
}
306295

307-
static bool sdhci_acpi_cht_pci_wifi(unsigned int vendor, unsigned int device,
308-
unsigned int slot, unsigned int parent_slot)
309-
{
310-
struct pci_dev *dev, *parent, *from = NULL;
311-
312-
while (1) {
313-
dev = pci_get_device(vendor, device, from);
314-
pci_dev_put(from);
315-
if (!dev)
316-
break;
317-
parent = pci_upstream_bridge(dev);
318-
if (ACPI_COMPANION(&dev->dev) && PCI_SLOT(dev->devfn) == slot &&
319-
parent && PCI_SLOT(parent->devfn) == parent_slot &&
320-
!pci_upstream_bridge(parent)) {
321-
pci_dev_put(dev);
322-
return true;
323-
}
324-
from = dev;
325-
}
326-
327-
return false;
328-
}
329-
330-
/*
331-
* GPDwin uses PCI wifi which conflicts with SDIO's use of
332-
* acpi_device_fix_up_power() on child device nodes. Identifying GPDwin is
333-
* problematic, but since SDIO is only used for wifi, the presence of the PCI
334-
* wifi card in the expected slot with an ACPI companion node, is used to
335-
* indicate that acpi_device_fix_up_power() should be avoided.
336-
*/
337-
static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
338-
{
339-
return sdhci_acpi_cht() &&
340-
acpi_dev_hid_uid_match(adev, "80860F14", "2") &&
341-
sdhci_acpi_cht_pci_wifi(0x14e4, 0x43ec, 0, 28);
342-
}
343-
344296
#else
345297

346298
static inline void sdhci_acpi_byt_setting(struct device *dev)
@@ -352,11 +304,6 @@ static inline bool sdhci_acpi_byt_defer(struct device *dev)
352304
return false;
353305
}
354306

355-
static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
356-
{
357-
return false;
358-
}
359-
360307
#endif
361308

362309
static int bxt_get_cd(struct mmc_host *mmc)
@@ -861,11 +808,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
861808

862809
/* Power on the SDHCI controller and its children */
863810
acpi_device_fix_up_power(device);
864-
if (!sdhci_acpi_no_fixup_child_power(device)) {
865-
list_for_each_entry(child, &device->children, node)
866-
if (child->status.present && child->status.enabled)
867-
acpi_device_fix_up_power(child);
868-
}
811+
list_for_each_entry(child, &device->children, node)
812+
if (child->status.present && child->status.enabled)
813+
acpi_device_fix_up_power(child);
869814

870815
if (sdhci_acpi_byt_defer(dev))
871816
return -EPROBE_DEFER;

0 commit comments

Comments
 (0)