Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch Pull up following revision(s) (requested by jmcn...



details:   https://anonhg.NetBSD.org/src/rev/6587b177ac23
branches:  netbsd-9
changeset: 843647:6587b177ac23
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Dec 09 16:01:11 2019 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #529):

        sys/arch/evbarm/conf/std.generic64: revision 1.12
        sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.8

Define __BUS_SPACE_HAS_PROBING_METHODS
Use bus_space_{peek,poke}_4 for pci conf reg access.

diffstat:

 sys/arch/arm/rockchip/rk3399_pcie.c |  22 +++++++++++++---------
 sys/arch/evbarm/conf/std.generic64  |   3 ++-
 2 files changed, 15 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r 138ae1962bf1 -r 6587b177ac23 sys/arch/arm/rockchip/rk3399_pcie.c
--- a/sys/arch/arm/rockchip/rk3399_pcie.c       Mon Dec 09 15:58:48 2019 +0000
+++ b/sys/arch/arm/rockchip/rk3399_pcie.c       Mon Dec 09 16:01:11 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_pcie.c,v 1.6.2.1 2019/12/08 12:55:30 martin Exp $ */
+/* $NetBSD: rk3399_pcie.c,v 1.6.2.2 2019/12/09 16:01:12 martin Exp $ */
 /*
  * Copyright (c) 2018 Mark Kettenis <kettenis%openbsd.org@localhost>
  *
@@ -17,7 +17,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.6.2.1 2019/12/08 12:55:30 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.6.2.2 2019/12/09 16:01:12 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,10 +121,10 @@
        bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))
 #define HWRITE4(sc, reg, val)                                          \
        bus_space_write_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val))
-#define AXIREAD4(sc, reg)                                              \
-       bus_space_read_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg))
-#define AXIWRITE4(sc, reg, val)                                                \
-       bus_space_write_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg), (val))
+#define AXIPEEK4(sc, reg, valp)                                                \
+       bus_space_peek_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg), (valp))
+#define AXIPOKE4(sc, reg, val)                                         \
+       bus_space_poke_4((sc)->sc_iot, (sc)->sc_axi_ioh, (reg), (val))
 
 struct rkpcie_softc {
        struct pcihost_softc    sc_phsc;
@@ -540,8 +540,12 @@
 
        if (bus == phsc->sc_bus_min)
                return HREAD4(sc, PCIE_RC_NORMAL_BASE + reg);
-       else
-               return AXIREAD4(sc, reg);
+       else {
+               uint32_t val;
+               if (AXIPEEK4(sc, reg, &val) != 0)
+                       return 0xffffffff;
+               return val;
+       }
 }
 
 void
@@ -563,7 +567,7 @@
        if (bus == phsc->sc_bus_min)
                HWRITE4(sc, PCIE_RC_NORMAL_BASE + reg, data);
        else
-               AXIWRITE4(sc, reg, data);
+               AXIPOKE4(sc, reg, data);
 }
 
 static int
diff -r 138ae1962bf1 -r 6587b177ac23 sys/arch/evbarm/conf/std.generic64
--- a/sys/arch/evbarm/conf/std.generic64        Mon Dec 09 15:58:48 2019 +0000
+++ b/sys/arch/evbarm/conf/std.generic64        Mon Dec 09 16:01:11 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: std.generic64,v 1.10.2.1 2019/09/22 12:35:56 martin Exp $
+#      $NetBSD: std.generic64,v 1.10.2.2 2019/12/09 16:01:11 martin Exp $
 #
 #      generic NetBSD/evbarm64 with FDT support
 
@@ -23,6 +23,7 @@
 options        __HAVE_GENERIC_CPU_INITCLOCKS
 options        __HAVE_PCI_CONF_HOOK
 options        __HAVE_PCI_MSI_MSIX
+options        __BUS_SPACE_HAS_PROBING_METHODS
 
 # XXXNH not yet
 #options       __HAVE_CPU_UAREA_ALLOC_IDLELWP



Home | Main Index | Thread Index | Old Index