132b578d3Smrg/*
232b578d3Smrg * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
332b578d3Smrg *
432b578d3Smrg * Permission to use, copy, modify, distribute, and sell this software and its
532b578d3Smrg * documentation for any purpose is hereby granted without fee, provided that
632b578d3Smrg * the above copyright notice appear in all copies and that both that copyright
732b578d3Smrg * notice and this permission notice appear in supporting documentation, and
832b578d3Smrg * that the name of Marc Aurele La France not be used in advertising or
932b578d3Smrg * publicity pertaining to distribution of the software without specific,
1032b578d3Smrg * written prior permission.  Marc Aurele La France makes no representations
1132b578d3Smrg * about the suitability of this software for any purpose.  It is provided
1232b578d3Smrg * "as-is" without express or implied warranty.
1332b578d3Smrg *
1432b578d3Smrg * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1532b578d3Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
1632b578d3Smrg * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
1732b578d3Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
1832b578d3Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1932b578d3Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2032b578d3Smrg * PERFORMANCE OF THIS SOFTWARE.
2132b578d3Smrg */
2232b578d3Smrg
2332b578d3Smrg#ifndef ___ATIVGAIO_H___
2432b578d3Smrg
2532b578d3Smrg#if !defined(___ATI_H___) && defined(XFree86Module)
2632b578d3Smrg# error missing #include "ati.h" before #include "ativgaio.h"
2732b578d3Smrg# undef XFree86Module
2832b578d3Smrg#endif
2932b578d3Smrg
3032b578d3Smrg#define ___ATIVGAIO_H___ 1
3132b578d3Smrg
3232b578d3Smrg#include "atiregs.h"
3332b578d3Smrg#include "atipriv.h"
3432b578d3Smrg
3532b578d3Smrg#include "compiler.h"
3632b578d3Smrg
3732b578d3Smrg#ifndef AVOID_CPIO
3832b578d3Smrg
3932b578d3Smrgextern void ATISetVGAIOBase(ATIPtr, const CARD8);
4032b578d3Smrg
410b0ce0bfSmrg/* Odds and ends to ease reading and writing of indexed registers */
4232b578d3Smrg#define GetReg(_Register, _Index) \
4332b578d3Smrg    (                             \
4432b578d3Smrg        outb(_Register, _Index),  \
4532b578d3Smrg        inb((_Register) + 1)      \
4632b578d3Smrg    )
4732b578d3Smrg#define PutReg(_Register, _Index, _Value) \
4832b578d3Smrg    do                                    \
4932b578d3Smrg    {                                     \
5032b578d3Smrg        outb(_Register, _Index);          \
5132b578d3Smrg        outb((_Register) + 1, _Value);    \
5232b578d3Smrg    } while (0)
5332b578d3Smrg
5432b578d3Smrg#endif /* AVOID_CPIO */
5532b578d3Smrg
5632b578d3Smrg#endif /* ___ATIVGAIO_H___ */
57