From 915c9097dfba70544f63ef9ade9d5057a9309f73 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 24 Apr 2004 19:51:50 +0000 Subject: Preliminary switch to an mvme88k bus_space world. Not all drivers have been converted yet, and they rely upon some linear mappings provided by bus_space. In order to not impact performance, almost all the bus_space accesses go through macros and inline functions. This currently restricts us to D16 and D32 access modes, which are selected at compilation time. Since there are no plans to support D8 vme devices in the future, this is acceptable for now. This makes the "len" locator for vme devices go away, and allows to simplify some code which was using the pcctwo device, and will now directly access hardware which is known to exist, rather than wait until the device is attached. While there, try to enforce more interrupt vector number checks, since these changes pointed out that dart(4) had been working correctly so far by sheer luck only. --- sys/arch/mvme88k/dev/pcctwovar.h | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sys/arch/mvme88k/dev/pcctwovar.h (limited to 'sys/arch/mvme88k/dev/pcctwovar.h') diff --git a/sys/arch/mvme88k/dev/pcctwovar.h b/sys/arch/mvme88k/dev/pcctwovar.h new file mode 100644 index 00000000000..7e4f57fcf7d --- /dev/null +++ b/sys/arch/mvme88k/dev/pcctwovar.h @@ -0,0 +1,41 @@ +/* $OpenBSD: pcctwovar.h,v 1.1 2004/04/24 19:51:48 miod Exp $ */ +/* + * Copyright (c) 2004, Miodrag Vallat. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _MVME88K_PCCTWOVAR_H_ +#define _MVME88K_PCCTWOVAR_H_ + +struct pcctwosoftc { + struct device sc_dev; + + paddr_t sc_base; + + bus_space_tag_t sc_iot; + bus_space_handle_t sc_ioh; +}; + +int pcctwointr_establish(int vec, struct intrhand *ih); + +#endif /* _MVME88K_PCCTWOVAR_H_ */ -- cgit v1.2.3