Deleted Added
full compact
bus_if.m (177467) bus_if.m (185059)
1#-
2# Copyright (c) 1998-2004 Doug Rabson
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
1#-
2# Copyright (c) 1998-2004 Doug Rabson
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# $FreeBSD: head/sys/kern/bus_if.m 177467 2008-03-20 21:24:32Z jhb $
26# $FreeBSD: head/sys/kern/bus_if.m 185059 2008-11-18 21:01:54Z jhb $
27#
28
29#include <sys/bus.h>
30
31/**
32 * @defgroup BUS bus - KObj methods for drivers of devices with children
33 * @brief A set of methods required device drivers that support
34 * child devices.

--- 504 unchanged lines hidden (view full) ---

539 * hinted devices to be enumerated.
540 *
541 * @param _dev the bus device
542 * @param _dname the name of the device w/o unit numbers
543 * @param _dunit the unit number of the device
544 */
545METHOD void hinted_child {
546 device_t _dev;
27#
28
29#include <sys/bus.h>
30
31/**
32 * @defgroup BUS bus - KObj methods for drivers of devices with children
33 * @brief A set of methods required device drivers that support
34 * child devices.

--- 504 unchanged lines hidden (view full) ---

539 * hinted devices to be enumerated.
540 *
541 * @param _dev the bus device
542 * @param _dname the name of the device w/o unit numbers
543 * @param _dunit the unit number of the device
544 */
545METHOD void hinted_child {
546 device_t _dev;
547 const char * _dname;
547 const char *_dname;
548 int _dunit;
549};
550
551/**
552 * @brief Returns bus_dma_tag_t for use w/ devices on the bus.
553 *
554 * @param _dev the parent device of @p _child
555 * @param _child the device to which the tag will belong
556 */
557METHOD bus_dma_tag_t get_dma_tag {
558 device_t _dev;
559 device_t _child;
560} DEFAULT bus_generic_get_dma_tag;
548 int _dunit;
549};
550
551/**
552 * @brief Returns bus_dma_tag_t for use w/ devices on the bus.
553 *
554 * @param _dev the parent device of @p _child
555 * @param _child the device to which the tag will belong
556 */
557METHOD bus_dma_tag_t get_dma_tag {
558 device_t _dev;
559 device_t _child;
560} DEFAULT bus_generic_get_dma_tag;
561
562/**
563 * @brief Allow the bus to determine the unit number of a device.
564 *
565 * @param _dev the parent device of @p _child
566 * @param _child the device whose unit is to be wired
567 * @param _name the name of the device's new devclass
568 * @param _unitp a pointer to the device's new unit value
569 */
570METHOD void hint_device_unit {
571 device_t _dev;
572 device_t _child;
573 const char *_name;
574 int *_unitp;
575};
576