summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/puc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit Exar XR17V35x serial port support previously backed out:jcs2020-08-141-3/+37
| | | | | | | | | | | | | | | The Exar XR17V354 has 4 ports that have a 256-byte FIFO, use a frequency of 125Mhz, and have a unique sleep register. A custom interrupt handler is setup in puc for these ports so it can check a register which reports which ports triggered the interrupt, rather than having to run comintr for every port every time. To avoid probing for these ports in com_attach_subr which requires access to registers that may be reserved on certain platforms, pass the sc_uarttype from com_puc_attach since the port type is already known based on the puc device vendor/id. Input from kettenis, tested in snaps
* Allow puc(4) to cope with 64-bit BARs. puc(4) iterates over the BARspatrick2020-03-021-2/+7
| | | | | | | | | assuming each BAR is four byte-wide. For 64-bit BARs this is not true, so we need to skip the next entry if we encounter one. Otherwise we corrupt the 64-bit BAR we just mapped. ok kettenis@ "quite a hack" deraadt@
* Include "com.h" to fix using a puc(4) based serial port as serial consolekettenis2018-12-021-1/+3
| | | | | | which was broken by the previous commit. ok jsg@, mpi@
* Fix kernel build without serial consolekn2018-11-051-1/+3
| | | | OK mpi
* Continue kettenis@'s revert:phessler2018-05-021-40/+5
| | | | | | Revert previous commit; the XR17V35X probe that was added accesses registers that aren't guaranteed to be there and may even belong to a different device. This triggers a fault on hppa machines like the C3000 for example.
* The Exar XR17V354 has 4 com ports that have a 256-byte FIFO, use ajcs2018-04-151-5/+40
| | | | | | | | | frequency of 125Mhz, and have a unique sleep register. A custom interrupt handler is setup in puc for these ports so it can check a register which reports which ports triggered the interrupt, rather than having to run comintr for every port every time. ok mlarkin deraadt
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-3/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-2/+2
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Explicitly check whether a BAR is big enough for a particular port insteadkettenis2012-06-121-9/+11
| | | | | of relying on bus_space_subregion(9) to fail. Fixes double console attachment seen by otto@
* Allow for serial console on com@puc. Not perfect but should handle thekettenis2012-05-151-1/+25
| | | | | | common cases. ok mikeb@
* Simplify various parts of the puc(4) attachment code. Tested lightlyderaadt2011-11-151-66/+1
| | | | by krw and myself.
* Use a new encoding for the entries in the pucdata table, the result isderaadt2011-10-251-25/+12
| | | | | | that the .o file is half the size. Tested by camield (who just doubled the table size recently for a 16-port device). Hopefully no regressions, since this is a pretty large change of a very large table.
* Initial stab at making com@puc suspend and resume properly. Works finekettenis2010-08-061-2/+2
| | | | | | | for using cu(1) between two OpenBSD machines. Probably doesn't work for serial consoles but we don't support those on puc(4) anyway. ok deraadt@
* Clean the macros from puc(4). Now with correct logic.pirofti2010-07-221-17/+8
| | | | Tested and okay sthen@.
* revert last commit, it made my puc(4) disappear. ok pirofti@sthen2010-07-071-8/+17
|
* Abstraction clean-up. `I like it' deraadt@.pirofti2010-07-021-17/+8
|
* shorten sizes of variables to the required number of bits, and removederaadt2009-03-031-3/+3
| | | | | unused variables, tested by todd ok kettenis
* Make puc(4) detachable.kettenis2007-12-041-3/+34
| | | | Tested by millert@
* Some cleanup, ansify remaining K&R functions, neatly summarize thegwk2007-04-261-28/+39
| | | | | | | | | | | | | | | available ports e.g. puc0 at pci1 dev 7 function 0 "Moxa C168H" rev 0x02: com, com, com, com, com, com, com, com vs puc0 at pci1 dev 7 function 0 "Moxa C168H" rev 0x02: ports: 8 com and panicing is an extreme behaviour if we dont know the name of a port simply print a message informing of the unknown port and dont attempt to attach it. ok deraadt
* Add support for the Cronyx Omega serial ports card; this particular cardmiod2006-12-281-1/+12
| | | | | forces the com(4) uart type to ST16C654 since that's what's on it; from Alexei G. Malinin (alexei.malinin@inetcomm.ru)
* back out a tiny piece of mickey's commit which lets me compile a kerneljolan2006-08-011-2/+2
| | | | on sparc64 again
* puc@cardbus (only added (commented out) to whom has puc@pci enabled)mickey2006-07-311-87/+96
| | | | | | tested on puc@pci by fkr and meself on the cardbus. still needs a bit more work but generally works. deraadt@ ok and some input from miod@
* typo; from weissmanndudemickey2003-02-281-2/+2
|
* send-pr -> sendbug here as well; Peter Wernerhenning2002-12-111-2/+2
|
* First round of __P removal in sysmillert2002-03-141-8/+8
|
* Change pci_intr_map to take pci_attach_args as an argument.art2001-08-251-3/+2
| | | | | | | | | | | All callers actually took all arguments to pci_intr_map from pci_attach_args structs, so this simplifies code. This also allows more complicated interrupt assignment schemes like the one on sparc64. This makes sparc64 pci interrupts work. Inspired by the same change in NetBSD.
* Make pci_mapreg_map take an extra argument where we canniklas2001-06-121-3/+2
| | | | | | | put a size limitation of the PCI region to map. That makes the PERC 3/Di raid controller usable, as it publishes too much PCI memory for us to map in the kernel virtual memory. As we only access the first 256 byte it is of no use to map 128MB of kvm.
* support puc devices with higher speeds (not tested yet)deraadt2001-03-151-1/+2
|
* Kill the overly verbose description strings, add another device.downsj1999-11-141-4/+8
|
* PCI "universal" communication device driver, by cgd@netbsd.org.downsj1999-10-261-0/+348