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: dwcmmc: Honour broken-cd and non-removabl...
details: https://anonhg.NetBSD.org/src/rev/b19ff80a4218
branches: trunk
changeset: 359991:b19ff80a4218
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Feb 06 15:48:12 2022 +0000
description:
acpi: dwcmmc: Honour broken-cd and non-removable DSD properties
diffstat:
sys/dev/acpi/dwcmmc_acpi.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r fe9bd847f40d -r b19ff80a4218 sys/dev/acpi/dwcmmc_acpi.c
--- a/sys/dev/acpi/dwcmmc_acpi.c Sun Feb 06 15:47:06 2022 +0000
+++ b/sys/dev/acpi/dwcmmc_acpi.c Sun Feb 06 15:48:12 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcmmc_acpi.c,v 1.1 2022/01/09 15:05:16 jmcneill Exp $ */
+/* $NetBSD: dwcmmc_acpi.c,v 1.2 2022/02/06 15:48:12 jmcneill Exp $ */
/*-
* Copyright (c) 2022 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwcmmc_acpi.c,v 1.1 2022/01/09 15:05:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcmmc_acpi.c,v 1.2 2022/02/06 15:48:12 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -149,6 +149,7 @@
dwcmmc_acpi_init_props(struct dwc_mmc_softc *sc, ACPI_HANDLE handle)
{
ACPI_INTEGER ival;
+ bool bval;
/* Defaults */
sc->sc_fifo_depth = 0;
@@ -165,6 +166,16 @@
if (ACPI_SUCCESS(acpi_dsd_integer(handle, "bus-width", &ival))) {
sc->sc_bus_width = ival;
}
+ bval = false;
+ acpi_dsd_bool(handle, "non-removable", &bval);
+ if (bval) {
+ sc->sc_flags |= DWC_MMC_F_NON_REMOVABLE;
+ }
+ bval = false;
+ acpi_dsd_bool(handle, "broken-cd", &bval);
+ if (bval) {
+ sc->sc_flags |= DWC_MMC_F_BROKEN_CD;
+ }
if (sc->sc_clock_freq == 0 || sc->sc_clock_freq == UINT_MAX) {
aprint_error_dev(sc->sc_dev, "clock frequency not specified\n");
Home |
Main Index |
Thread Index |
Old Index