Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.



details:   https://anonhg.NetBSD.org/src/rev/6348c87b5af2
branches:  trunk
changeset: 374559:6348c87b5af2
user:      phx <phx%NetBSD.org@localhost>
date:      Wed May 03 13:49:29 2023 +0000

description:
Driver for the MNT ZZ9000 Zorro board. Submitted by Alain Runa.

It was formerly known as mntzz, which Alain released three years ago.
Since then, the ZZ9000 had several firmware updates which changed some
hardware interface details rendering the former driver non functional in some
aspects. Also the audio card plug-in ZZ9000AX became available from MNT
Research. Considering the major rewrite of the driver in some areas he
decided to rename it to zz9k(9). The driver consists of several sub-drivers
each addressing different functionality of the MNT ZZ9000 & ZZ9000AX combo
card.

zz9k* is the main card driver and need to be enabled if any of the sub-driver
is enabled. zz9k on its own is not very useful, it only provides a common
zz9kbus for the other sub-drivers to connect to, so only enable it if one of
the zz9k sub-drivers are enabled.
zzfb* represents the graphics driver for the boot console and the dumb
framebuffer for X11 based on WSCONS. ZZFB_CONSOLE option enables the ZZ9000
to become the boot console.
zz* represents the ethernet interface of the ZZ9000. It basically works but
is considered experimental.
zzax* represents the ZZ9000AX audio card driver, audio* attaches to it to
provide audio output and input functionality. The driver is not functional
yet.
zzusb* represents the ZZ9000AX usb driver. It was not implemented yet and
probably never will.

diffstat:

 distrib/sets/lists/man/mi          |    5 +-
 share/man/man4/man4.amiga/Makefile |    4 +-
 share/man/man4/man4.amiga/zz9k.4   |   99 +++
 sys/arch/amiga/amiga/conf.c        |   14 +-
 sys/arch/amiga/conf/WSCONS         |   10 +-
 sys/arch/amiga/conf/files.amiga    |   26 +-
 sys/arch/amiga/dev/zbus.c          |   15 +-
 sys/arch/amiga/dev/zz9k.c          |  179 +++++++
 sys/arch/amiga/dev/zz9k_ax.c       |  524 ++++++++++++++++++++
 sys/arch/amiga/dev/zz9k_fb.c       |  932 +++++++++++++++++++++++++++++++++++++
 sys/arch/amiga/dev/zz9k_if.c       |  395 +++++++++++++++
 sys/arch/amiga/dev/zz9k_usb.c      |  107 ++++
 sys/arch/amiga/dev/zz9kreg.h       |  288 +++++++++++
 sys/arch/amiga/dev/zz9kvar.h       |   56 ++
 14 files changed, 2640 insertions(+), 14 deletions(-)

diffs (truncated from 2833 to 300 lines):

diff -r ded9620fbe44 -r 6348c87b5af2 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Tue May 02 23:08:58 2023 +0000
+++ b/distrib/sets/lists/man/mi Wed May 03 13:49:29 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1758 2022/12/22 11:05:54 nat Exp $
+# $NetBSD: mi,v 1.1759 2023/05/03 13:49:29 phx Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -870,6 +870,7 @@
 ./usr/share/man/cat4/amiga/xsurf.0             man-sys-catman          .cat
 ./usr/share/man/cat4/amiga/z3rambd.0           man-sys-catman          .cat
 ./usr/share/man/cat4/amiga/zssc.0              man-sys-catman          .cat
+./usr/share/man/cat4/amiga/zz9k.0              man-sys-catman          .cat
 ./usr/share/man/cat4/amr.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/ams.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/an.0                      man-sys-catman          .cat
@@ -4180,6 +4181,7 @@
 ./usr/share/man/html4/amiga/xsurf.html         man-sys-htmlman         html
 ./usr/share/man/html4/amiga/z3rambd.html       man-sys-htmlman         html
 ./usr/share/man/html4/amiga/zssc.html          man-sys-htmlman         html
+./usr/share/man/html4/amiga/zz9k.html          man-sys-htmlman         html
 ./usr/share/man/html4/amr.html                 man-sys-htmlman         html
 ./usr/share/man/html4/ams.html                 man-sys-htmlman         html
 ./usr/share/man/html4/an.html                  man-sys-htmlman         html
@@ -7186,6 +7188,7 @@
 ./usr/share/man/man4/amiga/xsurf.4             man-sys-man             .man
 ./usr/share/man/man4/amiga/z3rambd.4           man-sys-man             .man
 ./usr/share/man/man4/amiga/zssc.4              man-sys-man             .man
+./usr/share/man/man4/amiga/zz9k.4              man-sys-man             .man
 ./usr/share/man/man4/amr.4                     man-sys-man             .man
 ./usr/share/man/man4/ams.4                     man-sys-man             .man
 ./usr/share/man/man4/an.4                      man-sys-man             .man
diff -r ded9620fbe44 -r 6348c87b5af2 share/man/man4/man4.amiga/Makefile
--- a/share/man/man4/man4.amiga/Makefile        Tue May 02 23:08:58 2023 +0000
+++ b/share/man/man4/man4.amiga/Makefile        Wed May 03 13:49:29 2023 +0000
@@ -1,12 +1,12 @@
 #      from: @(#)Makefile      8.2 (Berkeley) 2/16/94
