Commit Graph

112 Commits

Author SHA1 Message Date
Bruce Evans
ba8fc6ca62 Fixed some style bugs in rev.1.28. Almost every line was misindented. 2004-04-18 04:48:53 +00:00
Bruce Evans
0efcc68bc8 Fixed a style bug (insertion sort error) in rev.1.29. This file should
be sorted in the same order as misc/pci_vendors (on vendor/device id),
and already partly is.
2004-04-18 04:44:28 +00:00
Bruce Evans
3f7fbb5497 Fixed some style bugs in previous commit. Almmost every line was
misformatted.
2004-04-18 04:31:58 +00:00
Colin Percival
a58deb4616 Add support for Exsys EX-41098 cards.
PR:		kern/65040
Submitted by:	Stefan Grundmann <sg-sendpr@waset.de>
Tested by:	buildkernel
"Just commit it" by: phk
2004-04-17 11:57:34 +00:00
Marcel Moolenaar
cc81fed63c Ever since rev 1.27 of puc.c, the port number that was exposed by puc(4)
and used by uart(4) for the channel conflicted with the port offset for
the Z8530. The Z8530 has the channels reversed (i.e. channel B is at
offset 0 and channel A is at offset 4). Assign the port offsets in the
right order so that uart(4) will properly attach to the channels.

Submitted by: Marius Strobl <marius@alchemy.franken.de>
2004-04-05 01:58:02 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
John Baldwin
890cefab5b Expand the mask for the Avlab Technology, PCI IO 2S entry to cover the
2S-650 and 2S-850 variants.

PR:		kern/45285
Submitted by:	Andrey Zakharchenko <avz AT jscc.ru>
MFC after:	1 week
2004-02-04 18:01:02 +00:00
John Baldwin
7cd06e089c Add support for an non-branded SUN1889-based 2 port PCI serial card.
PR:		kern/55159
Submitted by:	Yeasah Pell <yeasah@apocalypse.org>
MFC after:	1 week
2003-12-31 17:51:18 +00:00
David E. O'Brien
6ea7b5bcdf Add support for Moxa Technologies' Smartio CP-104UL/PCI 4S RS232 card.
Submitted by:	Guido Falsi <mad@madpilot.net>
2003-12-09 17:31:25 +00:00
Warner Losh
347934fa63 Sometimes cardbus attachments don't attach, so while we track down
this problem put these lines back in.  While they should be
unnecessary, they appear to be sometimes necessary.

Reviewed in concept: dfr
Approved by: re (scottl@)
2003-11-28 05:28:29 +00:00
Doug Rabson
0be389f3ca Remove explicit cardbus attachments from drivers where this is identical
to the pci attachment. Cardbus is a derived class of pci so all pci
drivers are automatically available for matching against cardbus devices.

Reviewed by: imp
2003-11-03 09:22:18 +00:00
Warner Losh
6a0e476222 const char ** needs to be passed, not char **. 2003-10-27 06:41:40 +00:00
Doug Ambrisko
43e42f3688 Add support for another multiple serial port card based on OX16PCI954 device
id 0x950a.

MFC:	after 4.9 release.
2003-10-24 22:34:56 +00:00
Marcel Moolenaar
153bbe3e6a Make the port number available to the sub-device with PUC_IVAR_PORT. 2003-09-26 04:44:55 +00:00
Joerg Wunsch
0ec6e98386 Add an entry for the VScom (Titan?) PCI-800L 8-port serial multiport
card.

Thanks to bde for his help in configuring the undocumented bars in
this driver...

MFC after:	1 month
2003-09-19 19:55:08 +00:00
Marcel Moolenaar
dc7d0dea12 Enhance puc(4) to support uart(4). This includes:
o  Introduce PUC_PORT_TYPE_UART so that we can attach to uart(4),
o  Introduce port sub-types (eg PUC_PORT_UART_NS8250, PUC_PORT_UART_Z8530)
   to handle different hardware and determine resource sizes.
o  Introduce two new IVARs: PUC_IVAR_SUBTYPE and PUC_IVAR_REGSHFT. Both
   are used by uart(4) to get sufficient information to talk to the HW.
