1129198Scognet/*      $NetBSD: sa11x0_var.h,v 1.4 2003/04/14 14:18:41 rjs Exp $        */
2129198Scognet
3129198Scognet/*-
4129198Scognet * Copyright (c) 2001, The NetBSD Foundation, Inc.  All rights reserved.
5129198Scognet *
6129198Scognet * This code is derived from software contributed to The NetBSD Foundation
7129198Scognet * by IWAMOTO Toshihiro and Ichiro FUKUHARA.
8129198Scognet *
9129198Scognet * Redistribution and use in source and binary forms, with or without
10129198Scognet * modification, are permitted provided that the following conditions
11129198Scognet * are met:
12129198Scognet * 1. Redistributions of source code must retain the above copyright
13129198Scognet *    notice, this list of conditions and the following disclaimer.
14129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
15129198Scognet *    notice, this list of conditions and the following disclaimer in the
16129198Scognet *    documentation and/or other materials provided with the distribution.
17129198Scognet *
18129198Scognet * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19129198Scognet * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20129198Scognet * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21129198Scognet * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22129198Scognet * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23129198Scognet * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24129198Scognet * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28129198Scognet * SUCH DAMAGE.
29129198Scognet *
30129198Scognet * $FreeBSD$
31129198Scognet *
32129198Scognet */
33129198Scognet
34129198Scognet#ifndef _SA11X0_VAR_H
35129198Scognet#define _SA11X0_VAR_H
36129198Scognet
37129198Scognet#include <sys/conf.h>
38129198Scognet
39129198Scognet#include <sys/bus.h>
40129198Scognet#include <machine/bus.h>
41150552Scognet#include <sys/rman.h>
42129198Scognet
43129198Scognetstruct sa11x0_softc {
44129198Scognet	device_t sc_dev;
45129198Scognet	bus_space_tag_t sc_iot;
46129198Scognet	bus_space_handle_t sc_ioh;
47129198Scognet	bus_space_handle_t sc_gpioh;
48129198Scognet	bus_space_handle_t sc_ppch;
49129198Scognet	bus_space_handle_t sc_dmach;
50129198Scognet	bus_space_handle_t sc_reseth;
51129198Scognet	u_int32_t sc_intrmask;
52150552Scognet	struct rman sa11x0_rman;
53129198Scognet};
54129198Scognet
55129198Scognet/* Attach args all devices */
56129198Scognet
57129198Scognettypedef void *sa11x0_chipset_tag_t;
58129198Scognet
59129198Scognetextern struct bus_space sa11x0_bs_tag;
60129198Scognet
61129198Scognetvoid *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int,
62129198Scognet			    int (*)(void *), void *);
63129198Scognetvoid sa11x0_intr_disestablish(sa11x0_chipset_tag_t, void *);
64129198Scognet
65129198Scognet#endif /* _SA11X0_VAR_H */
66