Go to the documentation of this file.
22 #ifndef __STB0899_PRIV_H
23 #define __STB0899_PRIV_H
34 #define dprintk(x, y, z, format, arg...) do { \
36 if ((*x > FE_ERROR) && (*x > y)) \
37 printk(KERN_ERR "%s: " format "\n", __func__ , ##arg); \
38 else if ((*x > FE_NOTICE) && (*x > y)) \
39 printk(KERN_NOTICE "%s: " format "\n", __func__ , ##arg); \
40 else if ((*x > FE_INFO) && (*x > y)) \
41 printk(KERN_INFO "%s: " format "\n", __func__ , ##arg); \
42 else if ((*x > FE_DEBUG) && (*x > y)) \
43 printk(KERN_DEBUG "%s: " format "\n", __func__ , ##arg); \
46 printk(format, ##arg); \
50 #define INRANGE(val, x, y) (((x <= val) && (val <= y)) || \
51 ((y <= val) && (val <= x)) ? 1 : 0)
58 #define GETBYTE(x, y) (((x) >> (y)) & 0xff)
59 #define MAKEWORD32(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
60 #define MAKEWORD16(a, b) (((a) << 8) | (b))
62 #define LSB(x) ((x & 0xff))
63 #define MSB(y) ((y >> 8) & 0xff)
66 #define STB0899_GETFIELD(bitf, val) ((val >> STB0899_OFFST_##bitf) & ((1 << STB0899_WIDTH_##bitf) - 1))
69 #define STB0899_SETFIELD(mask, val, width, offset) (mask & (~(((1 << width) - 1) << \
71 ((1 << width) - 1)) << offset)
73 #define STB0899_SETFIELD_VAL(bitf, mask, val) (mask = (mask & (~(((1 << STB0899_WIDTH_##bitf) - 1) <<\
74 STB0899_OFFST_##bitf))) | \
75 (val << STB0899_OFFST_##bitf))
231 u32 stb0899_base_addr,
232 u16 stb0899_reg_offset);
248 u32 stb0899_base_addr,
249 u16 stb0899_reg_offset,
255 #define STB0899_READ_S2REG(DEVICE, REG) (_stb0899_read_s2reg(state, DEVICE, STB0899_BASE_##REG, STB0899_OFF0_##REG))
263 #endif //__STB0899_PRIV_H