diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-io.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-io.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-io.h b/drivers/media/video/cx18/cx18-io.h index 287a5e8bf67b..425244453ea7 100644 --- a/drivers/media/video/cx18/cx18-io.h +++ b/drivers/media/video/cx18/cx18-io.h | |||
@@ -133,6 +133,8 @@ static inline void cx18_writel(struct cx18 *cx, u32 val, void __iomem *addr) | |||
133 | cx18_writel_noretry(cx, val, addr); | 133 | cx18_writel_noretry(cx, val, addr); |
134 | } | 134 | } |
135 | 135 | ||
136 | void _cx18_writel_expect(struct cx18 *cx, u32 val, void __iomem *addr, | ||
137 | u32 eval, u32 mask); | ||
136 | 138 | ||
137 | static inline | 139 | static inline |
138 | void cx18_writew_noretry(struct cx18 *cx, u16 val, void __iomem *addr) | 140 | void cx18_writew_noretry(struct cx18 *cx, u16 val, void __iomem *addr) |
@@ -271,6 +273,21 @@ static inline void cx18_write_reg(struct cx18 *cx, u32 val, u32 reg) | |||
271 | cx18_write_reg_noretry(cx, val, reg); | 273 | cx18_write_reg_noretry(cx, val, reg); |
272 | } | 274 | } |
273 | 275 | ||
276 | static inline void _cx18_write_reg_expect(struct cx18 *cx, u32 val, u32 reg, | ||
277 | u32 eval, u32 mask) | ||
278 | { | ||
279 | _cx18_writel_expect(cx, val, cx->reg_mem + reg, eval, mask); | ||
280 | } | ||
281 | |||
282 | static inline void cx18_write_reg_expect(struct cx18 *cx, u32 val, u32 reg, | ||
283 | u32 eval, u32 mask) | ||
284 | { | ||
285 | if (cx18_retry_mmio) | ||
286 | _cx18_write_reg_expect(cx, val, reg, eval, mask); | ||
287 | else | ||
288 | cx18_write_reg_noretry(cx, val, reg); | ||
289 | } | ||
290 | |||
274 | 291 | ||
275 | static inline u32 cx18_read_reg_noretry(struct cx18 *cx, u32 reg) | 292 | static inline u32 cx18_read_reg_noretry(struct cx18 *cx, u32 reg) |
276 | { | 293 | { |