Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi acpi: sdhc: Read caps2 even if sdhci-caps{,-mas...
details: https://anonhg.NetBSD.org/src/rev/98f664a0562f
branches: trunk
changeset: 359651:98f664a0562f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jan 15 15:54:40 2022 +0000
description:
acpi: sdhc: Read caps2 even if sdhci-caps{,-mask} doesn't touch the bits
SDHC_FLAG_HOSTCAPS means that the driver has to supply both caps and caps2
values.
diffstat:
sys/dev/acpi/sdhc_acpi.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diffs (35 lines):
diff -r 09479a4f1476 -r 98f664a0562f sys/dev/acpi/sdhc_acpi.c
--- a/sys/dev/acpi/sdhc_acpi.c Sat Jan 15 15:37:15 2022 +0000
+++ b/sys/dev/acpi/sdhc_acpi.c Sat Jan 15 15:54:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $ */
+/* $NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $ */
/*
* Copyright (c) 2016 Kimihiro Nonaka <nonaka%NetBSD.org@localhost>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -252,12 +252,10 @@
SDHC_CAPABILITIES);
sc->sc.sc_caps &= ~(caps_mask & 0xffffffff);
sc->sc.sc_caps |= (caps & 0xffffffff);
- if (((caps | caps_mask) >> 32) != 0) {
- sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt,
- sc->sc_memh, SDHC_CAPABILITIES2);
- sc->sc.sc_caps2 &= ~(caps_mask >> 32);
- sc->sc.sc_caps2 |= (caps >> 32);
- }
+ sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt,
+ sc->sc_memh, SDHC_CAPABILITIES2);
+ sc->sc.sc_caps2 &= ~(caps_mask >> 32);
+ sc->sc.sc_caps2 |= (caps >> 32);
sc->sc.sc_flags |= SDHC_FLAG_HOSTCAPS;
}
Home |
Main Index |
Thread Index |
Old Index