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: Ignore clkbase register if clock-fr...



details:   https://anonhg.NetBSD.org/src/rev/f4a94490f1b7
branches:  trunk
changeset: 1029241:f4a94490f1b7
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Dec 28 13:41:12 2021 +0000

description:
acpi: sdhc: Ignore clkbase register if clock-frequency property is present

diffstat:

 sys/dev/acpi/sdhc_acpi.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 0e6e54f1b461 -r f4a94490f1b7 sys/dev/acpi/sdhc_acpi.c
--- a/sys/dev/acpi/sdhc_acpi.c  Tue Dec 28 13:28:24 2021 +0000
+++ b/sys/dev/acpi/sdhc_acpi.c  Tue Dec 28 13:41:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc_acpi.c,v 1.14 2020/02/01 20:11:24 tnn Exp $       */
+/*     $NetBSD: sdhc_acpi.c,v 1.15 2021/12/28 13:41:12 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.14 2020/02/01 20:11:24 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.15 2021/12/28 13:41:12 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -211,8 +211,10 @@
        /* Read clock frequency from device properties */
        rv = acpi_dsd_integer(aa->aa_node->ad_handle, "clock-frequency",
            &clock_freq);
-       if (ACPI_SUCCESS(rv))
+       if (ACPI_SUCCESS(rv)) {
                sc->sc.sc_clkbase = clock_freq / 1000;
+               sc->sc.sc_flags |= SDHC_FLAG_NO_CLKBASE;
+       }
 
        if (sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh,
            sc->sc_memsize) != 0) {



Home | Main Index | Thread Index | Old Index