aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/bus_if.m
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-07-08 17:06:15 +0000
committerWarner Losh <imp@FreeBSD.org>2006-07-08 17:06:15 +0000
commitdb2bc1bb82d9b1fdd029ea87cda71d1b2bf388fb (patch)
tree6dacdab168aa26da6a9fdc1e7c9243c8f60795ad /sys/kern/bus_if.m
parent360de69338fc73432a7f88a3f8e074595aa748d9 (diff)
downloadsrc-db2bc1bb82d9b1fdd029ea87cda71d1b2bf388fb.tar.gz
src-db2bc1bb82d9b1fdd029ea87cda71d1b2bf388fb.zip
Create bus_enumerate_hinted_children. This routine will allow drivers
to use the hinted child system. Bus drivers that use this need to implmenet the bus_hinted_child method, where they actually add the child to their bus, as they see fit. The bus is repsonsible for getting the attribtues for the child, adding it in the right order, etc. ISA hinting will be updated to use this method. MFC After: 3 days
Notes
Notes: svn path=/head/; revision=160186
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r--sys/kern/bus_if.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
index b6fc624da086..05aad097c735 100644
--- a/sys/kern/bus_if.m
+++ b/sys/kern/bus_if.m
@@ -507,3 +507,25 @@ METHOD int config_intr {
enum intr_trigger _trig;
enum intr_polarity _pol;
} DEFAULT bus_generic_config_intr;
+
+/**
+ * @brief Notify a (bus) driver about a child that the hints mechanism
+ * believes it has discovered.
+ *
+ * The bus is responsible for then adding the child in the right order
+ * and discovering other things about the child. The bus driver is
+ * free to ignore this hint, to do special things, etc. It is all up
+ * to the bus driver to interpret.
+ *
+ * This method is only called in response to the parent bus asking for
+ * hinted devices to be enumerated.
+ *
+ * @param _dev the bus device
+ * @param _dname the name of the device w/o unit numbers
+ * @param _dunit the unit number of the device
+ */
+METHOD void hinted_child {
+ device_t _dev;
+ const char * _dname;
+ int _dunit;
+};