patch-2.4.6 linux/drivers/char/drm/r128_drv.h
Next file: linux/drivers/char/drm/radeon_bufs.c
Previous file: linux/drivers/char/drm/proc.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Wed Jun 20 21:00:55 2001
- Orig file:
v2.4.5/linux/drivers/char/drm/r128_drv.h
- Orig date:
Fri Mar 2 18:38:37 2001
diff -u --recursive --new-file v2.4.5/linux/drivers/char/drm/r128_drv.h linux/drivers/char/drm/r128_drv.h
@@ -385,16 +385,14 @@
#define R128_MAX_VB_VERTS (0xffff)
-#define R128_BASE(reg) ((u32)(dev_priv->mmio->handle))
+#define R128_BASE(reg) ((unsigned long)(dev_priv->mmio->handle))
#define R128_ADDR(reg) (R128_BASE(reg) + reg)
-#define R128_DEREF(reg) *(__volatile__ int *)R128_ADDR(reg)
-#define R128_READ(reg) R128_DEREF(reg)
-#define R128_WRITE(reg,val) do { R128_DEREF(reg) = val; } while (0)
+#define R128_READ(reg) readl(R128_ADDR(reg))
+#define R128_WRITE(reg,val) writel(val,R128_ADDR(reg))
-#define R128_DEREF8(reg) *(__volatile__ char *)R128_ADDR(reg)
-#define R128_READ8(reg) R128_DEREF8(reg)
-#define R128_WRITE8(reg,val) do { R128_DEREF8(reg) = val; } while (0)
+#define R128_READ8(reg) readb(R128_ADDR(reg))
+#define R128_WRITE8(reg,val) writeb(val,R128_ADDR(reg))
#define R128_WRITE_PLL(addr,val) \
do { \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)