Lines Matching defs:cobalt

3  *  cobalt driver internal defines and structures
41 /* Number of cobalt device nodes. */
45 /* Number of cobalt device streams. */
124 #define COBALT_CVI(cobalt, c) \
125 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE)
126 #define COBALT_CVI_VMR(cobalt, c) \
127 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x100)
128 #define COBALT_CVI_EVCNT(cobalt, c) \
129 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x200)
130 #define COBALT_CVI_FREEWHEEL(cobalt, c) \
131 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x300)
132 #define COBALT_CVI_CLK_LOSS(cobalt, c) \
133 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x400)
134 #define COBALT_CVI_PACKER(cobalt, c) \
135 (cobalt->bar1 + COBALT_VID_BASE + (c) * COBALT_VID_SIZE + 0x500)
137 #define COBALT_TX_BASE(cobalt) (cobalt->bar1 + COBALT_VID_BASE + 0x5000)
158 #define cobalt_err(fmt, arg...) v4l2_err(&cobalt->v4l2_dev, fmt, ## arg)
159 #define cobalt_warn(fmt, arg...) v4l2_warn(&cobalt->v4l2_dev, fmt, ## arg)
160 #define cobalt_info(fmt, arg...) v4l2_info(&cobalt->v4l2_dev, fmt, ## arg)
162 v4l2_dbg(level, cobalt_debug, &cobalt->v4l2_dev, fmt, ## arg)
164 struct cobalt;
169 struct cobalt *cobalt;
243 struct cobalt *cobalt;
249 /* Struct to hold info about cobalt cards */
250 struct cobalt {
292 static inline struct cobalt *to_cobalt(struct v4l2_device *v4l2_dev)
294 return container_of(v4l2_dev, struct cobalt, v4l2_dev);
297 static inline void cobalt_write_bar0(struct cobalt *cobalt, u32 reg, u32 val)
299 iowrite32(val, cobalt->bar0 + reg);
302 static inline u32 cobalt_read_bar0(struct cobalt *cobalt, u32 reg)
304 return ioread32(cobalt->bar0 + reg);
307 static inline void cobalt_write_bar1(struct cobalt *cobalt, u32 reg, u32 val)
309 iowrite32(val, cobalt->bar1 + reg);
312 static inline u32 cobalt_read_bar1(struct cobalt *cobalt, u32 reg)
314 return ioread32(cobalt->bar1 + reg);
317 static inline u32 cobalt_g_sysctrl(struct cobalt *cobalt)
319 return cobalt_read_bar1(cobalt, COBALT_SYS_CTRL_BASE);
322 static inline void cobalt_s_bit_sysctrl(struct cobalt *cobalt,
327 mutex_lock(&cobalt->pci_lock);
328 ctrl = cobalt_read_bar1(cobalt, COBALT_SYS_CTRL_BASE);
329 cobalt_write_bar1(cobalt, COBALT_SYS_CTRL_BASE,
331 mutex_unlock(&cobalt->pci_lock);
334 static inline u32 cobalt_g_sysstat(struct cobalt *cobalt)
336 return cobalt_read_bar1(cobalt, COBALT_SYS_STAT_BASE);
371 void cobalt_pcie_status_show(struct cobalt *cobalt);