-#      $NetBSD: Makefile,v 1.33 2020/09/21 08:46:07 kim Exp $
+#      $NetBSD: Makefile,v 1.34 2023/05/03 13:49:30 phx Exp $
 
 MAN=    a1k2cp.4 a2kbbc.4 a34kbbc.4 acafh.4 afsc.4 ahsc.4 amidisplaycc.4 \
        atzsc.4 autoconf.4 console.4 bah.4 bppcsc.4 clockport.4 cv3dpb.4 \
        drbbc.4 ed.4 efa.4 em4k.4 empb.4 es.4 fdc.4 grf.4 \
        grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \
        gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mntva.4 mppb.4 p5membar.4 \
-       p5pb.4 qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4
+       p5pb.4 qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4 zz9k.4
 MLINKS=        empb.4 emmem.4 \
        empb.4 empm.4 \
        mem.4 kmem.4
diff -r ded9620fbe44 -r 6348c87b5af2 share/man/man4/man4.amiga/zz9k.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/man4.amiga/zz9k.4  Wed May 03 13:49:29 2023 +0000
@@ -0,0 +1,99 @@
+.\" $NetBSD: zz9k.4,v 1.1 2023/05/03 13:49:30 phx Exp $
+.\"
+.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Alain Runa.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``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 FOUNDATION OR CONTRIBUTORS
+.\" 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.
+.\"
+.Dd April 2, 2023
+.Dt ZZ9K 4 amiga
+.Os
+.Sh NAME
+.Nm zz9k
+.Nd MNT ZZ9000 graphics card driver
+.Sh SYNOPSIS
+.Cd "zz9k*     at zbus?"
+.Cd "zzfb*     at zz9k?"
+.Cd "options   ZZFB_CONSOLE"
+.Cd "zz*       at zz9k?"
+.Cd "zzax*     at zz9k?"
+.Cd "zzusb*    at zz9k?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the MNT ZZ9000 graphics card and ethernet interface.
+Each driver can be individually enabled or disabled. However all ZZ9000 drivers
+depend on the zz9k* as the root to work.
+.Pp
+The zzfb*
+.Xr wscons 4
+driver implements blitter accelerated support for the boot console. Support
+for an unaccelerated X11 framebuffer is also available via the
+.Xr wsfb 4
+driver.
+.Pp
+The zz* driver implements the ZZ9000 ethernet interface.
+.Pp
+There is also provision for for adding ZZ9000AX audio card support as zzax* and
+the USB port support as zzusb* at a later time. None of these are functional
+yet.
+.Sh SEE ALSO
+.Xr wscons 4 ,
+.Xr wsdisplay 4
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Nx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Alain Runa Aq Mt alain74%gmx.net@localhost
+and was inspired by the original ZZ9000 drivers for AmigaOS. 
+.Sh CAVEATS
+For the ZZ9000 to assume the boot console, the user has to explicitly set the
+.Dv FBZZ_CONSOLE
+option in the kernel config file.
+.Pp
+Currently, the video mode is hard-coded to 1280x720 at 8 bpp for the console
+emulation and 16 bpp for the framebuffer used by X11. Resolutions and color
+depths can be individually changed in the zz9k_fb.c source code. Please follow
+the source code comments.
+.Pp
+zz* ethernet driver is considered experimental. As the MAC address is not
+stored permanently in the card, it will use it's default address. This should
+not impose any problem unless two ZZ9000 will be used in the same LAN. Please
+configure the desired link address for the zz0 interface in rc.conf or in the
+/etc/ifconfig.zz0 file, to avoid a MAC address collision.
+.Pp
+zzax* audio card driver is not functional yet. Only a basic skeleton source code
+is available for a possible later implementation.
+.Pp
+zzusb* USB driver is not functional yet. Only a basic skeleton source code is
+available for a possible later implementation.
+.Sh BUGS
+None known.
diff -r ded9620fbe44 -r 6348c87b5af2 sys/arch/amiga/amiga/conf.c
--- a/sys/arch/amiga/amiga/conf.c       Tue May 02 23:08:58 2023 +0000
+++ b/sys/arch/amiga/amiga/conf.c       Wed May 03 13:49:29 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.74 2016/10/03 14:26:02 rkujawa Exp $        */
+/*     $NetBSD: conf.c,v 1.75 2023/05/03 13:49:30 phx Exp $    */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.74 2016/10/03 14:26:02 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.75 2023/05/03 13:49:30 phx Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -41,8 +41,10 @@
 
 #include "ser.h"
 #include "ite.h"
+#include "grf.h"
 #include "amidisplaycc.h"
 #include "mntva.h"
+#include "zz9k_fb.h"
 #include "wsdisplay.h"
 
 /*
@@ -53,6 +55,7 @@
  */
 cons_decl(ser);
 cons_decl(mntva);
+cons_decl(zzfb_);
 cons_decl(grf);
 cons_decl(amidisplaycc_);
 cons_decl(ite);
