apbvar.h revision 331722
11057Salm/*- 21057Salm * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 31057Salm * All rights reserved. 41057Salm * 51057Salm * Redistribution and use in source and binary forms, with or without 61057Salm * modification, are permitted provided that the following conditions 71057Salm * are met: 81057Salm * 1. Redistributions of source code must retain the above copyright 91057Salm * notice unmodified, this list of conditions, and the following 101057Salm * disclaimer. 111057Salm * 2. Redistributions in binary form must reproduce the above copyright 121057Salm * notice, this list of conditions and the following disclaimer in the 131057Salm * documentation and/or other materials provided with the distribution. 141057Salm * 151057Salm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 161057Salm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 171057Salm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 181057Salm * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 191057Salm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 201057Salm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 211057Salm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 221057Salm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 231057Salm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 241057Salm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 251057Salm * SUCH DAMAGE. 261057Salm * 271057Salm * $FreeBSD: stable/11/sys/mips/atheros/apbvar.h 331722 2018-03-29 02:50:57Z eadler $ 281057Salm */ 2927963Ssteve 3020420Ssteve#ifndef _APBVAR_H_ 3127963Ssteve#define _APBVAR_H_ 3227963Ssteve 3346684Skris#define APB_IRQ_BASE 0 3427963Ssteve#define APB_IRQ_END 31 351057Salm#define APB_NIRQS 32 361057Salm 371057Salmstruct apb_softc { 381057Salm struct rman apb_irq_rman; 391057Salm struct rman apb_mem_rman; 401057Salm /* IRQ events structs for child devices */ 411057Salm struct intr_event *sc_eventstab[APB_NIRQS]; 421057Salm mips_intrcnt_t sc_intr_counter[APB_NIRQS]; 431057Salm /* Resources and cookies for MIPS CPU INTs */ 441057Salm struct resource *sc_misc_irq; 4546684Skris void *sc_misc_ih; 461057Salm}; 471057Salm 481057Salmstruct apb_ivar { 491057Salm struct resource_list resources; 501057Salm}; 511057Salm 521057Salm#endif /* _APBVAR_H_ */ 531057Salm