aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/isavar.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow device hints to wire the unit numbers of devices.John Baldwin2008-11-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | - An "at" hint now reserves a device name. - A new BUS_HINT_DEVICE_UNIT method is added to the bus interface. When determining the unit number of a device, this method is invoked to let the bus driver specify the unit of a device given a specific devclass. This is the only way a device can be given a name reserved via an "at" hint. - Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers. Both of these busses implement this by comparing the resources for a given hint device with the resources enumerated by ACPI/PnPBIOS and wire a unit if the hint resources are a subset of the "real" resources. - Use bus_hinted_children() for adding hinted devices on isa(4) busses now instead of doing it by hand. - Remove the unit kludging from sio(4) as it is no longer necessary. Prodding from: peter, imp OK'd by: marcel MFC after: 1 month Notes: svn path=/head/; revision=185059
* MFp4:Warner Losh2008-11-021-2/+8
| | | | | | | | | Make the ISA bus keep track of more PNP details. Plus a minor style fix while I'm here. More could be done here, but except for some SBCs that don't have ACPI, there's limited value to anybody in doing so. Notes: svn path=/head/; revision=184564
* MFp4 (my newcard tree):Warner Losh2008-08-241-1/+0
| | | | | | | | ISACFGATTR_MULTI is unused. Retire it, and a function that has no side effects used to compute it. Notes: svn path=/head/; revision=182103
* Add ISACFGATTR_HINTS flag to allow detection of a device that was createdMatthew N. Dodd2005-04-131-0/+1
| | | | | | | as a result of the hints mechanism. Notes: svn path=/head/; revision=144985
* Since we are quite unlikely to ever face another platform whichPoul-Henning Kamp2005-02-061-8/+9
| | | | | | | | | | | | uses the i8237 without trying to emulate the PC architecture move the register definitions for the i8237 chip into the central include file for the chip, except for the PC98 case which is magic. Add new isa_dmatc() function which tells us as cheaply as possible if the terminal count has been reached for a given channel. Notes: svn path=/head/; revision=141391
* PNP BIOS devices are fundamentally different than ISA PNP devices.Warner Losh2004-12-071-8/+9
| | | | | | | | | | These devices should be probed first because they are at fixed locations and cannot be turned off. ISA PNP devices, on the other hand, can be turned off and often can be flexible in the resources they use. Probe them last, as always. Notes: svn path=/head/; revision=138506
* Add new a function isa_dma_init() which returns an errno when it failsPoul-Henning Kamp2004-09-151-1/+7
| | | | | | | | | | | | and which takes a M_WAITOK/M_NOWAIT flag argument. Add compatibility isa_dmainit() macro which whines loudly if isa_dma_init() fails. Problem uncovered by: tegge Notes: svn path=/head/; revision=135262
* - Make the isab devclass global to allow for multiple ISA bridge drivers.John Baldwin2003-07-081-0/+5
| | | | | | | | | | - Factor out code common to all ISA bridge drivers attach methods into a isab_attach() function. - Rename the PCI-ISA bridge driver's attach function to pci_isab_attach() and have it call isab_attach(). Notes: svn path=/head/; revision=117337
* - Use __BUS_ACCESSOR() to define the ISA ivar accessor functions instead ofJohn Baldwin2002-10-151-18/+6
| | | | | | | | | | | homerolling our own version. - Rename the enum for memsize from ISA_IVAR_MSIZE to ISA_IVAR_MEMSIZE since using 'MSIZE' in the macro invocation of ISA_ACCESSOR() conflicts with the 'MSIZE' kernel option. The accessor function is still isa_get_msize(). Notes: svn path=/head/; revision=105139
* Remove __P.Alfred Perlstein2002-03-201-8/+8
| | | | Notes: svn path=/head/; revision=92756
* Rework the ISA PnP driver pnp and the PnP resource parser to fixKazutaka YOKOTA2001-09-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | the following bugs. - When constructing a resource configuration, respect the order in which resource descriptors are read, in order to establish the correct mapping between the descriptors and configuration registers. "Plug and Play ISA Specification, Version 1.0a", Sec 4.6.1, May 5, 1994. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1, Dec. 10, 1994. - Do not ignore null (empty) descriptors; they are valid descriptors acting as filler. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1. - Correctly set up logical device configuration registers for null resources. "Clarifications to the Plug and Play ISA Specification, Version 1.0a" - Handle null resources properly in the resource allocator for the ISA bus. Notes: svn path=/head/; revision=83051
* Add a new field, id_config_attr to the struct isa_device.Kazutaka YOKOTA2001-09-031-1/+3
| | | | | | | | It will be later used to store some flags to control PnP device configurations. Notes: svn path=/head/; revision=82863
* GC some defunct prototypesPeter Wemm2000-11-251-4/+0
| | | | Notes: svn path=/head/; revision=69155
* Moved prototypes of isa_alloc_resourcev() and isa_load_resourcev() toYoshihiro Takahashi2000-10-221-0/+13
| | | | | | | isa/isavar.h, and added needed includes. Notes: svn path=/head/; revision=67442
* Resolve the inconsistency between "the number of resources of a particularMike Smith2000-10-091-3/+14
| | | | | | | | | | | 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> Notes: svn path=/head/; revision=66840
* Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.Poul-Henning Kamp2000-03-131-0/+3
| | | | | | | | Define ISADMA_{READ,WRITE,RAW} macros with the same numeric values as the B_{READ,WRITE,RAW} and use them instead throughout. Notes: svn path=/head/; revision=57973
* Newbus-ify the USR Sportster TA Intern driver.Gary Jennejohn2000-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=57368
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | 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. Notes: svn path=/head/; revision=55206
* * Add struct resource_list* argument to resource_list_alloc andDoug Rabson1999-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=52174
* Change isa_get/set_flags() to device_get/set_flags().Doug Rabson1999-09-071-2/+0
| | | | Notes: svn path=/head/; revision=51052
* This represents essentially a complete rewrite of the ISA PnP code. TheDoug Rabson1999-09-011-15/+53
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=50769
* Sigh. Serves me right for testing against a modified tree (dfr's pnpPeter Wemm1999-09-011-4/+4
| | | | | | | | changes). Doug changed these variables. This should fix the isa_compat.c breakage that phk reported. (Sorry!) Notes: svn path=/head/; revision=50751
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* * Add ivars for ISA pnp.Doug Rabson1999-05-301-4/+31
| | | | | | | | | * Move isa_dma* declarations to isavar.h. * Add a method ISA_DELETE_RESOURCE() to the ISA interface. * Tidy up include protection defines. Notes: svn path=/head/; revision=47613
* * Change device_add_child_after() to device_add_child_ordered() which isDoug Rabson1999-05-281-1/+12
| | | | | | | | | | 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. Notes: svn path=/head/; revision=47578
* * Factor out the common code between the isa bus drivers for i386 and alpha.Doug Rabson1999-05-221-2/+3
| | | | | | | | | | * 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. Notes: svn path=/head/; revision=47398
* * Define a new static method DEVICE_IDENTIFY which is called to add deviceDoug Rabson1999-05-141-2/+2
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=47178
* Slightly increase the visibility of the isa_wrap_old_drivers() stuff. ItPeter Wemm1999-05-081-1/+4
| | | | | | | would be a shame to pollute the new isa.c with the isa_device.h defs. Notes: svn path=/head/; revision=46714
* Stage 1 of a cleanup of the i386 interrupt registration mechanism.Peter Wemm1999-04-211-3/+3
| | | | | | | | | | 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. Notes: svn path=/head/; revision=45897
* Bring the 'new-bus' to the i386. This extensively changes the way thePeter Wemm1999-04-161-2/+5
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=45720
* * Add hooks to allow the X server to access I/O ports and memory.Doug Rabson1998-11-151-5/+25
| | | | | | | | | | | | * 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: svn path=/head/; revision=41181
* Support files for ISA bus.Doug Rabson1998-08-061-0/+61
Notes: svn path=/head/; revision=38136