diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-05-20 22:44:33 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-05-20 22:44:33 +0000 |
commit | 8abdf733960e433e83bfb7e0821451096057d973 (patch) | |
tree | 8a1f4ff0faa9456aea2b54eca3d14d63f7460d1c /sys/dev | |
parent | c66ee64a693e2829acc0c30003a3d9a2a5b87034 (diff) |
Open up a 4GB memory bus window for mvneta(4) on the Marvell
Armada 3700. This makes my second ethernet controller/port
work on the Turris Mox.
ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fdt/if_mvneta.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/fdt/if_mvneta.c b/sys/dev/fdt/if_mvneta.c index 852a5fa54fc..f8ad333d53e 100644 --- a/sys/dev/fdt/if_mvneta.c +++ b/sys/dev/fdt/if_mvneta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvneta.c,v 1.8 2019/09/07 13:33:00 patrick Exp $ */ +/* $OpenBSD: if_mvneta.c,v 1.9 2020/05/20 22:44:32 patrick Exp $ */ /* $NetBSD: if_mvneta.c,v 1.41 2015/04/15 10:15:40 hsuenaga Exp $ */ /* * Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi @@ -305,13 +305,14 @@ mvneta_enaddr_write(struct mvneta_softc *sc) void mvneta_wininit(struct mvneta_softc *sc) { -#ifdef __armv7__ uint32_t en; int i; +#ifdef __armv7__ if (mvmbus_dram_info == NULL) panic("%s: mbus dram information not set up", sc->sc_dev.dv_xname); +#endif for (i = 0; i < MVNETA_NWINDOW; i++) { MVNETA_WRITE(sc, MVNETA_BASEADDR(i), 0); @@ -323,6 +324,7 @@ mvneta_wininit(struct mvneta_softc *sc) en = MVNETA_BARE_EN_MASK; +#ifdef __armv7__ for (i = 0; i < mvmbus_dram_info->numcs; i++) { struct mbus_dram_window *win = &mvmbus_dram_info->cs[i]; @@ -334,9 +336,12 @@ mvneta_wininit(struct mvneta_softc *sc) en &= ~(1 << i); } +#else + MVNETA_WRITE(sc, MVNETA_S(0), MVNETA_S_SIZE(0)); + en &= ~(1 << 0); +#endif MVNETA_WRITE(sc, MVNETA_BARE, en); -#endif } int |