bhnd.h (300250) | bhnd.h (300445) |
---|---|
1/*- 2 * Copyright (c) 2015 Landon Fuller <landon@landonf.org> 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 --- 12 unchanged lines hidden (view full) --- 21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 * | 1/*- 2 * Copyright (c) 2015 Landon Fuller <landon@landonf.org> 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 --- 12 unchanged lines hidden (view full) --- 21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 * |
29 * $FreeBSD: head/sys/dev/bhnd/bhnd.h 300250 2016-05-20 00:45:16Z adrian $ | 29 * $FreeBSD: head/sys/dev/bhnd/bhnd.h 300445 2016-05-23 03:47:44Z adrian $ |
30 */ 31 32#ifndef _BHND_BHND_H_ 33#define _BHND_BHND_H_ 34 35#include <sys/types.h> 36#include <sys/bus.h> 37 --- 518 unchanged lines hidden (view full) --- 556 * @param dev A bhnd bus child device. 557 */ 558static inline const struct bhnd_chipid * 559bhnd_get_chipid(device_t dev) { 560 return (BHND_BUS_GET_CHIPID(device_get_parent(dev), dev)); 561}; 562 563/** | 30 */ 31 32#ifndef _BHND_BHND_H_ 33#define _BHND_BHND_H_ 34 35#include <sys/types.h> 36#include <sys/bus.h> 37 --- 518 unchanged lines hidden (view full) --- 556 * @param dev A bhnd bus child device. 557 */ 558static inline const struct bhnd_chipid * 559bhnd_get_chipid(device_t dev) { 560 return (BHND_BUS_GET_CHIPID(device_get_parent(dev), dev)); 561}; 562 563/** |
564 * Return the BHND attachment type of the parent bhnd bus. 565 * 566 * @param dev A bhnd bus child device. 567 * 568 * @retval BHND_ATTACH_ADAPTER if the bus is resident on a bridged adapter, 569 * such as a WiFi chipset. 570 * @retval BHND_ATTACH_NATIVE if the bus provides hardware services (clock, 571 * CPU, etc) to a directly attached native host. 572 */ 573static inline bhnd_attach_type 574bhnd_get_attach_type (device_t dev) { 575 return (BHND_BUS_GET_ATTACH_TYPE(device_get_parent(dev), dev)); 576} 577 578/** |
|
564 * Attempt to read the BHND board identification from the bhnd bus. 565 * 566 * This relies on NVRAM access, and will fail if a valid NVRAM device cannot 567 * be found, or is not yet attached. 568 * 569 * @param dev The parent of @p child. 570 * @param child The bhnd device requesting board info. 571 * @param[out] info On success, will be populated with the bhnd(4) device's --- 542 unchanged lines hidden --- | 579 * Attempt to read the BHND board identification from the bhnd bus. 580 * 581 * This relies on NVRAM access, and will fail if a valid NVRAM device cannot 582 * be found, or is not yet attached. 583 * 584 * @param dev The parent of @p child. 585 * @param child The bhnd device requesting board info. 586 * @param[out] info On success, will be populated with the bhnd(4) device's --- 542 unchanged lines hidden --- |