aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bus.h
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/sys/bus.h
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/sys/bus.h')
-rw-r--r--sys/sys/bus.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index 4348ae7e304b..15f5c0674d7d 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -30,6 +30,7 @@
#define _SYS_BUS_H_
#include <machine/_limits.h>
+#include <machine/_bus.h>
#include <sys/_bus_dma.h>
#include <sys/ioccom.h>
@@ -383,6 +384,8 @@ int bus_generic_detach(device_t dev);
void bus_generic_driver_added(device_t dev, driver_t *driver);
bus_dma_tag_t
bus_generic_get_dma_tag(device_t dev, device_t child);
+bus_space_tag_t
+ bus_generic_get_bus_tag(device_t dev, device_t child);
int bus_generic_get_domain(device_t dev, device_t child, int *domain);
struct resource_list *
bus_generic_get_resource_list (device_t, device_t);
@@ -448,6 +451,7 @@ int bus_activate_resource(device_t dev, int type, int rid,
int bus_deactivate_resource(device_t dev, int type, int rid,
struct resource *r);
bus_dma_tag_t bus_get_dma_tag(device_t dev);
+bus_space_tag_t bus_get_bus_tag(device_t dev);
int bus_get_domain(device_t dev, int *domain);
int bus_release_resource(device_t dev, int type, int rid,
struct resource *r);