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