diff options
author | Dave Airlie <airlied@linux.ie> | 2006-01-02 05:52:17 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-02 05:52:17 +0000 |
commit | 781d96c61fdcc5bafe65053878d351100bf130e1 (patch) | |
tree | df43315a0f0425973ca681105dc6c00eb2c01663 /linux-core | |
parent | 8fef6fe4f02838447edbf6e99fd16df31a486772 (diff) |
use common read/write routines
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/i830_drv.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/linux-core/i830_drv.h b/linux-core/i830_drv.h index 1f6afe10..b592eaab 100644 --- a/linux-core/i830_drv.h +++ b/linux-core/i830_drv.h @@ -144,15 +144,10 @@ extern void i830_driver_reclaim_buffers_locked(drm_device_t * dev, extern int i830_driver_dma_quiescent(drm_device_t * dev); extern int i830_driver_device_is_agp(drm_device_t * dev); -#define I830_BASE(reg) ((unsigned long) \ - dev_priv->mmio_map->handle) -#define I830_ADDR(reg) (I830_BASE(reg) + reg) -#define I830_DEREF(reg) *(__volatile__ unsigned int *)I830_ADDR(reg) -#define I830_READ(reg) readl((volatile u32 *)I830_ADDR(reg)) -#define I830_WRITE(reg,val) writel(val, (volatile u32 *)I830_ADDR(reg)) -#define I830_DEREF16(reg) *(__volatile__ u16 *)I830_ADDR(reg) -#define I830_READ16(reg) I830_DEREF16(reg) -#define I830_WRITE16(reg,val) do { I830_DEREF16(reg) = val; } while (0) +#define I830_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) +#define I830_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, reg, val) +#define I830_READ16(reg) DRM_READ16(dev_priv->mmio_map, reg) +#define I830_WRITE16(reg,val) DRM_WRITE16(dev_priv->mmio_map, reg, val) #define I830_VERBOSE 0 |