Remove sio(4).
It had been disconnected from build in r181233 in 2008. Reviewed by: imp
This commit is contained in:
parent
e7485a436b
commit
71f0077631
@ -54,7 +54,6 @@ dialout devices
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr stty 1 ,
|
||||
.Xr sio 4
|
||||
.Sh HISTORY
|
||||
Originally part of cgd's com package patches, version 0.2.1, to
|
||||
.Bx 386 0.1 .
|
||||
|
@ -101,7 +101,6 @@ This is an interface to the tty ioctl
|
||||
.Dv TIOCCONS .
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr sio 4 ,
|
||||
.Xr syscons 4 ,
|
||||
.Xr tty 4 ,
|
||||
.Xr vt 4 ,
|
||||
|
@ -36,7 +36,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 30, 2019
|
||||
.Dd November 19, 2019
|
||||
.Dt BOOT 8 i386
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -223,15 +223,6 @@ you can use the
|
||||
.Fl h
|
||||
option to force the kernel to use the serial port as its
|
||||
console device.
|
||||
The serial port driver
|
||||
.Xr sio 4
|
||||
(but not
|
||||
.Xr uart 4 )
|
||||
has a flag (0x20) to override this option.
|
||||
If that flag is set, the serial port will always be used as the console,
|
||||
regardless of the
|
||||
.Fl h
|
||||
option described here.
|
||||
.It Fl m
|
||||
mute the console to suppress all kernel console input and output during the
|
||||
boot.
|
||||
|
@ -461,7 +461,6 @@ MAN= aac.4 \
|
||||
siftr.4 \
|
||||
siis.4 \
|
||||
simplebus.4 \
|
||||
sio.4 \
|
||||
sis.4 \
|
||||
sk.4 \
|
||||
${_smartpqi.4} \
|
||||
|
@ -91,7 +91,6 @@ file can be consulted for more information.
|
||||
.Sh SEE ALSO
|
||||
.Xr tty 1 ,
|
||||
.Xr ttyname 3 ,
|
||||
.Xr sio 4 ,
|
||||
.Xr tty 4 ,
|
||||
.Xr device.hints 5 ,
|
||||
.Xr comcontrol 8 ,
|
||||
|
@ -1,410 +0,0 @@
|
||||
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to Berkeley by
|
||||
.\" the Systems Programming Group of the University of Utah Computer
|
||||
.\" Science Department.
|
||||
.\" 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. Neither the name of the University 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 REGENTS 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 REGENTS 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.
|
||||
.\"
|
||||
.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
|
||||
.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 30, 2006
|
||||
.Dt SIO 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm sio
|
||||
.Nd "fast interrupt driven asynchronous serial communications interface"
|
||||
.Sh SYNOPSIS
|
||||
For standard ISA ports:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "device sio"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.sio.0.at="isa"
|
||||
.Cd hint.sio.0.port="0x3f8"
|
||||
.Cd hint.sio.0.flags="0x10"
|
||||
.Cd hint.sio.0.irq="4"
|
||||
.Cd hint.sio.1.at="isa"
|
||||
.Cd hint.sio.1.port="0x2f8"
|
||||
.Cd hint.sio.1.flags="0x0"
|
||||
.Cd hint.sio.1.irq="3"
|
||||
.Ed
|
||||
.Pp
|
||||
For AST compatible multiport cards with 4 ports:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "options COM_MULTIPORT"
|
||||
.Cd "device sio"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.sio.4.at="isa"
|
||||
.Cd hint.sio.4.port="0x2a0"
|
||||
.Cd hint.sio.4.flags="0x701"
|
||||
.Cd hint.sio.5.at="isa"
|
||||
.Cd hint.sio.5.port="0x2a8"
|
||||
.Cd hint.sio.5.flags="0x701"
|
||||
.Cd hint.sio.6.at="isa"
|
||||
.Cd hint.sio.6.port="0x2b0"
|
||||
.Cd hint.sio.6.flags="0x701"
|
||||
.Cd hint.sio.7.at="isa"
|
||||
.Cd hint.sio.7.port="0x2b8"
|
||||
.Cd hint.sio.7.flags="0x701"
|
||||
.Cd hint.sio.7.irq="12"
|
||||
.Ed
|
||||
.Pp
|
||||
For Boca Board compatible multiport cards with 8 ports:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "options COM_MULTIPORT"
|
||||
.Cd "device sio"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.sio.4.at="isa"
|
||||
.Cd hint.sio.4.port="0x100"
|
||||
.Cd hint.sio.4.flags="0xb05"
|
||||
.Cd "..."
|
||||
.Cd hint.sio.11.at="isa"
|
||||
.Cd hint.sio.11.port="0x138"
|
||||
.Cd hint.sio.11.flags="0xb05"
|
||||
.Cd hint.sio.11.irq="12"
|
||||
.Ed
|
||||
.Pp
|
||||
For Netmos Nm9845 multiport cards with 6 ports:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "options COM_MULTIPORT"
|
||||
.Cd "device sio"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.sio.4.at="isa"
|
||||
.Cd hint.sio.4.port="0xb000"
|
||||
.Cd hint.sio.4.flags="0x901"
|
||||
.Cd hint.sio.5.at="isa"
|
||||
.Cd hint.sio.5.port="0xb400"
|
||||
.Cd hint.sio.5.flags="0x901"
|
||||
.Cd hint.sio.6.at="isa"
|
||||
.Cd hint.sio.6.port="0xb800"
|
||||
.Cd hint.sio.6.flags="0x901"
|
||||
.Cd hint.sio.7.at="isa"
|
||||
.Cd hint.sio.7.port="0xbc00"
|
||||
.Cd hint.sio.7.flags="0x901"
|
||||
.Cd hint.sio.8.at="isa"
|
||||
.Cd hint.sio.8.port="0xc000"
|
||||
.Cd hint.sio.8.flags="0x901"
|
||||
.Cd hint.sio.9.at="isa"
|
||||
.Cd hint.sio.9.port="0xac00"
|
||||
.Cd hint.sio.9.flags="0x901"
|
||||
.Cd hint.sio.9.irq="12"
|
||||
.Ed
|
||||
.Pp
|
||||
For Hayes ESP cards:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "options COM_ESP"
|
||||
.Cd "device sio"
|
||||
.Cd "..."
|
||||
.Ed
|
||||
.Pp
|
||||
For single port PCI and PCCARD cards:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "device sio"
|
||||
.Pp
|
||||
No lines are required in
|
||||
.Pa /boot/device.hints
|
||||
for these cards.
|
||||
.Ed
|
||||
.Pp
|
||||
For dual port PCI cards that share an interrupt:
|
||||
.Bd -ragged -offset indent -compact
|
||||
.Cd "device sio"
|
||||
.Cd "options COM_MULTIPORT"
|
||||
.Pp
|
||||
In
|
||||
.Pa /boot/device.hints :
|
||||
.Cd hint.sio.2.flags="0x201"
|
||||
.Cd hint.sio.3.flags="0x201"
|
||||
.Ed
|
||||
.Pp
|
||||
Meaning of
|
||||
.Ar flags :
|
||||
.Bl -tag -offset indent -compact -width 0x000000
|
||||
.It 0x00001
|
||||
shared IRQs
|
||||
.It 0x00002
|
||||
disable FIFO
|
||||
.It 0x00004
|
||||
no AST/4 compatible IRQ control register
|
||||
.It 0x00008
|
||||
recover sooner from lost output interrupts
|
||||
.It 0x00010
|
||||
device is potential system console
|
||||
.It 0x00020
|
||||
device is forced to become system console
|
||||
.It 0x00040
|
||||
device is reserved for low-level IO (e.g.\& for remote kernel debugging)
|
||||
.It 0x00080
|
||||
use this port for remote kernel debugging
|
||||
.It 0x0 Ns Em ?? Ns 00
|
||||
minor number of master port
|
||||
.It 0x10000
|
||||
PPS timestamping on CTS instead of DCD
|
||||
.It 0x20000
|
||||
device is assumed to use a 16650A-type (extended FIFO) chip
|
||||
.El
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides support for NS8250-, NS16450-, NS16550 and NS16550A-based
|
||||
.Tn EIA
|
||||
.Tn RS-232C
|
||||
.Pf ( Tn CCITT
|
||||
.Tn V.24 )
|
||||
communications interfaces.
|
||||
The NS8250 and NS16450 have single character
|
||||
buffers, the NS16550A has 16 character FIFO input and output buffers.
|
||||
.Pp
|
||||
Input and output for each line may set to one of following baud rates;
|
||||
50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
|
||||
19200, 28800, 38400, 57600, or 115200.
|
||||
Your hardware may limit your baud rate choices.
|
||||
.Pp
|
||||
The driver supports `multiport' cards.
|
||||
Multiport cards are those that have one or more groups of ports
|
||||
that share an Interrupt Request (IRQ) line per group.
|
||||
Shared IRQs on different cards are not supported.
|
||||
Frequently 4 ports share 1 IRQ; some 8 port cards have 2 groups of 4 ports,
|
||||
thus using 2 IRQs.
|
||||
Some cards allow the first 2 serial ports to have separate IRQs per port
|
||||
(as per DOS PC standard).
|
||||
.Pp
|
||||
Some cards have an IRQ control register for each group.
|
||||
Some cards require special initialization related to such registers.
|
||||
Only AST/4 compatible IRQ control registers are supported.
|
||||
Some cards have an IRQ status register for each group.
|
||||
The driver does not require or use such registers yet.
|
||||
To work, the control and status registers for a group, if any,
|
||||
must be mapped to the scratch register (register 7)
|
||||
of a port in the group.
|
||||
Such a port is called a
|
||||
.Em master
|
||||
port.
|
||||
.Pp
|
||||
The driver supports controller based PCI modems.
|
||||
The 3Com FaxModem PCI and the Advantec 56k Voice Messaging PCI
|
||||
FaxModem are the only cards supported.
|
||||
WinModems, softmodems, hfc modems and any other modems that are not
|
||||
controller based are not supported.
|
||||
.Pp
|
||||
The
|
||||
.Em flags
|
||||
keyword may be used on each
|
||||
.Em device sio
|
||||
line in the kernel configuration file
|
||||
to disable the FIFO on 16550A UARTs
|
||||
(see the synopsis).
|
||||
Disabling the FIFO should rarely be necessary.
|
||||
.Pp
|
||||
The
|
||||
.Em flags
|
||||
keyword
|
||||
.Em must
|
||||
be used for all ports that are part of an IRQ sharing group.
|
||||
One bit specifies IRQ sharing; another bit specifies whether the port does
|
||||
.Em not
|
||||
require AST/4 compatible initialization.
|
||||
The minor number of the device corresponding a master port
|
||||
for the group is encoded as a bitfield in the high byte.
|
||||
The same master port must be specified for all ports in a group.
|
||||
.Pp
|
||||
The
|
||||
.Em irq
|
||||
specification must be given for master ports
|
||||
and for ports that are not part of an IRQ sharing group,
|
||||
and not for other ports.
|
||||
.Pp
|
||||
In the synopsis,
|
||||
.Em flags 0x701
|
||||
means that the 8th port (sio7) is the master
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and an AST/4 compatible IRQ control register.
|
||||
.Pp
|
||||
.Em flags 0xb05
|
||||
means that the 12th port (sio11) is the master
|
||||
port, and that the port is on a multiport card with shared IRQs
|
||||
and no special IRQ control register.
|
||||
.Pp
|
||||
Which port is the master port depends on the card type.
|
||||
Consult the hardware documentation of your card.
|
||||
Since IRQ status registers are never used,
|
||||
and IRQ control registers are only used for AST/4 compatible cards,
|
||||
and some cards map the control/status registers to all ports in a group,
|
||||
any port in a group will sometimes do for the master port.
|
||||
Choose a port containing an IRQ status register for forwards compatibility,
|
||||
and the highest possible port for consistency.
|
||||
.Pp
|
||||
Serial ports controlled by the
|
||||
.Nm
|
||||
driver can be used for both `callin' and `callout'.
|
||||
For each port there is a callin device and a callout device.
|
||||
The minor number of the callout device is 128 higher
|
||||
than that of the corresponding callin port.
|
||||
The callin device is general purpose.
|
||||
Processes opening it normally wait for carrier
|
||||
and for the callout device to become inactive.
|
||||
The callout device is used to steal the port from
|
||||
processes waiting for carrier on the callin device.
|
||||
Processes opening it do not wait for carrier
|
||||
and put any processes waiting for carrier on the callin device into
|
||||
a deeper sleep so that they do not conflict with the callout session.
|
||||
The callout device is abused for handling programs that are supposed
|
||||
to work on general ports and need to open the port without waiting
|
||||
but are too stupid to do so.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
driver also supports an initial-state and a lock-state control
|
||||
device for each of the callin and the callout "data" devices.
|
||||
The termios settings of a data device are copied
|
||||
from those of the corresponding initial-state device
|
||||
on first opens and are not inherited from previous opens.
|
||||
Use
|
||||
.Xr stty 1
|
||||
in the normal way on the initial-state devices to program
|
||||
initial termios states suitable for your setup.
|
||||
.Pp
|
||||
The lock termios state acts as flags to disable changing
|
||||
the termios state.
|
||||
E.g., to lock a flag variable such as CRTSCTS, use
|
||||
.Em stty crtscts
|
||||
on the lock-state device.
|
||||
Speeds and special characters
|
||||
may be locked by setting the corresponding value in the lock-state
|
||||
device to any nonzero value.
|
||||
E.g., to lock a speed to 115200, use
|
||||
.Dq Li stty 115200
|
||||
on the initial-state device and
|
||||
.Dq Li stty 1
|
||||
on the lock-state device.
|
||||
.Pp
|
||||
Correct programs talking to correctly wired external devices
|
||||
work with almost arbitrary initial states and almost no locking,
|
||||
but other setups may benefit from changing some of the default
|
||||
initial state and locking the state.
|
||||
In particular, the initial states for non (POSIX) standard flags
|
||||
should be set to suit the devices attached and may need to be
|
||||
locked to prevent buggy programs from changing them.
|
||||
E.g., CRTSCTS should be locked on for devices that support
|
||||
RTS/CTS handshaking at all times and off for devices that do not
|
||||
support it at all.
|
||||
CLOCAL should be locked on for devices that do not support carrier.
|
||||
HUPCL may be locked off if you do not
|
||||
want to hang up for some reason.
|
||||
In general, very bad things happen
|
||||
if something is locked to the wrong state, and things should not
|
||||
be locked for devices that support more than one setting.
|
||||
The CLOCAL flag on callin ports should be locked off for logins
|
||||
to avoid certain security holes, but this needs to be done by
|
||||
getty if the callin port is used for anything else.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /dev/ttyd?.init -compact
|
||||
.It Pa /dev/ttyd?
|
||||
for callin ports
|
||||
.It Pa /dev/ttyd?.init
|
||||
.It Pa /dev/ttyd?.lock
|
||||
corresponding callin initial-state and lock-state devices
|
||||
.Pp
|
||||
.It Pa /dev/cuad?
|
||||
for callout ports
|
||||
.It Pa /dev/cuad?.init
|
||||
.It Pa /dev/cuad?.lock
|
||||
corresponding callout initial-state and lock-state devices
|
||||
.El
|
||||
.Pp
|
||||
.Bl -tag -width /etc/rc.d/serial -compact
|
||||
.It Pa /etc/rc.d/serial
|
||||
examples of setting the initial-state and lock-state devices
|
||||
.El
|
||||
.Pp
|
||||
The device numbers are made from the set [0-9a-v] so that more than
|
||||
10 ports can be supported.
|
||||
.Sh DIAGNOSTICS
|
||||
.Bl -diag
|
||||
.It sio%d: silo overflow.
|
||||
Problem in the interrupt handler.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: interrupt-level buffer overflow.
|
||||
Problem in the bottom half of the driver.
|
||||
.El
|
||||
.Bl -diag
|
||||
.It sio%d: tty-level buffer overflow.
|
||||
Problem in the application.
|
||||
Input has arrived faster than the given module could process it
|
||||
and some has been lost.
|
||||
.El
|
||||
.\" .Bl -diag
|
||||
.\" .It sio%d: reduced fifo trigger level to %d.
|
||||
.\" Attempting to avoid further silo overflows.
|
||||
.\" .El
|
||||
.Sh SEE ALSO
|
||||
.Xr stty 1 ,
|
||||
.Xr termios 4 ,
|
||||
.Xr tty 4 ,
|
||||
.Xr comcontrol 8
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
driver is derived from the
|
||||
.Tn HP9000/300
|
||||
.Xr dca 4
|
||||
driver and is
|
||||
.Ud
|
||||
.Sh BUGS
|
||||
Data loss may occur at very high baud rates on slow systems,
|
||||
or with too many ports on any system,
|
||||
or on heavily loaded systems when crtscts cannot be used.
|
||||
The use of NS16550A's reduces system load and helps to avoid data loss.
|
||||
.Pp
|
||||
Stay away from plain NS16550's.
|
||||
These are early implementations of the chip with non-functional FIFO hardware.
|
||||
.Pp
|
||||
The constants which define the locations
|
||||
of the various serial ports are holdovers from
|
||||
.Tn DOS .
|
||||
As shown, hex addresses can be and for clarity probably should be used instead.
|
||||
.Pp
|
||||
Note that on the AST/4 the card's dipswitches should
|
||||
.Em not
|
||||
be set to use interrupt sharing.
|
||||
AST/4-like interrupt sharing is only used when
|
||||
.Em multiple
|
||||
AST/4 cards are installed in the same system.
|
||||
The
|
||||
.Nm
|
||||
driver does not support more than 1 AST/4 on one IRQ.
|
||||
.Pp
|
||||
The examples in the synopsis are too vendor-specific.
|
@ -69,7 +69,6 @@ and detached.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr pty 4 ,
|
||||
.Xr sio 4 ,
|
||||
.Xr kldload 8 ,
|
||||
.Xr watch 8
|
||||
.Sh HISTORY
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 23, 2015
|
||||
.Dd November 19, 2019
|
||||
.Dt DEVICE.HINTS 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -138,13 +138,13 @@ Notes on the kernel configuration file and device resource hints.
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
The following example sets up resources for the
|
||||
.Xr sio 4
|
||||
.Xr uart 4
|
||||
driver on the ISA bus:
|
||||
.Bd -literal -offset indent
|
||||
hint.sio.0.at="isa"
|
||||
hint.sio.0.port="0x3F8"
|
||||
hint.sio.0.flags="0x10"
|
||||
hint.sio.0.irq="4"
|
||||
hint.uart.0.at="isa"
|
||||
hint.uart.0.port="0x3F8"
|
||||
hint.uart.0.flags="0x10"
|
||||
hint.uart.0.irq="4"
|
||||
.Ed
|
||||
.Pp
|
||||
The following example disables the ACPI driver:
|
||||
|
@ -300,11 +300,6 @@ dev/sfxge/sfxge_nvram.c optional sfxge pci
|
||||
dev/sfxge/sfxge_port.c optional sfxge pci
|
||||
dev/sfxge/sfxge_rx.c optional sfxge pci
|
||||
dev/sfxge/sfxge_tx.c optional sfxge pci
|
||||
dev/sio/sio.c optional sio
|
||||
dev/sio/sio_isa.c optional sio isa
|
||||
dev/sio/sio_pccard.c optional sio pccard
|
||||
dev/sio/sio_pci.c optional sio pci
|
||||
dev/sio/sio_puc.c optional sio puc
|
||||
dev/smartpqi/smartpqi_cam.c optional smartpqi
|
||||
dev/smartpqi/smartpqi_cmd.c optional smartpqi
|
||||
dev/smartpqi/smartpqi_discovery.c optional smartpqi
|
||||
|
@ -136,11 +136,6 @@ dev/random/nehemiah.c optional padlock_rng !random_loadable
|
||||
dev/sbni/if_sbni.c optional sbni
|
||||
dev/sbni/if_sbni_isa.c optional sbni isa
|
||||
dev/sbni/if_sbni_pci.c optional sbni pci
|
||||
dev/sio/sio.c optional sio
|
||||
dev/sio/sio_isa.c optional sio isa
|
||||
dev/sio/sio_pccard.c optional sio pccard
|
||||
dev/sio/sio_pci.c optional sio pci
|
||||
dev/sio/sio_puc.c optional sio puc
|
||||
dev/speaker/spkr.c optional speaker
|
||||
dev/superio/superio.c optional superio isa
|
||||
dev/syscons/apm/apm_saver.c optional apm_saver apm
|
||||
|
2643
sys/dev/sio/sio.c
2643
sys/dev/sio/sio.c
File diff suppressed because it is too large
Load Diff
@ -1,178 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
*
|
||||
* Copyright (c) 2001 M. Warner Losh.
|
||||
*
|
||||
* 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 ``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 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_sio.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/tty.h>
|
||||
#include <machine/bus.h>
|
||||
#include <sys/timepps.h>
|
||||
|
||||
#include <dev/sio/siovar.h>
|
||||
|
||||
#include <isa/isareg.h>
|
||||
#include <isa/isavar.h>
|
||||
|
||||
static int sio_isa_attach(device_t dev);
|
||||
static int sio_isa_probe(device_t dev);
|
||||
|
||||
static device_method_t sio_isa_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, sio_isa_probe),
|
||||
DEVMETHOD(device_attach, sio_isa_attach),
|
||||
DEVMETHOD(device_detach, siodetach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t sio_isa_driver = {
|
||||
sio_driver_name,
|
||||
sio_isa_methods,
|
||||
0,
|
||||
};
|
||||
|
||||
static struct isa_pnp_id sio_ids[] = {
|
||||
{0x0005d041, "Standard PC COM port"}, /* PNP0500 */
|
||||
{0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */
|
||||
{0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */
|
||||
{0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */
|
||||
{0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */
|
||||
/* Devices that do not have a compatid */
|
||||
{0x12206804, NULL}, /* ACH2012 - 5634BTS 56K Video Ready Modem */
|
||||
{0x7602a904, NULL}, /* AEI0276 - 56K v.90 Fax Modem (LKT) */
|
||||
{0x00007905, NULL}, /* AKY0000 - 56K Plug&Play Modem */
|
||||
{0x21107905, NULL}, /* AKY1021 - 56K Plug&Play Modem */
|
||||
{0x01405407, NULL}, /* AZT4001 - AZT3000 PnP SOUND DEVICE, MODEM */
|
||||
{0x56039008, NULL}, /* BDP0356 - Best Data 56x2 */
|
||||
{0x56159008, NULL}, /* BDP1556 - B.D. Smart One 56SPS,Voice Modem*/
|
||||
{0x36339008, NULL}, /* BDP3336 - Best Data Prods. 336F */
|
||||
{0x0014490a, NULL}, /* BRI1400 - Boca 33.6 PnP */
|
||||
{0x0015490a, NULL}, /* BRI1500 - Internal Fax Data */
|
||||
{0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */
|
||||
{0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */
|
||||
{0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */
|
||||
{0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */
|
||||
{0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */
|
||||
{0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */
|
||||
{0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */
|
||||
{0x36033610, NULL}, /* DAV0336 - DAVICOM 336PNP MODEM */
|
||||
{0x01009416, NULL}, /* ETT0001 - E-Tech Bullet 33k6 PnP */
|
||||
{0x0000aa1a, NULL}, /* FUJ0000 - FUJITSU Modem 33600 PNP/I2 */
|
||||
{0x1200c31e, NULL}, /* GVC0012 - VF1128HV-R9 (win modem?) */
|
||||
{0x0303c31e, NULL}, /* GVC0303 - MaxTech 33.6 PnP D/F/V */
|
||||
{0x0505c31e, NULL}, /* GVC0505 - GVC 56k Faxmodem */
|
||||
{0x0116c31e, NULL}, /* GVC1601 - Rockwell V.34 Plug & Play Modem */
|
||||
{0x0050c31e, NULL}, /* GVC5000 - some GVC modem */
|
||||
{0x3800f91e, NULL}, /* GWY0038 - Telepath with v.90 */
|
||||
{0x9062f91e, NULL}, /* GWY6290 - Telepath with x2 Technology */
|
||||
{0x8100e425, NULL}, /* IOD0081 - I-O DATA DEVICE,INC. IFML-560 */
|
||||
{0x71004d24, NULL}, /* IBM0071 - IBM ThinkPad 240 IrDA controller*/
|
||||
{0x21002534, NULL}, /* MAE0021 - Jetstream Int V.90 56k Voice Series 2*/
|
||||
{0x0000f435, NULL}, /* MOT0000 - Motorola ModemSURFR 33.6 Intern */
|
||||
{0x5015f435, NULL}, /* MOT1550 - Motorola ModemSURFR 56K Modem */
|
||||
{0xf015f435, NULL}, /* MOT15F0 - Motorola VoiceSURFR 56K Modem */
|
||||
{0x6045f435, NULL}, /* MOT4560 - Motorola ? */
|
||||
{0x61e7a338, NULL}, /* NECE761 - 33.6Modem */
|
||||
{0x0160633a, NULL}, /* NSC6001 - National Semi's IrDA Controller*/
|
||||
{0x08804f3f, NULL}, /* OZO8008 - Zoom (33.6k Modem) */
|
||||
{0x0f804f3f, NULL}, /* OZO800f - Zoom 2812 (56k Modem) */
|
||||
{0x39804f3f, NULL}, /* OZO8039 - Zoom 56k flex */
|
||||
{0x00914f3f, NULL}, /* OZO9100 - Zoom 2919 (K56 Faxmodem) */
|
||||
{0x3024a341, NULL}, /* PMC2430 - Pace 56 Voice Internal Modem */
|
||||
{0x1000eb49, NULL}, /* ROK0010 - Rockwell ? */
|
||||
{0x1200b23d, NULL}, /* RSS0012 - OMRON ME5614ISA */
|
||||
{0x5002734a, NULL}, /* RSS0250 - 5614Jx3(G) Internal Modem */
|
||||
{0x6202734a, NULL}, /* RSS0262 - 5614Jx3[G] V90+K56Flex Modem */
|
||||
{0x1010104d, NULL}, /* SHP1010 - Rockwell 33600bps Modem */
|
||||
{0x10f0a34d, NULL}, /* SMCF010 - SMC IrCC*/
|
||||
{0xc100ad4d, NULL}, /* SMM00C1 - Leopard 56k PnP */
|
||||
{0x9012b04e, NULL}, /* SUP1290 - Supra ? */
|
||||
{0x1013b04e, NULL}, /* SUP1310 - SupraExpress 336i PnP */
|
||||
{0x8013b04e, NULL}, /* SUP1380 - SupraExpress 288i PnP Voice */
|
||||
{0x8113b04e, NULL}, /* SUP1381 - SupraExpress 336i PnP Voice */
|
||||
{0x5016b04e, NULL}, /* SUP1650 - Supra 336i Sp Intl */
|
||||
{0x7016b04e, NULL}, /* SUP1670 - Supra 336i V+ Intl */
|
||||
{0x7420b04e, NULL}, /* SUP2070 - Supra ? */
|
||||
{0x8020b04e, NULL}, /* SUP2080 - Supra ? */
|
||||
{0x8420b04e, NULL}, /* SUP2084 - SupraExpress 56i PnP */
|
||||
{0x7121b04e, NULL}, /* SUP2171 - SupraExpress 56i Sp? */
|
||||
{0x8024b04e, NULL}, /* SUP2480 - Supra ? */
|
||||
{0x01007256, NULL}, /* USR0001 - U.S. Robotics Inc., Sportster W */
|
||||
{0x02007256, NULL}, /* USR0002 - U.S. Robotics Inc. Sportster 33. */
|
||||
{0x04007256, NULL}, /* USR0004 - USR Sportster 14.4k */
|
||||
{0x06007256, NULL}, /* USR0006 - USR Sportster 33.6k */
|
||||
{0x11007256, NULL}, /* USR0011 - USR ? */
|
||||
{0x01017256, NULL}, /* USR0101 - USR ? */
|
||||
{0x30207256, NULL}, /* USR2030 - U.S.Robotics Inc. Sportster 560 */
|
||||
{0x50207256, NULL}, /* USR2050 - U.S.Robotics Inc. Sportster 33. */
|
||||
{0x70207256, NULL}, /* USR2070 - U.S.Robotics Inc. Sportster 560 */
|
||||
{0x30307256, NULL}, /* USR3030 - U.S. Robotics 56K FAX INT */
|
||||
{0x31307256, NULL}, /* USR3031 - U.S. Robotics 56K FAX INT */
|
||||
{0x50307256, NULL}, /* USR3050 - U.S. Robotics 56K FAX INT */
|
||||
{0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */
|
||||
{0x90307256, NULL}, /* USR3090 - USR ? */
|
||||
{0x70917256, NULL}, /* USR9170 - U.S. Robotics 56K FAX INT */
|
||||
{0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */
|
||||
{0x04f0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen*/
|
||||
{0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */
|
||||
{0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */
|
||||
{0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */
|
||||
{0}
|
||||
};
|
||||
|
||||
static int
|
||||
sio_isa_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
/* Check isapnp ids */
|
||||
if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO)
|
||||
return (ENXIO);
|
||||
return (sioprobe(dev, 0, 0UL, 0));
|
||||
}
|
||||
|
||||
static int
|
||||
sio_isa_attach(dev)
|
||||
device_t dev;
|
||||
{
|
||||
return (sioattach(dev, 0, 0UL));
|
||||
}
|
||||
|
||||
DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0);
|
||||
#ifndef COM_NO_ACPI
|
||||
DRIVER_MODULE(sio, acpi, sio_isa_driver, sio_devclass, 0, 0);
|
||||
#endif
|
||||
ISA_PNP_INFO(sio_ids);
|
@ -1,99 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
*
|
||||
* Copyright (c) 2001 M. Warner Losh.
|
||||
*
|
||||
* 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 ``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 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/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/tty.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/timepps.h>
|
||||
|
||||
#include <dev/pccard/pccard_cis.h>
|
||||
#include <dev/pccard/pccardvar.h>
|
||||
|
||||
#include <dev/sio/siovar.h>
|
||||
|
||||
static int sio_pccard_attach(device_t dev);
|
||||
static int sio_pccard_probe(device_t dev);
|
||||
|
||||
static device_method_t sio_pccard_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, sio_pccard_probe),
|
||||
DEVMETHOD(device_attach, sio_pccard_attach),
|
||||
DEVMETHOD(device_detach, siodetach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t sio_pccard_driver = {
|
||||
sio_driver_name,
|
||||
sio_pccard_methods,
|
||||
0,
|
||||
};
|
||||
|
||||
static int
|
||||
sio_pccard_probe(device_t dev)
|
||||
{
|
||||
int error = 0;
|
||||
u_int32_t fcn = PCCARD_FUNCTION_UNSPEC;
|
||||
|
||||
error = pccard_get_function(dev, &fcn);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
/*
|
||||
* If a serial card, we are likely the right driver. However,
|
||||
* some serial cards are better servered by other drivers, so
|
||||
* allow other drivers to claim it, if they want.
|
||||
*/
|
||||
if (fcn == PCCARD_FUNCTION_SERIAL)
|
||||
return (-100);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
static int
|
||||
sio_pccard_attach(device_t dev)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Do not probe IRQ - pccard doesn't turn on the interrupt line */
|
||||
/* until bus_setup_intr */
|
||||
if ((err = sioprobe(dev, 0, 0UL, 1)) > 0)
|
||||
return (err);
|
||||
return (sioattach(dev, 0, 0UL));
|
||||
}
|
||||
|
||||
DRIVER_MODULE(sio, pccard, sio_pccard_driver, sio_devclass, 0, 0);
|
@ -1,127 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
*
|
||||
* Copyright (c) 2001 M. Warner Losh.
|
||||
*
|
||||
* 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 ``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 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/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/tty.h>
|
||||
#include <machine/bus.h>
|
||||
#include <sys/timepps.h>
|
||||
|
||||
#include <dev/sio/siovar.h>
|
||||
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
static int sio_pci_attach(device_t dev);
|
||||
static int sio_pci_probe(device_t dev);
|
||||
|
||||
static device_method_t sio_pci_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, sio_pci_probe),
|
||||
DEVMETHOD(device_attach, sio_pci_attach),
|
||||
DEVMETHOD(device_detach, siodetach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t sio_pci_driver = {
|
||||
sio_driver_name,
|
||||
sio_pci_methods,
|
||||
0,
|
||||
};
|
||||
|
||||
struct pci_ids {
|
||||
u_int32_t type;
|
||||
const char *desc;
|
||||
int rid;
|
||||
};
|
||||
|
||||
static struct pci_ids pci_ids[] = {
|
||||
{ 0x100812b9, "3COM PCI FaxModem", 0x10 },
|
||||
{ 0x2000131f, "CyberSerial (1-port) 16550", 0x10 },
|
||||
{ 0x01101407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
|
||||
{ 0x01111407, "Koutech IOFLEX-2S PCI Dual Port Serial", 0x10 },
|
||||
{ 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
|
||||
{ 0x95211415, "Oxford Semiconductor PCI Dual Port Serial", 0x10 },
|
||||
{ 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 },
|
||||
{ 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
|
||||
{ 0x0103115d, "Xircom Cardbus modem", 0x10 },
|
||||
{ 0x432214e4, "Broadcom 802.11b/GPRS CardBus (Serial)", 0x10 },
|
||||
{ 0x434414e4, "Broadcom 802.11bg/EDGE/GPRS CardBus (Serial)", 0x10 },
|
||||
{ 0x01c0135c, "Quatech SSCLP-200/300", 0x18
|
||||
/*
|
||||
* NB: You must mount the "SPAD" jumper to correctly detect
|
||||
* the FIFO on the UART. Set the options on the jumpers,
|
||||
* we do not support the extra registers on the Quatech.
|
||||
*/
|
||||
},
|
||||
{ 0x00000000, NULL, 0 }
|
||||
};
|
||||
|
||||
static int
|
||||
sio_pci_attach(dev)
|
||||
device_t dev;
|
||||
{
|
||||
u_int32_t type;
|
||||
struct pci_ids *id;
|
||||
|
||||
type = pci_get_devid(dev);
|
||||
id = pci_ids;
|
||||
while (id->type && id->type != type)
|
||||
id++;
|
||||
if (id->desc == NULL)
|
||||
return (ENXIO);
|
||||
return (sioattach(dev, id->rid, 0UL));
|
||||
}
|
||||
|
||||
static int
|
||||
sio_pci_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
u_int32_t type;
|
||||
struct pci_ids *id;
|
||||
|
||||
type = pci_get_devid(dev);
|
||||
id = pci_ids;
|
||||
while (id->type && id->type != type)
|
||||
id++;
|
||||
if (id->desc == NULL)
|
||||
return (ENXIO);
|
||||
device_set_desc(dev, id->desc);
|
||||
|
||||
return (sioprobe(dev, id->rid, 0UL, 0));
|
||||
}
|
||||
|
||||
DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0);
|
@ -1,99 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
*
|
||||
* Copyright (c) 2002 JF Hay. All rights reserved.
|
||||
* Copyright (c) 2001 M. Warner Losh.
|
||||
*
|
||||
* 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 ``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 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/systm.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/tty.h>
|
||||
#include <machine/bus.h>
|
||||
#include <sys/timepps.h>
|
||||
|
||||
#include <dev/puc/puc_bus.h>
|
||||
|
||||
#include <dev/sio/siovar.h>
|
||||
#include <dev/sio/sioreg.h>
|
||||
|
||||
static int sio_puc_attach(device_t dev);
|
||||
static int sio_puc_probe(device_t dev);
|
||||
|
||||
static device_method_t sio_puc_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, sio_puc_probe),
|
||||
DEVMETHOD(device_attach, sio_puc_attach),
|
||||
DEVMETHOD(device_detach, siodetach),
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t sio_puc_driver = {
|
||||
sio_driver_name,
|
||||
sio_puc_methods,
|
||||
0,
|
||||
};
|
||||
|
||||
static int
|
||||
sio_puc_attach(device_t dev)
|
||||
{
|
||||
uintptr_t rclk;
|
||||
|
||||
if (BUS_READ_IVAR(device_get_parent(dev), dev, PUC_IVAR_CLOCK,
|
||||
&rclk) != 0)
|
||||
rclk = DEFAULT_RCLK;
|
||||
return (sioattach(dev, 0, rclk));
|
||||
}
|
||||
|
||||
static int
|
||||
sio_puc_probe(device_t dev)
|
||||
{
|
||||
device_t parent;
|
||||
uintptr_t rclk, type;
|
||||
int error;
|
||||
|
||||
parent = device_get_parent(dev);
|
||||
|
||||
if (BUS_READ_IVAR(parent, dev, PUC_IVAR_TYPE, &type))
|
||||
return (ENXIO);
|
||||
if (type != PUC_TYPE_SERIAL)
|
||||
return (ENXIO);
|
||||
|
||||
if (BUS_READ_IVAR(parent, dev, PUC_IVAR_CLOCK, &rclk))
|
||||
rclk = DEFAULT_RCLK;
|
||||
|
||||
error = sioprobe(dev, 0, rclk, 1);
|
||||
return ((error > 0) ? error : BUS_PROBE_LOW_PRIORITY);
|
||||
}
|
||||
|
||||
DRIVER_MODULE(sio, puc, sio_puc_driver, sio_devclass, 0, 0);
|
@ -1,51 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* 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. Neither the name of the University 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 REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)comreg.h 7.2 (Berkeley) 5/9/91
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* Receiver clock frequency for "standard" pc serial ports. */
|
||||
#define DEFAULT_RCLK 1843200
|
||||
|
||||
/* speed to initialize to during chip tests */
|
||||
#define SIO_TEST_SPEED 9600
|
||||
|
||||
/* default serial console speed if not set with sysctl or probed from boot */
|
||||
#ifndef CONSPEED
|
||||
#define CONSPEED 9600
|
||||
#endif
|
||||
|
||||
/* default serial gdb speed if not set with sysctl or probed from boot */
|
||||
#ifndef GDBSPEED
|
||||
#define GDBSPEED CONSPEED
|
||||
#endif
|
||||
|
||||
#define IO_COMSIZE 8 /* 8250, 16x50 com controllers */
|
@ -1,39 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* 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. Neither the name of the University 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 REGENTS 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 REGENTS 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$
|
||||
*/
|
||||
|
||||
int sioattach(device_t dev, int xrid, u_long rclk);
|
||||
int siodetach(device_t dev);
|
||||
int sioprobe(device_t dev, int xrid, u_long rclk, int noprobe);
|
||||
|
||||
extern devclass_t sio_devclass;
|
||||
extern char sio_driver_name[];
|
@ -1,10 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/dev/sio
|
||||
|
||||
KMOD= sio
|
||||
SRCS= bus_if.h card_if.h device_if.h isa_if.h pci_if.h serdev_if.h \
|
||||
opt_gdb.h opt_kdb.h opt_sio.h \
|
||||
sio.c sio_isa.c sio_pccard.c sio_pci.c sio_puc.c pccarddevs.h
|
||||
|
||||
.include <bsd.kmod.mk>
|
@ -105,7 +105,6 @@ control-X is passed to the terminal as with other control characters.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr pty 4 ,
|
||||
.Xr sio 4 ,
|
||||
.Xr snp 4 ,
|
||||
.Xr kldload 8
|
||||
.Sh HISTORY
|
||||
|
Loading…
Reference in New Issue
Block a user