summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/local/bus_if.h
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/include/rtems/bsd/local/bus_if.h')
-rw-r--r--rtemsbsd/include/rtems/bsd/local/bus_if.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/rtemsbsd/include/rtems/bsd/local/bus_if.h b/rtemsbsd/include/rtems/bsd/local/bus_if.h
index 6a54d605..a0204db3 100644
--- a/rtemsbsd/include/rtems/bsd/local/bus_if.h
+++ b/rtemsbsd/include/rtems/bsd/local/bus_if.h
@@ -3,7 +3,7 @@
* Do not modify anything in here by hand.
*
* Created from source file
- * kern/bus_if.m
+ * freebsd-org/sys/kern/bus_if.m
* with
* makeobjops.awk
*
@@ -319,6 +319,37 @@ static __inline int BUS_DEACTIVATE_RESOURCE(device_t _dev, device_t _child,
return ((bus_deactivate_resource_t *) _m)(_dev, _child, _type, _rid, _r);
}
+/** @brief Unique descriptor for the BUS_ADJUST_RESOURCE() method */
+extern struct kobjop_desc bus_adjust_resource_desc;
+/** @brief A function implementing the BUS_ADJUST_RESOURCE() method */
+typedef int bus_adjust_resource_t(device_t _dev, device_t _child, int _type,
+ struct resource *_res, u_long _start,
+ u_long _end);
+/**
+ * @brief Adjust a resource
+ *
+ * Adjust the start and/or end of a resource allocated by
+ * BUS_ALLOC_RESOURCE. At least part of the new address range must overlap
+ * with the existing address range. If the successful, the resource's range
+ * will be adjusted to [start, end] on return.
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device which allocated the resource
+ * @param _type the type of resource
+ * @param _res the resource to adjust
+ * @param _start the new starting address of the resource range
+ * @param _end the new ending address of the resource range
+ */
+
+static __inline int BUS_ADJUST_RESOURCE(device_t _dev, device_t _child,
+ int _type, struct resource *_res,
+ u_long _start, u_long _end)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_adjust_resource);
+ return ((bus_adjust_resource_t *) _m)(_dev, _child, _type, _res, _start, _end);
+}
+
/** @brief Unique descriptor for the BUS_RELEASE_RESOURCE() method */
extern struct kobjop_desc bus_release_resource_desc;
/** @brief A function implementing the BUS_RELEASE_RESOURCE() method */