133965Sjdp/*	$NetBSD: pccvar.h,v 1.9 2008/01/12 09:54:25 tsutsui Exp $	*/
233965Sjdp
333965Sjdp/*-
433965Sjdp * Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
533965Sjdp * All rights reserved.
633965Sjdp *
733965Sjdp * This code is derived from software contributed to The NetBSD Foundation
833965Sjdp * by Jason R. Thorpe and Steve C. Woodford.
933965Sjdp *
1033965Sjdp * Redistribution and use in source and binary forms, with or without
1133965Sjdp * modification, are permitted provided that the following conditions
1233965Sjdp * are met:
1377298Sobrien * 1. Redistributions of source code must retain the above copyright
1477298Sobrien *    notice, this list of conditions and the following disclaimer.
1577298Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1677298Sobrien *    notice, this list of conditions and the following disclaimer in the
1777298Sobrien *    documentation and/or other materials provided with the distribution.
1833965Sjdp *
1933965Sjdp * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2033965Sjdp * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2133965Sjdp * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2233965Sjdp * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2389857Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2433965Sjdp * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2533965Sjdp * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2633965Sjdp * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2733965Sjdp * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2833965Sjdp * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2989857Sobrien * POSSIBILITY OF SUCH DAMAGE.
3033965Sjdp */
3133965Sjdp
3233965Sjdp#ifndef _MVME68K_PCCVAR_H
3333965Sjdp#define _MVME68K_PCCVAR_H
3433965Sjdp
3533965Sjdp/* For isrlink_evcnt() definition */
3633965Sjdp#include <mvme68k/mvme68k/isr.h>
3733965Sjdp
3833965Sjdp/*
3933965Sjdp * Structure used to attach PCC devices.
4033965Sjdp */
4133965Sjdpstruct pcc_attach_args {
4238889Sjdp	const char	*pa_name;	/* name of device */
4333965Sjdp	int		pa_ipl;		/* interrupt level */
4433965Sjdp	bus_dma_tag_t	pa_dmat;
4533965Sjdp	bus_space_tag_t	pa_bust;
4633965Sjdp	bus_addr_t	pa_offset;
4738889Sjdp
4833965Sjdp	bus_addr_t	_pa_base;
4933965Sjdp};
5033965Sjdp
5133965Sjdp/* Shorthand for locators. */
5233965Sjdp#include "locators.h"
5333965Sjdp#define pcccf_ipl	cf_loc[PCCCF_IPL]
54
55
56struct pcc_softc {
57        struct device sc_dev;
58	bus_space_tag_t sc_bust;
59	bus_space_handle_t sc_bush;
60	struct evcnt sc_evcnt;
61};
62
63extern struct pcc_softc *sys_pcc;
64extern bus_addr_t pcc_slave_base_addr;
65
66#define	pccintr_evcnt(ipl)	isrlink_evcnt(ipl)
67void	pccintr_establish(int, int (*)(void *), int, void *, struct evcnt *);
68void	pccintr_disestablish(int);
69
70#endif /* _MVME68K_PCCVAR_H */
71