Subject: "esp" driver reorg proposal
To: None <tech-kern@NetBSD.ORG>
From: Gordon W. Ross <firstname.lastname@example.org>
Date: 01/25/1997 16:36:48
I would like to propose a minor reorganization of the "esp" driver
that is currently shared (almost) between the alpha and sparc ports.
This would let the alpha and sparc actually share the esp code, and
would make it easier for the sun3x port to share it as well.
The basic idea is to take the existing esp code (from either the
sparc or alpha ports - they're the same) and plop that into the
dev/ic directory, and then move all the machine-dependent things
those files into some new (small) machine-dependent files. I've
already done a prototype of this which creates these files:
The machine-independent code:
The machine-dependent code:
Note that the MD includes are pulled in by the MI code using
<machine/espvar.h> to get some macros that are used instead of
the #ifdef SPARC_DRIVER sections that used to be in esp.c, and
the match/attach glue moves into the MD esp.c files.
The result of this reorganization should compile to nearly the
same thing that it did before moving stuff around.
I've uploaded my prototype for your review on:
Comments welcome. *
* I am not interested in discussing "asc" vs. "esp" and such.
The movement of esp into dev/ic does not have any impact on
whether someone wants to make the "asc" driver more easily
shared, or move it too into dev/ic, or whatever.