Lines Matching refs:cobalt
135 #define COBALT_CVI(cobalt, c) \ argument
136 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE)
137 #define COBALT_CVI_VMR(cobalt, c) \ argument
138 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x100)
139 #define COBALT_CVI_EVCNT(cobalt, c) \ argument
140 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x200)
141 #define COBALT_CVI_FREEWHEEL(cobalt, c) \ argument
142 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x300)
143 #define COBALT_CVI_CLK_LOSS(cobalt, c) \ argument
144 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x400)
145 #define COBALT_CVI_PACKER(cobalt, c) \ argument
146 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x500)
148 #define COBALT_TX_BASE(cobalt) (cobalt->bar1 + COBALT_VID_BASE + 0x5000) argument
169 #define cobalt_err(fmt, arg...) v4l2_err(&cobalt->v4l2_dev, fmt, ## arg)
170 #define cobalt_warn(fmt, arg...) v4l2_warn(&cobalt->v4l2_dev, fmt, ## arg)
171 #define cobalt_info(fmt, arg...) v4l2_info(&cobalt->v4l2_dev, fmt, ## arg)
173 v4l2_dbg(level, cobalt_debug, &cobalt->v4l2_dev, fmt, ## arg)
175 struct cobalt;
180 struct cobalt *cobalt; member
254 struct cobalt *cobalt; member
261 struct cobalt { struct
304 static inline struct cobalt *to_cobalt(struct v4l2_device *v4l2_dev) in to_cobalt() argument
306 return container_of(v4l2_dev, struct cobalt, v4l2_dev); in to_cobalt()
309 static inline void cobalt_write_bar0(struct cobalt *cobalt, u32 reg, u32 val) in cobalt_write_bar0() argument
311 iowrite32(val, cobalt->bar0 + reg); in cobalt_write_bar0()
314 static inline u32 cobalt_read_bar0(struct cobalt *cobalt, u32 reg) in cobalt_read_bar0() argument
316 return ioread32(cobalt->bar0 + reg); in cobalt_read_bar0()
319 static inline void cobalt_write_bar1(struct cobalt *cobalt, u32 reg, u32 val) in cobalt_write_bar1() argument
321 iowrite32(val, cobalt->bar1 + reg); in cobalt_write_bar1()
324 static inline u32 cobalt_read_bar1(struct cobalt *cobalt, u32 reg) in cobalt_read_bar1() argument
326 return ioread32(cobalt->bar1 + reg); in cobalt_read_bar1()
329 static inline u32 cobalt_g_sysctrl(struct cobalt *cobalt) in cobalt_g_sysctrl() argument
331 return cobalt_read_bar1(cobalt, COBALT_SYS_CTRL_BASE); in cobalt_g_sysctrl()
334 static inline void cobalt_s_bit_sysctrl(struct cobalt *cobalt, in cobalt_s_bit_sysctrl() argument
337 u32 ctrl = cobalt_read_bar1(cobalt, COBALT_SYS_CTRL_BASE); in cobalt_s_bit_sysctrl()
339 cobalt_write_bar1(cobalt, COBALT_SYS_CTRL_BASE, in cobalt_s_bit_sysctrl()
343 static inline u32 cobalt_g_sysstat(struct cobalt *cobalt) in cobalt_g_sysstat() argument
345 return cobalt_read_bar1(cobalt, COBALT_SYS_STAT_BASE); in cobalt_g_sysstat()
380 void cobalt_pcie_status_show(struct cobalt *cobalt);