CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rin Date: Wed Apr 28 00:35:47 UTC 2021 Modified Files: src/sys/arch/amiga/clockport: files.clockport Log Message: clockport_common does not need its own interface attribute. All children are attached to clockportbus. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amiga/clockport/files.clockport 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/amiga/clockport/files.clockport diff -u src/sys/arch/amiga/clockport/files.clockport:1.5 src/sys/arch/amiga/clockport/files.clockport:1.6 --- src/sys/arch/amiga/clockport/files.clockport:1.5 Sun Dec 22 23:02:38 2013 +++ src/sys/arch/amiga/clockport/files.clockport Wed Apr 28 00:35:47 2021 @@ -1,8 +1,8 @@ -# $NetBSD: files.clockport,v 1.5 2013/12/22 23:02:38 rkujawa Exp $ +# $NetBSD: files.clockport,v 1.6 2021/04/28 00:35:47 rin Exp $ define clockportbus {} -define clockport_common {} +define clockport_common file arch/amiga/clockport/clockport_common.c clockport_common # Generic clockport (can be attached on top of Zorro boards)
CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rkujawa Date: Thu Nov 8 18:30:21 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: files.clockport Added Files: src/sys/arch/amiga/clockport: flipper.c flipperreg.h flippervar.h Log Message: Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support audio or DSP), but is able to disable interrupts which is important if booting NetBSD from AmigaOS to avoid unhandled interrupts. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/clockport/files.clockport cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/clockport/flipper.c \ src/sys/arch/amiga/clockport/flipperreg.h \ src/sys/arch/amiga/clockport/flippervar.h 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/amiga/clockport/files.clockport diff -u src/sys/arch/amiga/clockport/files.clockport:1.3 src/sys/arch/amiga/clockport/files.clockport:1.4 --- src/sys/arch/amiga/clockport/files.clockport:1.3 Sat Oct 27 11:54:21 2012 +++ src/sys/arch/amiga/clockport/files.clockport Thu Nov 8 18:30:21 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.clockport,v 1.3 2012/10/27 11:54:21 phx Exp $ +# $NetBSD: files.clockport,v 1.4 2012/11/08 18:30:21 rkujawa Exp $ define clockportbus {} @@ -37,3 +37,9 @@ file arch/amiga/clockport/clockport.c cl # Individual Computers SilverSurfer serial attach com at clockport with com_ss file arch/amiga/clockport/com_ss.c com_ss + +# Individual Computers / Petsoff - Delfina 1200 / Flipper +device flipper +attach flipper at clockport +file arch/amiga/clockport/flipper.c flipper + Added files: Index: src/sys/arch/amiga/clockport/flipper.c diff -u /dev/null src/sys/arch/amiga/clockport/flipper.c:1.1 --- /dev/null Thu Nov 8 18:30:21 2012 +++ src/sys/arch/amiga/clockport/flipper.c Thu Nov 8 18:30:21 2012 @@ -0,0 +1,120 @@ +/* $NetBSD: flipper.c,v 1.1 2012/11/08 18:30:21 rkujawa Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + */ + +/* Driver for Individual Computers Delfina Flipper / Petsoff Delfina 1200. + * + * TODO: + * - linux-style /dev/dsp56k interface + * - audio + * - firmware + * - interrupts: caa->cp_intr_establish(dspintr, sc); + */ + +#include + +#include +#include + +#include + +#include + +#include +#include + +#define FLIPPER_DEBUG 1 + +static int flipper_probe(device_t, cfdata_t , void *); +static void flipper_attach(device_t, device_t, void *); + +CFATTACH_DECL_NEW(flipper, sizeof(struct flipper_softc), +flipper_probe, flipper_attach, NULL, NULL); + +static int +flipper_probe(device_t parent, cfdata_t cf, void *aux) +{ + struct clockport_attach_args *caa = aux; + uint8_t delfinaver; + bus_space_handle_t ioh; + + bus_space_map(caa->cp_iot, 0, FLIPPER_REGSIZE, 0, &ioh); + + delfinaver = bus_space_read_1(caa->cp_iot, ioh, FLIPPER_HOSTCTL); +#ifdef FLIPPER_DEBUG + aprint_normal("flipper: hostctl probe read %x\n", delfinaver); +#endif /* FLIPPER_DEBUG */ + + bus_space_unmap(caa->cp_iot, ioh, FLIPPER_REGSIZE); + + if ((delfinaver == 0xB5) || (delfinaver == 0xB6)) + return 1; + + return 0; +} + +static void +flipper_attach(device_t parent, device_t self, void *aux) +{ + struct flipper_softc *sc = device_private(self); + struct clockport_attach_args *caa = aux; + sc->sc_dev = self; + sc->sc_iot = caa->cp_iot; + + if (bus_space_map(sc->sc_iot, 0, FLIPPER_REGSIZE, 0, &sc->sc_ioh)) { + aprint_normal("can't map the bus space\n"); + return; + } + + sc->sc
CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rkujawa Date: Tue Oct 30 01:17:24 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: clockport.c clockportvar.h Log Message: Add sc_dev removed previously in a moment of insanity. How did this ever work is beyond me. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amiga/clockport/clockport.c \ src/sys/arch/amiga/clockport/clockportvar.h 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/amiga/clockport/clockport.c diff -u src/sys/arch/amiga/clockport/clockport.c:1.4 src/sys/arch/amiga/clockport/clockport.c:1.5 --- src/sys/arch/amiga/clockport/clockport.c:1.4 Sat Oct 27 17:17:26 2012 +++ src/sys/arch/amiga/clockport/clockport.c Tue Oct 30 01:17:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockport.c,v 1.4 2012/10/27 17:17:26 chs Exp $ */ +/* $NetBSD: clockport.c,v 1.5 2012/10/30 01:17:24 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -62,6 +62,7 @@ clockport_attach(device_t parent, device aprint_normal("\n"); sc = device_private(self); + sc->sc_dev = self; sc->cpb_aa = (struct clockportbus_attach_args *) aux; config_search_ia(clockport_submatch, self, "clockport", 0); Index: src/sys/arch/amiga/clockport/clockportvar.h diff -u src/sys/arch/amiga/clockport/clockportvar.h:1.4 src/sys/arch/amiga/clockport/clockportvar.h:1.5 --- src/sys/arch/amiga/clockport/clockportvar.h:1.4 Mon Jul 9 19:32:26 2012 +++ src/sys/arch/amiga/clockport/clockportvar.h Tue Oct 30 01:17:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockportvar.h,v 1.4 2012/07/09 19:32:26 rkujawa Exp $ */ +/* $NetBSD: clockportvar.h,v 1.5 2012/10/30 01:17:24 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -38,6 +38,7 @@ struct gencp_softc { }; struct clockportbus_softc { + device_t sc_dev; struct clockportbus_attach_args *cpb_aa; };
CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rkujawa Date: Mon Jul 9 19:32:26 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: clockportvar.h Log Message: Remove unused sc_dev. Thanks to cegger@. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/clockport/clockportvar.h 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/amiga/clockport/clockportvar.h diff -u src/sys/arch/amiga/clockport/clockportvar.h:1.3 src/sys/arch/amiga/clockport/clockportvar.h:1.4 --- src/sys/arch/amiga/clockport/clockportvar.h:1.3 Thu Jun 28 18:55:03 2012 +++ src/sys/arch/amiga/clockport/clockportvar.h Mon Jul 9 19:32:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockportvar.h,v 1.3 2012/06/28 18:55:03 rkujawa Exp $ */ +/* $NetBSD: clockportvar.h,v 1.4 2012/07/09 19:32:26 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -38,7 +38,6 @@ struct gencp_softc { }; struct clockportbus_softc { - device_t sc_dev; struct clockportbus_attach_args *cpb_aa; };
CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rkujawa Date: Thu Jun 28 18:55:04 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: a1k2cp.c clockport.c clockportvar.h Log Message: Obtain sc using device_private(), cosmetic changes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/clockport/a1k2cp.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/clockport/clockport.c \ src/sys/arch/amiga/clockport/clockportvar.h 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/amiga/clockport/a1k2cp.c diff -u src/sys/arch/amiga/clockport/a1k2cp.c:1.1 src/sys/arch/amiga/clockport/a1k2cp.c:1.2 --- src/sys/arch/amiga/clockport/a1k2cp.c:1.1 Tue Apr 17 09:59:03 2012 +++ src/sys/arch/amiga/clockport/a1k2cp.c Thu Jun 28 18:55:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: a1k2cp.c,v 1.1 2012/04/17 09:59:03 rkujawa Exp $ */ +/* $NetBSD: a1k2cp.c,v 1.2 2012/06/28 18:55:03 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ a1k2cp_attach(device_t parent, device_t a1k2cp_aa.cp_intr_establish = clockport_generic_intr_establish; #ifdef A1K2CP_DEBUG - aprint_normal_dev(sc->sc_dev, "pa %d va %p", + aprint_normal_dev(sc->sc_dev, "pa %x va %p\n", A1K2CP_BASE, (void*) a1k2cp_bst.base); #endif /* A1K2CP_DEBUG */ Index: src/sys/arch/amiga/clockport/clockport.c diff -u src/sys/arch/amiga/clockport/clockport.c:1.2 src/sys/arch/amiga/clockport/clockport.c:1.3 --- src/sys/arch/amiga/clockport/clockport.c:1.2 Fri May 18 20:52:02 2012 +++ src/sys/arch/amiga/clockport/clockport.c Thu Jun 28 18:55:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockport.c,v 1.2 2012/05/18 20:52:02 rkujawa Exp $ */ +/* $NetBSD: clockport.c,v 1.3 2012/06/28 18:55:03 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ clockport_attach(device_t parent, device aprint_normal("\n"); - sc = (struct clockportbus_softc *) self; + sc = device_private(self); sc->cpb_aa = (struct clockportbus_attach_args *) aux; config_search_ia(clockport_submatch, self, "clockport", 0); Index: src/sys/arch/amiga/clockport/clockportvar.h diff -u src/sys/arch/amiga/clockport/clockportvar.h:1.2 src/sys/arch/amiga/clockport/clockportvar.h:1.3 --- src/sys/arch/amiga/clockport/clockportvar.h:1.2 Tue May 15 17:35:43 2012 +++ src/sys/arch/amiga/clockport/clockportvar.h Thu Jun 28 18:55:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockportvar.h,v 1.2 2012/05/15 17:35:43 rkujawa Exp $ */ +/* $NetBSD: clockportvar.h,v 1.3 2012/06/28 18:55:03 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -38,6 +38,7 @@ struct gencp_softc { }; struct clockportbus_softc { + device_t sc_dev; struct clockportbus_attach_args *cpb_aa; };
CVS commit: src/sys/arch/amiga/clockport
Module Name:src Committed By: rkujawa Date: Fri May 18 20:52:02 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: clockport.c Log Message: Cosmetic change - print newline during autoconf. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/clockport/clockport.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/amiga/clockport/clockport.c diff -u src/sys/arch/amiga/clockport/clockport.c:1.1 src/sys/arch/amiga/clockport/clockport.c:1.2 --- src/sys/arch/amiga/clockport/clockport.c:1.1 Tue Apr 17 09:59:03 2012 +++ src/sys/arch/amiga/clockport/clockport.c Fri May 18 20:52:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: clockport.c,v 1.1 2012/04/17 09:59:03 rkujawa Exp $ */ +/* $NetBSD: clockport.c,v 1.2 2012/05/18 20:52:02 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -61,6 +61,8 @@ clockport_attach(device_t parent, device { struct clockportbus_softc *sc; +aprint_normal("\n"); + sc = (struct clockportbus_softc *) self; sc->cpb_aa = (struct clockportbus_attach_args *) aux;