diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-04-14 01:26:19 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-04-22 10:39:12 -0400 |
commit | d5169fc4ccfecbfdf3b882be0d2cdf8b057b2eae (patch) | |
tree | bb1aefdfe83d2dc5c4a40fcf9acc34a467c5fe6e /drivers/gpu/drm/radeon/radeon.h | |
parent | d7c605a20ee86a4e8f19ca7b33f7c4f7ba0468bc (diff) | |
download | lwn-d5169fc4ccfecbfdf3b882be0d2cdf8b057b2eae.tar.gz lwn-d5169fc4ccfecbfdf3b882be0d2cdf8b057b2eae.zip |
drm/radeon: add helpers for masking and setting bits in regs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 18904fb83d3a..5020c7c9b7cb 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -1741,6 +1741,8 @@ void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v); tmp_ |= ((val) & ~(mask)); \ WREG32(reg, tmp_); \ } while (0) +#define WREG32_AND(reg, and) WREG32_P(reg, 0, and) +#define WREG32_OR(reg, or) WREG32_P(reg, or, ~or) #define WREG32_PLL_P(reg, val, mask) \ do { \ uint32_t tmp_ = RREG32_PLL(reg); \ |