Skip to content
Snippets Groups Projects
Commit 7ca12b97 authored by Nishanth Menon's avatar Nishanth Menon Committed by Tom Rini
Browse files

ARM: keystone2: psc-defs: use adequate () for macros


'#define X a | b' is better defined as '#define X (a | b)' for obvious
reasons.

Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 82ff21bd
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,9 @@
#define BOOTBITMASK(x, y) ((((((u32)1 << (((u32)x) - ((u32)y) + (u32)1)) - \
(u32)1)) << ((u32)y)))
#define BOOT_READ_BITFIELD(z, x, y) (((u32)z) & BOOTBITMASK(x, y)) >> (y)
#define BOOT_SET_BITFIELD(z, f, x, y) (((u32)z) & ~BOOTBITMASK(x, y)) | \
((((u32)f) << (y)) & BOOTBITMASK(x, y))
#define BOOT_READ_BITFIELD(z, x, y) ((((u32)z) & BOOTBITMASK(x, y)) >> (y))
#define BOOT_SET_BITFIELD(z, f, x, y) ((((u32)z) & ~BOOTBITMASK(x, y)) | \
((((u32)f) << (y)) & BOOTBITMASK(x, y)))
/* PDCTL */
#define PSC_REG_PDCTL_SET_NEXT(x, y) BOOT_SET_BITFIELD((x), (y), 0, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment