Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/amlogic Reset device at attach and fix eMMC 1.8...



details:   https://anonhg.NetBSD.org/src/rev/cafa377562eb
branches:  trunk
changeset: 839676:cafa377562eb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Mar 03 12:54:58 2019 +0000

description:
Reset device at attach and fix eMMC 1.8V flags

diffstat:

 sys/arch/arm/amlogic/mesongx_mmc.c |  23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diffs (51 lines):

diff -r 154db1ed1816 -r cafa377562eb sys/arch/arm/amlogic/mesongx_mmc.c
--- a/sys/arch/arm/amlogic/mesongx_mmc.c        Sun Mar 03 12:54:07 2019 +0000
+++ b/sys/arch/arm/amlogic/mesongx_mmc.c        Sun Mar 03 12:54:58 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mesongx_mmc.c,v 1.1 2019/02/25 19:30:17 jmcneill Exp $ */
+/* $NetBSD: mesongx_mmc.c,v 1.2 2019/03/03 12:54:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mesongx_mmc.c,v 1.1 2019/02/25 19:30:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mesongx_mmc.c,v 1.2 2019/03/03 12:54:58 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -370,6 +370,9 @@
        }
        aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
+       if (sc->sc_pwrseq)
+               fdtbus_mmc_pwrseq_reset(sc->sc_pwrseq);
+
        config_interrupts(self, mesongx_mmc_attach_i);
 }
 
@@ -535,15 +538,13 @@
        if (of_getprop_bool(sc->sc_phandle, "cap-mmc-highspeed"))
                saa.saa_caps |= SMC_CAPS_MMC_HIGHSPEED;
 
-       if (sc->sc_reg_vqmmc != NULL) {
-               if (of_getprop_bool(sc->sc_phandle, "mmc-ddr-1_8v")) {
-                       saa.saa_caps |= SMC_CAPS_MMC_DDR52;
-                       sc->sc_host_ocr |= MMC_OCR_S18A;
-               }
-               if (of_getprop_bool(sc->sc_phandle, "mmc-hs200-1_8v")) {
-                       saa.saa_caps |= SMC_CAPS_MMC_HS200;
-                       sc->sc_host_ocr |= MMC_OCR_S18A;
-               }
+       if (of_getprop_bool(sc->sc_phandle, "mmc-ddr-1_8v")) {
+               saa.saa_caps |= SMC_CAPS_MMC_DDR52;
+               sc->sc_host_ocr |= MMC_OCR_1_65V_1_95V;
+       }
+       if (of_getprop_bool(sc->sc_phandle, "mmc-hs200-1_8v")) {
+               saa.saa_caps |= SMC_CAPS_MMC_HS200;
+               sc->sc_host_ocr |= MMC_OCR_1_65V_1_95V;
        }
 
        if (width == 4)



Home | Main Index | Thread Index | Old Index