Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $XFree86$ */ |
| 2 | /* $XdotOrg$ */ |
| 3 | /* |
| 4 | * General type definitions for universal mode switching modules |
| 5 | * |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 6 | * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * |
| 8 | * If distributed as part of the Linux kernel, the following license terms |
| 9 | * apply: |
| 10 | * |
| 11 | * * This program is free software; you can redistribute it and/or modify |
| 12 | * * it under the terms of the GNU General Public License as published by |
| 13 | * * the Free Software Foundation; either version 2 of the named License, |
| 14 | * * or any later version. |
| 15 | * * |
| 16 | * * This program is distributed in the hope that it will be useful, |
| 17 | * * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * * GNU General Public License for more details. |
| 20 | * * |
| 21 | * * You should have received a copy of the GNU General Public License |
| 22 | * * along with this program; if not, write to the Free Software |
| 23 | * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
| 24 | * |
| 25 | * Otherwise, the following license terms apply: |
| 26 | * |
| 27 | * * Redistribution and use in source and binary forms, with or without |
| 28 | * * modification, are permitted provided that the following conditions |
| 29 | * * are met: |
| 30 | * * 1) Redistributions of source code must retain the above copyright |
| 31 | * * notice, this list of conditions and the following disclaimer. |
| 32 | * * 2) Redistributions in binary form must reproduce the above copyright |
| 33 | * * notice, this list of conditions and the following disclaimer in the |
| 34 | * * documentation and/or other materials provided with the distribution. |
| 35 | * * 3) The name of the author may not be used to endorse or promote products |
| 36 | * * derived from this software without specific prior written permission. |
| 37 | * * |
| 38 | * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 39 | * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 40 | * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 41 | * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 42 | * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 43 | * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 44 | * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 45 | * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 46 | * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 47 | * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 48 | * |
| 49 | * Author: Thomas Winischhofer <thomas@winischhofer.net> |
| 50 | * |
| 51 | */ |
| 52 | |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 53 | #ifndef _VGATYPES_H_ |
| 54 | #define _VGATYPES_H_ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 56 | #ifdef SIS_LINUX_KERNEL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | #include <linux/version.h> |
| 58 | #endif |
| 59 | |
| 60 | #ifndef FALSE |
| 61 | #define FALSE 0 |
| 62 | #endif |
| 63 | |
| 64 | #ifndef TRUE |
| 65 | #define TRUE 1 |
| 66 | #endif |
| 67 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | #ifndef BOOLEAN |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 69 | typedef unsigned int BOOLEAN; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | #endif |
| 71 | |
| 72 | #define SISIOMEMTYPE |
| 73 | |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 74 | #ifdef SIS_LINUX_KERNEL |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | typedef unsigned long SISIOADDRESS; |
| 76 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8) |
| 77 | #include <linux/types.h> /* Need __iomem */ |
| 78 | #undef SISIOMEMTYPE |
| 79 | #define SISIOMEMTYPE __iomem |
| 80 | #endif |
| 81 | #endif |
| 82 | |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 83 | #ifdef SIS_XORG_XF86 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | #if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0) |
| 85 | typedef unsigned long IOADDRESS; |
| 86 | typedef unsigned long SISIOADDRESS; |
| 87 | #else |
| 88 | typedef IOADDRESS SISIOADDRESS; |
| 89 | #endif |
| 90 | #endif |
| 91 | |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 92 | typedef enum _SIS_CHIP_TYPE { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | SIS_VGALegacy = 0, |
| 94 | SIS_530, |
| 95 | SIS_OLD, |
| 96 | SIS_300, |
| 97 | SIS_630, |
| 98 | SIS_730, |
| 99 | SIS_540, |
| 100 | SIS_315H, /* SiS 310 */ |
| 101 | SIS_315, |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 102 | SIS_315PRO, /* SiS 325 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | SIS_550, |
| 104 | SIS_650, |
| 105 | SIS_740, |
| 106 | SIS_330, |
| 107 | SIS_661, |
| 108 | SIS_741, |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 109 | SIS_670, |
| 110 | SIS_660 = 35, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | SIS_760, |
| 112 | SIS_761, |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 113 | SIS_762, |
| 114 | SIS_770, |
| 115 | SIS_340 = 55, |
| 116 | SIS_341, |
| 117 | SIS_342, |
| 118 | XGI_20 = 75, |
| 119 | XGI_40, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | MAX_SIS_CHIP |
Thomas Winischhofer | 544393f | 2005-09-09 13:04:45 -0700 | [diff] [blame] | 121 | } SIS_CHIP_TYPE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 123 | |
| 124 | #endif |
| 125 | |