1176772Sraj/*- 2176772Sraj * Copyright 2006 by Juniper Networks. 3176772Sraj * All rights reserved. 4176772Sraj * 5176772Sraj * Redistribution and use in source and binary forms, with or without 6176772Sraj * modification, are permitted provided that the following conditions 7176772Sraj * are met: 8176772Sraj * 1. Redistributions of source code must retain the above copyright 9176772Sraj * notice, this list of conditions and the following disclaimer. 10176772Sraj * 2. Redistributions in binary form must reproduce the above copyright 11176772Sraj * notice, this list of conditions and the following disclaimer in the 12176772Sraj * documentation and/or other materials provided with the distribution. 13176772Sraj * 3. The name of the author may not be used to endorse or promote products 14176772Sraj * derived from this software without specific prior written permission. 15176772Sraj * 16176772Sraj * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17176772Sraj * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18176772Sraj * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19176772Sraj * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20176772Sraj * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21176772Sraj * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22176772Sraj * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23176772Sraj * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24176772Sraj * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25176772Sraj * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26176772Sraj * SUCH DAMAGE. 27176772Sraj * 28176772Sraj * $FreeBSD: releng/11.0/sys/dev/quicc/quicc_bfe.h 294883 2016-01-27 02:23:54Z jhibbits $ 29176772Sraj */ 30176772Sraj 31176772Sraj#ifndef _DEV_QUICC_BFE_H_ 32176772Sraj#define _DEV_QUICC_BFE_H_ 33176772Sraj 34176772Srajstruct quicc_device; 35176772Sraj 36176772Srajstruct quicc_softc { 37176772Sraj device_t sc_dev; 38176772Sraj 39176772Sraj struct resource *sc_rres; /* Register resource. */ 40176772Sraj int sc_rrid; 41176772Sraj int sc_rtype; /* SYS_RES_{IOPORT|MEMORY}. */ 42176772Sraj 43176772Sraj struct resource *sc_ires; /* Interrupt resource. */ 44176772Sraj void *sc_icookie; 45176772Sraj int sc_irid; 46176772Sraj 47176772Sraj struct rman sc_rman; 48176772Sraj struct quicc_device *sc_device; 49176772Sraj 50176772Sraj u_int sc_clock; 51176772Sraj 52176772Sraj int sc_fastintr:1; 53176772Sraj int sc_polled:1; 54176772Sraj}; 55176772Sraj 56176772Srajextern devclass_t quicc_devclass; 57176772Srajextern char quicc_driver_name[]; 58176772Sraj 59176772Srajint quicc_bfe_attach(device_t); 60176772Srajint quicc_bfe_detach(device_t); 61176772Srajint quicc_bfe_probe(device_t, u_int); 62176772Sraj 63176772Srajstruct resource *quicc_bus_alloc_resource(device_t, device_t, int, int *, 64294883Sjhibbits rman_res_t, rman_res_t, rman_res_t, u_int); 65294883Sjhibbitsint quicc_bus_get_resource(device_t, device_t, int, int, 66294883Sjhibbits rman_res_t *, rman_res_t *); 67176772Srajint quicc_bus_read_ivar(device_t, device_t, int, uintptr_t *); 68176772Srajint quicc_bus_release_resource(device_t, device_t, int, int, struct resource *); 69176772Srajint quicc_bus_setup_intr(device_t, device_t, struct resource *, int, 70176772Sraj driver_filter_t *, void (*)(void *), void *, void **); 71176772Srajint quicc_bus_teardown_intr(device_t, device_t, struct resource *, void *); 72176772Sraj 73176772Sraj#endif /* _DEV_QUICC_BFE_H_ */ 74