o  Introduce PUC_FLAGS_ALTRES to tell puc(4) to try memory mapped I/O
   if I/O port space cannot be allocated, or vice versa.
o  Have ports of type PUC_PORT_TYPE_COM attach to uart(1) if attaching
   to sio(4) fails (due to not having the sio driver).
o  Put struct puc_device_description in struct puc_softc instead of
   having a pointer to a device description in the softc. This allows
   us to create device descriptions on the fly without having to use
   malloc() or otherwise have them staticly defined.
o  Move puc_find_description() from puc.c to puc_pci.c as it's specific
   to PCI.
o  Add EBUS and SBUS frontends for use on sparc64. Note that the P in
   puc stands for PCI, so we kinda mess things up here. It's too soon
   to worry about it though. We'll know what to do about it in time.

NOTE: This commit changes the behaviour of puc(4) to not quieten the
device probe and attach for child devices. The uart(4) driver provides
additional device description that is valuable to have.
2003-09-06 21:48:50 +00:00
John Baldwin
729d7ffbcf - Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds
  the header type.
- Replace several magic numbers with appropriate constants for the header
  type register and a couple of PCI_FUNCMAX.
- Merge to amd64 the fix to the i386 bridge code to skip devices with
  unknown header types.

Requested by:	imp (1, 2)
2003-08-28 21:22:25 +00:00
David E. O'Brien
aad970f1fe Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
Doug Ambrisko
6cb38a02e0 Add in a missing device entry that I thought was already in there. This
is from the same PR.  Prompted by the reporter of the PR.

PR:		38372
2003-08-21 03:54:20 +00:00
Pierre Beyssac
4530e20aae Add support for the newer Moxa PCI 8-port, 16550-compatible based
CP-168U board. It initializes and attaches in the same way as the
older (but higher performance) C168H. The only difference is the
board ID, which is 0x1681.

PR:		kern/53548
Submitted by:	regnauld@catpipe.net
MFC after:	1 week
2003-08-14 14:15:16 +00:00
Bruce Evans
40f018905b Support the Titan VScom PCI-200HV2 2 port serial card.
MFC after:	3 days
2003-08-02 13:25:31 +00:00
Doug Ambrisko
a373227418 Add printer support to puc(4) driver.
-	Move isa/ppc* to sys/dev/ppc (repo-copy)
      -	Add an attachment method to ppc for puc
      -	In puc we need to walk the chain of parents.
Still to do, is to make ppc(4) & puc(4) work on other platforms.  Testers
wanted.

PR:		38372 (in spirit done differently)
Verified by:	Make universe (if I messed up a platform please fix)
2003-08-01 02:25:32 +00:00
Wilko Bulte
5adbf8fb4d add support for NetMos 4S0P PCI: 4S, 0P
tested on -current: ceri
tested on -stable:  wilko

approved: re (scottl)
2003-05-14 09:37:46 +00:00
Maxim Sobolev
e9442e03ca Add support for IC Book Ironclad Pro/Lite 8-port cards.
Sponsired by:	IC Book Labs
MFC After:	2 weeks
2003-04-30 22:15:47 +00:00
Murray Stokely
13b051bb51 Correct typos.
PR:		kern/50619
Submitted by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
MFC after:	3 days
2003-04-07 09:42:45 +00:00
Poul-Henning Kamp
8f24aac6b9 Add support for Moxa Technologies Co., Ltd. PCI I/O Card 4S RS232
Submitted by:	sst@cybercity.dk
2003-04-03 09:47:15 +00:00
Maxim Sobolev
084254f807 - Add minimal support for TI16754 4xUART chip into sio(4) driver and remove
now unnecessary hack from the previous commit;
- Add support for Interrupt Latch Register (ILR) into puc(4). So far only
  ILRs compatible with specifications from Digi International are supported.
  Support for other types of ILRs could be easily added later;
- Correct clock frequency for IC Book Labs Dreadnought x16 Lite board;
- Enable ILR detection/usage for IC Book Labs Dreadnought x16 boards.

