1187517Sgonzo/*- 2187517Sgonzo * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 3187517Sgonzo * All rights reserved. 4187517Sgonzo * 5187517Sgonzo * Redistribution and use in source and binary forms, with or without 6187517Sgonzo * modification, are permitted provided that the following conditions 7187517Sgonzo * are met: 8187517Sgonzo * 1. Redistributions of source code must retain the above copyright 9187517Sgonzo * notice unmodified, this list of conditions, and the following 10187517Sgonzo * disclaimer. 11187517Sgonzo * 2. Redistributions in binary form must reproduce the above copyright 12187517Sgonzo * notice, this list of conditions and the following disclaimer in the 13187517Sgonzo * documentation and/or other materials provided with the distribution. 14187517Sgonzo * 15187517Sgonzo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16187517Sgonzo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17187517Sgonzo * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18187517Sgonzo * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19187517Sgonzo * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20187517Sgonzo * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21187517Sgonzo * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22187517Sgonzo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23187517Sgonzo * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24187517Sgonzo * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25187517Sgonzo * SUCH DAMAGE. 26187517Sgonzo */ 27187517Sgonzo 28187517Sgonzo#ifndef _APBVAR_H_ 29187517Sgonzo#define _APBVAR_H_ 30187517Sgonzo 31187517Sgonzo#define APB_IRQ_BASE 0 32187517Sgonzo#define APB_IRQ_END 7 33187517Sgonzo#define APB_NIRQS 8 34187517Sgonzo 35187517Sgonzostruct apb_softc { 36187517Sgonzo struct rman apb_irq_rman; 37191837Sgonzo struct rman apb_mem_rman; 38187517Sgonzo /* IRQ events structs for child devices */ 39187517Sgonzo struct intr_event *sc_eventstab[APB_NIRQS]; 40199497Sgonzo mips_intrcnt_t sc_intr_counter[APB_NIRQS]; 41187517Sgonzo /* Resources and cookies for MIPS CPU INTs */ 42187517Sgonzo struct resource *sc_misc_irq; 43187517Sgonzo void *sc_misc_ih; 44187517Sgonzo}; 45187517Sgonzo 46187517Sgonzostruct apb_ivar { 47187517Sgonzo struct resource_list resources; 48187517Sgonzo}; 49187517Sgonzo 50187517Sgonzo#endif /* _APBVAR_H_ */ 51