bus.h (298933) | bus.h (298951) |
---|---|
1/*- 2 * Copyright (c) 1997,1998,2003 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) 1997,1998,2003 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/sys/bus.h 298933 2016-05-02 18:00:38Z jhb $ | 26 * $FreeBSD: head/sys/sys/bus.h 298951 2016-05-03 01:17:40Z jhb $ |
27 */ 28 29#ifndef _SYS_BUS_H_ 30#define _SYS_BUS_H_ 31 32#include <machine/_limits.h> 33#include <machine/_bus.h> 34#include <sys/_bus_dma.h> | 27 */ 28 29#ifndef _SYS_BUS_H_ 30#define _SYS_BUS_H_ 31 32#include <machine/_limits.h> 33#include <machine/_bus.h> 34#include <sys/_bus_dma.h> |
35#include <sys/_cpuset.h> | |
36#include <sys/ioccom.h> 37 38/** 39 * @defgroup NEWBUS newbus - a generic framework for managing devices 40 * @{ 41 */ 42 43/** --- 224 unchanged lines hidden (view full) --- 268}; 269 270enum intr_polarity { 271 INTR_POLARITY_CONFORM = 0, 272 INTR_POLARITY_HIGH = 1, 273 INTR_POLARITY_LOW = 2 274}; 275 | 35#include <sys/ioccom.h> 36 37/** 38 * @defgroup NEWBUS newbus - a generic framework for managing devices 39 * @{ 40 */ 41 42/** --- 224 unchanged lines hidden (view full) --- 267}; 268 269enum intr_polarity { 270 INTR_POLARITY_CONFORM = 0, 271 INTR_POLARITY_HIGH = 1, 272 INTR_POLARITY_LOW = 2 273}; 274 |
276/** 277 * CPU sets supported by bus_get_cpus(). Note that not all sets may be 278 * supported for a given device. If a request is not supported by a 279 * device (or its parents), then bus_get_cpus() will fail with EINVAL. 280 */ 281enum cpu_sets { 282 LOCAL_CPUS = 0, 283 INTR_CPUS 284}; 285 | |
286typedef int (*devop_t)(void); 287 288/** 289 * @brief This structure is deprecated. 290 * 291 * Use the kobj(9) macro DEFINE_CLASS to 292 * declare classes which implement device drivers. 293 */ --- 100 unchanged lines hidden (view full) --- 394 enum intr_polarity); 395int bus_generic_describe_intr(device_t dev, device_t child, 396 struct resource *irq, void *cookie, 397 const char *descr); 398int bus_generic_deactivate_resource(device_t dev, device_t child, int type, 399 int rid, struct resource *r); 400int bus_generic_detach(device_t dev); 401void bus_generic_driver_added(device_t dev, driver_t *driver); | 275typedef int (*devop_t)(void); 276 277/** 278 * @brief This structure is deprecated. 279 * 280 * Use the kobj(9) macro DEFINE_CLASS to 281 * declare classes which implement device drivers. 282 */ --- 100 unchanged lines hidden (view full) --- 383 enum intr_polarity); 384int bus_generic_describe_intr(device_t dev, device_t child, 385 struct resource *irq, void *cookie, 386 const char *descr); 387int bus_generic_deactivate_resource(device_t dev, device_t child, int type, 388 int rid, struct resource *r); 389int bus_generic_detach(device_t dev); 390void bus_generic_driver_added(device_t dev, driver_t *driver); |
402int bus_generic_get_cpus(device_t dev, device_t child, enum cpu_sets op, 403 size_t setsize, cpuset_t *cpuset); | |
404bus_dma_tag_t 405 bus_generic_get_dma_tag(device_t dev, device_t child); 406bus_space_tag_t 407 bus_generic_get_bus_tag(device_t dev, device_t child); 408int bus_generic_get_domain(device_t dev, device_t child, int *domain); 409struct resource_list * 410 bus_generic_get_resource_list (device_t, device_t); 411void bus_generic_new_pass(device_t dev); --- 53 unchanged lines hidden (view full) --- 465 rman_res_t start, rman_res_t end); 466struct resource *bus_alloc_resource(device_t dev, int type, int *rid, 467 rman_res_t start, rman_res_t end, 468 rman_res_t count, u_int flags); 469int bus_activate_resource(device_t dev, int type, int rid, 470 struct resource *r); 471int bus_deactivate_resource(device_t dev, int type, int rid, 472 struct resource *r); | 391bus_dma_tag_t 392 bus_generic_get_dma_tag(device_t dev, device_t child); 393bus_space_tag_t 394 bus_generic_get_bus_tag(device_t dev, device_t child); 395int bus_generic_get_domain(device_t dev, device_t child, int *domain); 396struct resource_list * 397 bus_generic_get_resource_list (device_t, device_t); 398void bus_generic_new_pass(device_t dev); --- 53 unchanged lines hidden (view full) --- 452 rman_res_t start, rman_res_t end); 453struct resource *bus_alloc_resource(device_t dev, int type, int *rid, 454 rman_res_t start, rman_res_t end, 455 rman_res_t count, u_int flags); 456int bus_activate_resource(device_t dev, int type, int rid, 457 struct resource *r); 458int bus_deactivate_resource(device_t dev, int type, int rid, 459 struct resource *r); |
473int bus_get_cpus(device_t dev, enum cpu_sets op, size_t setsize, 474 cpuset_t *cpuset); | |
475bus_dma_tag_t bus_get_dma_tag(device_t dev); 476bus_space_tag_t bus_get_bus_tag(device_t dev); 477int bus_get_domain(device_t dev, int *domain); 478int bus_release_resource(device_t dev, int type, int rid, 479 struct resource *r); 480int bus_free_resource(device_t dev, int type, struct resource *r); 481int bus_setup_intr(device_t dev, struct resource *r, int flags, 482 driver_filter_t filter, driver_intr_t handler, --- 415 unchanged lines hidden --- | 460bus_dma_tag_t bus_get_dma_tag(device_t dev); 461bus_space_tag_t bus_get_bus_tag(device_t dev); 462int bus_get_domain(device_t dev, int *domain); 463int bus_release_resource(device_t dev, int type, int rid, 464 struct resource *r); 465int bus_free_resource(device_t dev, int type, struct resource *r); 466int bus_setup_intr(device_t dev, struct resource *r, int flags, 467 driver_filter_t filter, driver_intr_t handler, --- 415 unchanged lines hidden --- |