Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src obsolete moscom(4). it was never in any default configs, did
details: https://anonhg.NetBSD.org/src/rev/a15e54026aeb
branches: trunk
changeset: 451144:a15e54026aeb
user: mrg <mrg%NetBSD.org@localhost>
date: Tue May 07 22:00:10 2019 +0000
description:
obsolete moscom(4). it was never in any default configs, did
not work for some cases.
umcs(4) supports everything it does plus one additional chipset,
has been in default configurations since netbsd 7.
diffstat:
share/man/man4/umcs.4 | 8 +-
sys/arch/amd64/conf/ALL | 8 +-
sys/arch/i386/conf/ALL | 7 +-
sys/dev/usb/TODO.usbmp | 4 +-
sys/dev/usb/files.usb | 7 +-
sys/dev/usb/moscom.c | 457 ------------------------------------------------
6 files changed, 11 insertions(+), 480 deletions(-)
diffs (truncated from 583 to 300 lines):
diff -r 850ac6110a2f -r a15e54026aeb share/man/man4/umcs.4
--- a/share/man/man4/umcs.4 Tue May 07 21:14:46 2019 +0000
+++ b/share/man/man4/umcs.4 Tue May 07 22:00:10 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: umcs.4,v 1.2 2014/03/16 09:37:47 wiz Exp $
+.\" $NetBSD: umcs.4,v 1.3 2019/05/07 22:00:10 mrg Exp $
.\"
.\" Copyright (c) 2014 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd March 16, 2014
+.Dd May 7, 2019
.Dt UMCS 4
.Os
.Sh NAME
@@ -69,7 +69,3 @@
driver
appeared in
.Nx 7 .
-.Pp
-It superseded the
-.Xr moscom 4
-driver.
diff -r 850ac6110a2f -r a15e54026aeb sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL Tue May 07 21:14:46 2019 +0000
+++ b/sys/arch/amd64/conf/ALL Tue May 07 22:00:10 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.118 2019/04/26 22:46:03 sevan Exp $
+# $NetBSD: ALL,v 1.119 2019/05/07 22:00:10 mrg Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.118 $"
+#ident "ALL-$Revision: 1.119 $"
maxusers 64 # estimated number of users
@@ -1289,8 +1289,8 @@
uark* at uhub? port ?
ucom* at uark? portno ?
-moscom* at uhub? port ?
-ucom* at moscom? portno ?
+umcs* at uhub? port ? # Moschip MCS7xxx serial adapter
+ucom* at umcs? portno ?
uhmodem* at uhub?
ucom* at uhmodem? portno ?
diff -r 850ac6110a2f -r a15e54026aeb sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Tue May 07 21:14:46 2019 +0000
+++ b/sys/arch/i386/conf/ALL Tue May 07 22:00:10 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.467 2019/04/26 22:46:03 sevan Exp $
+# $NetBSD: ALL,v 1.468 2019/05/07 22:00:10 mrg Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.467 $"
+#ident "ALL-$Revision: 1.468 $"
maxusers 64 # estimated number of users
@@ -1392,9 +1392,6 @@
uark* at uhub? port ?
ucom* at uark? portno ?
-moscom* at uhub? port ?
-ucom* at moscom? portno ?
-
umcs* at uhub? port ? # Moschip MCS7xxx serial adapter
ucom* at umcs? portno ?
diff -r 850ac6110a2f -r a15e54026aeb sys/dev/usb/TODO.usbmp
--- a/sys/dev/usb/TODO.usbmp Tue May 07 21:14:46 2019 +0000
+++ b/sys/dev/usb/TODO.usbmp Tue May 07 22:00:10 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.11 2016/11/21 08:48:00 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.12 2019/05/07 22:00:10 mrg Exp $
the majority of the USB MP device interface is documented in usbdivar.h.
@@ -201,7 +201,7 @@
- uplcom attaches ok
- uslsa working
- uvscom
- - moscom
+ - umcs
- uvisor
- ukyopon
- u3g
diff -r 850ac6110a2f -r a15e54026aeb sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb Tue May 07 21:14:46 2019 +0000
+++ b/sys/dev/usb/files.usb Tue May 07 22:00:10 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.usb,v 1.154 2019/02/06 11:55:06 rin Exp $
+# $NetBSD: files.usb,v 1.155 2019/05/07 22:00:10 mrg Exp $
#
# Config file and device description for machine-independent USB code.
# Included by ports that need it. Ports that use it must provide
@@ -418,11 +418,6 @@
file dev/usb/umct.c umct
# MOSCHIP MCS7xxx serial driver
-device moscom: ucombus
-attach moscom at usbdevif
-file dev/usb/moscom.c moscom
-
-# andother driver for the same chip
device umcs: ucombus
attach umcs at usbdevif
file dev/usb/umcs.c umcs
diff -r 850ac6110a2f -r a15e54026aeb sys/dev/usb/moscom.c
--- a/sys/dev/usb/moscom.c Tue May 07 21:14:46 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,457 +0,0 @@
-/* $NetBSD: moscom.c,v 1.12 2019/05/04 08:04:13 mrg Exp $ */
-/* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */
-
-/*
- * Copyright (c) 2006 Jonathan Gray <jsg%openbsd.org@localhost>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.12 2019/05/04 08:04:13 mrg Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/conf.h>
-#include <sys/tty.h>
-#include <sys/device.h>
-
-#include <dev/usb/usb.h>
-#include <dev/usb/usbdi.h>
-#include <dev/usb/usbdi_util.h>
-#include <dev/usb/usbdevs.h>
-
-#include <dev/usb/usbdevs.h>
-#include <dev/usb/ucomvar.h>
-
-#define MOSCOMBUFSZ 256
-#define MOSCOM_CONFIG_NO 0
-#define MOSCOM_IFACE_NO 0
-
-#define MOSCOM_READ 0x0d
-#define MOSCOM_WRITE 0x0e
-#define MOSCOM_UART_REG 0x0300
-#define MOSCOM_VEND_REG 0x0000
-
-#define MOSCOM_TXBUF 0x00 /* Write */
-#define MOSCOM_RXBUF 0x00 /* Read */
-#define MOSCOM_INT 0x01
-#define MOSCOM_FIFO 0x02 /* Write */
-#define MOSCOM_ISR 0x02 /* Read */
-#define MOSCOM_LCR 0x03
-#define MOSCOM_MCR 0x04
-#define MOSCOM_LSR 0x05
-#define MOSCOM_MSR 0x06
-#define MOSCOM_SCRATCH 0x07
-#define MOSCOM_DIV_LO 0x08
-#define MOSCOM_DIV_HI 0x09
-#define MOSCOM_EFR 0x0a
-#define MOSCOM_XON1 0x0b
-#define MOSCOM_XON2 0x0c
-#define MOSCOM_XOFF1 0x0d
-#define MOSCOM_XOFF2 0x0e
-
-#define MOSCOM_BAUDLO 0x00
-#define MOSCOM_BAUDHI 0x01
-
-#define MOSCOM_INT_RXEN 0x01
-#define MOSCOM_INT_TXEN 0x02
-#define MOSCOM_INT_RSEN 0x04
-#define MOSCOM_INT_MDMEM 0x08
-#define MOSCOM_INT_SLEEP 0x10
-#define MOSCOM_INT_XOFF 0x20
-#define MOSCOM_INT_RTS 0x40
-
-#define MOSCOM_FIFO_EN 0x01
-#define MOSCOM_FIFO_RXCLR 0x02
-#define MOSCOM_FIFO_TXCLR 0x04
-#define MOSCOM_FIFO_DMA_BLK 0x08
-#define MOSCOM_FIFO_TXLVL_MASK 0x30
-#define MOSCOM_FIFO_TXLVL_8 0x00
-#define MOSCOM_FIFO_TXLVL_16 0x10
-#define MOSCOM_FIFO_TXLVL_32 0x20
-#define MOSCOM_FIFO_TXLVL_56 0x30
-#define MOSCOM_FIFO_RXLVL_MASK 0xc0
-#define MOSCOM_FIFO_RXLVL_8 0x00
-#define MOSCOM_FIFO_RXLVL_16 0x40
-#define MOSCOM_FIFO_RXLVL_56 0x80
-#define MOSCOM_FIFO_RXLVL_80 0xc0
-
-#define MOSCOM_ISR_MDM 0x00
-#define MOSCOM_ISR_NONE 0x01
-#define MOSCOM_ISR_TX 0x02
-#define MOSCOM_ISR_RX 0x04
-#define MOSCOM_ISR_LINE 0x06
-#define MOSCOM_ISR_RXTIMEOUT 0x0c
-#define MOSCOM_ISR_RX_XOFF 0x10
-#define MOSCOM_ISR_RTSCTS 0x20
-#define MOSCOM_ISR_FIFOEN 0xc0
-
-#define MOSCOM_LCR_DBITS(x) (x - 5)
-#define MOSCOM_LCR_STOP_BITS_1 0x00
-#define MOSCOM_LCR_STOP_BITS_2 0x04 /* 2 if 6-8 bits/char or 1.5 if 5 */
-#define MOSCOM_LCR_PARITY_NONE 0x00
-#define MOSCOM_LCR_PARITY_ODD 0x08
-#define MOSCOM_LCR_PARITY_EVEN 0x18
-#define MOSCOM_LCR_BREAK 0x40
-#define MOSCOM_LCR_DIVLATCH_EN 0x80
-
-#define MOSCOM_MCR_DTR 0x01
-#define MOSCOM_MCR_RTS 0x02
-#define MOSCOM_MCR_LOOP 0x04
-#define MOSCOM_MCR_INTEN 0x08
-#define MOSCOM_MCR_LOOPBACK 0x10
-#define MOSCOM_MCR_XONANY 0x20
-#define MOSCOM_MCR_IRDA_EN 0x40
-#define MOSCOM_MCR_BAUD_DIV4 0x80
-
-#define MOSCOM_LSR_RXDATA 0x01
-#define MOSCOM_LSR_RXOVER 0x02
-#define MOSCOM_LSR_RXPAR_ERR 0x04
-#define MOSCOM_LSR_RXFRM_ERR 0x08
-#define MOSCOM_LSR_RXBREAK 0x10
-#define MOSCOM_LSR_TXEMPTY 0x20
-#define MOSCOM_LSR_TXALLEMPTY 0x40
-#define MOSCOM_LSR_TXFIFO_ERR 0x80
-
-#define MOSCOM_MSR_CTS_CHG 0x01
-#define MOSCOM_MSR_DSR_CHG 0x02
-#define MOSCOM_MSR_RI_CHG 0x04
-#define MOSCOM_MSR_CD_CHG 0x08
-#define MOSCOM_MSR_CTS 0x10
-#define MOSCOM_MSR_RTS 0x20
-#define MOSCOM_MSR_RI 0x40
-#define MOSCOM_MSR_CD 0x80
-
-#define MOSCOM_BAUD_REF 115200
-
-struct moscom_softc {
- device_t sc_dev;
- struct usbd_device * sc_udev;
- struct usbd_interface * sc_iface;
- device_t sc_subdev;
-
- u_char sc_msr;
- u_char sc_lsr;
- u_char sc_lcr;
-
- u_char sc_dying;
-};
-
-void moscom_get_status(void *, int, u_char *, u_char *);
-void moscom_set(void *, int, int, int);
-int moscom_param(void *, int, struct termios *);
-int moscom_open(void *, int);
-int moscom_cmd(struct moscom_softc *, int, int);
-
-struct ucom_methods moscom_methods = {
- .ucom_set = moscom_set,
- .ucom_param = moscom_param,
- .ucom_open = moscom_open,
- .ucom_close = NULL,
-};
-
-static const struct usb_devno moscom_devs[] = {
- { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7703 },
- { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7720 },
- { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7840 },
- { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC2324 }
-};
-#define moscom_lookup(v, p) usb_lookup(moscom_devs, v, p)
-
-int moscom_match(device_t, cfdata_t, void *);
-void moscom_attach(device_t, device_t, void *);
Home |
Main Index |
Thread Index |
Old Index