xref: /netbsd-src/sys/arch/evbppc/virtex/dev/tftvar.h (revision 51a2be5067a138a00a7a8e38709ecf5718f9f3a5)
1*51a2be50Smatt /* 	$NetBSD: tftvar.h,v 1.4 2011/06/18 06:44:27 matt Exp $ */
2e388b581Sfreza 
3e388b581Sfreza /*
4e388b581Sfreza  * Copyright (c) 2006 Jachym Holecek
5e388b581Sfreza  * All rights reserved.
6e388b581Sfreza  *
7e388b581Sfreza  * Written for DFC Design, s.r.o.
8e388b581Sfreza  *
9e388b581Sfreza  * Redistribution and use in source and binary forms, with or without
10e388b581Sfreza  * modification, are permitted provided that the following conditions
11e388b581Sfreza  * are met:
12e388b581Sfreza  *
13e388b581Sfreza  * 1. Redistributions of source code must retain the above copyright
14e388b581Sfreza  *    notice, this list of conditions and the following disclaimer.
15e388b581Sfreza  *
16e388b581Sfreza  * 2. Redistributions in binary form must reproduce the above copyright
17e388b581Sfreza  *    notice, this list of conditions and the following disclaimer in the
18e388b581Sfreza  *    documentation and/or other materials provided with the distribution.
19e388b581Sfreza  *
20e388b581Sfreza  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21e388b581Sfreza  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22e388b581Sfreza  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23e388b581Sfreza  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24e388b581Sfreza  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25e388b581Sfreza  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26e388b581Sfreza  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27e388b581Sfreza  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28e388b581Sfreza  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29e388b581Sfreza  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30e388b581Sfreza  */
31e388b581Sfreza 
32e388b581Sfreza #ifndef	_VIRTEX_DEV_TFTVAR_H_
33e388b581Sfreza #define	_VIRTEX_DEV_TFTVAR_H_
34e388b581Sfreza 
35e388b581Sfreza struct tft_softc {
36*51a2be50Smatt 	device_t 		sc_dev;
37e388b581Sfreza 
3853524e44Schristos 	void *			sc_image;
39e388b581Sfreza 	size_t 			sc_size;
40e388b581Sfreza 
41e388b581Sfreza 	bus_space_tag_t 	sc_iot;
42e388b581Sfreza 	bus_space_handle_t 	sc_ioh;
43e388b581Sfreza 
44e388b581Sfreza 	u_int 			sc_width;
45e388b581Sfreza 	u_int 			sc_height;
46e388b581Sfreza 	u_int 			sc_stride; 	/* line length in bytes */
47e388b581Sfreza 	u_int 			sc_bpp; 	/* bits per pixel */
48e388b581Sfreza 
49e388b581Sfreza 	void 			*sc_sdhook;
50e388b581Sfreza 
51e388b581Sfreza 	/* wscons */
52e388b581Sfreza 	struct wsscreen_descr 	sc_ws_descr_storage[1];
53e388b581Sfreza 	struct wsscreen_descr 	*sc_ws_descr; 	/* Fixed resolution */
54e388b581Sfreza 	struct wsscreen_list 	sc_ws_scrlist;
55e388b581Sfreza 	struct vcons_screen 	sc_vc_screen;
56e388b581Sfreza 	struct vcons_data 	sc_vc_data;
57e388b581Sfreza 
58e388b581Sfreza 	/* splashscreen */
59e388b581Sfreza #ifdef SPLASHSCREEN
60e388b581Sfreza 	struct splash_info 	sc_sp_info;
61e388b581Sfreza #endif
62e388b581Sfreza };
63e388b581Sfreza 
64e388b581Sfreza void 		tft_attach(device_t, struct wsdisplay_accessops *);
65e388b581Sfreza void 		tft_shutdown(void *);
6653524e44Schristos int 		tft_ioctl(void *, void *, u_long, void *, int, struct lwp *);
67e388b581Sfreza int 		tft_mode(device_t);
68e388b581Sfreza 
69e388b581Sfreza #endif	/*_VIRTEX_DEV_TFTVAR_H_*/
70