diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-07-13 02:28:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-07-25 07:13:16 -0400 |
commit | a0533fbf8778991f9a978656cff0d301322d37e2 (patch) | |
tree | e0bfe4922e7418f174231b45bd4f3951ab240da3 /drivers/gpu/drm/radeon/radeon.h | |
parent | 62cb70118c4efabb3c0a6f962168ddcad4344eef (diff) |
drm/radeon: Remove a bunch of useless _iomem casts
Just defining rdev->rmmio properly in the first place should do
the trick. In some cases, the cast were also complete dups as
the original variable was already of the right type.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index ec534f52408a..ef37a9b5a3cc 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1177,7 +1177,7 @@ struct radeon_device { | |||
1177 | /* Register mmio */ | 1177 | /* Register mmio */ |
1178 | resource_size_t rmmio_base; | 1178 | resource_size_t rmmio_base; |
1179 | resource_size_t rmmio_size; | 1179 | resource_size_t rmmio_size; |
1180 | void *rmmio; | 1180 | void __iomem *rmmio; |
1181 | radeon_rreg_t mc_rreg; | 1181 | radeon_rreg_t mc_rreg; |
1182 | radeon_wreg_t mc_wreg; | 1182 | radeon_wreg_t mc_wreg; |
1183 | radeon_rreg_t pll_rreg; | 1183 | radeon_rreg_t pll_rreg; |
@@ -1254,20 +1254,20 @@ int radeon_gpu_wait_for_idle(struct radeon_device *rdev); | |||
1254 | static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg) | 1254 | static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg) |
1255 | { | 1255 | { |
1256 | if (reg < rdev->rmmio_size) | 1256 | if (reg < rdev->rmmio_size) |
1257 | return readl(((void __iomem *)rdev->rmmio) + reg); | 1257 | return readl((rdev->rmmio) + reg); |
1258 | else { | 1258 | else { |
1259 | writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX); | 1259 | writel(reg, (rdev->rmmio) + RADEON_MM_INDEX); |
1260 | return readl(((void __iomem *)rdev->rmmio) + RADEON_MM_DATA); | 1260 | return readl((rdev->rmmio) + RADEON_MM_DATA); |
1261 | } | 1261 | } |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) | 1264 | static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) |
1265 | { | 1265 | { |
1266 | if (reg < rdev->rmmio_size) | 1266 | if (reg < rdev->rmmio_size) |
1267 | writel(v, ((void __iomem *)rdev->rmmio) + reg); | 1267 | writel(v, (rdev->rmmio) + reg); |
1268 | else { | 1268 | else { |
1269 | writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX); | 1269 | writel(reg, (rdev->rmmio) + RADEON_MM_INDEX); |
1270 | writel(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA); | 1270 | writel(v, (rdev->rmmio) + RADEON_MM_DATA); |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
1273 | 1273 | ||
@@ -1299,10 +1299,10 @@ static inline void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v) | |||
1299 | /* | 1299 | /* |
1300 | * Registers read & write functions. | 1300 | * Registers read & write functions. |
1301 | */ | 1301 | */ |
1302 | #define RREG8(reg) readb(((void __iomem *)rdev->rmmio) + (reg)) | 1302 | #define RREG8(reg) readb((rdev->rmmio) + (reg)) |
1303 | #define WREG8(reg, v) writeb(v, ((void __iomem *)rdev->rmmio) + (reg)) | 1303 | #define WREG8(reg, v) writeb(v, (rdev->rmmio) + (reg)) |
1304 | #define RREG16(reg) readw(((void __iomem *)rdev->rmmio) + (reg)) | 1304 | #define RREG16(reg) readw((rdev->rmmio) + (reg)) |
1305 | #define WREG16(reg, v) writew(v, ((void __iomem *)rdev->rmmio) + (reg)) | 1305 | #define WREG16(reg, v) writew(v, (rdev->rmmio) + (reg)) |
1306 | #define RREG32(reg) r100_mm_rreg(rdev, (reg)) | 1306 | #define RREG32(reg) r100_mm_rreg(rdev, (reg)) |
1307 | #define DREG32(reg) printk(KERN_INFO "REGISTER: " #reg " : 0x%08X\n", r100_mm_rreg(rdev, (reg))) | 1307 | #define DREG32(reg) printk(KERN_INFO "REGISTER: " #reg " : 0x%08X\n", r100_mm_rreg(rdev, (reg))) |
1308 | #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v)) | 1308 | #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v)) |