aboutsummaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/mmio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/device/mmio.h b/src/include/device/mmio.h
index b4f2ab639f..a725a62953 100644
--- a/src/include/device/mmio.h
+++ b/src/include/device/mmio.h
@@ -131,10 +131,10 @@ static inline void buffer_to_fifo32(void *buffer, size_t size, void *fifo,
#define DEFINE_BIT(name, bit) DEFINE_BITFIELD(name, bit, bit)
#define _BF_MASK(name, value) \
- (((1 << name##_BITFIELD_SIZE) - 1) << name##_BITFIELD_SHIFT)
+ ((u32)((1ULL << name##_BITFIELD_SIZE) - 1) << name##_BITFIELD_SHIFT)
#define _BF_VALUE(name, value) \
- ((value) << name##_BITFIELD_SHIFT)
+ (((u32)(value) << name##_BITFIELD_SHIFT) & _BF_MASK(name, 0))
#define _BF_APPLY1(op, name, value, ...) (op(name, value))
#define _BF_APPLY2(op, name, value, ...) ((op(name, value)) | \