From: deraadt Date: Mon, 29 Jan 1996 21:40:30 +0000 (+0000) Subject: from netbsd; move register layout stuff X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a0ea977129d93a3ca762988f70be6a8b6ad18b1c;p=openbsd from netbsd; move register layout stuff --- diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index c63aa037396..b58ec39f31f 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.13 1995/12/25 14:16:50 leo Exp $ */ +/* $NetBSD: zs.c,v 1.14 1996/01/23 09:35:15 leo Exp $ */ /* * Copyright (c) 1995 L. Weppelman (Atari modifications) @@ -419,7 +419,9 @@ struct proc *p; /* * Drop all lines and cancel interrupts */ - zs_loadchannelregs(&zi->zi_zs->zs_chan[unit & 1], zs_init_regs); + s = splzs(); + zs_loadchannelregs(cs->cs_zc, zs_init_regs); + splx(s); return (0); } diff --git a/sys/arch/atari/dev/zsvar.h b/sys/arch/atari/dev/zsvar.h index 320041baa02..35d5f374cb2 100644 --- a/sys/arch/atari/dev/zsvar.h +++ b/sys/arch/atari/dev/zsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: zsvar.h,v 1.4 1995/12/25 14:16:51 leo Exp $ */ +/* $NetBSD: zsvar.h,v 1.5 1996/01/24 19:26:40 gwr Exp $ */ /* * Copyright (c) 1995 Leo Weppelman (Atari modifications) @@ -45,6 +45,21 @@ * @(#)zsvar.h 8.1 (Berkeley) 6/11/93 */ +/* + * Register layout is machine-dependent... + */ + +struct zschan { + u_char zc_xxx0; + volatile u_char zc_csr; /* ctrl,status, and indirect access */ + u_char zc_xxx1; + volatile u_char zc_data; /* data */ +}; + +struct zsdevice { + struct zschan zs_chan[2]; +}; + /* * Software state, per zs channel. *