Commit Graph

25 Commits

Author SHA1 Message Date
Poul-Henning Kamp
bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Nate Williams
757dab8dcb Simplify probe. Removed the DELAY() as it's not needed. 1996-05-07 22:33:19 +00:00
Nate Williams
0e76201114 Removed one of the un-documented CTRL pokes, and replace it with a one
second delay.  My ps/2 mouse is now found reliably on my ThinkPad (it
didn't before) and still works on my NEC Versa.

Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:59:44 +00:00
Nate Williams
f73355c18f Make sure you include <sys/devconf.h> if you have devconf code. :( 1996-05-07 21:56:46 +00:00
Nate Williams
a0245aeb1a Added code to avoid keyboard 'hangs' during the probe.
Submitted by:	Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:48:55 +00:00
Nate Williams
0c7b035e39 Added devconf() support.
Obtained from: Richard Wiwatowski <rjwiwat@adelaide.on.net>
1996-05-07 21:32:29 +00:00
Nate Williams
077e6558ec Re-wrote psm_poll_status() to use the ioport supplied in the kernel
config file instead of hard-coding it in the driver.  No functional
differences.

This is based on the code Richard Wiwatowski <rjwiwat@adelaide.on.net>
sent to the mailing list.
1996-05-07 21:11:13 +00:00
Nate Williams
110f70b852 Last typo fixed (network came up for a few minutes). 1996-05-07 20:39:34 +00:00
Nate Williams
ff473041c5 Augh, more typos.
(I hate *Sprint*, since the network is down it's hard to test things well.)
1996-05-07 20:08:21 +00:00
Nate Williams
83cc6d6bdd Whoops, brain-o's with the previous commit. Fix up quite a few typos. 1996-05-07 19:40:47 +00:00
Nate Williams
aaf73493e8 - KNF'ify
- Prepend PSM_ to some defines to avoid any possible name-space problems
- Use some already defined constants instead of magic #'s where appropriate.

[ No functional changes (yet) ]
1996-05-07 19:01:31 +00:00
Marc G. Fournier
6e18ce4676 Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:29:52 +00:00
Bruce Evans
bfd8f1484e Removed unused #includes. 1995-12-15 00:40:38 +00:00
Poul-Henning Kamp
6f4e0beb7e Staticize and cleanup. 1995-12-10 13:40:44 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
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.. :)
1995-12-08 11:19:42 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
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)
1995-11-29 10:49:16 +00:00
Julian Elischer
7146c13e43 the second set of changes in a move towards getting devices to be
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 */
1995-11-28 09:42:06 +00:00
Bruce Evans
08ab924c0d The cmd' and addr' args to psmioctl() were in the wrong order. This
probably broke MOUSEIOCREAD which is the only ioctl supported.
1995-09-05 06:23:39 +00:00
Bruce Evans
97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Doug Rabson
975c53c7b0 Add an option to the psm driver to skip the parts of the probe which break
some laptops with PS/2 mice.

Submitted by:	nsayer@quack.kfu.com
1995-06-22 10:56:56 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Bruce Evans
550f8550ec Replace all remaining instances of i386/include' by machine' and fix
nearby #include inconsistencies.
1995-02-26 05:14:53 +00:00
David Greenman
df9ab3049d Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included from
systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some
related code.
1994-09-16 13:33:56 +00:00
Doug Rabson
010a751e0a Added the psm driver from 1.1.5.
Submitted by:	dfr
1994-09-09 11:27:50 +00:00