From de34a43cd23fb0127b21e66425164a48091078e6 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Tue, 11 Jun 2002 06:53:04 +0000 Subject: split creator driver into bus specific and common code. requested and ok by jason@ --- sys/arch/sparc64/dev/creatorvar.h | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sys/arch/sparc64/dev/creatorvar.h (limited to 'sys/arch/sparc64/dev/creatorvar.h') diff --git a/sys/arch/sparc64/dev/creatorvar.h b/sys/arch/sparc64/dev/creatorvar.h new file mode 100644 index 00000000000..933385c7d97 --- /dev/null +++ b/sys/arch/sparc64/dev/creatorvar.h @@ -0,0 +1,73 @@ +/* $OpenBSD: creatorvar.h,v 1.1 2002/06/11 06:53:03 fgsch Exp $ */ + +/* + * Copyright (c) 2002 Jason L. Wright (jason@thought.net) + * All rights reserved. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Jason L. Wright + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + */ + +/* Number of register sets */ +#define FFB_NREGS 24 + +/* Register set numbers */ +#define FFB_REG_PROM 0 +#define FFB_REG_DAC 1 +#define FFB_REG_FBC 2 +#define FFB_REG_DFB8R 3 +#define FFB_REG_DFB8G 4 +#define FFB_REG_DFB8B 5 +#define FFB_REG_DFB8X 6 +#define FFB_REG_DFB24 7 +#define FFB_REG_DFB32 8 +#define FFB_REG_SFB8R 9 +#define FFB_REG_SFB8G 10 +#define FFB_REG_SFB8B 11 +#define FFB_REG_SFB8X 12 +#define FFB_REG_SFB32 13 +#define FFB_REG_SFB64 14 +#define FFB_REG_DFB422A 15 + +#define FFB_CREATOR 0 +#define FFB_AFB 1 + +struct creator_softc { + struct device sc_dv; + bus_space_tag_t sc_bt; + bus_space_handle_t sc_pixel_h; + bus_addr_t sc_addrs[FFB_NREGS]; + bus_size_t sc_sizes[FFB_NREGS]; + int sc_height, sc_width, sc_linebytes, sc_depth; + int sc_nscreens, sc_nreg; + int sc_console; + int sc_node; + int sc_type; + u_int sc_mode; + struct rasops_info sc_rasops; +}; + +void creator_attach(struct creator_softc *); -- cgit v1.2.3