Sponsored by:   IC Book Labs
MFC after:      2 weeks
2003-03-15 16:25:40 +00:00
Maxim Sobolev
525e5ed929 Correct clock frequency for the IC Book Labs' cards, so that it's possible
to use speeds higher than 115200.

Sponsored by:	IC Book Labs
MFC after:	2 weeks
2003-03-12 17:56:03 +00:00
Maxim Sobolev
a2a101e766 Add initial support for IC Book Labs Dreadnought x16 Pro 16-ports card. Since
this card is based on 16750 UART, modify sio(4) a bit to ignore 16750-specific
7th bit of MCR when probing card. This allows card to be detected and attached
as 16550A-compatible device. More work needs to be done in order to enable
nice 16750-specific features such as larger fifo buffer and higher speeds.

Sponsored by:	IC Book Labs
MFC after:	2 weeks
2003-03-12 17:20:24 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Marcel Moolenaar
da5e9a5bd6 MFp4: Add support for memory mapped UARTs, but don't add any devices
yet that depend on it because sio(4) needs support for it before it
can be used. There's no reason why zs(4) couldn't attach to puc(4)
in the (near?) future (in principle), so don't make memory mapped I/O
support in sio(4) a precondition for this change.
2003-01-18 02:54:16 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Sam Leffler
28788ed563 fix build (make LINT) 2002-12-30 19:45:30 +00:00
Maxim Sobolev
638d2f4fe8 Add support for IC Book Labs Dreadnought x16 Lite.
Approved by:	re
2002-12-28 15:45:38 +00:00
Poul-Henning Kamp
6cfbfac6d4 Add "missing scratch-pad register" to the first of the two ports
on the Argosy SP-320 dual-port async PCcard.

An amazing piece of hardware seen from an ISO9000 point of view.
2002-09-27 22:02:46 +00:00
Poul-Henning Kamp
32bc35fdb6 Add a field so we can specify flags per port to the underlying device driver. 2002-09-27 22:01:32 +00:00
Poul-Henning Kamp
1f02c343e8 Don't let children attach fast interrupts if the parent interrupt is normal.
Submitted by:	bde
2002-09-04 18:50:40 +00:00
Poul-Henning Kamp
d3c10e33e6 Bring back the PUC_FASTINTR option, and implement it correctly so that
child devices also know if they are fast or normal.

Requested by:	bde
2002-09-04 15:29:04 +00:00
Poul-Henning Kamp
b4dde36292 Remove a debug printf.
Correctly identify the ARGOSY SP320 dual port serial PCMCIA card.
2002-09-03 11:31:34 +00:00
Poul-Henning Kamp
b5518fb0cf Fix interrupt registration:
PUC devices live on pccard or pci so INTR_FAST is never really an option.
Don't try to register the interrupt as fast and don't allow the children
to do so either.
2002-09-03 11:22:13 +00:00
Poul-Henning Kamp
ed4208e931 Style: fix a function whitespace stuff-up. Remove a debugging printf. 2002-09-03 11:19:44 +00:00
Poul-Henning Kamp
c91680190a Style: move a global variable up to the top of the file. 2002-09-03 11:18:35 +00:00
Juli Mallett
237d2dda36 Stylistic fixes for the inclusion of the opt_puc.h header, so it comes from the
right places, and so it's sorted consistently with how all the other N-hundreds
of files ding this do it.

Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-09-01 01:59:38 +00:00
Poul-Henning Kamp
1e89655a31 More cleaning up and unhacking:
Don't expect all RIDs to be PCI rids.  The previous code made at
least 1 mistake, even for PCI.

Give the card definitions a chance to specify a init function.
Use this instead of the gross superio hack.
Move the win877 init function to puc_pci.c where it belongs.

RIDs can actually be zero, don't set badmuxed if so.

Set a less incorrect end for the construct SYS_RES_IOPORT entries,
I guess both sio and lpt happen to use 8 IO ports, but that shouldn't
really be hardcoded this way.

Fixup puc_pccard.c to match.

