Commit Graph

19 Commits

Author SHA1 Message Date
thorpej
9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
gmcgarry
36adeea7c2 Don't frob MCR_IEN bit if on a 425e. Problem initially reported
by Christoph Badura:

It looks to me like the 425e uses reverse polarity of the MCR_IEN bit with
respect to the other 4xx models.  That could be because it doesn't have
an inverter wired behind the IEN(OUT2) output of the UART.

Fix is inspired by change in OpenBSD.  Serial console input is
confirmed working on 425e by Thilo Manske.
2002-04-17 23:31:24 +00:00
gmcgarry
e25ab469b9 Attach apci console as an intio device, not a dio device.
Fixes console attach on 425e noted by Thilo Manske.
2002-04-17 20:40:30 +00:00
atatat
31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
gmcgarry
97ef6567ad Add RCSIDs. 2002-03-15 05:55:35 +00:00
gmcgarry
9370d5d4ef Update hardware drivers with console attachments to the new console
attachment interface.
2001-12-14 08:34:27 +00:00
wiz
0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
scw
2963ff5c58 Add l_poll' to struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
jdolecek
67e67ac7dc Replace the (no longer working) check for tp->t_line == 0 with
tp->t_linesw == linesw[0]. Hopefully this is correct.
2000-11-27 18:39:04 +00:00
eeh
5d8e9b343a Adapt to the new line discipline scheme. 2000-11-02 00:35:04 +00:00
thorpej
b667a5a357 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:30:07 +00:00
bad
1a3995bac1 In apciparam() in the ospeed == 0 case, actually set the cfcr to the new
value.
1999-09-10 22:49:33 +00:00
thorpej
22d6c3f13b Fix APCI console initialization; we were forgetting to update cn_tab.
From Christoph Badura.
1999-08-01 21:30:21 +00:00
thorpej
e1f99936c8 Nuke apcicheckdca(). Since "serial 1" only exists as an APCI serial
port on the 425e, key off that instead.
1999-07-31 21:14:36 +00:00
thorpej
f1821c7811 Adjust for recent ttyopen() and dialout device changes. 1998-03-28 23:49:06 +00:00
thorpej
871cf5e7ce Update for changes to config. 1998-01-12 18:30:41 +00:00
thorpej
2d397943d4 Copyright assigned to The NetBSD Foundation. 1997-10-04 09:59:35 +00:00
thorpej
a492e1df80 Add a kernel driver for the APCI 8250-like UARTs that live in the
Frodo ASIC, originally contributed by Mike Smith
<mike@pressed.spam.frisbee.net.au>, but reworked by me to:
- Essentially duplicate the dca driver, modifiying where necessary
  to work with the APCI.
- Deal with the different Frodo autoconfiguration model.
- Don't attach a tty to the 0th UART - it's not really useful for much
  more than the Domain keyboard.
- Added a routine to check for the existence of a DCA at select code 9.
  On most models, the 1'th UART is mapped to select code 9 by the PROM,
  and on these models, we do _NOT_ want to attach the device as an APCI.
  However, on the 425e, this mapping does not take place, so we attach
  as an APCI.  The 2'th and 3'th UARTs always get tty instances.
- Add console support which will only be invoked on the 425e (i.e. check
  for DCA at 9, and defer console to it if it exists).
1997-05-12 08:12:36 +00:00