128263Spst/*	$NetBSD: obiovar.h,v 1.4 2003/06/16 17:40:53 thorpej Exp $	*/
228263Spst
350472Speter/*-
428263Spst * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
561981Sbrian * All rights reserved.
661981Sbrian *
728263Spst * Written by Jason R. Thorpe for Wasabi Systems, Inc.
861981Sbrian *
961981Sbrian * Redistribution and use in source and binary forms, with or without
1061981Sbrian * modification, are permitted provided that the following conditions
1161981Sbrian * are met:
1261981Sbrian * 1. Redistributions of source code must retain the above copyright
1361981Sbrian *    notice, this list of conditions and the following disclaimer.
1461981Sbrian * 2. Redistributions in binary form must reproduce the above copyright
1528263Spst *    notice, this list of conditions and the following disclaimer in the
1661981Sbrian *    documentation and/or other materials provided with the distribution.
1761981Sbrian * 3. All advertising materials mentioning features or use of this software
1865843Sbrian *    must display the following acknowledgement:
1961981Sbrian *	This product includes software developed for the NetBSD Project by
2065843Sbrian *	Wasabi Systems, Inc.
2165843Sbrian * 4. The name of Wasabi Systems, Inc. may not be used to endorse
2265843Sbrian *    or promote products derived from this software without specific prior
2365843Sbrian *    written permission.
2465843Sbrian *
2565843Sbrian * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
2665843Sbrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2765843Sbrian * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2865843Sbrian * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
2961981Sbrian * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3070323Sbrian * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3161981Sbrian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32193302Sbrian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3370323Sbrian * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3470323Sbrian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3570323Sbrian * POSSIBILITY OF SUCH DAMAGE.
3661981Sbrian *
3775961Sru * $FreeBSD: releng/10.3/sys/mips/idt/obiovar.h 202175 2010-01-12 21:36:08Z imp $
3861981Sbrian *
3961981Sbrian */
4061981Sbrian
4161981Sbrian#ifndef _ADM5120_OBIOVAR_H_
4261981Sbrian#define	_ADM5120_OBIOVAR_H_
4361981Sbrian
44193302Sbrian#include <sys/rman.h>
45193302Sbrian
46193302Sbrian/* Number of controller's IRQs */
4765843Sbrian#define	NIRQS	32*5
4865843Sbrian
4961981Sbrian/* Number of CPU IRQ lines */
5061981Sbrian#define	MIPS_IRQS	5
5165843Sbrian
5265843Sbrian#define	OBIO_MEM_START	0x18000000L
5361981Sbrian#define	OBIO_MEM_SIZE	0x200000
5465843Sbrian
5565843Sbrianstruct obio_softc {
56	struct rman		oba_mem_rman;
57	struct rman		oba_irq_rman;
58	struct intr_event	*sc_eventstab[NIRQS];	/* IRQ events structs */
59	struct resource		*sc_irq[MIPS_IRQS];	/* IRQ resource */
60	void			*sc_ih[MIPS_IRQS];	/* interrupt cookie */
61};
62
63struct obio_ivar {
64	struct resource_list	resources;
65};
66
67#endif /* _ADM5120_OBIOVAR_H_ */
68