Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej_scsipi]: src/sys/arch/dreamcast/dev/maple Corrected license text.
details: https://anonhg.NetBSD.org/src/rev/56653ead7328
branches: thorpej_scsipi
changeset: 477371:56653ead7328
user: marcus <marcus%NetBSD.org@localhost>
date: Sun Jan 21 22:45:58 2001 +0000
description:
Corrected license text.
diffstat:
sys/arch/dreamcast/dev/maple/maple.h | 94 ++++++++++++++++++++++++++++++++
sys/arch/dreamcast/dev/maple/mapleconf.h | 37 ++++++++++++
sys/arch/dreamcast/dev/maple/maplereg.h | 48 ++++++++++++++++
sys/arch/dreamcast/dev/maple/mkbdvar.h | 54 ++++++++++++++++++
4 files changed, 233 insertions(+), 0 deletions(-)
diffs (249 lines):
diff -r 13de43ea21b0 -r 56653ead7328 sys/arch/dreamcast/dev/maple/maple.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/dreamcast/dev/maple/maple.h Sun Jan 21 22:45:58 2001 +0000
@@ -0,0 +1,94 @@
+/* $NetBSD: maple.h,v 1.2.2.2 2001/01/21 22:45:58 marcus Exp $ */
+/*-
+ * Copyright (c) 2001 Marcus Comstedt
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Marcus Comstedt.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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.
+ */
+
+#define MAPLE_PORTS 4
+#define MAPLE_SUBUNITS 6
+
+/* Maple Bus command and response codes */
+
+#define MAPLE_RESPONSE_FILEERR -5
+#define MAPLE_RESPONSE_AGAIN -4 /* request should be retransmitted */
+#define MAPLE_RESPONSE_BADCMD -3
+#define MAPLE_RESPONSE_BADFUNC -2
+#define MAPLE_RESPONSE_NONE -1 /* unit didn't respond at all */
+#define MAPLE_COMMAND_DEVINFO 1
+#define MAPLE_COMMAND_ALLINFO 2
+#define MAPLE_COMMAND_RESET 3
+#define MAPLE_COMMAND_KILL 4
+#define MAPLE_RESPONSE_DEVINFO 5
+#define MAPLE_RESPONSE_ALLINFO 6
+#define MAPLE_RESPONSE_OK 7
+#define MAPLE_RESPONSE_DATATRF 8
+#define MAPLE_COMMAND_GETCOND 9
+#define MAPLE_COMMAND_GETMINFO 10
+#define MAPLE_COMMAND_BREAD 11
+#define MAPLE_COMMAND_BWRITE 12
+#define MAPLE_COMMAND_SETCOND 14
+
+
+/* Function codes */
+
+#define MAPLE_FUNC_CONTROLLER 0x001
+#define MAPLE_FUNC_MEMCARD 0x002
+#define MAPLE_FUNC_LCD 0x004
+#define MAPLE_FUNC_CLOCK 0x008
+#define MAPLE_FUNC_MICROPHONE 0x010
+#define MAPLE_FUNC_ARGUN 0x020
+#define MAPLE_FUNC_KEYBOARD 0x040
+#define MAPLE_FUNC_LIGHTGUN 0x080
+#define MAPLE_FUNC_PURUPURU 0x100
+#define MAPLE_FUNC_MOUSE 0x200
+
+struct maple_devinfo {
+ u_int32_t di_func; /* function code */
+ u_int32_t di_function_data[3]; /* function data */
+ u_int8_t di_area_code; /* region settings */
+ u_int8_t di_connector_direction; /* ? */
+ char di_product_name[30]; /* name of the device */
+ char di_product_license[60]; /* manufacturer info */
+ u_int16_t di_standby_power; /* standby power consumption */
+ u_int16_t di_max_power; /* maximum power consumption */
+};
+
+struct maple_unit {
+ int port, subunit;
+ int status;
+ u_int32_t getcond_func;
+ void (*getcond_callback)(void *, void *, int);
+ void *getcond_data;
+ struct maple_devinfo devinfo;
+};
+
+extern void maple_set_condition_callback __P((struct device *, int, int, u_int32_t, void (*)(void *, void *, int), void *));
+extern u_int32_t maple_get_function_data __P((struct maple_devinfo *, u_int32_t));
+extern void maple_run_polling __P((struct device *));
diff -r 13de43ea21b0 -r 56653ead7328 sys/arch/dreamcast/dev/maple/mapleconf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/dreamcast/dev/maple/mapleconf.h Sun Jan 21 22:45:58 2001 +0000
@@ -0,0 +1,37 @@
+/* $NetBSD: mapleconf.h,v 1.2.2.2 2001/01/21 22:45:59 marcus Exp $ */
+/*-
+ * Copyright (c) 2001 Marcus Comstedt
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Marcus Comstedt.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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.
+ */
+
+struct maple_attach_args {
+ int ma_port, ma_subunit;
+ struct maple_devinfo *ma_devinfo;
+};
diff -r 13de43ea21b0 -r 56653ead7328 sys/arch/dreamcast/dev/maple/maplereg.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/dreamcast/dev/maple/maplereg.h Sun Jan 21 22:45:58 2001 +0000
@@ -0,0 +1,48 @@
+/* $NetBSD: maplereg.h,v 1.2.2.2 2001/01/21 22:45:59 marcus Exp $ */
+
+/*-
+ * Copyright (c) 2001 Marcus Comstedt
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Marcus Comstedt.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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.
+ */
+
+#define MAPLE_DMAADDR (*(volatile paddr_t *) 0xa05f6c04)
+#define MAPLE_RESET2 (*(volatile u_int32_t *) 0xa05f6c10)
+#define MAPLE_ENABLE (*(volatile u_int32_t *) 0xa05f6c14)
+#define MAPLE_STATE (*(volatile u_int32_t *) 0xa05f6c18)
+#define MAPLE_SPEED (*(volatile u_int32_t *) 0xa05f6c80)
+#define MAPLE_RESET (*(volatile u_int32_t *) 0xa05f6c8c)
+
+#define RESET_MAGIC 0x6155404f
+
+#define SPEED_2MBPS 0
+#define TIMEOUT(n) ((n)<<16)
+
+#define MAPLE_DMABUF_SIZE (MAPLE_PORTS*MAPLE_SUBUNITS*(1024+1024+4+4))
+
diff -r 13de43ea21b0 -r 56653ead7328 sys/arch/dreamcast/dev/maple/mkbdvar.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/dreamcast/dev/maple/mkbdvar.h Sun Jan 21 22:45:58 2001 +0000
@@ -0,0 +1,54 @@
+/* $NetBSD: mkbdvar.h,v 1.2.2.2 2001/01/21 22:45:59 marcus Exp $ */
+
+/*-
+ * Copyright (c) 2001 Marcus Comstedt
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Marcus Comstedt.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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.
+ */
+
+struct mkbd_condition {
+ u_int8_t shift;
+ u_int8_t led;
+ u_int8_t key[6];
+};
+
+/*
+ * State info, per keyboard instance.
+ */
+struct mkbd_softc {
+ struct device sc_dev;
+ struct device *sc_wskbddev;
+ struct device *sc_parent;
+
+ int sc_port, sc_subunit;
+ struct mkbd_condition sc_condition;
+};
+
+int mkbd_cnattach __P((void));
+
Home |
Main Index |
Thread Index |
Old Index