Module Name: src
Committed By: rkujawa
Date: Tue Apr 17 09:59:03 UTC 2012
Modified Files:
src/sys/arch/amiga/amiga: autoconf.c
src/sys/arch/amiga/conf: GENERIC.in files.amiga
Added Files:
src/sys/arch/amiga/clockport: a1k2cp.c clockport.c clockport_common.c
clockportvar.h com_ss.c files.clockport
Log Message:
Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/amiga/amiga/autoconf.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/clockport/a1k2cp.c \
src/sys/arch/amiga/clockport/clockport.c \
src/sys/arch/amiga/clockport/clockport_common.c \
src/sys/arch/amiga/clockport/clockportvar.h \
src/sys/arch/amiga/clockport/com_ss.c \
src/sys/arch/amiga/clockport/files.clockport
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amiga/conf/GENERIC.in
cvs rdiff -u -r1.154 -r1.155 src/sys/arch/amiga/conf/files.amiga
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/amiga/autoconf.c
diff -u src/sys/arch/amiga/amiga/autoconf.c:1.110 src/sys/arch/amiga/amiga/autoconf.c:1.111
--- src/sys/arch/amiga/amiga/autoconf.c:1.110 Sun Feb 12 16:34:06 2012
+++ src/sys/arch/amiga/amiga/autoconf.c Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.110 2012/02/12 16:34:06 matt Exp $ */
+/* $NetBSD: autoconf.c,v 1.111 2012/04/17 09:59:03 rkujawa Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.110 2012/02/12 16:34:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.111 2012/04/17 09:59:03 rkujawa Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -295,6 +295,8 @@ mbattach(device_t pdp, device_t dp, void
config_found(dp, __UNCONST("ahsc"), simple_devprint);
if (is_a600() || is_a1200())
config_found(dp, __UNCONST("pccard"), simple_devprint);
+ if (is_a1200())
+ config_found(dp, __UNCONST("a1k2cp"), simple_devprint);
#ifdef DRACO
if (!is_draco())
#endif
Index: src/sys/arch/amiga/conf/GENERIC.in
diff -u src/sys/arch/amiga/conf/GENERIC.in:1.97 src/sys/arch/amiga/conf/GENERIC.in:1.98
--- src/sys/arch/amiga/conf/GENERIC.in:1.97 Sat Mar 10 21:51:49 2012
+++ src/sys/arch/amiga/conf/GENERIC.in Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.97 2012/03/10 21:51:49 joerg Exp $
+# $NetBSD: GENERIC.in,v 1.98 2012/04/17 09:59:03 rkujawa Exp $
#
##
# GENERIC machine description file
@@ -52,7 +52,7 @@ include "arch/amiga/conf/std.amiga"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.97 $"
+#ident "GENERIC-$Revision: 1.98 $"
m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
makeoptions COPTS="-Os"
@@ -415,6 +415,11 @@ a2kbbc0 at mainbus0 # A2000 battery ba
m4_ifdef(`INSTALL_CONFIGURATION', `', `m4_dnl
aucc* at mainbus0 # Amiga CC audio
audio* at aucc?
+
+#a1k2cp0 at mainbus0 # A1200 on-board clockport
+#clockport* at a1k2cp0
+
+#com* at clockport? # Individual Computers SilverSurfer
')m4_dnl
')m4_dnl
Index: src/sys/arch/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.154 src/sys/arch/amiga/conf/files.amiga:1.155
--- src/sys/arch/amiga/conf/files.amiga:1.154 Tue Jan 24 00:19:39 2012
+++ src/sys/arch/amiga/conf/files.amiga Tue Apr 17 09:59:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: files.amiga,v 1.154 2012/01/24 00:19:39 rkujawa Exp $
+# $NetBSD: files.amiga,v 1.155 2012/04/17 09:59:03 rkujawa Exp $
# maxpartitions must be first item in files.${ARCH}.newconf
maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL!
@@ -527,5 +527,7 @@ attach cv3dpb at zbus
include "dev/i2o/files.i2o"
include "dev/pci/files.pci"
+include "arch/amiga/clockport/files.clockport"
+
include "arch/amiga/conf/majors.amiga"
Added files:
Index: src/sys/arch/amiga/clockport/a1k2cp.c
diff -u /dev/null src/sys/arch/amiga/clockport/a1k2cp.c:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/a1k2cp.c Tue Apr 17 09:59:03 2012
@@ -0,0 +1,109 @@
+/* $NetBSD: a1k2cp.c,v 1.1 2012/04/17 09:59:03 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 A1200 on-board clockport. */
+
+#include <sys/cdefs.h>
+
+#include <sys/systm.h>
+#include <sys/types.h>
+#include <sys/device.h>
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/kmem.h>
+
+#include <machine/cpu.h>
+
+#include <amiga/amiga/device.h>
+
+#include <amiga/dev/zbusvar.h>
+
+#include <amiga/clockport/clockportvar.h>
+
+/* #define A1K2CP_DEBUG 1 */
+
+#define A1K2CP_BASE 0xD80001
+
+static int a1k2cp_match(struct device *pdp, struct cfdata *cfp, void *aux);
+static void a1k2cp_attach(device_t parent, device_t self, void *aux);
+
+struct a1k2cp_softc {
+ device_t sc_dev;
+};
+
+CFATTACH_DECL_NEW(a1k2cp, sizeof(struct a1k2cp_softc),
+ a1k2cp_match, a1k2cp_attach, NULL, NULL);
+
+static int
+a1k2cp_match(struct device *pdp, struct cfdata *cfp, void *aux)
+{
+
+ static int a1k2cp_matched = 0;
+
+ if (!matchname("a1k2cp", aux))
+ return 0;
+
+ if (a1k2cp_matched)
+ return 0;
+
+ if (!is_a1200())
+ return 0;
+
+ a1k2cp_matched = 1;
+ return 1;
+}
+
+static void
+a1k2cp_attach(device_t parent, device_t self, void *aux)
+{
+ struct a1k2cp_softc *sc;
+ struct clockportbus_attach_args a1k2cp_aa;
+ struct bus_space_tag a1k2cp_bst;
+
+ sc = device_private(self);
+ sc->sc_dev = self;
+
+ aprint_normal(": A1200 on-board clockport\n");
+
+ a1k2cp_bst.base = (bus_addr_t) __UNVOLATILE(ztwomap(A1K2CP_BASE));
+ a1k2cp_bst.absm = &amiga_bus_stride_4;
+
+ a1k2cp_aa.cp_iot = &a1k2cp_bst;
+ a1k2cp_aa.cp_intr_establish = clockport_generic_intr_establish;
+
+#ifdef A1K2CP_DEBUG
+ aprint_normal_dev(sc->sc_dev, "pa %d va %p",
+ A1K2CP_BASE, (void*) a1k2cp_bst.base);
+#endif /* A1K2CP_DEBUG */
+
+ config_found(sc->sc_dev, &a1k2cp_aa, 0);
+}
+
Index: src/sys/arch/amiga/clockport/clockport.c
diff -u /dev/null src/sys/arch/amiga/clockport/clockport.c:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/clockport.c Tue Apr 17 09:59:03 2012
@@ -0,0 +1,100 @@
+/* $NetBSD: clockport.c,v 1.1 2012/04/17 09:59:03 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.
+ */
+
+#include <sys/cdefs.h>
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/termios.h>
+
+#include <sys/bus.h>
+#include <sys/intr.h>
+
+#include <amiga/clockport/clockportvar.h>
+
+static int clockport_match(device_t, cfdata_t , void *);
+static void clockport_attach(device_t, device_t, void *);
+static int clockport_print(struct clockport_attach_args *a,
+ const char *str);
+static int clockport_submatch(device_t cpbus, cfdata_t dev,
+ const int *ldesc, void *aux);
+
+CFATTACH_DECL_NEW(clockport, sizeof(struct clockportbus_softc),
+ clockport_match, clockport_attach, NULL, NULL);
+
+static int
+clockport_match(device_t parent, cfdata_t cf, void *aux)
+{
+ return 1;
+}
+
+static void
+clockport_attach(device_t parent, device_t self, void *aux)
+{
+ struct clockportbus_softc *sc;
+
+ sc = (struct clockportbus_softc *) self;
+ sc->cpb_aa = (struct clockportbus_attach_args *) aux;
+
+ config_search_ia(clockport_submatch, self, "clockport", 0);
+}
+
+static int
+clockport_submatch(device_t cpbus, cfdata_t dev, const int *ldesc, void *aux)
+{
+ struct clockportbus_softc *sc;
+ struct clockport_attach_args a;
+
+ sc = device_private(cpbus);
+
+ /* XXX: copy bus_space_tag and intr routine for now... */
+ a.cp_iot = sc->cpb_aa->cp_iot;
+ a.cp_intr_establish = sc->cpb_aa->cp_intr_establish;
+
+ if(config_match(cpbus, dev, &a)) {
+ config_attach(cpbus, dev, &a, (cfprint_t) clockport_print);
+ return 1;
+ }
+
+ return 0;
+}
+
+static int
+clockport_print(struct clockport_attach_args *a, const char *str)
+{
+ if (str == NULL)
+ return 0;
+
+ printf("%s ", str);
+
+ return 0;
+}
+
Index: src/sys/arch/amiga/clockport/clockport_common.c
diff -u /dev/null src/sys/arch/amiga/clockport/clockport_common.c:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/clockport_common.c Tue Apr 17 09:59:03 2012
@@ -0,0 +1,65 @@
+/* $NetBSD: clockport_common.c,v 1.1 2012/04/17 09:59:03 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.
+ */
+
+/*
+ * Routines for generic clockports, shared among all backend drivers.
+ * TODO: implement clockport_intr_disestablish.
+ */
+
+#include <sys/cdefs.h>
+
+#include <sys/systm.h>
+#include <sys/types.h>
+#include <sys/bus.h>
+#include <sys/kmem.h>
+
+#include <machine/cpu.h>
+
+#include <amiga/clockport/clockportvar.h>
+
+#define CLOCKPORT_GENERIC_IPL 6
+
+void *
+clockport_generic_intr_establish(int (*isr)(void *), void *arg)
+{
+ struct isr *sc_isr;
+
+ sc_isr = kmem_alloc(sizeof(struct isr), KM_SLEEP);
+
+ sc_isr->isr_intr = isr;
+ sc_isr->isr_arg = arg;
+ sc_isr->isr_ipl = CLOCKPORT_GENERIC_IPL;
+
+ add_isr(sc_isr);
+
+ return sc_isr;
+}
+
Index: src/sys/arch/amiga/clockport/clockportvar.h
diff -u /dev/null src/sys/arch/amiga/clockport/clockportvar.h:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/clockportvar.h Tue Apr 17 09:59:03 2012
@@ -0,0 +1,53 @@
+/* $NetBSD: clockportvar.h,v 1.1 2012/04/17 09:59:03 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.
+ */
+
+#include <sys/types.h>
+
+struct clockportbus_softc {
+ struct clockportbus_attach_args *cpb_aa;
+};
+
+struct clockportbus_attach_args {
+
+ bus_space_tag_t cp_iot;
+
+ void *(*cp_intr_establish)(int (*)(void *), void *);
+};
+
+struct clockport_attach_args {
+
+ bus_space_tag_t cp_iot;
+
+ void *(*cp_intr_establish)(int (*)(void *), void *);
+};
+
+void *clockport_generic_intr_establish(int (*)(void *), void *);
+
Index: src/sys/arch/amiga/clockport/com_ss.c
diff -u /dev/null src/sys/arch/amiga/clockport/com_ss.c:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/com_ss.c Tue Apr 17 09:59:03 2012
@@ -0,0 +1,81 @@
+/* $NetBSD: com_ss.c,v 1.1 2012/04/17 09:59:03 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 SilverSurfer. */
+
+#include <sys/cdefs.h>
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/termios.h>
+
+#include <sys/bus.h>
+#include <sys/intr.h>
+
+#include <dev/ic/comreg.h>
+#include <dev/ic/comvar.h>
+
+#include <amiga/clockport/clockportvar.h>
+
+#define COM_SS_REGS 8
+
+static int com_ss_probe(device_t, cfdata_t , void *);
+static void com_ss_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(com_ss, sizeof(struct com_softc),
+ com_ss_probe, com_ss_attach, NULL, NULL);
+
+static int
+com_ss_probe(device_t parent, cfdata_t cf, void *aux)
+{
+ return 1; /* TODO: implement probe */
+}
+
+static void
+com_ss_attach(device_t parent, device_t self, void *aux)
+{
+ struct com_softc *sc = device_private(self);
+ struct clockport_attach_args *caa = aux;
+
+ bus_space_handle_t ioh;
+
+ sc->sc_dev = self;
+ sc->sc_frequency = COM_FREQ;
+
+ bus_space_map(caa->cp_iot, 0, COM_SS_REGS, 0, &ioh);
+
+ COM_INIT_REGS(sc->sc_regs, caa->cp_iot, ioh, 0 /* off */);
+
+ com_attach_subr(sc);
+
+ caa->cp_intr_establish(comintr, sc);
+}
+
Index: src/sys/arch/amiga/clockport/files.clockport
diff -u /dev/null src/sys/arch/amiga/clockport/files.clockport:1.1
--- /dev/null Tue Apr 17 09:59:03 2012
+++ src/sys/arch/amiga/clockport/files.clockport Tue Apr 17 09:59:03 2012
@@ -0,0 +1,26 @@
+# $NetBSD: files.clockport,v 1.1 2012/04/17 09:59:03 rkujawa Exp $
+
+define clockportbus {}
+
+define clockport_common
+file arch/amiga/clockport/clockport_common.c clockport_generic
+
+# A1200 clockport
+device a1k2cp: clockportbus, clockport_common
+attach a1k2cp at mainbus
+file arch/amiga/clockport/a1k2cp.c a1k2cp
+
+device clockport {}
+attach clockport at clockportbus
+file arch/amiga/clockport/clockport.c clockport
+
+# Individual Computers SilverSurfer serial
+#device com
+attach com at clockport with com_ss
+file arch/amiga/clockport/com_ss.c
+
+# TODO: We should support for generic clockports, like:
+# device obio at mainbus {[address = -1]}
+# device gencp
+# attach gencp at obio
+