1/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/durango.c,v 1.4 2003/01/14 09:34:30 alanh Exp $ */
2/*
3 * $Workfile: durango.c $
4 * $Revision: 1.1.1.1 $
5 * $Author: mrg $
6 *
7 * This is the main file used to add Durango graphics support to a software
8 * project.  The main reason to have a single file include the other files
9 * is that it centralizes the location of the compiler options.  This file
10 * should be tuned for a specific implementation, and then modified as needed
11 * for new Durango releases.  The releases.txt file indicates any updates to
12 * this main file, such as a new definition for a new hardware platform.
13 *
14 * In other words, this file should be copied from the Durango source files
15 * once when a software project starts, and then maintained as necessary.
16 * It should not be recopied with new versions of Durango unless the
17 * developer is willing to tune the file again for the specific project.
18 */
19
20/*
21 * NSC_LIC_ALTERNATIVE_PREAMBLE
22 *
23 * Revision 1.0
24 *
25 * National Semiconductor Alternative GPL-BSD License
26 *
27 * National Semiconductor Corporation licenses this software
28 * ("Software"):
29 *
30 *      Durango
31 *
32 * under one of the two following licenses, depending on how the
33 * Software is received by the Licensee.
34 *
35 * If this Software is received as part of the Linux Framebuffer or
36 * other GPL licensed software, then the GPL license designated
37 * NSC_LIC_GPL applies to this Software; in all other circumstances
38 * then the BSD-style license designated NSC_LIC_BSD shall apply.
39 *
40 * END_NSC_LIC_ALTERNATIVE_PREAMBLE */
41
42/* NSC_LIC_BSD
43 *
44 * National Semiconductor Corporation Open Source License for Durango
45 *
46 * (BSD License with Export Notice)
47 *
48 * Copyright (c) 1999-2001
49 * National Semiconductor Corporation.
50 * All rights reserved.
51 *
52 * Redistribution and use in source and binary forms, with or without
53 * modification, are permitted provided that the following conditions
54 * are met:
55 *
56 *   * Redistributions of source code must retain the above copyright
57 *     notice, this list of conditions and the following disclaimer.
58 *
59 *   * Redistributions in binary form must reproduce the above
60 *     copyright notice, this list of conditions and the following
61 *     disclaimer in the documentation and/or other materials provided
62 *     with the distribution.
63 *
64 *   * Neither the name of the National Semiconductor Corporation nor
65 *     the names of its contributors may be used to endorse or promote
66 *     products derived from this software without specific prior
67 *     written permission.
68 *
69 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
70 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
71 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
72 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
73 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
74 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
75 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
76 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
77 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
78 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
79 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
80 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
81 * OF SUCH DAMAGE.
82 *
83 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
84 * YOUR JURISDICTION. It is licensee's responsibility to comply with
85 * any export regulations applicable in licensee's jurisdiction. Under
86 * CURRENT (2001) U.S. export regulations this software
87 * is eligible for export from the U.S. and can be downloaded by or
88 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
89 * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
90 * Syria, Sudan, Afghanistan and any other country to which the U.S.
91 * has embargoed goods and services.
92 *
93 * END_NSC_LIC_BSD */
94
95/* NSC_LIC_GPL
96 *
97 * National Semiconductor Corporation Gnu General Public License for Durango
98 *
99 * (GPL License with Export Notice)
100 *
101 * Copyright (c) 1999-2001
102 * National Semiconductor Corporation.
103 * All rights reserved.
104 *
105 * Redistribution and use in source and binary forms, with or without
106 * modification, are permitted under the terms of the GNU General
107 * Public License as published by the Free Software Foundation; either
108 * version 2 of the License, or (at your option) any later version
109 *
110 * In addition to the terms of the GNU General Public License, neither
111 * the name of the National Semiconductor Corporation nor the names of
112 * its contributors may be used to endorse or promote products derived
113 * from this software without specific prior written permission.
114 *
115 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
116 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
117 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
118 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
119 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
120 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
121 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
122 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
123 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
124 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
125 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
126 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
127 * OF SUCH DAMAGE. See the GNU General Public License for more details.
128 *
129 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
130 * YOUR JURISDICTION. It is licensee's responsibility to comply with
131 * any export regulations applicable in licensee's jurisdiction. Under
132 * CURRENT (2001) U.S. export regulations this software
133 * is eligible for export from the U.S. and can be downloaded by or
134 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
135 * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
136 * Syria, Sudan, Afghanistan and any other country to which the U.S.
137 * has embargoed goods and services.
138 *
139 * You should have received a copy of the GNU General Public License
140 * along with this file; if not, write to the Free Software Foundation,
141 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
142 *
143 * END_NSC_LIC_GPL */
144
145/* COMPILER OPTIONS
146 * These compiler options specify how the Durango routines are compiled
147 * for the different hardware platforms.  For best performance, a driver
148 * would build for a specific platform.  The "dynamic" switches are set
149 * by diagnostic applications such as Darwin that will run on a variety
150 * of platforms and use the appropriate code at runtime.  Each component
151 * may be separately dynamic, so that a driver has the option of being
152 * tuned for a specific 2D accelerator, but will still run with a variety
153 * of chipsets.
154 */
155
156#ifdef HAVE_CONFIG_H
157#include "config.h"
158#endif
159
160#define GFX_DISPLAY_DYNAMIC			1	/* runtime selection */
161#define GFX_DISPLAY_GU1				1	/* 1st generation display controller */
162#define GFX_DISPLAY_GU2				1	/* 2nd generation display controller */
163
164#define GFX_INIT_DYNAMIC            1	/* runtime selection */
165#define GFX_INIT_GU1                1	/* Geode family      */
166#define GFX_INIT_GU2                1	/* Redcloud          */
167
168#define GFX_MSR_DYNAMIC             1	/* runtime selection */
169#define GFX_MSR_REDCLOUD            1	/* Redcloud          */
170
171#define GFX_2DACCEL_DYNAMIC			1	/* runtime selection */
172#define GFX_2DACCEL_GU1				1	/* 1st generation 2D accelerator */
173#define GFX_2DACCEL_GU2				1	/* 2nd generation 2D accelerator */
174
175#define GFX_VIDEO_DYNAMIC			1	/* runtime selection */
176#define GFX_VIDEO_CS5530			1	/* support for CS5530 */
177#define GFX_VIDEO_SC1200			1	/* support for SC1200 */
178#define GFX_VIDEO_REDCLOUD          1	/* support for Redcloud */
179
180#define GFX_VIP_DYNAMIC				1	/* runtime selection */
181#define GFX_VIP_SC1200				1	/* support for SC1200 */
182
183#define GFX_DECODER_DYNAMIC			1	/* runtime selection */
184#define GFX_DECODER_SAA7114			1	/* Philips SAA7114 decoder */
185
186#define GFX_TV_DYNAMIC				1	/* runtime selection */
187#define GFX_TV_FS451				0	/* Focus Enhancements FS450 */
188#define GFX_TV_SC1200				1	/* SC1200 integrated TV encoder */
189
190#define GFX_I2C_DYNAMIC				1	/* runtime selection */
191#define GFX_I2C_ACCESS				1	/* support for ACCESS.BUS */
192#define GFX_I2C_GPIO				1	/* support for CS5530 GPIOs */
193
194#define GFX_VGA_DYNAMIC				1	/* runtime selection */
195#define GFX_VGA_GU1					1	/* 1st generation graphics unit */
196
197#define FB4MB						1	/* Set to use 4Mb video ram for Pyramid */
198
199#define GFX_NO_IO_IN_WAIT_MACROS    1	/* Set to remove I/O accesses in GP bit testing */
200
201/* ROUTINES TO READ VALUES
202 * These are routines used by Darwin or other diagnostics to read the
203 * current state of the hardware.  Display drivers or embedded applications can
204 * reduce the size of the Durango code by not including these routines.
205 */
206#define GFX_READ_ROUTINES			1	/* add routines to read values */
207
208/* HEADER FILE FOR DURANGO ROUTINE DEFINITIONS
209 * Needed since some of the Durango routines call other Durango routines.
210 * Also defines the size of chipset array (GFX_CSPTR_SIZE).
211 */
212#include "gfx_rtns.h"			/* routine definitions */
213
214/* VARIABLES USED FOR RUNTIME SELECTION
215 * If part of the graphics subsystem is declared as dynamic, then the
216 * following variables are used to specify which platform has been detected.
217 * The variables are set in the "gfx_detect_cpu" routine.  The values should
218 * be bit flags to allow masks to be used to check for multiple platforms.
219 */
220
221#if GFX_DISPLAY_DYNAMIC
222int gfx_display_type = 0;
223#endif
224
225#if GFX_INIT_DYNAMIC
226int gfx_init_type = 0;
227#endif
228
229#if GFX_MSR_DYNAMIC
230int gfx_msr_type = 0;
231#endif
232
233#if GFX_2DACCEL_DYNAMIC
234int gfx_2daccel_type = 0;
235#endif
236
237#if GFX_VIDEO_DYNAMIC
238int gfx_video_type = 0;
239#endif
240
241#if GFX_VIP_DYNAMIC
242int gfx_vip_type = 0;
243#endif
244
245#if GFX_DECODER_DYNAMIC
246int gfx_decoder_type = 0;
247#endif
248
249#if GFX_TV_DYNAMIC
250int gfx_tv_type = 0;
251#endif
252
253#if GFX_I2C_DYNAMIC
254int gfx_i2c_type = 0;
255#endif
256
257#if GFX_VGA_DYNAMIC
258int gfx_vga_type = 0;
259#endif
260
261/* DEFINE POINTERS TO MEMORY MAPPED REGIONS
262 * These pointers are used by the Durango routines to access the hardware.
263 * The variables must be set by the project's initialization code after
264 * mapping the regions in the appropriate manner.
265 */
266
267/* DEFINE VIRTUAL ADDRESSES */
268/* Note: These addresses define the starting base expected by all    */
269/*       Durango offsets.  Under an OS that requires these pointers  */
270/*       to be mapped to linear addresses (i.e Windows), it may not  */
271/*       be possible to keep these base offsets.  In these cases,    */
272/*       the addresses are modified to point to the beginning of the */
273/*       relevant memory region and the access macros are adjusted   */
274/*       to subtract the offset from the default base.  For example, */
275/*       the register pointer could be moved to be 0x40008000, while */
276/*       the WRITE_REG* macros are modified to subtract 0x8000 from  */
277/*       the offset.                                                 */
278
279unsigned char *gfx_virt_regptr = (unsigned char *)0x40000000;
280unsigned char *gfx_virt_fbptr = (unsigned char *)0x40800000;
281unsigned char *gfx_virt_vidptr = (unsigned char *)0x40010000;
282unsigned char *gfx_virt_vipptr = (unsigned char *)0x40015000;
283unsigned char *gfx_virt_spptr = (unsigned char *)0x40000000;
284unsigned char *gfx_virt_gpptr = (unsigned char *)0x40000000;
285
286/* DEFINE PHYSICAL ADDRESSES */
287
288unsigned char *gfx_phys_regptr = (unsigned char *)0x40000000;
289unsigned char *gfx_phys_fbptr = (unsigned char *)0x40800000;
290unsigned char *gfx_phys_vidptr = (unsigned char *)0x40010000;
291unsigned char *gfx_phys_vipptr = (unsigned char *)0x40015000;
292
293/* HEADER FILE FOR GRAPHICS REGISTER DEFINITIONS
294 * This contains only constant definitions, so it should be able to be
295 * included in any software project as is.
296 */
297#include "gfx_regs.h"			/* graphics register definitions */
298
299/* HEADER FILE FOR REGISTER ACCESS MACROS
300 * This file contains the definitions of the WRITE_REG32 and similar macros
301 * used by the Durango routines to access the hardware.  The file assumes
302 * that the environment can handle 32-bit pointer access.  If this is not
303 * the case, or if there are special requirements, then this header file
304 * should not be included and the project must define the macros itself.
305 * (A project may define WRITE_REG32 to call a routine, for example).
306 */
307#include "gfx_defs.h"			/* register access macros */
308
309/* IO MACROS AND ROUTINES
310 * These macros must be defined before the initialization or I2C
311 * routines will work properly.
312 */
313
314#if defined(OS_WIN32)			/* For Windows */
315
316/* VSA II CALL */
317
318void
319gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr,
320		 unsigned long *ptrHigh, unsigned long *ptrLow)
321{
322   unsigned long temp1, temp2;
323
324   _asm {
325      mov dx, 0x0AC1C
326      mov eax, 0x0FC530007
327      out dx, eax
328      add dl, 2
329      mov ecx, msrAddr
330      mov cx, msrReg
331      in ax, dx;
332      ;EDX:EAX will contain MSR contents.
333      mov temp1, edx
334      mov temp2, eax
335   }
336
337   *ptrHigh = temp1;
338   *ptrLow = temp2;
339}
340
341void
342gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr,
343		  unsigned long *ptrHigh, unsigned long *ptrLow)
344{
345   unsigned long temp1 = *ptrHigh;
346   unsigned long temp2 = *ptrLow;
347
348   _asm {
349      mov dx, 0x0AC1C
350      mov eax, 0x0FC530007
351      out dx, eax i
352      add dl, 2
353      ;ECX contains msrAddr | msrReg
354      mov ecx, msrAddr
355      mov cx, msrReg
356      ;<OR_mask_hi >
357      mov ebx, temp1
358
359      ;<OR_mask_hi >
360      mov eax, temp2
361      ;<AND_mask_hi >
362      mov esi, 0
363      ;<AND_mask_lo >
364      mov edi, 0
365      ;MSR is written at this point
366      out dx, ax
367   }
368}
369
370unsigned char
371gfx_inb(unsigned short port)
372{
373   unsigned char data;
374
375   _asm {
376      pushf
377      mov dx, port
378      in al, dx
379      mov data, al
380      popf
381   }
382   return (data);
383}
384
385unsigned short
386gfx_inw(unsigned short port)
387{
388   unsigned short data;
389
390   _asm {
391      pushf
392      mov dx, port
393      in ax, dx
394      mov data, ax
395      popf
396   }
397   return (data);
398}
399
400unsigned long
401gfx_ind(unsigned short port)
402{
403   unsigned long data;
404
405   _asm {
406      pushf
407      mov dx, port
408      in eax, dx
409      mov data, eax
410      popf
411   }
412   return (data);
413}
414
415void
416gfx_outb(unsigned short port, unsigned char data)
417{
418   _asm {
419      pushf
420      mov al, data
421      mov dx, port
422      out dx, al
423      popf
424   }
425}
426
427void
428gfx_outw(unsigned short port, unsigned short data)
429{
430   _asm {
431      pushf
432      mov ax, data
433      mov dx, port
434      out dx, ax
435      popf
436   }
437}
438
439void
440gfx_outd(unsigned short port, unsigned long data)
441{
442   _asm {
443      pushf
444      mov eax, data
445      mov dx, port
446      out dx, eax
447      popf
448   }
449}
450
451#elif defined(OS_VXWORKS) || defined (OS_LINUX)	/* VxWorks and Linux */
452
453extern unsigned long nsc_asm_msr_vsa_rd(unsigned long, unsigned long *,
454					unsigned long *);
455extern unsigned long nsc_asm_msr_vsa_wr(unsigned long, unsigned long,
456					unsigned long);
457
458void
459gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr,
460		 unsigned long *ptrHigh, unsigned long *ptrLow)
461{
462   unsigned long addr, val1, val2;
463
464   addr = msrAddr | (unsigned long)msrReg;
465   nsc_asm_msr_vsa_rd(addr, &val2, &val1);
466   *ptrHigh = val2;
467   *ptrLow = val1;
468}
469
470void
471gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr,
472		  unsigned long *ptrHigh, unsigned long *ptrLow)
473{
474   unsigned long addr, val1, val2;
475
476   val2 = *ptrHigh;
477   val1 = *ptrLow;
478   addr = (msrAddr & 0xFFFF0000) | (unsigned long)msrReg;
479   nsc_asm_msr_vsa_wr(addr, val2, val1);
480}
481
482unsigned char
483gfx_inb(unsigned short port)
484{
485   unsigned char value;
486   __asm__ volatile ("inb %1,%0":"=a" (value):"d"(port));
487
488   return value;
489}
490
491unsigned short
492gfx_inw(unsigned short port)
493{
494   unsigned short value;
495   __asm__ volatile ("in %1,%0":"=a" (value):"d"(port));
496
497   return value;
498}
499
500unsigned long
501gfx_ind(unsigned short port)
502{
503   unsigned long value;
504   __asm__ volatile ("inl %1,%0":"=a" (value):"d"(port));
505
506   return value;
507}
508
509void
510gfx_outb(unsigned short port, unsigned char data)
511{
512   __asm__ volatile ("outb %0,%1"::"a" (data), "d"(port));
513}
514
515void
516gfx_outw(unsigned short port, unsigned short data)
517{
518   __asm__ volatile ("out %0,%1"::"a" (data), "d"(port));
519}
520
521void
522gfx_outd(unsigned short port, unsigned long data)
523{
524   __asm__ volatile ("outl %0,%1"::"a" (data), "d"(port));
525}
526
527#elif defined(XFree86Server)
528
529#include <compiler.h>
530#define INB(port) inb(port)
531#define INW(port) inw(port)
532#define IND(port) inl(port)
533#define OUTB(port,data) outb(port, data)
534#define OUTW(port,data) outw(port, data)
535#define OUTD(port,data) outl(port, data)
536
537unsigned char gfx_inb(unsigned short port);
538unsigned short gfx_inw(unsigned short port);
539unsigned long gfx_ind(unsigned short port);
540void gfx_outb(unsigned short port, unsigned char data);
541void gfx_outw(unsigned short port, unsigned short data);
542void gfx_outd(unsigned short port, unsigned long data);
543
544unsigned char
545gfx_inb(unsigned short port)
546{
547   return inb(port);
548}
549
550unsigned short
551gfx_inw(unsigned short port)
552{
553   return inw(port);
554}
555
556unsigned long
557gfx_ind(unsigned short port)
558{
559   return inl(port);
560}
561
562void
563gfx_outb(unsigned short port, unsigned char data)
564{
565   outb(port, data);
566}
567
568void
569gfx_outw(unsigned short port, unsigned short data)
570{
571   outw(port, data);
572}
573
574void
575gfx_outd(unsigned short port, unsigned long data)
576{
577   outl(port, data);
578}
579
580#ifdef __i386__
581extern unsigned long nsc_asm_msr_vsa_rd(unsigned long, unsigned long *,
582					unsigned long *);
583extern unsigned long nsc_asm_msr_vsa_wr(unsigned long, unsigned long,
584					unsigned long);
585#endif
586
587void
588gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr,
589		 unsigned long *ptrHigh, unsigned long *ptrLow)
590{
591#ifdef __i386__
592   unsigned long addr, val1, val2;
593
594   addr = msrAddr | (unsigned long)msrReg;
595   nsc_asm_msr_vsa_rd(addr, &val2, &val1);
596   *ptrHigh = val2;
597   *ptrLow = val1;
598#endif
599}
600
601void
602gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr,
603		  unsigned long *ptrHigh, unsigned long *ptrLow)
604{
605#ifdef __i386__
606   unsigned long addr, val1, val2;
607
608   val2 = *ptrHigh;
609   val1 = *ptrLow;
610   addr = (msrAddr & 0xFFFF0000) | (unsigned long)msrReg;
611   nsc_asm_msr_vsa_wr(addr, val2, val1);
612#endif
613}
614#else /* else nothing */
615
616unsigned char
617gfx_inb(unsigned short port)
618{
619   /* ADD OS SPECIFIC IMPLEMENTATION */
620   return (0);
621}
622
623unsigned short
624gfx_inw(unsigned short port)
625{
626   /* ADD OS SPECIFIC IMPLEMENTATION */
627   return (0);
628}
629
630unsigned long
631gfx_ind(unsigned short port)
632{
633   /* ADD OS SPECIFIC IMPLEMENTATION */
634   return (0);
635}
636
637void
638gfx_outb(unsigned short port, unsigned char data)
639{
640   /* ADD OS SPECIFIC IMPLEMENTATION */
641}
642
643void
644gfx_outw(unsigned short port, unsigned short data)
645{
646   /* ADD OS SPECIFIC IMPLEMENTATION */
647}
648
649void
650gfx_outd(unsigned short port, unsigned long data)
651{
652   /* ADD OS SPECIFIC IMPLEMENTATION */
653}
654#endif
655
656#ifndef XFree86Server
657#define INB(port) gfx_inb(port)
658#define INW(port) gfx_inw(port)
659#define IND(port) gfx_ind(port)
660#define OUTB(port, data) gfx_outb(port, data)
661#define OUTW(port, data) gfx_outw(port, data)
662#define OUTD(port, data) gfx_outd(port, data)
663#endif
664
665/* INITIALIZATION ROUTINES
666 * These routines are used during the initialization of the driver to
667 * perform such tasks as detecting the type of CPU and video hardware.
668 * The routines require the use of IO, so the above IO routines need
669 * to be implemented before the initialization routines will work
670 * properly.
671 */
672
673#include "gfx_init.c"
674
675/* INCLUDE MSR ACCESS ROUTINES */
676
677#include "gfx_msr.c"
678
679/* INCLUDE GRAPHICS ENGINE ROUTINES
680 * These routines are used to program the 2D graphics accelerator.  If
681 * the project does not use graphics acceleration (direct frame buffer
682 * access only), then this file does not need to be included.
683 */
684#include "gfx_rndr.c"			/* graphics engine routines */
685
686/* INCLUDE DISPLAY CONTROLLER ROUTINES
687 * These routines are used if the display mode is set directly.  If the
688 * project uses VGA registers to set a display mode, then these files
689 * do not need to be included.
690 */
691#include "gfx_mode.h"			/* display mode tables */
692#include "gfx_disp.c"			/* display controller routines */
693
694/* INCLUDE VIDEO OVERLAY ROUTINES
695 * These routines control the video overlay hardware.
696 */
697#include "gfx_vid.c"			/* video overlay routines */
698
699/* VIDEO PORT AND VIDEO DECODER ROUTINES
700 * These routines rely on the I2C routines.
701 */
702#include "gfx_vip.c"			/* video port routines */
703#include "gfx_dcdr.c"			/* video decoder routines */
704
705/* I2C BUS ACCESS ROUTINES
706 * These routines are used by the video decoder and possibly an
707 * external TV encoer.
708 */
709#include "gfx_i2c.c"			/* I2C bus access routines */
710
711/* TV ENCODER ROUTINES
712 * This file does not need to be included if the system does not
713 * support TV output.
714 */
715#include "gfx_tv.c"			/* TV encoder routines */
716
717/* VGA ROUTINES
718 * This file is used if setting display modes using VGA registers.
719 */
720#include "gfx_vga.c"			/* VGA routines */
721
722/* Hardware Register reading functions */
723#include "nsc_regacc.c"
724
725/* END OF FILE */
726