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.
26263229Sadrian *
27263229Sadrian * $FreeBSD$
28187517Sgonzo */
29187517Sgonzo
30187517Sgonzo#ifndef _APBVAR_H_
31187517Sgonzo#define _APBVAR_H_
32187517Sgonzo
33187517Sgonzo#define	APB_IRQ_BASE		0
34263229Sadrian#define	APB_IRQ_END		31
35263229Sadrian#define	APB_NIRQS		32
36187517Sgonzo
37187517Sgonzostruct apb_softc {
38187517Sgonzo	struct rman		apb_irq_rman;
39191837Sgonzo	struct rman		apb_mem_rman;
40187517Sgonzo	/* IRQ events structs for child devices */
41263229Sadrian	struct intr_event	*sc_eventstab[APB_NIRQS];
42263229Sadrian	mips_intrcnt_t		sc_intr_counter[APB_NIRQS];
43187517Sgonzo	/* Resources and cookies for MIPS CPU INTs */
44187517Sgonzo	struct resource		*sc_misc_irq;
45187517Sgonzo	void			*sc_misc_ih;
46187517Sgonzo};
47187517Sgonzo
48187517Sgonzostruct apb_ivar {
49187517Sgonzo	struct resource_list	resources;
50187517Sgonzo};
51187517Sgonzo
52187517Sgonzo#endif /* _APBVAR_H_ */
53