Use unsigned long rather than deprecated IOADDRESS

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston
2011-10-19 00:35:02 -07:00
parent 28f3a899a1
commit 69aa104ed0
3 changed files with 16 additions and 24 deletions

View File

@@ -110,12 +110,12 @@
#warning sisfb will not work!
#endif
#define OutPortByte(p,v) outb((u8)(v),(IOADDRESS)(p))
#define OutPortWord(p,v) outw((u16)(v),(IOADDRESS)(p))
#define OutPortLong(p,v) outl((u32)(v),(IOADDRESS)(p))
#define InPortByte(p) inb((IOADDRESS)(p))
#define InPortWord(p) inw((IOADDRESS)(p))
#define InPortLong(p) inl((IOADDRESS)(p))
#define OutPortByte(p,v) outb((u8)(v),(unsigned long)(p))
#define OutPortWord(p,v) outw((u16)(v),(unsigned long)(p))
#define OutPortLong(p,v) outl((u32)(v),(unsigned long)(p))
#define InPortByte(p) inb((unsigned long)(p))
#define InPortWord(p) inw((unsigned long)(p))
#define InPortLong(p) inl((unsigned long)(p))
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
#endif /* LINUX_KERNEL */
@@ -129,12 +129,12 @@
#define SIS300
#define SIS315H
#define OutPortByte(p,v) outSISREG((IOADDRESS)(p),(CARD8)(v))
#define OutPortWord(p,v) outSISREGW((IOADDRESS)(p),(CARD16)(v))
#define OutPortLong(p,v) outSISREGL((IOADDRESS)(p),(CARD32)(v))
#define InPortByte(p) inSISREG((IOADDRESS)(p))
#define InPortWord(p) inSISREGW((IOADDRESS)(p))
#define InPortLong(p) inSISREGL((IOADDRESS)(p))
#define OutPortByte(p,v) outSISREG((unsigned long)(p),(CARD8)(v))
#define OutPortWord(p,v) outSISREGW((unsigned long)(p),(CARD16)(v))
#define OutPortLong(p,v) outSISREGL((unsigned long)(p),(CARD32)(v))
#define InPortByte(p) inSISREG((unsigned long)(p))
#define InPortWord(p) inSISREGW((unsigned long)(p))
#define InPortLong(p) inSISREGL((unsigned long)(p))
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif /* XF86 */

View File

@@ -978,7 +978,7 @@ typedef struct {
void *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */
CARD32 IOAddress; /* MMIO physical address */
void *IOBase; /* MMIO linear address */
IOADDRESS IODBase; /* Base of PIO memory area */
unsigned long IODBase; /* Base of PIO memory area */
#ifdef __alpha__
void *IOBaseDense; /* MMIO for Alpha platform */
#endif
@@ -1355,7 +1355,7 @@ typedef struct {
Bool skipswitchcheck;
unsigned int VBFlagsInit;
DisplayModePtr currentModeLast;
IOADDRESS MyPIOOffset;
unsigned long MyPIOOffset;
Bool OverruleRanges;
Bool BenchMemCpy;
Bool NeedCopyFastVidCpy;

View File

@@ -69,8 +69,9 @@ typedef unsigned int BOOLEAN;
#define SISIOMEMTYPE
#ifdef SIS_LINUX_KERNEL
typedef unsigned long SISIOADDRESS;
#ifdef SIS_LINUX_KERNEL
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
#include <linux/types.h> /* Need __iomem */
#undef SISIOMEMTYPE
@@ -78,15 +79,6 @@ typedef unsigned long SISIOADDRESS;
#endif
#endif
#ifdef SIS_XORG_XF86
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
typedef unsigned long IOADDRESS;
typedef unsigned long SISIOADDRESS;
#else
typedef IOADDRESS SISIOADDRESS;
#endif
#endif
typedef enum _SIS_CHIP_TYPE {
SIS_VGALegacy = 0,
SIS_530,