diff options
author | John-Mark Gurney <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
---|---|---|
committer | John-Mark Gurney <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
commit | 378f231e7d884bc4d5954638f602f7ff44dfe5b3 (patch) | |
tree | 2d913a3cb79e7a1579bdad59426344b90355f220 /sys/kern/bus_if.m | |
parent | 01646adbc89c26f1148440064cdfe77336a61a8f (diff) | |
download | src-378f231e7d884bc4d5954638f602f7ff44dfe5b3.tar.gz src-378f231e7d884bc4d5954638f602f7ff44dfe5b3.zip |
add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there
are seperate IOMMU's for each PCI bus... For all other arches, it will
end up returning NULL, which makes it a no-op...
Convert a few drivers (the ones we've been working w/ on sun4v) to the
new convection... Eventually all drivers will need to replace the parent
tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for
each driver, and will require hand inspection...
Reviewed by: scottl (earlier version)
Notes
Notes:
svn path=/head/; revision=161928
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r-- | sys/kern/bus_if.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 05aad097c735..529b506f1b68 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -529,3 +529,14 @@ METHOD void hinted_child { const char * _dname; int _dunit; }; + +/** + * @brief Returns bus_dma_tag_t for use w/ devices on the bus. + * + * @param _dev the parent device of @p _child + * @param _child the device to which the tag will belong + */ +METHOD bus_dma_tag_t get_dma_tag { + device_t _dev; + device_t _child; +} DEFAULT bus_generic_get_dma_tag; |