Module Name: src Committed By: rin Date: Mon Mar 29 13:14:14 UTC 2021
Modified Files: src/sys/arch/evbppc/virtex: autoconf.c consinit.c design_gsrd2.c machdep.c src/sys/arch/evbppc/virtex/dev: if_temac.c tft_ll.c Log Message: Make VIRTEX_* kernels compile. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/virtex/autoconf.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/virtex/consinit.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/virtex/design_gsrd2.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbppc/virtex/machdep.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbppc/virtex/dev/if_temac.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/virtex/dev/tft_ll.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbppc/virtex/autoconf.c diff -u src/sys/arch/evbppc/virtex/autoconf.c:1.5 src/sys/arch/evbppc/virtex/autoconf.c:1.6 --- src/sys/arch/evbppc/virtex/autoconf.c:1.5 Sun Jul 29 18:05:42 2012 +++ src/sys/arch/evbppc/virtex/autoconf.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.6 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2021/03/29 13:14:13 rin Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v /* List of port-specific devices to attach to the processor local bus. */ -static const struct plb_dev local_plb_devs [] = { +static struct plb_dev local_plb_devs [] = { { XILVIRTEX, "xcvbus" }, { 0, NULL } }; Index: src/sys/arch/evbppc/virtex/consinit.c diff -u src/sys/arch/evbppc/virtex/consinit.c:1.3 src/sys/arch/evbppc/virtex/consinit.c:1.4 --- src/sys/arch/evbppc/virtex/consinit.c:1.3 Fri Jul 1 19:03:50 2011 +++ src/sys/arch/evbppc/virtex/consinit.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: consinit.c,v 1.3 2011/07/01 19:03:50 dyoung Exp $ */ +/* $NetBSD: consinit.c,v 1.4 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -33,7 +33,7 @@ #include "xlcom.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.3 2011/07/01 19:03:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2021/03/29 13:14:13 rin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -54,7 +54,6 @@ void xlcom_kgdbinit(void); #endif #endif -struct consdev *cn_tab = NULL; bus_space_tag_t consdev_iot; bus_space_handle_t consdev_ioh; Index: src/sys/arch/evbppc/virtex/design_gsrd2.c diff -u src/sys/arch/evbppc/virtex/design_gsrd2.c:1.4 src/sys/arch/evbppc/virtex/design_gsrd2.c:1.5 --- src/sys/arch/evbppc/virtex/design_gsrd2.c:1.4 Sat Jun 18 06:44:27 2011 +++ src/sys/arch/evbppc/virtex/design_gsrd2.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: design_gsrd2.c,v 1.4 2011/06/18 06:44:27 matt Exp $ */ +/* $NetBSD: design_gsrd2.c,v 1.5 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -32,7 +32,7 @@ #include "opt_virtex.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: design_gsrd2.c,v 1.4 2011/06/18 06:44:27 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: design_gsrd2.c,v 1.5 2021/03/29 13:14:13 rin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -96,6 +96,7 @@ static void *cdmac_ih; * DCR bus space leaf access routines. */ +#ifndef DESIGN_DFC static void tft0_write_4(bus_space_tag_t t, bus_space_handle_t h, uint32_t addr, uint32_t val) @@ -124,6 +125,7 @@ tft0_read_4(bus_space_tag_t t, bus_space return (val); } +#endif /* !DESIGN_DFC */ static void tft1_write_4(bus_space_tag_t t, bus_space_handle_t h, uint32_t addr, @@ -232,9 +234,11 @@ static const struct powerpc_bus_space te DCR_BST_BODY(DCR_TEMAC_BASE, temac_read_4, temac_write_4) }; +#ifndef DESIGN_DFC static const struct powerpc_bus_space tft0_bst = { DCR_BST_BODY(DCR_TFT0_BASE, tft0_read_4, tft0_write_4) }; +#endif static const struct powerpc_bus_space tft1_bst = { DCR_BST_BODY(DCR_TFT1_BASE, tft1_read_4, tft1_write_4) Index: src/sys/arch/evbppc/virtex/machdep.c diff -u src/sys/arch/evbppc/virtex/machdep.c:1.25 src/sys/arch/evbppc/virtex/machdep.c:1.26 --- src/sys/arch/evbppc/virtex/machdep.c:1.25 Thu Jun 11 19:20:43 2020 +++ src/sys/arch/evbppc/virtex/machdep.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.25 2020/06/11 19:20:43 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.26 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2020/06/11 19:20:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2021/03/29 13:14:13 rin Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -100,7 +100,6 @@ char machine[] = MACHINE; /* from <mach char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */ char bootpath[256]; -vaddr_t msgbuf_vaddr; void initppc(vaddr_t, vaddr_t); Index: src/sys/arch/evbppc/virtex/dev/if_temac.c diff -u src/sys/arch/evbppc/virtex/dev/if_temac.c:1.16 src/sys/arch/evbppc/virtex/dev/if_temac.c:1.17 --- src/sys/arch/evbppc/virtex/dev/if_temac.c:1.16 Tue Feb 4 07:36:04 2020 +++ src/sys/arch/evbppc/virtex/dev/if_temac.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $ */ +/* $NetBSD: if_temac.c,v 1.17 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.17 2021/03/29 13:14:13 rin Exp $"); #include <sys/param.h> @@ -230,7 +230,7 @@ static inline void gmi_write_8(uint32_t static inline void gmi_write_4(uint32_t, uint32_t); static inline void gmi_read_8(uint32_t, uint32_t *, uint32_t *); static inline uint32_t gmi_read_4(uint32_t); -static inline void hif_wait_stat(uint32_t); +static inline int hif_wait_stat(uint32_t); #define cdmac_rx_stat(sc) \ bus_space_read_4((sc)->sc_dma_rxt, (sc)->sc_dma_rsh, 0 /* XXX hack */) @@ -1029,7 +1029,7 @@ temac_txreap(struct temac_softc *sc) m_freem(txs->txs_mbuf); txs->txs_mbuf = NULL; - sc->sc_if.if_opackets++; + if_statinc(&sc->sc_if, if_opackets); sent = 1; sc->sc_txsreap = TEMAC_TXSNEXT(sc->sc_txsreap); Index: src/sys/arch/evbppc/virtex/dev/tft_ll.c diff -u src/sys/arch/evbppc/virtex/dev/tft_ll.c:1.4 src/sys/arch/evbppc/virtex/dev/tft_ll.c:1.5 --- src/sys/arch/evbppc/virtex/dev/tft_ll.c:1.4 Fri Jul 1 19:03:50 2011 +++ src/sys/arch/evbppc/virtex/dev/tft_ll.c Mon Mar 29 13:14:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tft_ll.c,v 1.4 2011/07/01 19:03:50 dyoung Exp $ */ +/* $NetBSD: tft_ll.c,v 1.5 2021/03/29 13:14:13 rin Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tft_ll.c,v 1.4 2011/07/01 19:03:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tft_ll.c,v 1.5 2021/03/29 13:14:13 rin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -60,7 +60,9 @@ __KERNEL_RCSID(0, "$NetBSD: tft_ll.c,v 1 struct ll_tft_control { struct cdmac_descr cd_dsc; u_char cd_img[]; -} __packed; +}; + +CTASSERT(offsetof(struct ll_tft_control, cd_img) == sizeof(struct cdmac_descr)); struct ll_tft_softc { struct tft_softc lsc_sc;