diff options
author | Doug Rabson <dfr@FreeBSD.org> | 1998-11-15 18:25:17 +0000 |
---|---|---|
committer | Doug Rabson <dfr@FreeBSD.org> | 1998-11-15 18:25:17 +0000 |
commit | 08b6a4cbee427b68518039a35579f86d2e646bb9 (patch) | |
tree | fd54512c9c731113c4672699fae373a27076692f /sys/isa/syscons.c | |
parent | 128d4f3960c20175f0c33050be82862db5378087 (diff) |
* Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface.
The ISA drivers' use of the new resource api is minimal. Garrett has
some much cleaner drivers which should be more easily shared between
i386 and alpha. This has only been tested on cia based machines. It
should work on lca and apecs but I might have broken something.
Notes
Notes:
svn path=/head/; revision=41181
Diffstat (limited to 'sys/isa/syscons.c')
-rw-r--r-- | sys/isa/syscons.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 65a51537b4b7..e44fe37ee308 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.275 1998/10/31 10:35:23 dfr Exp $ + * $Id: syscons.c,v 1.276 1998/11/08 12:39:04 dfr Exp $ * from: i386/isa syscons.c,v 1.278 */ @@ -54,10 +54,12 @@ #include <sys/tty.h> #include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/rman.h> #ifdef DEVFS #include <sys/devfsext.h> #endif +#include <machine/resource.h> #include <machine/clock.h> #include <machine/cons.h> #include <machine/console.h> @@ -694,6 +696,8 @@ scattach(device_t dev) int vc; #endif void *ih; + struct resource *res; + int zero = 0; scinit(); flags = isa_get_flags(dev); @@ -771,13 +775,10 @@ scattach(device_t dev) UID_ROOT, GID_WHEEL, 0600, "consolectl"); #endif - ih = BUS_CREATE_INTR(device_get_parent(dev), dev, - isa_get_irq(dev), - scintr, 0); - if (!ih) - return ENXIO; - - BUS_CONNECT_INTR(device_get_parent(dev), ih); + res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, + RF_SHAREABLE | RF_ACTIVE); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, scintr, 0, + &ih); return 0; } |