53 cx18_raw_writel_noretry(cx, val, addr);
54 if (val == cx18_raw_readl(cx, addr))
60 static inline u32 cx18_readl(
struct cx18 *cx,
const void __iomem *addr)
66 void cx18_writel_noretry(
struct cx18 *cx,
u32 val,
void __iomem *addr)
71 static inline void cx18_writel(
struct cx18 *cx,
u32 val,
void __iomem *addr)
75 cx18_writel_noretry(cx, val, addr);
76 if (val == cx18_readl(cx, addr))
82 void cx18_writel_expect(
struct cx18 *cx,
u32 val,
void __iomem *addr,
89 cx18_writel_noretry(cx, val, addr);
90 r = cx18_readl(cx, addr);
91 if (r == 0xffffffff && eval != 0xffffffff)
93 if (eval == (r & mask))
98 static inline u16 cx18_readw(
struct cx18 *cx,
const void __iomem *addr)
104 void cx18_writew_noretry(
struct cx18 *cx,
u16 val,
void __iomem *addr)
109 static inline void cx18_writew(
struct cx18 *cx,
u16 val,
void __iomem *addr)
113 cx18_writew_noretry(cx, val, addr);
114 if (val == cx18_readw(cx, addr))
119 static inline u8 cx18_readb(
struct cx18 *cx,
const void __iomem *addr)
125 void cx18_writeb_noretry(
struct cx18 *cx,
u8 val,
void __iomem *addr)
130 static inline void cx18_writeb(
struct cx18 *cx,
u8 val,
void __iomem *addr)
134 cx18_writeb_noretry(cx, val, addr);
135 if (val == cx18_readb(cx, addr))
141 void cx18_memcpy_fromio(
struct cx18 *cx,
void *to,
151 static inline void cx18_write_reg_noretry(
struct cx18 *cx,
u32 val,
u32 reg)
153 cx18_writel_noretry(cx, val, cx->
reg_mem + reg);
156 static inline void cx18_write_reg(
struct cx18 *cx,
u32 val,
u32 reg)
158 cx18_writel(cx, val, cx->
reg_mem + reg);
161 static inline void cx18_write_reg_expect(
struct cx18 *cx,
u32 val,
u32 reg,
164 cx18_writel_expect(cx, val, cx->
reg_mem + reg, eval, mask);
169 return cx18_readl(cx, cx->
reg_mem + reg);
174 static inline void cx18_write_enc(
struct cx18 *cx,
u32 val,
u32 addr)
176 cx18_writel(cx, val, cx->
enc_mem + addr);
179 static inline u32 cx18_read_enc(
struct cx18 *cx,
u32 addr)
181 return cx18_readl(cx, cx->
enc_mem + addr);