summaryrefslogtreecommitdiffstats
path: root/sys/kern/bus_if.m
Commit message (Collapse)AuthorAgeFilesLines
* Add two interfaces to allow for busses to report the pnpinfo forimp2002-10-071-0/+22
| | | | devices as well as their location on the bus.
* Clarify the return value from child_present.imp2002-09-111-0/+7
|
* Add bus_child_present and the child_present method to bus_if.mimp2002-07-211-4/+11
|
* Use protected names (_foo) to cutdown on boatloads of lint warnings.markm2002-04-211-68/+68
|
* "Fixed" -Wshadow warnings by changing the name of some function parametersbde2002-03-271-2/+2
| | | | | from `index' to `indx'. The correct fix would be to not support or use index().
* Alter the return value and arguments of the GET_RESOURCE_LIST bus method.mdodd2000-11-281-2/+1
| | | | | | | Alter consumers of this method to conform to the new convention. Minor cosmetic adjustments to bus.h. This isn't of concern as this interface isn't in use yet.
* Add new bus method 'GET_RESOURCE_LIST' and appropriate genericmdodd2000-10-181-0/+9
| | | | | | | | | | implementation. Add bus_generic_rl_{get,set,delete,release,alloc}_resource() functions which provide generic operations for devices using resource list style resource management. This should simplify a number of bus drivers. Further commits to follow.
* * Factor out the object system from new-bus so that it can be used bydfr2000-04-081-0/+2
| | | | | | | | | | non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware. This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-121-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Call DEVICE_IDENIFY in bus_generic_driver_added to allow devices toimp1999-10-091-1/+1
| | | | | | | | | add nodes to the tree. Also, default to bus_generic_driver_added for the BUS_DRIVER_ADDED method. This allows newbus busses to be kldload'd. Reviewed by: dfr
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
* Add a hook for a bus to detect child devices which didn't find drivers.dfr1999-07-111-1/+11
| | | | | | This allows the bus to print an informative message about unknown devices. Submitted by: Matthew N. Dodd <winter@jurai.net>
* * Change device_add_child_after() to device_add_child_ordered() which isdfr1999-05-281-3/+3
| | | | | | | 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.
* * Define a new static method DEVICE_IDENTIFY which is called to add devicedfr1999-05-141-1/+14
| | | | | | | | | | 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.
* * Augment the interface language to allow arbitrary C code to be 'passeddfr1999-05-101-2/+16
| | | | | | | | | | through' to the C compiler. * Allow the interface to specify a default implementation for methods. * Allow 'static' methods which are not device specific. * Add a simple scheme for probe routines to return a priority value. To make life simple, priority values are negative numbers (positive numbers are standard errno codes) with zero being the highest priority. The driver which returns the highest priority will be chosen for the device.
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-1/+2
| | | | to the BUS_SETUP_INTR call.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-1/+11
| | | | | | | | | | | | | | | | | | 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
* Add some useful functions to the device framework:dfr1999-03-291-1/+10
| | | | | | | | | | | | | | | * bus_setup_intr() as a wrapper for BUS_SETUP_INTR * bus_teardown_intr() as a wrapper for BUS_TEARDOWN_INTR * device_get_nameunit() which returns e.g. "foo0" for name "foo" and unit 0. * device_set_desc_copy() malloc a copy of the description string. * device_quiet(), device_is_quiet(), device_verbose() suppress probe message. Add one method to the BUS interface, BUS_CHILD_DETACHED() which is called after the child has been detached to allow the bus to clean up any memory which it allocated on behalf of the child. I also fixed a bug which corrupted the list of drivers in a devclass if a driver was added to more than one devclass.
* My changes to the new device interface:wollman1998-11-141-18/+66
| | | | | | | | | | | | | | - Interface wth the new resource manager. - Allow for multiple drivers implementing a single devclass. - Remove ordering dependencies between header files. - Style cleanup. - Add DEVICE_SUSPEND and DEVICE_RESUME methods. - Move to a single-phase interrupt setup scheme. Kernel builds on the Alpha are brken until Doug gets a chance to incorporate these changes on that side. Agreed to in principle by: dfr
* Add semicolon to INTERFACE declaration.nsouch1998-11-081-2/+2
|
* Document BUS_CREATE_INTR and BUS_CONNECT_INTR.dfr1998-09-161-3/+8
|
* Change interrupt api to be closer to intr_create/intr_connect.dfr1998-07-121-2/+8
|
* [Add missing files from previous commit]dfr1998-06-141-0/+82
Major changes to the generic device framework for FreeBSD/alpha: * Eliminate bus_t and make it possible for all devices to have attached children. * Support dynamically extendable interfaces for drivers to replace both the function pointers in driver_t and bus_ops_t (which has been removed entirely. Two system defined interfaces have been defined, 'device' which is mandatory for all devices and 'bus' which is recommended for all devices which support attached children. * In addition, the alpha port defines two simple interfaces 'clock' for attaching various real time clocks to the system and 'mcclock' for the many different variations of mc146818 clocks which can be attached to different alpha platforms. This eliminates two more function pointer tables in favour of the generic method dispatch system provided by the device framework. Future device interfaces may include: * cdev and bdev interfaces for devfs to use in replacement for specfs and the fixed interfaces bdevsw and cdevsw. * scsi interface to replace struct scsi_adapter (not sure how this works in CAM but I imagine there is something similar there). * various tailored interfaces for different bus types such as pci, isa, pccard etc.
OpenPOWER on IntegriCloud