summaryrefslogtreecommitdiffstats
path: root/sys/dev/cy
Commit message (Collapse)AuthorAgeFilesLines
* Updated #includes to 4.4lite style.bde1996-10-151-2/+3
|
* Fixed a bug that got introduced when I changed the CY16_RESET anddg1996-10-142-6/+6
| | | | | CY_CLEAR_INTR definitions. This might have affected probing of ISA versions of the Cyclom 16/32-Y.
* Make this compile again for the CyDebug case.dg1996-10-142-12/+14
|
* Change DEVFS device naming convention for cuac*, ttyc*.dg1996-10-132-14/+26
|
* Changes to add support for the PCI version of the Cyclades Cyclom-Ydg1996-10-134-270/+467
| | | | serial adapter, and support for multiple Cyclom controllers.
* Oops, missed a chunk in that last commit.dg1996-10-042-6/+6
|
* Implemented a more sophisticated mechanism for finding the chip iobasedg1996-10-043-124/+144
| | | | | so that 32Y boards will work. Fixed bogus indenting and added a pair of parens.
* Remove devconf, it never grew up to be of any use.phk1996-09-062-104/+2
|
* Synced with sio.c: added support for TIOCDCDTIMESTAMP and simplifiedbde1996-07-302-80/+64
| | | | timestamp code.
* Clean up -Wunused warnings.gpalmer1996-06-122-2/+10
| | | | Reviewed by: bde
* KGDB is dead. It may come back one day if somebody does it.phk1996-05-022-26/+2
|
* Fixed ownerships of callout devices.bde1996-03-272-28/+26
|
* Avoid local sprintfs and other printf'isms.phk1996-01-252-40/+36
|
* Synced with sio.c. This fixed the DEVFS initialization. cy.c isbde1995-12-222-184/+154
| | | | supposed to be identical with sio.c for hardware-independent details.
* Replaced nxreset by noreset (if the reset function gets called, then thebde1995-12-102-4/+4
| | | | | | | device must be configured. It's hard to tell whether a reset function should be noreset or nullreset since reset functions are never called. Most drivers use nullreset but noreset has the advantage of complaining if somehow gets called).
* Replaced nxmmap by nommap (if the mmap function gets called, then thebde1995-12-102-4/+4
| | | | device must be configured).
* Removed new alias d_size_t for d_psize_t.bde1995-12-102-4/+4
| | | | | | | | | | Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and d_devtotty_t. Sorted declarations of switch functions into switch order. Removed duplicated comments and declarations of nonexistent switch functions.
* Julian forgot to make the *devsw structures static.phk1995-12-082-4/+4
|
* Pass 3 of the great devsw changesjulian1995-12-082-60/+76
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* Removed unnecessary #includes of <sys/user.h>. Some of these were justbde1995-12-062-4/+2
| | | | | | | to get the definitions of TRUE and FALSE which happen to be defined in a deeply nested include. Added nearby #includes of <sys/conf.h> where appropriate.
* If you're going to mechanically replicate something in 50 filesjulian1995-11-292-4/+4
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-292-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* the second set of changes in a move towards getting devices to bejulian1995-11-282-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | totally dynamic. this is only the devices in i386/isa I'll do more tomorrow. they're completely masked by #ifdef JREMOD at this stage... the eventual aim is that every driver will do a SYSINIT at startup BEFORE the probes, which will effectively link it into the devsw tables etc. If I'd thought about it more I'd have put that in in this set (damn) The ioconf lines generated by config will also end up in the device's own scope as well, so ioconf.c will eventually be gutted the SYSINIT call to the driver will include a phase where the driver links it's ioconf line into a chain of such. when this phase is done then the user can modify them with the boot: -c config menu if he wants, just like now.. config will put the config lines out in the .h file (e.g. in aha.h will be the addresses for the aha driver to look.) as I said this is a very small first step.. the aim of THIS set of edits is to not have to edit conf.c at all when adding a new device.. the tabe will be a simple skeleton.. when this is done, it will allow other changes to be made, all teh time still having a fully working kernel tree, but the logical outcome is the complete REMOVAL of the devsw tables. By the end of this, linked in drivers will be exactly the same as run-time loaded drivers, except they JUST HAPPEN to already be linked and present at startup.. the SYSINIT calls will be the equivalent of the "init" call made to a newly loaded driver in every respect. For this edit, each of the files has the following code inserted into it: obviously, tailored to suit.. ----------------------somewhere at the top: #ifdef JREMOD #include <sys/conf.h> #define CDEV_MAJOR 13 #define BDEV_MAJOR 4 static void sd_devsw_install(); #endif /*JREMOD */ ---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT #ifdef JREMOD sd_devsw_install(); #endif /*JREMOD*/ -----------------------at the bottom: #ifdef JREMOD struct bdevsw sd_bdevsw = { sdopen, sdclose, sdstrategy, sdioctl, /*4*/ sddump, sdsize, 0 }; struct cdevsw sd_cdevsw = { sdopen, sdclose, rawread, rawwrite, /*13*/ sdioctl, nostop, nullreset, nodevtotty,/* sd */ seltrue, nommap, sdstrategy }; static sd_devsw_installed = 0; static void sd_devsw_install() { dev_t descript; if( ! sd_devsw_installed ) { descript = makedev(CDEV_MAJOR,0); cdevsw_add(&descript,&sd_cdevsw,NULL); #if defined(BDEV_MAJOR) descript = makedev(BDEV_MAJOR,0); bdevsw_add(&descript,&sd_bdevsw,NULL); #endif /*BDEV_MAJOR*/ sd_devsw_installed = 1; } } #endif /* JREMOD */
* Fixed setting of speed B0 - don't output a bogus divisor of 0 and abde1995-11-262-10/+18
| | | | | random prescaler, just hang up. This may fix hangup problems with mgetty.
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up thebde1995-11-042-6/+4
| | | | | | | | | | misplaced extern declarations (mostly prototypes of interrupt handlers) that this exposed. The prototypes should be moved back to the driver sources when the functions are staticalized. Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be included when building LKMs so define a wart in bsd.kmod.mk to help guard against including it.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-042-22/+2
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* sio.c:bde1995-10-222-38/+12
| | | | | | | | | | | | | | | | | | | | Fix the tests for being a console by reverting to the ones that were used before the the RB_SERIAL changes. RB_SERIAL only needs to be tested in one place. The initialization of comconsole was wrong before the RB_SERIAL changes for the COMCONSOLE case. This may have been the cause of the unnecessary changes. Start eliminating #includes of <i386/i386/cons.h>. This header is supposed to be included from <machine> although it should be completely machine-independent and included from <sys>. Remove a wrong XXX comment. `comconsole' is used to test for being a console and even the tests for deciding the default termios state are necessary (the semi-reentrant i/o routines don't handle ordinary device i/o). cy.c: Sync with sio.c. The console tests are present but always fail.
* Fix probe to work properly with the Cyclades cyclom-16Ye.dg1995-10-112-18/+26
|
* Improve input flow control.bde1995-07-312-52/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8 (low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with some drivers. 512 is magic and some things depended on TTYHOG/2 >= TTYHOG-512 to work; now they depend on the 512 magic not changing and TTYHOG-512 being significantly larger than 0. This should be handled in ttsetwater(). Separate the decision about whether to do input flow control from doing it. ttyblock() now just starts input flow control (hardware and/or software) and there is a new function ttyunblock() to stop it. The decisions are the same except for the watermark changes and allowing for input expansion for PARMRK. When flushing input, try harder at first to send a start character if required, but give up if the first attempt fails. cy.c, rc.c, sio.c: Simplify: let ttyinput() handle input flow control if it is not being bypassed. Use ttyblock() to start flow control otherwise. rc.c: Use same input flow control test as elsewhere: test in a more efficient order and start flow control at >= highwater instead of at > highwater.
* Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFFbde1995-07-292-16/+12
| | | | | is handled at a low level, and ECHONL only applies if ICANON is set, although tty.c sometimes bogusly applies it when ICANON isn't set.
* Always wake up writers after clearing TS_BUSY. This will soon bebde1995-07-292-48/+10
| | | | | | | | | essential when I fix excessive wakeups for output-below-low-water. In cy.c and sio.c, wake up via the driver start routine to also eliminate duplicated code involving the clearing of TS_TTSTOP. Always (except in code to be replaced soon) call driver start routine directly instead of going through ttstart().
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-222-16/+6
| | | | | Give names to the magic tty i/o sleep addresses and use them. This makes it easier to remember what the addresses are for and to keep them unique.
* Move the inline code for waking up writers to a new functionbde1995-07-222-34/+4
| | | | | | | | | | | ttwwakeup(). The conditions for doing the wakeup will soon become more complicated and I don't want them duplicated in all drivers. It's probably not worth making ttwwakeup() a macro or an inline function. The cost of the function call is relatively small when there is a process to wake up. There is usually a process to wake up for large writes and the system call overhead dwarfs the function call overhead for small writes.
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-212-22/+2
| | | | | Move static termioschars() from a couple of drivers to tty.c. Now there is only one copy of ttydefchars[].
* Rewrite:bde1995-07-053-2480/+4389
| | | | | | | | | | | - use pseudo-dma - provide the same features and interface as sio - support multiple boards - fix bugs. Some compile-time configuration constants are set to support higher speeds and Cyclom-16Y's at a 30% relative cost in efficiency. Cyclom-16Y support is untested.
* Remove trailing whitespace.rgrimes1995-05-302-16/+16
|
* CVS:bde1995-03-282-8/+8
| | | | The previous patch was botched.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-282-2/+6
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
* Incorporate bde's code-review comments.pst1995-02-282-22/+2
| | | | | | | | | | | (a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous. (b) remove all of the wrappers that have been replaced by ttselect (c) fix formatting in syscons.c and definition in syscons.h (d) add cxdevtotty NOT DONE: (e) make pcvt work... it was already broken...when someone fixes pcvt to link properly, just rename get_pccons to xxxdevtotty and we're done
* (a) remove the pointer to each driver's tty structure array from cdevswpst1995-02-252-6/+32
| | | | | | | | | (b) add a function callback vector to tty drivers that will return a pointer to a valid tty structure based upon a dev_t (c) make syscons structures the same size whether or not APM is enabled so utilities don't crash if NAPM changes (and make the damn kernel compile!) (d) rewrite /dev/snp ioctl interface so that it is device driver and i386 independant
* Avoid duplicating ttselect() so that we don't have to change cyselect()bde1995-02-152-60/+36
| | | | | | | | | | | when ttselect() is improved. This requires using an array of tty structs and not using ttymalloc(). Fix an off by 1 error. Some caclulations seem to be off by a factor of NCY. NCY defaults to 16, which gives 256 tty structs occupying 0xd000 bytes. The minor number encoding only allows 16 ttys. Update the types of timeout functions to 2.0.
* Add the Cyclades serial driver code (ALPHA) from Andrew Werple andjkh1995-02-092-0/+3364
adapted to FreeBSD by Heikki Suonsivu <hsu@cs.hut.fi>. Submitted by: Andrew Werple <andrew@werple.apana.org.au> and Heikki Suonsivu <hsu@cs.hut.fi> Obtained from: NetBSD
OpenPOWER on IntegriCloud