1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/include/mach/bitfield.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #ifndef __MACH_PUV3_BITFIELD_H__
10 #define __MACH_PUV3_BITFIELD_H__
13 #define UData(Data) ((unsigned long) (Data))
15 #define UData(Data) (Data)
18 #define FIELD(val, vmask, vshift) (((val) & ((UData(1) << (vmask)) - 1)) << (vshift))
19 #define FMASK(vmask, vshift) (((UData(1) << (vmask)) - 1) << (vshift))
21 #endif /* __MACH_PUV3_BITFIELD_H__ */