Lines Matching +full:reg +full:- +full:shift
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2018 - Beniamino Galvani <b.galvani@gmail.com>
4 * (C) Copyright 2018 - BayLibre, SAS
14 unsigned int reg; member
20 .reg = (_reg), \
28 u8 shift; member
32 #define PMASK(width) GENMASK(width - 1, 0)
33 #define SETPMASK(width, shift) GENMASK(shift + width - 1, shift) argument
34 #define CLRPMASK(width, shift) (~SETPMASK(width, shift)) argument
36 #define PARM_GET(width, shift, reg) \ argument
37 (((reg) & SETPMASK(width, shift)) >> (shift))
38 #define PARM_SET(width, shift, reg, val) \ argument
39 (((reg) & CLRPMASK(width, shift)) | ((val) << (shift)))