diff options
author | kem <kem> | 2001-04-06 17:53:32 +0000 |
---|---|---|
committer | kem <kem> | 2001-04-06 17:53:32 +0000 |
commit | d95729913540a637b66655271b83288368a59775 (patch) | |
tree | a82c7d65b419b23ae7e4546f465c327dd0f36f40 | |
parent | a6e72223ef5cf89c868113ef1ddf65bcc7e981b6 (diff) |
- Fix typoX_4_0_99_2-20010409-preimport
- Clean up some macros
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h | 40 | ||||
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h | 23 |
2 files changed, 40 insertions, 23 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h index fbc692298..0ef94e454 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.h @@ -385,36 +385,48 @@ extern int r128_cce_indirect( struct inode *inode, struct file *filp, #define R128_DEREF(reg) *(volatile u32 *)R128_ADDR( reg ) #ifdef __alpha__ -#define R128_READ(reg) (_R128_READ((u32 *)R128_ADDR(reg))) -static inline u32 _R128_READ(u32 *addr) { - mb(); - return *(volatile u32 *)addr; +#define R128_READ(reg) (_R128_READ((u32 *)R128_ADDR(reg))) +static inline u32 _R128_READ(u32 *addr) +{ + mb(); + return *(volatile u32 *)addr; } -#define R128_WRITE(reg,val) \ - do { wmb(); R128_DEREF(reg) = val; } while (0) +#define R128_WRITE(reg,val) \ +do { \ + wmb(); \ + R128_DEREF(reg) = val; \ +} while (0) #else #define R128_READ(reg) le32_to_cpu( R128_DEREF( reg ) ) -#define R128_WRITE(reg,val) do { R128_DEREF( reg ) = cpu_to_le32( val ); } while (0) +#define R128_WRITE(reg,val) \ +do { \ + R128_DEREF( reg ) = cpu_to_le32( val ); \ +} while (0) #endif #define R128_DEREF8(reg) *(volatile u8 *)R128_ADDR( reg ) #ifdef __alpha__ #define R128_READ8(reg) _R128_READ8((u8 *)R128_ADDR(reg)) -static inline u8 _R128_READ8(u8 *addr) { +static inline u8 _R128_READ8(u8 *addr) +{ mb(); return *(volatile u8 *)addr; } -#define R128_WRITE8(reg,val) \ - do { wmb(); R128_DEREF8(reg) = val; } while (0) +#define R128_WRITE8(reg,val) \ +do { \ + wmb(); \ + R128_DEREF8(reg) = val; \ +} while (0) #else #define R128_READ8(reg) R128_DEREF8( reg ) #define R128_WRITE8(reg,val) do { R128_DEREF8( reg ) = val; } while (0) #endif -#define R128_WRITE_PLL(addr,val) \ -do { \ - R128_WRITE8(R128_CLOCK_CNTL_INDEX, ((addr) & 0x1f) | R128_PLL_WR_EN); \ - R128_WRITE(R128_CLOCK_CNTL_DATA, (val)); \ +#define R128_WRITE_PLL(addr,val) \ +do { \ + R128_WRITE8(R128_CLOCK_CNTL_INDEX, \ + ((addr) & 0x1f) | R128_PLL_WR_EN); \ + R128_WRITE(R128_CLOCK_CNTL_DATA, (val)); \ } while (0) extern int R128_READ_PLL(drm_device_t *dev, int addr); diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h index 249358477..ee5e113b1 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_drv.h @@ -521,13 +521,15 @@ extern int radeon_cp_indirect( struct inode *inode, struct file *filp, #define RADEON_DEREF(reg) *(volatile u32 *)RADEON_ADDR( reg ) #ifdef __alpha__ #define RADEON_READ(reg) (_RADEON_READ((u32 *)RADEON_ADDR( reg ))) -static inline u32 _RADEON_READ(u32 *addr) { +static inline u32 _RADEON_READ(u32 *addr) +{ mb(); return *(volatile u32 *)addr; } -#define RADEON_WRITE(reg,val) do { \ - wmb(); - RADEON_DEREF(reg) = val; +#define RADEON_WRITE(reg,val) \ +do { \ + wmb(); \ + RADEON_DEREF(reg) = val; \ } while (0) #else #define RADEON_READ(reg) RADEON_DEREF( reg ) @@ -537,20 +539,23 @@ static inline u32 _RADEON_READ(u32 *addr) { #define RADEON_DEREF8(reg) *(volatile u8 *)RADEON_ADDR( reg ) #ifdef __alpha__ #define RADEON_READ8(reg) _RADEON_READ8((u8 *)RADEON_ADDR( reg )) -static inline u8 _RADEON_READ8(u8 *addr) { +static inline u8 _RADEON_READ8(u8 *addr) +{ mb(); return *(volatile u8 *)addr; } -#define RADEON_WRITE8(reg,val) do { \ - wmb(); - RADEON_DEREF8( reg ) = val; +#define RADEON_WRITE8(reg,val) \ +do { \ + wmb(); \ + RADEON_DEREF8( reg ) = val; \ } while (0) #else #define RADEON_READ8(reg) RADEON_DEREF8( reg ) #define RADEON_WRITE8(reg, val) do { RADEON_DEREF8( reg ) = val; } while (0) #endif -#define RADEON_WRITE_PLL( addr, val ) do { \ +#define RADEON_WRITE_PLL( addr, val ) \ +do { \ RADEON_WRITE8( RADEON_CLOCK_CNTL_INDEX, \ ((addr) & 0x1f) | RADEON_PLL_WR_EN ); \ RADEON_WRITE( RADEON_CLOCK_CNTL_DATA, (val) ); \ |