diff options
Diffstat (limited to 'sys/dev/acpi/sdhc_acpi.c')
-rw-r--r-- | sys/dev/acpi/sdhc_acpi.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/acpi/sdhc_acpi.c b/sys/dev/acpi/sdhc_acpi.c index 0e3a633fa2b..17931f04ee7 100644 --- a/sys/dev/acpi/sdhc_acpi.c +++ b/sys/dev/acpi/sdhc_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc_acpi.c,v 1.19 2021/12/21 20:53:46 kettenis Exp $ */ +/* $OpenBSD: sdhc_acpi.c,v 1.20 2022/01/18 11:36:21 patrick Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -88,7 +88,7 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux) struct sdhc_acpi_softc *sc = (struct sdhc_acpi_softc *)self; struct acpi_attach_args *aaa = aux; struct aml_value res; - uint32_t cap, capmask; + uint64_t capmask, capset; sc->sc_acpi = (struct acpi_softc *)parent; sc->sc_node = aaa->aaa_node; @@ -135,13 +135,8 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux) sdhc_acpi_power_on(sc, sc->sc_node); sdhc_acpi_explore(sc); - cap = acpi_getpropint(sc->sc_node, "sdhci-caps", 0); capmask = acpi_getpropint(sc->sc_node, "sdhci-caps-mask", 0); - if (capmask != 0) { - cap = bus_space_read_4(sc->sc_memt, sc->sc_memh, - SDHC_CAPABILITIES); - cap &= ~capmask; - } + capset = acpi_getpropint(sc->sc_node, "sdhci-caps", 0); /* Raspberry Pi4 "emmc2" controller. */ if (strcmp(aaa->aaa_dev, "BRCME88C") == 0) @@ -152,7 +147,7 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc.sc_clkbase = acpi_getpropint(sc->sc_node, "clock-frequency", 0) / 1000; sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, - aaa->aaa_size[0], 1, cap); + aaa->aaa_size[0], 1, capmask, capset); } int |