We're getting closer.
2002-08-31 20:29:46 +00:00
Poul-Henning Kamp
e6ccea0a25 Don't enable PUC_DEBUG by accident 2002-08-31 18:42:31 +00:00
Poul-Henning Kamp
32f606d105 Split the puc driver in pci specific and generic parts.
Add a pccard frontend for it as well.

The PCcard stuff does not work yet because there is still some PCImagic
left in puc.c
2002-08-31 18:38:43 +00:00
John Hay
799e9b2414 Add an entry for Avlab's low profile 4 serial port card.
PR:		41146
Submitted by:	Shinsuke Matsui <smatsui@internet-inc.co.jp>
Obtained from:	NetBSD
2002-08-22 10:40:00 +00:00
John Hay
76353f6823 Add an entry for VScom PCI-200L 2 port serial card.
PR:		41142
Submitted by:	Shinsuke Matsui <smatsui@internet-inc.co.jp>
Obtained from:	OpenBSD
2002-08-22 10:37:55 +00:00
Warner Losh
4e64e27753 cardbus attachment. 2002-07-21 04:23:40 +00:00
David E. O'Brien
a27ffb412a Add support for Comtrol RocketPort 550 PCi models: 4 RJ45, 4 Quadcable,
8 RJ11, 8 Octacable, and 8 (used with RocketPort I/F box).

Note:	untested due to lack of hardware
2002-06-18 03:05:10 +00:00
David E. O'Brien
2569e3871c Support the Comtrol RocketPort 550 PCi 16 (used with RocketPort I/F box).
Sponsored by:	Feral Software
2002-06-18 02:39:12 +00:00
John Hay
de0d2cad31 Add another chip id for the new LAVA 4-port serial card.
PR:		37333
Submitted by:	Ari Suutari <ari.suutari@syncrontech.com>
MFC after:	4 days
2002-04-24 18:55:50 +00:00
John Hay
aaeedfc626 Ignore the multifunction bit in the PCIR_HEADERTYPE.
PR:		37333
Submitted by:	Ari Suutari <ari.suutari@syncrontech.com>
MFC after:	4 days
2002-04-24 18:53:43 +00:00
John Hay
a4c6b91603 Add an entry for "PCCOM dual port RS232/422/485".
Submitted by:	Daniel O'Connor <doconnor@gsoft.com.au>
MFC after:	1 week
2002-04-01 13:33:43 +00:00
Murray Stokely
07bd43d600 Add an entry for Decision Computer Inc, PCCOM 4-port serial cards.
PR:		kern/36302
Submitted by:	Thomas Zenker <thz@Lennartz-electronic.de>
MFC after:	1 week
2002-03-28 11:17:20 +00:00
Alfred Perlstein
e51a25f850 Remove __P. 2002-03-20 02:08:01 +00:00
John Hay
db78e578e3 Remove the #if __FreeBSD_version glue now that the puc driver is part of
-stable.
2002-03-08 17:41:22 +00:00
John Hay
b72c70af4c Add the "Avlab Technology, PCI IO 2S" card.
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2002-03-06 17:37:27 +00:00
Yoshihiro Takahashi
5aa967d922 Release allocated memory and bus_space_handle on an error.
Reviewed by:	jhay
2002-02-19 14:58:11 +00:00
Yoshihiro Takahashi
9f67ccb7e5 Move the bus_space_subregion function from the puc driver to the bus_space
sutff.

Reviewed by:	jhay
2002-02-17 09:41:23 +00:00
John Hay
9c564b6c92 Add the puc (PCI "Universal" Communications) driver. The idea and some of
the structure definitions come from NetBSD to make it easier to share card
definitions. The driver only acts as a shim between the pci bus and the
sio driver. Later pci parallel ports could also be supported through this
driver. Support for most single and multiport pci serial cards should be
as simple as adding its definition to pucdata.c

Tested with the following pci cards:
Moxa Industio CP-114, 4 port RS-232,RS-422/485
Syba Tech Ltd. PCI-4S2P-550-ECP, 4 port RS-232 + 2 parallel ports
Netmos NM9835 PCI-2S-550, 2 port RS-232
2002-02-16 15:12:14 +00:00