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