summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_bus.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a hook for a bus to detect child devices which didn't find drivers.dfr1999-07-111-1/+3
| | | | | | This allows the bus to print an informative message about unknown devices. Submitted by: Matthew N. Dodd <winter@jurai.net>
* * Add a function devclass_create() which looks up the named devclass anddfr1999-05-301-2/+8
| | | | | creates it if it doesn't exist. * Rename resource_list_remove() to resource_list_delete() for consistency.
* * Change device_add_child_after() to device_add_child_ordered() which isdfr1999-05-281-20/+23
| | | | | | | 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.
* Fix an embarrasing typo in device_add_child_after(). I can't understanddfr1999-05-271-3/+3
| | | | | | how this hasn't caused problems before. Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* Add some helper functions to make it easier to write a driver for a busdfr1999-05-221-1/+149
| | | | which needs to manage resources for its children.
* Add seatbelt like in previous function..peter1999-05-221-1/+3
|
* Silently return NULL from devclass_get_device if dc == NULL. The callerdfr1999-05-211-2/+2
| | | | | | should be handling NULL returns already. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* * Define a new static method DEVICE_IDENTIFY which is called to add devicedfr1999-05-141-1/+17
| | | | | | | | | | 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.
* Adjust method dispatch to ensure that default methods are called properly.dfr1999-05-141-1/+8
|
* * Augment the interface language to allow arbitrary C code to be 'passeddfr1999-05-101-6/+55
| | | | | | | | | | 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-7/+8
| | | | to the BUS_SETUP_INTR call.
* Change resource_set_*() to be more useful. BTW; resource_find() is apeter1999-05-081-16/+9
| | | | bit odd, it looks like the wildcard stuff isn't right.
* GC some stray debugging printf()s...peter1999-04-191-4/+1
|
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-42/+344
| | | | | | | | | | | | | | | | | | 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-42/+303
| | | | | | | | | | | | | | | * 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.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-7/+7
| | | | kernel compile
* A few small improvements to the bus code:dfr1999-01-161-4/+75
| | | | | | | * A function device_printf() to make pretty-printing driver messages easier. * A function device_get_children() to query the children of a device. * Generic implementations of BUS_ALLOC_RESOURCE and BUS_RELEASE_RESOURCE. * Change bus_generic_print_child() so that it is actually useful.
* Remove warningn_hibma1999-01-101-3/+1
|
* When no driver was found for a device, the message 'not probed' appearedn_hibma1998-12-121-5/+5
| | | | | | | This is odd, especially in the case of USB where the driver is found in several tries: vendor specific, class specific, interface specific. The mouse driver is found at the interface specific level... Reviewed by: Doug Rabson (dfr@freebsd.org)
* A couple of minor sanity checks.dfr1998-11-151-4/+10
| | | | Submitted by: Nick Hibma <nick.hibma@jrc.it>
* My changes to the new device interface:wollman1998-11-141-67/+200
| | | | | | | | | | | | | | - 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
* A couple of fixes to device_delete_child() to delete all children ofdfr1998-11-131-2/+10
| | | | | | | the device and to free the device which is being deleted (not its parent - oops). Submitted by: Nick Hibma <nick.hibma@jrc.it>
* Lots of debugging code and some bugfixes.dfr1998-10-271-25/+338
| | | | Submitted by: Nick Hibma <nick.hibma@jrc.it>
* Nitpicking and dusting performed on a train. Removes trivial warningsphk1998-10-251-7/+1
| | | | about unused variables, labels and other lint.
* Don't call DEVICE_DETACH directly, always go through the device_detach()dfr1998-10-031-4/+4
| | | | wrapper which checks to make sure the device isn't currently open.
* Fixed recently perpetrated printf format errors.bde1998-09-051-2/+2
|
* Add some very simple support for a compiled in (from config(8)) resourcedfr1998-07-221-1/+123
| | | | database.
* Change interrupt api to be closer to intr_create/intr_connect.dfr1998-07-121-6/+16
|
* Major changes to the generic device framework for FreeBSD/alpha:dfr1998-06-141-166/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add initial support for the FreeBSD/alpha kernel. This is very much adfr1998-06-101-0/+854
work in progress and has never booted a real machine. Initial development and testing was done using SimOS (see http://simos.stanford.edu for details). On the SimOS simulator, this port successfully reaches single-user mode and has been tested with loads as high as one copy of /bin/ls :-). Obtained from: partly from NetBSD/alpha
OpenPOWER on IntegriCloud