2
* Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
4
* Permission to use, copy, modify, distribute, and sell this software and its
5
* documentation for any purpose is hereby granted without fee, provided that
6
* the above copyright notice appear in all copies and that both that copyright
7
* notice and this permission notice appear in supporting documentation, and
8
* that the name of Marc Aurele La France not be used in advertising or
9
* publicity pertaining to distribution of the software without specific,
10
* written prior permission. Marc Aurele La France makes no representations
11
* about the suitability of this software for any purpose. It is provided
12
* "as-is" without express or implied warranty.
14
* MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
16
* EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
* PERFORMANCE OF THIS SOFTWARE.
29
#include "atimach64io.h"
30
#include "atiwonderio.h"
37
* Set an ATI 28800's, 68800's or 88800's read and write bank numbers.
46
(void)iBank; /* always called with iBank = 0 */
48
ATIPutExtReg(0xB2U, 0x00U);
49
ATIModifyExtReg(pATI, 0xAEU, -1, (CARD8)(~0x0FU), 0x00U);
53
* Functions to simulate a banked VGA aperture using a Mach64's small dual
54
* paged apertures. There are two sets of these: one for packed modes, the
55
* other for planar modes.
59
ATIMach64MassagePackedBankNumber
65
return ((iBank + 1) << 16) | iBank;
69
* ATIMach64SetBankPacked --
71
* Set read and write bank numbers for small dual paged apertures.
74
ATIMach64SetBankPacked
80
CARD32 tmp = ATIMach64MassagePackedBankNumber(iBank);
82
outr(MEM_VGA_RP_SEL, tmp);
83
outr(MEM_VGA_WP_SEL, tmp);
87
ATIMach64MassagePlanarBankNumber
93
return ((iBank + 4) << 16) | iBank;
97
* ATIMach64SetBankPlanar --
99
* Set read and write bank numbers for small dual paged apertures.
102
ATIMach64SetBankPlanar
108
CARD32 tmp = ATIMach64MassagePlanarBankNumber(iBank);
110
outr(MEM_VGA_RP_SEL, tmp);
111
outr(MEM_VGA_WP_SEL, tmp);
114
#endif /* AVOID_CPIO */