@@ -64,7 +67,10 @@ struct       consdev constab[] = {
 #if NMNTVA > 0
        cons_init(mntva),
 #endif
-#if NWSDISPLAY > 0
+#if NZZ9K_FB > 0
+       cons_init(zzfb_),
+#endif
+#if (NWSDISPLAY > 0) && (NGRF > 0)
        { dev_init(grf,cnprobe), dev_init(grf,cninit) },
 #endif
 #if NAMIDISPLAYCC > 0
@@ -73,5 +79,5 @@ struct        consdev constab[] = {
 #if NITE > 0
        cons_init(ite),
 #endif
-       { 0 },
+       { 0 }
 };
diff -r ded9620fbe44 -r 6348c87b5af2 sys/arch/amiga/conf/WSCONS
--- a/sys/arch/amiga/conf/WSCONS        Tue May 02 23:08:58 2023 +0000
+++ b/sys/arch/amiga/conf/WSCONS        Wed May 03 13:49:29 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: WSCONS,v 1.72 2020/03/07 20:27:54 is Exp $
+# $NetBSD: WSCONS,v 1.73 2023/05/03 13:49:30 phx Exp $
 
 # GENERIC with wscons(4)
 #
@@ -46,6 +46,14 @@ no ite7              at grf7
 mntva*         at zbus?                # MNTMN VA2000
 #options       MNTVA_CONSOLE
 
+zz9k*          at zbus?                # MNT ZZ9000
+zzfb*          at zz9k?                # Framebuffer
+options                ZZFB_CONSOLE            # Console on ZZ9000
+#zz*           at zz9k?                # Ethernet (experimental)
+#zzax*         at zz9k?                # MNT ZZ9000AX (not functional yet)
+#audio*                at zzax?                # Audio on ZZ9000AX
+#zzusb*                at zz9k?                # USB (not implemented yet)
+
 # PCI framebuffers
 #genfb*                at pci?                 # CyberVisionPPC/BlizzardVisionPPC only
 voodoofb*      at pci?                 # 3Dfx Voodoo 3 in G-REX 
diff -r ded9620fbe44 -r 6348c87b5af2 sys/arch/amiga/conf/files.amiga
--- a/sys/arch/amiga/conf/files.amiga   Tue May 02 23:08:58 2023 +0000
+++ b/sys/arch/amiga/conf/files.amiga   Wed May 03 13:49:29 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.amiga,v 1.184 2022/05/07 04:40:01 msaitoh Exp $
+#      $NetBSD: files.amiga,v 1.185 2023/05/03 13:49:30 phx Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16                       # NOTE THAT AMIGA IS SPECIAL!
@@ -22,6 +22,8 @@ defflag       opt_amigacons.h         SERCONSOLE
 
 defflag        opt_mntva.h             MNTVA_CONSOLE
 
+defflag opt_zz9k_fb.h          ZZFB_CONSOLE
+
 defflag        opt_kfont.h             KFONT_CONS_ISO8859_1
 defflag        opt_kfont.h             KFONT_CONS_ISO8859_2
 
@@ -225,6 +227,28 @@ device     mntva: wsemuldisplaydev, rasops16
 attach mntva at zbus
 file   arch/amiga/dev/mntva.c          mntva needs-flag
 
+# MNT ZZ9000
+define zz9kbus {}
+device zz9k: zz9kbus
+attach zz9k at zbus
+file   arch/amiga/dev/zz9k.c           zz9k needs-flag
+
+device zzfb: wsemuldisplaydev, rasops8, rasops15, rasops16, rasops32, vcons
+attach zzfb at zz9kbus with zz9k_fb
+file   arch/amiga/dev/zz9k_fb.c        zz9k_fb needs-flag
+
+device zz: ifnet, ether, arp
+attach zz at zz9kbus with zz9k_if
+file   arch/amiga/dev/zz9k_if.c        zz9k_if needs-flag
+
+device zzax: audiobus
+attach zzax at zz9kbus with zz9k_ax
+file   arch/amiga/dev/zz9k_ax.c        zz9k_ax needs-flag
+
+device zzusb
+attach zzusb at zz9kbus with zz9k_usb
+file   arch/amiga/dev/zz9k_usb.c       zz9k_usb needs-flag
+
 # device defined in sys/conf/files
 # A2065, Ameristar, Ariadne ethernet cards
 attach le at zbus with le_zbus: le24
diff -r ded9620fbe44 -r 6348c87b5af2 sys/arch/amiga/dev/zbus.c
--- a/sys/arch/amiga/dev/zbus.c Tue May 02 23:08:58 2023 +0000
+++ b/sys/arch/amiga/dev/zbus.c Wed May 03 13:49:29 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zbus.c,v 1.77 2021/08/07 16:18:42 thorpej Exp $ */
+/*     $NetBSD: zbus.c,v 1.78 2023/05/03 13:49:30 phx Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.77 2021/08/07 16:18:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.78 2023/05/03 13:49:30 phx Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -194,7 +194,10 @@ static const struct aconfdata aconftab[]



Home | Main Index | Thread Index | Old Index