aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/bus_if.m
diff options
context:
space:
mode:
authorZbigniew Bodek <zbb@FreeBSD.org>2016-02-18 13:00:04 +0000
committerZbigniew Bodek <zbb@FreeBSD.org>2016-02-18 13:00:04 +0000
commitb998c9656bd16ec804af2030769c1406e01942df (patch)
tree2affdba8f0124a43a93eb47db8afb77ab54cfd50 /sys/kern/bus_if.m
parente2d4f32f4e7aaadd71f61682fe45b311e8c6dce0 (diff)
downloadsrc-b998c9656bd16ec804af2030769c1406e01942df.tar.gz
src-b998c9656bd16ec804af2030769c1406e01942df.zip
Introduce bus_get_bus_tag() method
Provide bus_get_bus_tag() for sparc64, powerpc, arm, arm64 and mips nexus and its children in order to return a platform specific default tag. This is required to ensure generic correctness of the bus_space tag. It is especially needed for arches where child bus tag does not match the parent bus tag. This solves the problem with ppc architecture where the PCI bus tag differs from parent bus tag which is big-endian. This commit is a part of the following patch: https://reviews.freebsd.org/D4879 Submitted by: Marcin Mazurek <mma@semihalf.com> Obtained from: Semihalf Sponsored by: Annapurna Labs Reviewed by: jhibbits, mmel Differential Revision: https://reviews.freebsd.org/D4879
Notes
Notes: svn path=/head/; revision=295755
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r--sys/kern/bus_if.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
index e55b1ce9ea6b..8acadd7c10b7 100644
--- a/sys/kern/bus_if.m
+++ b/sys/kern/bus_if.m
@@ -637,6 +637,17 @@ METHOD bus_dma_tag_t get_dma_tag {
} DEFAULT bus_generic_get_dma_tag;
/**
+ * @brief Returns bus_space_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_space_tag_t get_bus_tag {
+ device_t _dev;
+ device_t _child;
+} DEFAULT bus_generic_get_bus_tag;
+
+/**
* @brief Allow the bus to determine the unit number of a device.
*
* @param _dev the parent device of @p _child