Subject: Re: Build error in -current?
To: None <bob@murphy.dyndns.org>
From: Robert Swindells <rjs@fdy2.demon.co.uk>
List: port-mac68k
Date: 08/26/2004 20:25:10
[Please ignore my previous attempt to fix this]

>Has anyone noticed this error in -current builds over the last week or 
>so?

>#   compile  GENERICSBC/ncr5380sbc.o
>/pub/build/obj/mac68k/tooldir.NetBSD-1.6ZK-i386/bin/m68k--netbsdelf-gcc 
>-msoft-float -ffreestanding -O2 -Werror -Wall -Wno-main 
>-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
>-Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss 
>-Dmac68k -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DM68040 
>-DM68030 -DM68020 -DLKM -DGRF_COMPAT -DMAXUSERS=16 -D_KERNEL 
>-D_KERNEL_OPT -c /usr/src/sys/dev/ic/ncr5380sbc.c
>/usr/src/sys/dev/ic/ncr5380sbc.c: In function `ncr5380_init':
>/usr/src/sys/dev/ic/ncr5380sbc.c:378: warning: implicit declaration of 
>function `bus_space_write_1'
>/usr/src/sys/dev/ic/ncr5380sbc.c:378: error: structure has no member 
>named `sc_regt'
>/usr/src/sys/dev/ic/ncr5380sbc.c:378: error: structure has no member 
>named `sc_regh'
>
>*** Failed target:  ncr5380sbc.o

Try this:

Index: ncr5380sbc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/ncr5380sbc.c,v
retrieving revision 1.52
diff -u -r1.52 ncr5380sbc.c
--- ncr5380sbc.c        10 Aug 2004 07:00:30 -0000      1.52
+++ ncr5380sbc.c        26 Aug 2004 19:19:25 -0000
@@ -374,9 +374,11 @@
        sc->sc_prevphase = PHASE_INVALID;
        sc->sc_state = NCR_IDLE;
 
+#ifdef NCR5380_USE_BUS_SPACE
        if (sc->sc_rev == NCR_VARIANT_NCR53C400)
                bus_space_write_1(sc->sc_regt, sc->sc_regh, C400_CSR,
                    C400_CSR_5380_ENABLE);
+#endif
 
        NCR5380_WRITE(sc, sci_tcmd, PHASE_INVALID);
        NCR5380_WRITE(sc, sci_icmd, 0);