Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt Match generic "snps,dw-mshc" compat string as fo...



details:   https://anonhg.NetBSD.org/src/rev/1fffe40dac0c
branches:  trunk
changeset: 960635:1fffe40dac0c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Mar 23 22:27:38 2021 +0000

description:
Match generic "snps,dw-mshc" compat string as found in BeagleV.

diffstat:

 sys/dev/fdt/dwcmmc_fdt.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 12c2773991a0 -r 1fffe40dac0c sys/dev/fdt/dwcmmc_fdt.c
--- a/sys/dev/fdt/dwcmmc_fdt.c  Tue Mar 23 22:02:44 2021 +0000
+++ b/sys/dev/fdt/dwcmmc_fdt.c  Tue Mar 23 22:27:38 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcmmc_fdt.c,v 1.16 2021/01/27 03:10:21 thorpej Exp $ */
+/* $NetBSD: dwcmmc_fdt.c,v 1.17 2021/03/23 22:27:38 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.16 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.17 2021/03/23 22:27:38 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -66,8 +66,14 @@
        .intr_cardmask = __BIT(24),
 };
 
+static const struct dwmmc_fdt_config dwmmc_default_config = {
+       .flags = DWC_MMC_F_USE_HOLD_REG |
+                DWC_MMC_F_DMA,
+};
+
 static const struct device_compatible_entry compat_data[] = {
        { .compat = "rockchip,rk3288-dw-mshc",  .data = &dwcmmc_rk3288_config },
+       { .compat = "snps,dw-mshc",             .data = &dwmmc_default_config },
        DEVICE_COMPAT_EOL
 };
 
@@ -158,7 +164,7 @@
                sc->sc_bus_width = 4;
 
        sc->sc_fifo_depth = fifo_depth;
-       sc->sc_intr_cardmask = esc->sc_conf->intr_cardmask;
+       sc->sc_entr_cardmask = esc->sc_conf->intr_cardmask;
        sc->sc_ciu_div = esc->sc_conf->ciu_div;
        sc->sc_flags = esc->sc_conf->flags;
        sc->sc_pre_power_on = dwcmmc_fdt_pre_power_on;



Home | Main Index | Thread Index | Old Index