Home | History | Annotate | Line # | Download | only in ic
      1  1.3  macallan /*	$NetBSD: ct65550var.h,v 1.3 2017/02/02 19:55:05 macallan Exp $	*/
      2  1.1  macallan 
      3  1.1  macallan /*
      4  1.1  macallan  * Copyright (c) 2006 Michael Lorenz
      5  1.1  macallan  * All rights reserved.
      6  1.1  macallan  *
      7  1.1  macallan  * Redistribution and use in source and binary forms, with or without
      8  1.1  macallan  * modification, are permitted provided that the following conditions
      9  1.1  macallan  * are met:
     10  1.1  macallan  * 1. Redistributions of source code must retain the above copyright
     11  1.1  macallan  *    notice, this list of conditions and the following disclaimer.
     12  1.1  macallan  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  macallan  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  macallan  *    documentation and/or other materials provided with the distribution.
     15  1.1  macallan  *
     16  1.1  macallan  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1  macallan  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.1  macallan  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.1  macallan  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.1  macallan  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  1.1  macallan  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  1.1  macallan  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  1.1  macallan  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  1.1  macallan  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  1.1  macallan  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26  1.1  macallan  */
     27  1.1  macallan 
     28  1.1  macallan #ifndef CT65550VAR_H
     29  1.1  macallan #define CT65550VAR_H
     30  1.1  macallan 
     31  1.1  macallan #include <dev/wscons/wsdisplayvar.h>
     32  1.1  macallan #include <dev/wscons/wsconsio.h>
     33  1.1  macallan #include <dev/wsfont/wsfont.h>
     34  1.1  macallan #include <dev/rasops/rasops.h>
     35  1.1  macallan #include <dev/wscons/wsdisplay_vconsvar.h>
     36  1.3  macallan #include <dev/wscons/wsdisplay_glyphcachevar.h>
     37  1.1  macallan #include <dev/i2c/i2cvar.h>
     38  1.1  macallan 
     39  1.1  macallan struct chipsfb_softc {
     40  1.1  macallan 	device_t sc_dev;
     41  1.1  macallan 
     42  1.1  macallan 	bus_space_tag_t sc_memt;
     43  1.1  macallan 	bus_space_tag_t sc_iot;
     44  1.1  macallan 
     45  1.1  macallan 	bus_space_handle_t sc_fbh;
     46  1.2  macallan 	bus_space_handle_t sc_mmregh;
     47  1.1  macallan 	bus_space_handle_t sc_ioregh;
     48  1.2  macallan 	bus_addr_t sc_fb;
     49  1.1  macallan 	bus_size_t sc_fbsize, sc_ioregsize;
     50  1.1  macallan 
     51  1.1  macallan 	int (*sc_ioctl)(void *, void *, u_long, void *, int, struct lwp *);
     52  1.2  macallan 	paddr_t	(*sc_mmap)(void *, void *, off_t, int);
     53  1.1  macallan 
     54  1.1  macallan 
     55  1.1  macallan 	size_t memsize;
     56  1.1  macallan 
     57  1.3  macallan 	int sc_bits_per_pixel;
     58  1.3  macallan 	int sc_width, sc_height, sc_linebytes;
     59  1.1  macallan 
     60  1.1  macallan 	int sc_mode;
     61  1.1  macallan 	uint32_t sc_bg;
     62  1.1  macallan 
     63  1.1  macallan 	u_char sc_cmap_red[256];
     64  1.1  macallan 	u_char sc_cmap_green[256];
     65  1.1  macallan 	u_char sc_cmap_blue[256];
     66  1.1  macallan 	int sc_dacw;
     67  1.1  macallan 
     68  1.1  macallan 	/*
     69  1.1  macallan 	 * I2C stuff
     70  1.1  macallan 	 * DDC2 clock is on GPIO1, data on GPIO0
     71  1.1  macallan 	 */
     72  1.1  macallan 	struct i2c_controller sc_i2c;
     73  1.1  macallan 	uint8_t sc_edid[1024];
     74  1.1  macallan 	int sc_edidbytes;	/* number of bytes read from the monitor */
     75  1.1  macallan 
     76  1.1  macallan 	struct vcons_data vd;
     77  1.3  macallan 	glyphcache sc_gc;
     78  1.1  macallan };
     79  1.1  macallan 
     80  1.1  macallan void chipsfb_do_attach(struct chipsfb_softc *sc);
     81  1.1  macallan uint32_t chipsfb_probe_vram(struct chipsfb_softc *sc);
     82  1.1  macallan 
     83  1.1  macallan #endif /* CT65550VAR_H */
     84