Commit Graph

20 Commits

Author SHA1 Message Date
Peter Wemm
bc7425f5f2 GC some defunct prototypes 2000-11-25 08:13:33 +00:00
Yoshihiro Takahashi
97ae0fe84c Moved prototypes of isa_alloc_resourcev() and isa_load_resourcev() to
isa/isavar.h, and added needed includes.
2000-10-22 16:48:08 +00:00
Mike Smith
08764b841b Resolve the inconsistency between "the number of resources of a particular
kind we can manage in a set of configurations" and "the number of resources
of a particular kind that can be programmed into an ISA PnP adapter".

Submitted by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
Submitted by:	Hirokazu WATANABE <gwna@geocities.co.jp>
2000-10-09 00:40:17 +00:00
Poul-Henning Kamp
d8b47cbb70 Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.
Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.
2000-03-13 10:19:32 +00:00
Gary Jennejohn
4f9d49f140 Newbus-ify the USR Sportster TA Intern driver.
Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by:	hm
Approved by:	jkh
2000-02-21 02:10:10 +00:00
Peter Wemm
c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Doug Rabson
25afb89b1c * Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
  layout of ivars.

* Move set_resource, get_resource and delete_resource from
  isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

     bus_set_resource(dev, type, rid, start, count);
     bus_get_resource(dev, type, rid, startp, countp);
     bus_get_resource_start(dev, type, rid);
     bus_get_resource_count(dev, type, rid);
     bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
  Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
  device.

* Change device_print_prettyname() so that it doesn't print
  "(no driver assigned)-1" for anonymous devices.
1999-10-12 21:35:51 +00:00
Doug Rabson
062acdb7e7 Change isa_get/set_flags() to device_get/set_flags(). 1999-09-07 08:42:49 +00:00
Doug Rabson
4249382df0 This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.

This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.
1999-09-01 20:53:43 +00:00
Peter Wemm
523df07b14 Sigh. Serves me right for testing against a modified tree (dfr's pnp
changes).  Doug changed these variables.  This should fix the isa_compat.c
breakage that phk reported.  (Sorry!)
1999-09-01 14:53:16 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Doug Rabson
cfa84f4631 * Add ivars for ISA pnp.
* Move isa_dma* declarations to isavar.h.
* Add a method ISA_DELETE_RESOURCE() to the ISA interface.
* Tidy up include protection defines.
1999-05-30 11:02:17 +00:00
Doug Rabson
bea6af4d31 * Change device_add_child_after() to device_add_child_ordered() which is
easier to use and more flexible.
* Change BUS_ADD_CHILD to take an order argument instead of a place.
* Define a partial ordering for isa devices so that sensitive devices are
  probed before non-sensitive ones.
1999-05-28 09:25:16 +00:00
Doug Rabson
a3be63b3ce * Factor out the common code between the isa bus drivers for i386 and alpha.
* Re-work the resource allocation code to use helper functions in subr_bus.c.
* Add simple isa interface for manipulating the resource ranges which can be
  allocated and remove the code from isa_write_ivar() which was previously
  used for this purpose.
1999-05-22 15:18:28 +00:00
Doug Rabson
6c2e3dde8c * Define a new static method DEVICE_IDENTIFY which is called to add device
instances to a parent bus.
* Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY
  to add new instances.
* Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY
  for each driver attached to the parent's devclass.
* Move the hint-based isa probe from the isa driver to a new isahint driver
  which can be shared between i386 and alpha.
1999-05-14 11:22:47 +00:00
Peter Wemm
929f6b0a11 Slightly increase the visibility of the isa_wrap_old_drivers() stuff. It
would be a shame to pollute the new isa.c with the isa_device.h defs.
1999-05-08 18:11:04 +00:00
Peter Wemm
54a8c69347 Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager.  There is further room for optimizing
the interfaces still.  All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.
1999-04-21 07:26:30 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Doug Rabson
08b6a4cbee * 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.
1998-11-15 18:25:17 +00:00
Doug Rabson
1a4290e7f0 Support files for ISA bus. 1998-08-06 08:49:09 +00:00