diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2023-02-04 14:38:09 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2023-02-04 14:38:09 +0000 |
| commit | dd2f773ea404efdf2a83b80118aef6d2a56ec957 (patch) | |
| tree | f48ac1050ace7522e7c0a691618fa8d82967d4d5 /sys | |
| parent | 168c5d0318bcf67b015c15364ea12cf53cb5a9f9 (diff) | |
Remove trailing spaces and TABs.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/next68k/conf/GENERIC | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/conf/majors.next68k | 4 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/bmapreg.h | 4 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/if_xereg.h | 28 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/intio.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/nextcons.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/wskbdmap_next.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/zs.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/include/vmparam.h | 4 | ||||
| -rw-r--r-- | sys/arch/next68k/next68k/machdep.c | 10 | ||||
| -rw-r--r-- | sys/arch/next68k/next68k/mainbus.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/next68k/pmap_bootstrap.c | 8 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/Makefile | 8 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/README | 4 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/devopen.c | 18 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/machdep.c | 6 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/rtc.c | 12 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/scsi.c | 43 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/sd.c | 19 | ||||
| -rw-r--r-- | sys/arch/next68k/stand/boot/srt0.s | 6 |
20 files changed, 104 insertions, 106 deletions
diff --git a/sys/arch/next68k/conf/GENERIC b/sys/arch/next68k/conf/GENERIC index dd8c216275f..6f3adfebd25 100644 --- a/sys/arch/next68k/conf/GENERIC +++ b/sys/arch/next68k/conf/GENERIC @@ -1,7 +1,7 @@ -# $NetBSD: GENERIC,v 1.156 2023/02/03 23:07:47 tsutsui Exp $ +# $NetBSD: GENERIC,v 1.157 2023/02/04 14:38:09 tsutsui Exp $ # # GENERIC machine description file -# +# # This machine description file is used to generate the default NetBSD # kernel. The generic kernel does not include all options, subsystems # and device drivers, but should be useful for most applications. @@ -22,7 +22,7 @@ include "arch/next68k/conf/std.next68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.156 $" +#ident "GENERIC-$Revision: 1.157 $" makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for diff --git a/sys/arch/next68k/conf/majors.next68k b/sys/arch/next68k/conf/majors.next68k index 0a370b84615..9219c26b9c4 100644 --- a/sys/arch/next68k/conf/majors.next68k +++ b/sys/arch/next68k/conf/majors.next68k @@ -1,4 +1,4 @@ -# $NetBSD: majors.next68k,v 1.25 2020/04/04 16:06:15 jdolecek Exp $ +# $NetBSD: majors.next68k,v 1.26 2023/02/04 14:38:09 tsutsui Exp $ # # Device majors for next68k # @@ -50,5 +50,5 @@ device-major wsfont char 50 wsfont #device-major obsolete char 98 obsolete (nsmb) # Majors up to 143 are reserved for machine-dependent drivers. -# New machine-independent driver majors are assigned in +# New machine-independent driver majors are assigned in # sys/conf/majors. diff --git a/sys/arch/next68k/dev/bmapreg.h b/sys/arch/next68k/dev/bmapreg.h index 429f89d48bd..45ceed590b4 100644 --- a/sys/arch/next68k/dev/bmapreg.h +++ b/sys/arch/next68k/dev/bmapreg.h @@ -1,6 +1,6 @@ -/* $NetBSD: bmapreg.h,v 1.3 2009/10/23 02:32:33 snj Exp $ */ +/* $NetBSD: bmapreg.h,v 1.4 2023/02/04 14:38:09 tsutsui Exp $ */ -/* +/* * Copyright (c) 2002 Christian Limpach * All rights reserved. * diff --git a/sys/arch/next68k/dev/if_xereg.h b/sys/arch/next68k/dev/if_xereg.h index a66cd9d8a55..0a437233ab3 100644 --- a/sys/arch/next68k/dev/if_xereg.h +++ b/sys/arch/next68k/dev/if_xereg.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_xereg.h,v 1.2 2009/10/23 02:32:33 snj Exp $ */ +/* $NetBSD: if_xereg.h,v 1.3 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 2002 Christian Limpach @@ -11,19 +11,19 @@ * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ /* Size of register area to be mapped */ diff --git a/sys/arch/next68k/dev/intio.c b/sys/arch/next68k/dev/intio.c index e209d787fa4..2469ad2b4dc 100644 --- a/sys/arch/next68k/dev/intio.c +++ b/sys/arch/next68k/dev/intio.c @@ -1,4 +1,4 @@ -/* $NetBSD: intio.c,v 1.17 2023/02/03 23:13:00 tsutsui Exp $ */ +/* $NetBSD: intio.c,v 1.18 2023/02/04 14:38:09 tsutsui Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -34,11 +34,11 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intio.c,v 1.17 2023/02/03 23:13:00 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intio.c,v 1.18 2023/02/04 14:38:09 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> -#include <sys/device.h> +#include <sys/device.h> #include <sys/reboot.h> #include <machine/autoconf.h> diff --git a/sys/arch/next68k/dev/nextcons.c b/sys/arch/next68k/dev/nextcons.c index 8e2908c0cb7..12c9940cc88 100644 --- a/sys/arch/next68k/dev/nextcons.c +++ b/sys/arch/next68k/dev/nextcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: nextcons.c,v 1.12 2023/02/03 23:13:00 tsutsui Exp $ */ +/* $NetBSD: nextcons.c,v 1.13 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1999 Darrin B. Jewell @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nextcons.c,v 1.12 2023/02/03 23:13:00 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nextcons.c,v 1.13 2023/02/04 14:38:09 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -69,7 +69,7 @@ nextcnprobe(struct consdev *cp) rom_machine_type == NeXT_TURBO_MONO || rom_machine_type == NeXT_TURBO_COLOR) cp->cn_pri = CN_INTERNAL; - else + else cp->cn_pri = CN_DEAD; cp->cn_dev = NODEV; diff --git a/sys/arch/next68k/dev/wskbdmap_next.c b/sys/arch/next68k/dev/wskbdmap_next.c index fbc41cbd48e..5c2df23a153 100644 --- a/sys/arch/next68k/dev/wskbdmap_next.c +++ b/sys/arch/next68k/dev/wskbdmap_next.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbdmap_next.c,v 1.5 2008/04/28 20:23:30 martin Exp $ */ +/* $NetBSD: wskbdmap_next.c,v 1.6 2023/02/04 14:38:09 tsutsui Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wskbdmap_next.c,v 1.5 2008/04/28 20:23:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbdmap_next.c,v 1.6 2023/02/04 14:38:09 tsutsui Exp $"); #include <sys/types.h> #include <dev/wscons/wsksymdef.h> @@ -237,7 +237,7 @@ static const keysym_t nextkbd_keydesc_fr[] = { KC(13), KS_equal, KS_plus, KS_braceright, KC(16), KS_a, KC(17), KS_z, - KC(26), KS_dead_circumflex, KS_dead_diaeresis, + KC(26), KS_dead_circumflex, KS_dead_diaeresis, KC(27), KS_dollar, KS_sterling, KS_currency, KC(30), KS_q, KC(39), KS_m, diff --git a/sys/arch/next68k/dev/zs.c b/sys/arch/next68k/dev/zs.c index 84b9c0f6501..35724ec711f 100644 --- a/sys/arch/next68k/dev/zs.c +++ b/sys/arch/next68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.37 2021/09/11 20:28:04 andvar Exp $ */ +/* $NetBSD: zs.c,v 1.38 2023/02/04 14:38:09 tsutsui Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.37 2021/09/11 20:28:04 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.38 2023/02/04 14:38:09 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -631,7 +631,7 @@ zscninit(struct consdev *cn) /* * can't use zs_set_speed as we haven't set up the - * signal sources, and it's not worth it for now + * signal sources, and it's not worth it for now */ cs->cs_preg[9] &= ~ZSWR9_MASTER_IE; diff --git a/sys/arch/next68k/include/vmparam.h b/sys/arch/next68k/include/vmparam.h index 8fd9eada368..43370826161 100644 --- a/sys/arch/next68k/include/vmparam.h +++ b/sys/arch/next68k/include/vmparam.h @@ -1,10 +1,10 @@ -/* $NetBSD: vmparam.h,v 1.29 2023/02/04 08:42:45 tsutsui Exp $ */ +/* $NetBSD: vmparam.h,v 1.30 2023/02/04 14:38:09 tsutsui Exp $ */ /* * This file was taken from mvme68k/include/vmparam.h and * should probably be re-synced when needed. * Darrin B Jewell <jewell@mit.edu> Fri Aug 28 03:22:07 1998 - * original cvs id: NetBSD: vmparam.h,v 1.9 1998/08/22 10:55:34 scw Exp + * original cvs id: NetBSD: vmparam.h,v 1.9 1998/08/22 10:55:34 scw Exp */ /* diff --git a/sys/arch/next68k/next68k/machdep.c b/sys/arch/next68k/next68k/machdep.c index eb66f4bdcfb..1419e31264e 100644 --- a/sys/arch/next68k/next68k/machdep.c +++ b/sys/arch/next68k/next68k/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.119 2023/02/03 23:21:18 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.120 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2023/02/03 23:21:18 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.120 2023/02/04 14:38:09 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -124,7 +124,7 @@ extern char *esym; /* the following is used externally (sysctl_hw) */ char machine[] = MACHINE; /* from <machine/param.h> */ -/* Our exported CPU info; we can have only one. */ +/* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; struct vm_map *phys_map = NULL; @@ -810,7 +810,7 @@ nmihand(void *frame) #endif /* DDB */ INTR_ENABLE(NEXT_I_NMI); - + innmihand = 0; return 0; @@ -820,7 +820,7 @@ nmihand(void *frame) /* * cpu_exec_aout_makecmds(): * CPU-dependent a.out format hook for execve(). - * + * * Determine of the given exec package refers to something which we * understand and, if so, set up the vmcmds for it. */ diff --git a/sys/arch/next68k/next68k/mainbus.c b/sys/arch/next68k/next68k/mainbus.c index 1b3e96027cc..1d602a03f5c 100644 --- a/sys/arch/next68k/next68k/mainbus.c +++ b/sys/arch/next68k/next68k/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.14 2023/02/03 23:22:34 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.15 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.14 2023/02/03 23:22:34 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.15 2023/02/04 14:38:09 tsutsui Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -60,7 +60,7 @@ struct m68k_bus_dma_tag next68k_bus_dma_tag = { _bus_dmamap_load_raw_direct, /* _dmamap_load_raw */ _bus_dmamap_unload, /* _dmamap_unload */ _bus_dmamap_sync, /* _dmamap_sync */ - + _bus_dmamem_alloc, /* _dmamem_alloc */ _bus_dmamem_free, /* _dmamem_free */ _bus_dmamem_map, /* _dmamem_map */ diff --git a/sys/arch/next68k/next68k/pmap_bootstrap.c b/sys/arch/next68k/next68k/pmap_bootstrap.c index 19b04d9886d..f18436935a0 100644 --- a/sys/arch/next68k/next68k/pmap_bootstrap.c +++ b/sys/arch/next68k/next68k/pmap_bootstrap.c @@ -1,15 +1,15 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.45 2023/02/04 08:42:45 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.46 2023/02/04 14:38:09 tsutsui Exp $ */ /* * This file was taken from mvme68k/mvme68k/pmap_bootstrap.c * should probably be re-synced when needed. * cvs id of source for the most recent syncing: - * NetBSD: pmap_bootstrap.c,v 1.15 2000/11/20 19:35:30 scw Exp + * NetBSD: pmap_bootstrap.c,v 1.15 2000/11/20 19:35:30 scw Exp * NetBSD: pmap_bootstrap.c,v 1.17 2001/11/08 21:53:44 scw Exp */ -/* +/* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.45 2023/02/04 08:42:45 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.46 2023/02/04 14:38:09 tsutsui Exp $"); #include "opt_m68k_arch.h" diff --git a/sys/arch/next68k/stand/boot/Makefile b/sys/arch/next68k/stand/boot/Makefile index bbc9f5a151a..3c9b03c949a 100644 --- a/sys/arch/next68k/stand/boot/Makefile +++ b/sys/arch/next68k/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2017/04/08 19:53:22 christos Exp $ +# $NetBSD: Makefile,v 1.30 2023/02/04 14:38:09 tsutsui Exp $ NOMAN= # defined @@ -23,9 +23,9 @@ SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes # SA_USE_CREAD=yes RELOC= 4380000 # XXX make defs arch-indep. -INCLUDES+= -I${.OBJDIR} -I${S}/arch -I${S} -I${S}/lib/libsa -DEFS+= -D_STANDALONE -DMC68040 -DSUPPORT_BOOTP -DSUPPORT_DHCP -DDEBUG -DSD_DEBUG -DSCSI_DEBUG # -DEN_DEBUG -DNETIF_DEBUG -SAMISCCPPFLAGS= -DSUPPORT_DHCP -DSUPPORT_BOOTP -DSA_EXEC_ANYOWNER # -DBOOTP_DEBUG -DETHER_DEBUG -DNET_DEBUG # -DNETIF_DEBUG -DNFS_DEBUG -DARP_DEBUG +INCLUDES+= -I${.OBJDIR} -I${S}/arch -I${S} -I${S}/lib/libsa +DEFS+= -D_STANDALONE -DMC68040 -DSUPPORT_BOOTP -DSUPPORT_DHCP -DDEBUG -DSD_DEBUG -DSCSI_DEBUG # -DEN_DEBUG -DNETIF_DEBUG +SAMISCCPPFLAGS= -DSUPPORT_DHCP -DSUPPORT_BOOTP -DSA_EXEC_ANYOWNER # -DBOOTP_DEBUG -DETHER_DEBUG -DNET_DEBUG # -DNETIF_DEBUG -DNFS_DEBUG -DARP_DEBUG WARNS=1 CFLAGS+= -ffreestanding -nostdinc ${INCLUDES} ${DEFS} CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith diff --git a/sys/arch/next68k/stand/boot/README b/sys/arch/next68k/stand/boot/README index e83447cea78..f0563804437 100644 --- a/sys/arch/next68k/stand/boot/README +++ b/sys/arch/next68k/stand/boot/README @@ -1,9 +1,9 @@ -$NetBSD: README,v 1.1.1.1 1998/06/09 07:53:06 dbj Exp $ +$NetBSD: README,v 1.2 2023/02/04 14:38:09 tsutsui Exp $ NeXT standalone bootblocks. Rolf Grossmann, Dec 1994 -Started work based on files from hp300/stand. boot.c was from post-1.0 +Started work based on files from hp300/stand. boot.c was from post-1.0 sparc/stand/boot.c, modified to work for the needs of the NeXT PROM, i.e. it wants to call the kernel, so the bootblock has to return the entry point. diff --git a/sys/arch/next68k/stand/boot/devopen.c b/sys/arch/next68k/stand/boot/devopen.c index 0495296be9d..20333d3b563 100644 --- a/sys/arch/next68k/stand/boot/devopen.c +++ b/sys/arch/next68k/stand/boot/devopen.c @@ -1,4 +1,4 @@ -/* $NetBSD: devopen.c,v 1.6 2014/08/10 07:40:49 isaki Exp $ */ +/* $NetBSD: devopen.c,v 1.7 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1994 Rolf Grossmann * All rights reserved. @@ -40,7 +40,7 @@ devlookup(const char *d, int len) { struct devsw *dp = devsw; int i; - + for (i = 0; i < ndevs; i++, dp++) if (dp->dv_name && strncmp(dp->dv_name, d, len) == 0) return i; @@ -68,7 +68,7 @@ devparse(const char *fname, int *dev, { int i; const char *s, *args[3]; - + /* get device name */ for (s = fname; *s && *s != '/' && *s != '('; s++) ; @@ -86,7 +86,7 @@ devparse(const char *fname, int *dev, } if (*s != ')') goto baddev; - + switch(i) { case 3: *count = atoi(args[0]); @@ -108,9 +108,9 @@ devparse(const char *fname, int *dev, /* no device present */ else *file = (char *)fname; /* XXX discard const */ - + return 0; - + baddev: return ENXIO; } @@ -132,15 +132,15 @@ devopen(struct open_file *f, const char *fname, char **file) return error; dp = &devsw[dev]; - + if ((void *)dp->dv_open == (void *)nodev) return ENXIO; f->f_dev = dp; - + if ((error = (*dp->dv_open)(f, count, lun, part)) != 0) printf("%s(%d,%d,%d): %d = %s\n", devsw[dev].dv_name, count, lun, part, error, strerror(error)); return error; -} +} diff --git a/sys/arch/next68k/stand/boot/machdep.c b/sys/arch/next68k/stand/boot/machdep.c index d70a65a9a64..d3828c2fd5b 100644 --- a/sys/arch/next68k/stand/boot/machdep.c +++ b/sys/arch/next68k/stand/boot/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.7 2007/12/24 15:46:45 perry Exp $ */ +/* $NetBSD: machdep.c,v 1.8 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1998 Darrin Jewell * Copyright (c) 1994 Rolf Grossmann @@ -117,10 +117,10 @@ trap(struct trapframe *fp) printf("Got unexpected trap: format=%x vector=%x sr=%x pc=%x\n", fp->fmt, fp->vec, fp->sr, fp->pc); printf("dregs: %x %x %x %x %x %x %x %x\n", - fp->dregs[0], fp->dregs[1], fp->dregs[2], fp->dregs[3], + fp->dregs[0], fp->dregs[1], fp->dregs[2], fp->dregs[3], fp->dregs[4], fp->dregs[5], fp->dregs[6], fp->dregs[7]); printf("aregs: %x %x %x %x %x %x %x %x\n", - fp->aregs[0], fp->aregs[1], fp->aregs[2], fp->aregs[3], + fp->aregs[0], fp->aregs[1], fp->aregs[2], fp->aregs[3], fp->aregs[4], fp->aregs[5], fp->aregs[6], fp->aregs[7]); intrap = 0; #ifdef DEBUG diff --git a/sys/arch/next68k/stand/boot/rtc.c b/sys/arch/next68k/stand/boot/rtc.c index 1a9f4254c19..09b15f7948c 100644 --- a/sys/arch/next68k/stand/boot/rtc.c +++ b/sys/arch/next68k/stand/boot/rtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtc.c,v 1.6 2009/01/12 11:32:44 tsutsui Exp $ */ +/* $NetBSD: rtc.c,v 1.7 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1997 Rolf Grossmann * All rights reserved. @@ -51,7 +51,7 @@ rtc_read(u_char reg) int i; u_int tmp; u_char val; - + *scr2 = (*scr2 & ~(SCR2_RTDATA | SCR2_RTCLK)) | SCR2_RTCE; DELAY(1); @@ -74,7 +74,7 @@ rtc_read(u_char reg) val = 0; /* should be anyway */ for (i=0; i<8; i++) { val <<= 1; - + tmp = *scr2 & ~(SCR2_RTDATA | SCR2_RTCLK); *scr2 = tmp | SCR2_RTCLK; @@ -96,7 +96,7 @@ void rtc_init(void) { u_char val; - + val = rtc_read(RTC_STATUS); new_clock = (val & RTC_NEW_CLOCK) ? 1 : 0; } @@ -105,7 +105,7 @@ satime_t getsecs(void) { u_int secs; - + if (new_clock) { secs = rtc_read(RTC_CNTR0) << 24 | rtc_read(RTC_CNTR1) << 16 | @@ -124,6 +124,6 @@ getsecs(void) BCD_DECODE(m) * 60 + BCD_DECODE(s); } - + return secs; } diff --git a/sys/arch/next68k/stand/boot/scsi.c b/sys/arch/next68k/stand/boot/scsi.c index 96505ca5d7a..c8cae17cb64 100644 --- a/sys/arch/next68k/stand/boot/scsi.c +++ b/sys/arch/next68k/stand/boot/scsi.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsi.c,v 1.10 2008/03/30 16:28:08 he Exp $ */ +/* $NetBSD: scsi.c,v 1.11 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1994, 1997 Rolf Grossmann * All rights reserved. @@ -77,7 +77,7 @@ scsi_init(void) dma = (struct dma_dev *)P_SCSI_CSR; dma_buffer = DMA_ALIGN(char *, the_dma_buffer); - + P_FLOPPY[FLP_CTRL] &= ~FLC_82077_SEL; /* select SCSI chip */ /* first reset DMA */ @@ -96,7 +96,7 @@ scsi_init(void) /* now reset the SCSI bus */ sr[NCR_CMD] = NCRCMD_RSTSCSI; DELAY(4000000); /* XXX should be about 2-3 seconds at least */ - + /* then reset the SCSI chip again and initialize it properly */ sr[NCR_CMD] = NCRCMD_RSTCHIP; sr[NCR_CMD] = NCRCMD_NOP; @@ -125,7 +125,7 @@ scsierror(char *error) short scsi_getbyte(volatile uint8_t *sr) { - if ((sr[NCR_FFLAG] & NCRFIFO_FF) == 0) + if ((sr[NCR_FFLAG] & NCRFIFO_FF) == 0) { printf("getbyte: no data!\n"); return -1; @@ -187,7 +187,7 @@ scsiicmd(char target, char lun, sr[NCR_FIFO] = cbuf[i]; sr[NCR_CMD] = NCRCMD_SELATN; sc->sc_state = SCSI_SELECTING; - + while(sc->sc_state != SCSI_DONE) { if (scsi_wait_for_intr()) /* maybe we'd better use real intrs ? */ return EIO; @@ -207,12 +207,12 @@ scsiicmd(char target, char lun, redo: DPRINTF(("scsiicmd: regs[intr=%x, stat=%x, step=%x]\n", sc->sc_intrstatus, sc->sc_status, sc->sc_seqstep)); - + if (sc->sc_intrstatus & NCRINTR_SBR) { scsierror("scsi bus reset"); return EIO; } - + if ((sc->sc_status & NCRSTAT_GE) || (sc->sc_intrstatus & NCRINTR_ILL)) { scsierror("software error"); @@ -227,12 +227,12 @@ scsiicmd(char target, char lun, switch(sc->sc_state) { case SCSI_SELECTING: - if (sc->sc_intrstatus & NCRINTR_DIS) + if (sc->sc_intrstatus & NCRINTR_DIS) { sc->sc_state = SCSI_IDLE; return EUNIT; /* device not present */ } - + #define NCRINTR_DONE (NCRINTR_BS | NCRINTR_FC) if ((sc->sc_intrstatus & NCRINTR_DONE) != NCRINTR_DONE) { @@ -310,7 +310,7 @@ scsiicmd(char target, char lun, sc->sc_state = SCSI_IDLE; return -sc->sc_result; } - + int scsi_msgin(void) { @@ -340,11 +340,10 @@ dma_start(char *addr, int len) { volatile uint8_t *sr; struct dma_dev *dma; - - + sr = P_SCSI; dma = (struct dma_dev *)P_SCSI_CSR; - + if (len > MAX_DMASIZE) { scsierror("DMA too long"); @@ -365,15 +364,15 @@ dma_start(char *addr, int len) return -1; #endif } - + PRINTF(("DMA start: %lx, %d byte.\n", (long)addr, len)); - DPRINTF(("dma_bufffer: start: 0x%lx end: 0x%lx \n", + DPRINTF(("dma_bufffer: start: 0x%lx end: 0x%lx \n", (long)dma_buffer,(long)DMA_ENDALIGN(char *, dma_buffer+len))); sc->dma_addr = addr; sc->dma_len = len; - + sr[NCR_TCL] = len & 0xff; sr[NCR_TCM] = len >> 8; sr[NCR_CMD] = NCRCMD_DMA | NCRCMD_NOP; @@ -405,7 +404,7 @@ dma_done(void) struct dma_dev *dma; int resid, state; int flushcount = 0; - + sr = P_SCSI; dma = (struct dma_dev *)P_SCSI_CSR; @@ -419,16 +418,16 @@ dma_done(void) if (!(sr[NCR_FFLAG] & NCRFIFO_FF)) { sr[ESP_DCTL] = ESPDCTL_20MHZ | ESPDCTL_INTENB | ESPDCTL_DMAMOD | ESPDCTL_DMARD; - while (!(state & DMACSR_COMPLETE) && (state & DMACSR_ENABLE) && flushcount < 16) + while (!(state & DMACSR_COMPLETE) && (state & DMACSR_ENABLE) && flushcount < 16) { - + DPRINTF(("DMA still enabled, flushing DCTL.\n")); - + sr[ESP_DCTL] = ESPDCTL_20MHZ | ESPDCTL_INTENB | ESPDCTL_DMAMOD | ESPDCTL_DMARD | ESPDCTL_FLUSH; sr[ESP_DCTL] = ESPDCTL_20MHZ | ESPDCTL_INTENB | ESPDCTL_DMAMOD | ESPDCTL_DMARD; - + flushcount++; state = dma->dd_csr & (DMACSR_BUSEXC | DMACSR_COMPLETE | DMACSR_SUPDATE | DMACSR_ENABLE); @@ -467,6 +466,6 @@ dma_done(void) return sc->dma_len; /* scsierror("DMA not completed\n"); */ - + return 0; } diff --git a/sys/arch/next68k/stand/boot/sd.c b/sys/arch/next68k/stand/boot/sd.c index 321bbb2d413..76e91700701 100644 --- a/sys/arch/next68k/stand/boot/sd.c +++ b/sys/arch/next68k/stand/boot/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.12 2014/03/29 19:20:29 christos Exp $ */ +/* $NetBSD: sd.c,v 1.13 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1994 Rolf Grossmann * All rights reserved. @@ -87,7 +87,7 @@ sdprobe(char target, char lun) do { count = 0; error = scsiicmd(target, lun, (u_char *)&cdb1, sizeof(cdb1), NULL, &count); - if (error == -SCSI_BUSY) { + if (error == -SCSI_BUSY) { register int N = 10000000; while (--N > 0); } } while ((error == -SCSI_CHECK || error == -SCSI_BUSY) @@ -105,12 +105,12 @@ sdprobe(char target, char lun) if (error != 0) return error<0 ? EHER : error; - if ((inq.device & SID_TYPE) != T_DIRECT + if ((inq.device & SID_TYPE) != T_DIRECT && (inq.device & SID_TYPE) != T_CDROM) return EUNIT; /* not a disk */ DPRINTF(("booting disk %s.\n", inq.vendor)); - + return 0; } @@ -188,9 +188,9 @@ sdopen(struct open_file *f, char count, char lun, char part) register struct sd_softc *ss; char unit, cnt; int error; - + DPRINTF(("open: sd(%d,%d,%d)\n", count, lun, part)); - + if (lun >= NSD) return EUNIT; @@ -211,7 +211,7 @@ sdopen(struct open_file *f, char count, char lun, char part) if (unit >= NSD) return EUNIT; - + ss = alloc(sizeof(struct sd_softc)); ss->sc_unit = unit; ss->sc_lun = lun; @@ -244,10 +244,10 @@ sdstrategy(struct sd_softc *ss, int rw, daddr_t dblk, size_t size, u_long blk = dblk + ss->sc_pinfo.offset[ss->sc_part]; struct scsipi_rw_10 cdb; int error; - + if (size == 0) return 0; - + if (rw != F_READ) { printf("sdstrategy: write not implemented.\n"); @@ -291,4 +291,3 @@ sdstrategy(struct sd_softc *ss, int rw, daddr_t dblk, size_t size, DPRINTF(("sdstrategy: read %d bytes\n", *rsize)); return 0; } - diff --git a/sys/arch/next68k/stand/boot/srt0.s b/sys/arch/next68k/stand/boot/srt0.s index ddcaa5fa951..1b8c0411517 100644 --- a/sys/arch/next68k/stand/boot/srt0.s +++ b/sys/arch/next68k/stand/boot/srt0.s @@ -1,4 +1,4 @@ -/* $NetBSD: srt0.s,v 1.2 2001/05/12 22:35:30 chs Exp $ */ +/* $NetBSD: srt0.s,v 1.3 2023/02/04 14:38:09 tsutsui Exp $ */ /* * Copyright (c) 1994 Rolf Grossmann * All rights reserved. @@ -71,7 +71,7 @@ Lclr: || restore prom vectors movel save_vbr,%a0 movec %a0,%vbr - + || return kernel start address (still in d0) rts @@ -82,7 +82,7 @@ hloop: movel #halt,%d0 trap #13 | halt the system bra hloop | and do not allow continuation - + ASENTRY_NOPROFILE(astrap) moveml %d0-%d7/%a0-%a7,%sp@- | save all registers |
