git: ac4643ef7865 - main - Remove terasic drivers used on the Cambridge BERI tablet.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jan 2022 19:02:19 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=ac4643ef786553e7d61cace456ef865920689669
commit ac4643ef786553e7d61cace456ef865920689669
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-01-27 19:00:48 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-01-27 19:01:51 +0000
Remove terasic drivers used on the Cambridge BERI tablet.
Reviewed by: brooks
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D34057
---
ObsoleteFiles.inc | 3 +
share/man/man4/Makefile | 1 -
share/man/man4/terasic_mtl.4 | 131 -------
sys/dev/terasic/de4led/terasic_de4led.c | 192 -----------
sys/dev/terasic/de4led/terasic_de4led.h | 79 -----
sys/dev/terasic/de4led/terasic_de4led_fdt.c | 123 -------
sys/dev/terasic/de4led/terasic_de4led_nexus.c | 112 ------
sys/dev/terasic/mtl/terasic_mtl.c | 134 --------
sys/dev/terasic/mtl/terasic_mtl.h | 235 -------------
sys/dev/terasic/mtl/terasic_mtl_fdt.c | 217 ------------
sys/dev/terasic/mtl/terasic_mtl_nexus.c | 208 -----------
sys/dev/terasic/mtl/terasic_mtl_pixel.c | 161 ---------
sys/dev/terasic/mtl/terasic_mtl_reg.c | 296 ----------------
sys/dev/terasic/mtl/terasic_mtl_syscons.c | 476 --------------------------
sys/dev/terasic/mtl/terasic_mtl_text.c | 196 -----------
sys/dev/terasic/mtl/terasic_mtl_vt.c | 133 -------
16 files changed, 3 insertions(+), 2694 deletions(-)
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index f6856e775936..dc065d970478 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -52,6 +52,9 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20220127: terasic_mtl.4 removed
+OLD_FILES+=usr/share/man/man4/terasic_mtl.4.gz
+
# 20211229: libc++ moved to /lib
MOVED_LIBS+=usr/lib/libc++.so.1
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 7b64bad84536..23582e95c79b 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -546,7 +546,6 @@ MAN= aac.4 \
tcp.4 \
tcp_bbr.4 \
tdfx.4 \
- terasic_mtl.4 \
termios.4 \
textdump.4 \
ti.4 \
diff --git a/share/man/man4/terasic_mtl.4 b/share/man/man4/terasic_mtl.4
deleted file mode 100644
index 757efd16bfee..000000000000
--- a/share/man/man4/terasic_mtl.4
+++ /dev/null
@@ -1,131 +0,0 @@
-.\"-
-.\" Copyright (c) 2012 Robert N. M. Watson
-.\" All rights reserved.
-.\"
-.\" This software was developed by SRI International and the University of
-.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
-.\" ("CTSRD"), as part of the DARPA CRASH research programme.
-.\"
-.\" 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 AUTHOR 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 AUTHOR 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.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd August 18, 2012
-.Dt TERASIC_MTL 4
-.Os
-.Sh NAME
-.Nm terasic_mtl
-.Nd driver for the Terasic/Cambridge Multi-Touch LCD device
-.Sh SYNOPSIS
-.Cd "device terasic_mtl"
-.Pp
-In
-.Pa /boot/device.hints :
-.Cd hint.terasic_mtl.0.at="nexus0"
-.Cd hint.terasic_mtl.0.reg_maddr=0x70400000
-.Cd hint.terasic_mtl.0.reg_msize=0x1000
-.Cd hint.terasic_mtl.0.pixel_maddr=0x70000000
-.Cd hint.terasic_mtl.0.pixel_msize=0x177000
-.Cd hint.terasic_mtl.0.text_maddr=0x70177000
-.Cd hint.terasic_mtl.0.text_msize=0x2000
-.Sh DESCRIPTION
-The
-.Nm
-device driver provides support for the Terasic Multi-Touch LCD combined as
-controlled by a University of Cambridge's IP Core.
-Three device nodes are instantiated, representing various services supported
-by the device:
-.Bl -tag -width terasic_pixelX
-.It terasic_regX
-Memory-mapped register interface, including touch screen input.
-.It terasic_pixelX
-Memory-mapped pixel-oriented frame buffer.
-.It terasic_textX
-Memory-mapped text-oriented frame buffer.
-.El
-.Pp
-.Nm
-devices are also attached to the
-.Xr syscons 4
-framework, which implements a VT-compatible terminal connected to the
-.Xr tty 4
-framework.
-.Li ttyvX
-device nodes may be added to
-.Xr ttys 5
-in order to launch
-.Xr login 1
-sessions at boot.
-.Pp
-Register, text, and pixel devices may be accessed using
-.Xr read 2
-and
-.Xr write 2
-system calls, and also memory mapped using
-.Xr mmap 2 .
-.Sh SEE ALSO
-.Xr login 1 ,
-.Xr ioctl 2 ,
-.Xr mmap 2 ,
-.Xr poll 2 ,
-.Xr read 2 ,
-.Xr write 2 ,
-.Xr syscons 4 ,
-.Xr tty 4 ,
-.Xr ttys 5
-.Sh HISTORY
-The
-.Nm
-device driver first appeared in
-.Fx 10.0 .
-.Sh AUTHORS
-The
-.Nm
-device driver and this manual page were
-developed by SRI International and the University of Cambridge Computer
-Laboratory under DARPA/AFRL contract
-.Pq FA8750-10-C-0237
-.Pq Do CTSRD Dc ,
-as part of the DARPA CRASH research programme.
-This device driver was written by
-.An Robert N. M. Watson .
-.Sh BUGS
-The
-.Xr syscons 4
-attachment does not support the hardware cursor feature.
-.Pp
-A more structured interface to control registers using the
-.Xr ioctl 2
-system call, would sometimes be preferable to memory mapping.
-For touch screen input, it would be highly desirable to offer a streaming
-interface whose events can be managed using
-.Xr poll 2
-and related system calls, with the kernel performing polling rather than the
-userspace application.
-.Pp
-.Nm
-supports only a
-.Li nexus
-bus attachment, which is appropriate for system-on-chip busses such as
-Altera's Avalon bus.
-If the IP core is configured off of another bus type, then additional bus
-attachments will be required.
diff --git a/sys/dev/terasic/de4led/terasic_de4led.c b/sys/dev/terasic/de4led/terasic_de4led.c
deleted file mode 100644
index ee99bd541233..000000000000
--- a/sys/dev/terasic/de4led/terasic_de4led.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <sys/rman.h>
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-
-#include <dev/led/led.h>
-#include <dev/terasic/de4led/terasic_de4led.h>
-
-devclass_t terasic_de4led_devclass;
-
-static void
-terasic_de4led_update(struct terasic_de4led_softc *sc)
-{
-
- TERASIC_DE4LED_LOCK_ASSERT(sc);
-
- bus_write_1(sc->tdl_res, TERASIC_DE4LED_OFF_LED, sc->tdl_bits);
-}
-
-static void
-led_update(struct terasic_de4led_softc *sc, int bit, int onoff)
-{
-
- TERASIC_DE4LED_LOCK(sc);
- TERASIC_DE4LED_SETLED(sc, bit, onoff);
- terasic_de4led_update(sc);
- TERASIC_DE4LED_UNLOCK(sc);
-}
-
-static void
-led_0(void *arg, int onoff)
-{
-
- led_update(arg, 0, onoff);
-}
-
-static void
-led_1(void *arg, int onoff)
-{
-
- led_update(arg, 1, onoff);
-}
-
-static void
-led_2(void *arg, int onoff)
-{
-
- led_update(arg, 2, onoff);
-}
-
-static void
-led_3(void *arg, int onoff)
-{
-
- led_update(arg, 3, onoff);
-}
-
-static void
-led_4(void *arg, int onoff)
-{
-
- led_update(arg, 4, onoff);
-}
-
-static void
-led_5(void *arg, int onoff)
-{
-
- led_update(arg, 5, onoff);
-}
-
-static void
-led_6(void *arg, int onoff)
-{
-
- led_update(arg, 6, onoff);
-}
-
-static void
-led_7(void *arg, int onoff)
-{
-
- led_update(arg, 7, onoff);
-}
-
-void
-terasic_de4led_attach(struct terasic_de4led_softc *sc)
-{
- const char *cmd;
-
- TERASIC_DE4LED_LOCK_INIT(sc);
-
- /*
- * Clear the LED array before we start.
- */
- TERASIC_DE4LED_LOCK(sc);
- TERASIC_DE4LED_CLEARBAR(sc);
- terasic_de4led_update(sc);
- TERASIC_DE4LED_UNLOCK(sc);
-
- /*
- * Register the LED array with led(4).
- */
- sc->tdl_leds[0] = led_create(led_0, sc, "de4led_0");
- sc->tdl_leds[1] = led_create(led_1, sc, "de4led_1");
- sc->tdl_leds[2] = led_create(led_2, sc, "de4led_2");
- sc->tdl_leds[3] = led_create(led_3, sc, "de4led_3");
- sc->tdl_leds[4] = led_create(led_4, sc, "de4led_4");
- sc->tdl_leds[5] = led_create(led_5, sc, "de4led_5");
- sc->tdl_leds[6] = led_create(led_6, sc, "de4led_6");
- sc->tdl_leds[7] = led_create(led_7, sc, "de4led_7");
-
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_0_cmd", &cmd) == 0)
- led_set("de4led_0", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_1_cmd", &cmd) == 0)
- led_set("de4led_1", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_2_cmd", &cmd) == 0)
- led_set("de4led_2", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_3_cmd", &cmd) == 0)
- led_set("de4led_3", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_4_cmd", &cmd) == 0)
- led_set("de4led_4", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_5_cmd", &cmd) == 0)
- led_set("de4led_5", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_6_cmd", &cmd) == 0)
- led_set("de4led_6", cmd);
- if (resource_string_value(device_get_name(sc->tdl_dev),
- sc->tdl_unit, "de4led_7_cmd", &cmd) == 0)
- led_set("de4led_7", cmd);
-}
-
-void
-terasic_de4led_detach(struct terasic_de4led_softc *sc)
-{
- int i;
-
- for (i = 0; i < 8; i++) {
- led_destroy(sc->tdl_leds[i]);
- sc->tdl_leds[i] = NULL;
- }
- TERASIC_DE4LED_LOCK(sc);
- TERASIC_DE4LED_CLEARBAR(sc);
- terasic_de4led_update(sc);
- TERASIC_DE4LED_UNLOCK(sc);
- TERASIC_DE4LED_LOCK_DESTROY(sc);
-}
diff --git a/sys/dev/terasic/de4led/terasic_de4led.h b/sys/dev/terasic/de4led/terasic_de4led.h
deleted file mode 100644
index 873a531ff3e1..000000000000
--- a/sys/dev/terasic/de4led/terasic_de4led.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _DEV_TERASIC_DE4LED_H_
-#define _DEV_TERASIC_DE4LED_H_
-
-#define TERASIC_DE4LED_NUMLEDS 8
-struct terasic_de4led_softc {
- device_t tdl_dev;
- int tdl_unit;
- struct resource *tdl_res;
- int tdl_rid;
- struct mtx tdl_lock;
- uint8_t tdl_bits;
- struct cdev *tdl_leds[TERASIC_DE4LED_NUMLEDS];
-};
-
-#define TERASIC_DE4LED_LOCK(sc) mtx_lock(&(sc)->tdl_lock)
-#define TERASIC_DE4LED_LOCK_ASSERT(sc) mtx_assert(&(sc)->tdl_lock, MA_OWNED)
-#define TERASIC_DE4LED_LOCK_DESTROY(sc) mtx_destroy(&(sc)->tdl_lock)
-#define TERASIC_DE4LED_LOCK_INIT(sc) mtx_init(&(sc)->tdl_lock, \
- "terasic_de4led", NULL, MTX_DEF)
-#define TERASIC_DE4LED_UNLOCK(sc) mtx_unlock(&(sc)->tdl_lock)
-
-/*
- * Setting and clearing LEDs. tdl_bits is in the bit order preferred for I/O.
- * The LED elements are labelled 1..8 on the DE-4, so bit 0 is LED 1, and so
- * on.
- */
-#define TERASIC_DE4LED_CLEARBAR(sc) do { \
- (sc)->tdl_bits = 0; \
-} while (0)
-#define TERASIC_DE4LED_SETLED(sc, led, onoff) do { \
- (sc)->tdl_bits &= ~(1 << (led)); \
- (sc)->tdl_bits |= ((onoff != 0) ? 1 : 0) << (led); \
-} while (0)
-
-/*
- * Only one offset matters for this device -- 0.
- */
-#define TERASIC_DE4LED_OFF_LED 0
-
-void terasic_de4led_attach(struct terasic_de4led_softc *sc);
-void terasic_de4led_detach(struct terasic_de4led_softc *sc);
-
-extern devclass_t terasic_de4led_devclass;
-
-#endif /* _DEV_TERASIC_DE4LED_H_ */
diff --git a/sys/dev/terasic/de4led/terasic_de4led_fdt.c b/sys/dev/terasic/de4led/terasic_de4led_fdt.c
deleted file mode 100644
index d8473f7d0fbf..000000000000
--- a/sys/dev/terasic/de4led/terasic_de4led_fdt.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <sys/condvar.h>
-#include <sys/conf.h>
-#include <sys/bio.h>
-#include <sys/kernel.h>
-#include <sys/lock.h>
-#include <sys/malloc.h>
-#include <sys/module.h>
-#include <sys/mutex.h>
-#include <sys/rman.h>
-#include <sys/systm.h>
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-
-#include <dev/fdt/fdt_common.h>
-#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_bus.h>
-#include <dev/ofw/ofw_bus_subr.h>
-
-#include <dev/terasic/de4led/terasic_de4led.h>
-
-/*
- * Nexus bus attachment for the 8-element LED on the Terasic DE-4 FPGA board,
- * which is hooked up to the processor via a memory-mapped Avalon bus.
- */
-static int
-terasic_de4led_fdt_probe(device_t dev)
-{
-
- if (!ofw_bus_status_okay(dev))
- return (ENXIO);
-
- if (ofw_bus_is_compatible(dev, "sri-cambridge,de4led")) {
- device_set_desc(dev, "Terasic DE4 8-element LED");
- return (BUS_PROBE_DEFAULT);
- }
- return (ENXIO);
-}
-
-static int
-terasic_de4led_fdt_attach(device_t dev)
-{
- struct terasic_de4led_softc *sc;
-
- sc = device_get_softc(dev);
- sc->tdl_dev = dev;
- sc->tdl_unit = device_get_unit(dev);
- sc->tdl_rid = 0;
- sc->tdl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &sc->tdl_rid, RF_ACTIVE);
- if (sc->tdl_res == NULL) {
- device_printf(dev, "couldn't map memory\n");
- return (ENXIO);
- }
- terasic_de4led_attach(sc);
- return (0);
-}
-
-static int
-terasic_de4led_fdt_detach(device_t dev)
-{
- struct terasic_de4led_softc *sc;
-
- sc = device_get_softc(dev);
- KASSERT(sc->tdl_res != NULL, ("%s: resources not allocated",
- __func__));
- terasic_de4led_detach(sc);
- bus_release_resource(dev, SYS_RES_MEMORY, sc->tdl_rid, sc->tdl_res);
- return (0);
-}
-
-static device_method_t terasic_de4led_fdt_methods[] = {
- DEVMETHOD(device_probe, terasic_de4led_fdt_probe),
- DEVMETHOD(device_attach, terasic_de4led_fdt_attach),
- DEVMETHOD(device_detach, terasic_de4led_fdt_detach),
- { 0, 0 }
-};
-
-static driver_t terasic_de4led_fdt_driver = {
- "terasic_de4led",
- terasic_de4led_fdt_methods,
- sizeof(struct terasic_de4led_softc),
-};
-
-DRIVER_MODULE(terasic_de4led, simplebus, terasic_de4led_fdt_driver,
- terasic_de4led_devclass, 0, 0);
diff --git a/sys/dev/terasic/de4led/terasic_de4led_nexus.c b/sys/dev/terasic/de4led/terasic_de4led_nexus.c
deleted file mode 100644
index 33ea2377cc03..000000000000
--- a/sys/dev/terasic/de4led/terasic_de4led_nexus.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <sys/condvar.h>
-#include <sys/conf.h>
-#include <sys/bio.h>
-#include <sys/kernel.h>
-#include <sys/lock.h>
-#include <sys/malloc.h>
-#include <sys/module.h>
-#include <sys/mutex.h>
-#include <sys/rman.h>
-#include <sys/systm.h>
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-
-#include <dev/terasic/de4led/terasic_de4led.h>
-
-/*
- * Nexus bus attachment for the 8-element LED on the Terasic DE-4 FPGA board,
- * which is hooked up to the processor via a memory-mapped Avalon bus.
- */
-static int
-terasic_de4led_nexus_probe(device_t dev)
-{
-
- device_set_desc(dev, "Terasic DE4 8-element LED");
- return (BUS_PROBE_NOWILDCARD);
-}
-
-static int
-terasic_de4led_nexus_attach(device_t dev)
-{
- struct terasic_de4led_softc *sc;
-
- sc = device_get_softc(dev);
- sc->tdl_dev = dev;
- sc->tdl_unit = device_get_unit(dev);
- sc->tdl_rid = 0;
- sc->tdl_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &sc->tdl_rid, RF_ACTIVE);
- if (sc->tdl_res == NULL) {
- device_printf(dev, "couldn't map memory\n");
- return (ENXIO);
- }
- terasic_de4led_attach(sc);
- return (0);
-}
-
-static int
-terasic_de4led_nexus_detach(device_t dev)
-{
- struct terasic_de4led_softc *sc;
-
- sc = device_get_softc(dev);
- KASSERT(sc->tdl_res != NULL, ("%s: resources not allocated",
- __func__));
- terasic_de4led_detach(sc);
- bus_release_resource(dev, SYS_RES_MEMORY, sc->tdl_rid, sc->tdl_res);
- return (0);
-}
-
-static device_method_t terasic_de4led_nexus_methods[] = {
- DEVMETHOD(device_probe, terasic_de4led_nexus_probe),
- DEVMETHOD(device_attach, terasic_de4led_nexus_attach),
- DEVMETHOD(device_detach, terasic_de4led_nexus_detach),
- { 0, 0 }
-};
-
-static driver_t terasic_de4led_nexus_driver = {
- "terasic_de4led",
- terasic_de4led_nexus_methods,
- sizeof(struct terasic_de4led_softc),
-};
-
-DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver,
- terasic_de4led_devclass, 0, 0);
diff --git a/sys/dev/terasic/mtl/terasic_mtl.c b/sys/dev/terasic/mtl/terasic_mtl.c
deleted file mode 100644
index 10e3b413ca96..000000000000
--- a/sys/dev/terasic/mtl/terasic_mtl.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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>
-__FBSDID("$FreeBSD$");
-
-#include "opt_syscons.h"
-
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <sys/condvar.h>
-#include <sys/conf.h>
-#include <sys/consio.h> /* struct vt_mode */
-#include <sys/endian.h>
-#include <sys/fbio.h> /* video_adapter_t */
-#include <sys/kernel.h>
-#include <sys/lock.h>
-#include <sys/malloc.h>
-#include <sys/module.h>
-#include <sys/mutex.h>
-#include <sys/rman.h>
-#include <sys/systm.h>
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-
-#include <dev/terasic/mtl/terasic_mtl.h>
-
-/*
- * Device driver for the Terasic Multitouch LCD (MTL). Three separate
- * sub-drivers that support, respectively, access to device control registers,
- * the pixel frame buffer, and the text frame buffer. The pixel frame buffer
- * is hooked up to vt(4), and the text frame buffer to syscons(4).
- *
- * Eventually, the frame buffer control registers and touch screen input FIFO
- * will end up being separate sub-drivers as well.
- *
- * Note: sub-driver detach routines must check whether or not they have
- * attached as they may be called even if the attach routine hasn't been, on
- * an error.
- */
-
-devclass_t terasic_mtl_devclass;
-
-int
-terasic_mtl_attach(struct terasic_mtl_softc *sc)
-{
- int error;
-
- error = terasic_mtl_reg_attach(sc);
- if (error)
- goto error;
- error = terasic_mtl_pixel_attach(sc);
- if (error)
- goto error;
- error = terasic_mtl_text_attach(sc);
- if (error)
- goto error;
- /*
- * XXXRW: Once we've attached syscons or vt, we can't detach it, so do
- * it last.
- */
-#if defined(DEV_VT)
- terasic_mtl_reg_pixel_endian_set(sc, BYTE_ORDER == BIG_ENDIAN);
- error = terasic_mtl_fbd_attach(sc);
- if (error)
- goto error;
- terasic_mtl_blend_pixel_set(sc, TERASIC_MTL_ALPHA_OPAQUE);
- terasic_mtl_blend_textfg_set(sc, TERASIC_MTL_ALPHA_TRANSPARENT);
- terasic_mtl_blend_textbg_set(sc, TERASIC_MTL_ALPHA_TRANSPARENT);
-#endif
-#if defined(DEV_SC)
- error = terasic_mtl_syscons_attach(sc);
- if (error)
- goto error;
- terasic_mtl_blend_pixel_set(sc, TERASIC_MTL_ALPHA_TRANSPARENT);
- terasic_mtl_blend_textfg_set(sc, TERASIC_MTL_ALPHA_OPAQUE);
- terasic_mtl_blend_textbg_set(sc, TERASIC_MTL_ALPHA_OPAQUE);
-#endif
- terasic_mtl_blend_default_set(sc, TERASIC_MTL_COLOR_BLACK);
- return (0);
-error:
- terasic_mtl_text_detach(sc);
- terasic_mtl_pixel_detach(sc);
- terasic_mtl_reg_detach(sc);
- return (error);
-}
-
-void
-terasic_mtl_detach(struct terasic_mtl_softc *sc)
-{
-
- /* XXXRW: syscons and vt can't detach, but try anyway, only to panic. */
-#if defined(DEV_SC)
- terasic_mtl_syscons_detach(sc);
-#endif
-#if defined(DEV_VT)
- terasic_mtl_fbd_detach(sc);
-#endif
-
- /* All other aspects of the driver can detach just fine. */
- terasic_mtl_text_detach(sc);
- terasic_mtl_pixel_detach(sc);
- terasic_mtl_reg_detach(sc);
-}
diff --git a/sys/dev/terasic/mtl/terasic_mtl.h b/sys/dev/terasic/mtl/terasic_mtl.h
deleted file mode 100644
index 2ab6de00b7a0..000000000000
--- a/sys/dev/terasic/mtl/terasic_mtl.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2012 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed by SRI International and the University of
- * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
- * ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * 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 AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD$
- */
-
-#ifndef _DEV_TERASIC_MTL_H_
-#define _DEV_TERASIC_MTL_H_
-
-#include "opt_syscons.h"
-
-struct terasic_mtl_softc {
-#if defined(DEV_SC)
- /*
- * syscons requires that its video_adapter_t be at the front of the
- * softc, so place syscons fields first, which we otherwise would
- * probably not do.
- */
- video_adapter_t mtl_va;
-#endif
-
- /*
- * Bus-related fields.
- */
- device_t mtl_dev;
- int mtl_unit;
-
- /*
- * The MTL driver doesn't require a lot of synchronisation; however,
- * the lock is used to protect read-modify-write operations on MTL
- * registers.
- */
- struct mtx mtl_lock;
-
- /*
- * Control register device -- mappable from userspace.
- */
- struct cdev *mtl_reg_cdev;
- struct resource *mtl_reg_res;
- int mtl_reg_rid;
-
- /*
- * Graphics frame buffer device -- mappable from userspace, and used
- * by the vt framebuffer interface.
- */
- struct cdev *mtl_pixel_cdev;
- struct resource *mtl_pixel_res;
- int mtl_pixel_rid;
-
- /*
- * Text frame buffer device -- mappable from userspace, and syscons
- * hookup.
- */
- struct cdev *mtl_text_cdev;
- struct resource *mtl_text_res;
- int mtl_text_rid;
- uint16_t *mtl_text_soft;
-
- /*
- * Framebuffer hookup for vt(4).
- */
- struct fb_info mtl_fb_info;
-};
-
-#define TERASIC_MTL_LOCK(sc) mtx_lock(&(sc)->mtl_lock)
-#define TERASIC_MTL_LOCK_ASSERT(sc) mtx_assert(&(sc)->mtl_lock, MA_OWNED)
-#define TERASIC_MTL_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtl_lock)
-#define TERASIC_MTL_LOCK_INIT(sc) mtx_init(&(sc)->mtl_lock, \
- "terasic_mtl", NULL, MTX_DEF)
-#define TERASIC_MTL_UNLOCK(sc) mtx_unlock(&(sc)->mtl_lock)
-
-/*
- * Constant properties of the MTL text frame buffer.
- */
-#define TERASIC_MTL_COLS 100
-#define TERASIC_MTL_ROWS 40
-
-/*
- * MTL control register offsets.
- */
-#define TERASIC_MTL_OFF_BLEND 0
-#define TERASIC_MTL_OFF_TEXTCURSOR 4
-#define TERASIC_MTL_OFF_TEXTFRAMEBUFADDR 8
-#define TERASIC_MTL_OFF_TOUCHPOINT_X1 12
-#define TERASIC_MTL_OFF_TOUCHPOINT_Y1 16
-#define TERASIC_MTL_OFF_TOUCHPOINT_X2 20
*** 1850 LINES SKIPPED ***