diff options
author | Dave Airlie <airlied@linux.ie> | 2006-02-18 02:53:36 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-02-18 02:53:36 +0000 |
commit | 4791dc885619b1a6460c1fcf48f648945feea4d3 (patch) | |
tree | c8836b6b99a1bc7f2c455d2ad4089939f5098118 /linux-core/drm_os_linux.h | |
parent | 585f34c3e533cafd687beba161d6d0379b52bb47 (diff) |
major realigment of DRM CVS with kernel code, makes integration much easier
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r-- | linux-core/drm_os_linux.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h index d3fb67e6..42700978 100644 --- a/linux-core/drm_os_linux.h +++ b/linux-core/drm_os_linux.h @@ -16,18 +16,21 @@ #define DRM_SUSER(p) capable(CAP_SYS_ADMIN) #define DRM_UDELAY(d) udelay(d) #if LINUX_VERSION_CODE <= 0x020608 /* KERNEL_VERSION(2,6,8) */ +#ifndef __iomem +#define __iomem +#endif /** Read a byte from a MMIO region */ -#define DRM_READ8(map, offset) readb(((unsigned long)(map)->handle) + (offset)) +#define DRM_READ8(map, offset) readb(((void __iomem *)(map)->handle) + (offset)) /** Read a word from a MMIO region */ -#define DRM_READ16(map, offset) readw(((unsigned long)(map)->handle) + (offset)) +#define DRM_READ16(map, offset) readw(((void __iomem *)(map)->handle) + (offset)) /** Read a dword from a MMIO region */ -#define DRM_READ32(map, offset) readl(((unsigned long)(map)->handle) + (offset)) +#define DRM_READ32(map, offset) readl(((void __iomem *)(map)->handle) + (offset)) /** Write a byte into a MMIO region */ -#define DRM_WRITE8(map, offset, val) writeb(val, ((unsigned long)(map)->handle) + (offset)) +#define DRM_WRITE8(map, offset, val) writeb(val, ((void __iomem *)(map)->handle) + (offset)) /** Write a word into a MMIO region */ -#define DRM_WRITE16(map, offset, val) writew(val, ((unsigned long)(map)->handle) + (offset)) +#define DRM_WRITE16(map, offset, val) writew(val, ((void __iomem *)(map)->handle) + (offset)) /** Write a dword into a MMIO region */ -#define DRM_WRITE32(map, offset, val) writel(val, ((unsigned long)(map)->handle) + (offset)) +#define DRM_WRITE32(map, offset, val) writel(val, ((void __iomem *)(map)->handle) + (offset)) #else /** Read a byte from a MMIO region */ #define DRM_READ8(map, offset) readb((map)->handle + (offset)) |