Lines Matching defs:cobalt

11 #include "cobalt-cpld.h"
15 static u16 cpld_read(struct cobalt *cobalt, u32 offset)
17 return cobalt_bus_read32(cobalt->bar1, ADRS(offset));
20 static void cpld_write(struct cobalt *cobalt, u32 offset, u16 val)
22 return cobalt_bus_write32(cobalt->bar1, ADRS(offset), val);
25 static void cpld_info_ver3(struct cobalt *cobalt)
32 cpld_read(cobalt, 0));
35 cpld_read(cobalt, 0x04));
38 cpld_read(cobalt, 0x08));
40 cpld_read(cobalt, 0x0c));
42 cpld_read(cobalt, 0x10));
44 cpld_read(cobalt, 0x14));
46 cpld_read(cobalt, 0x18));
48 cpld_read(cobalt, 0x1c));
50 cpld_read(cobalt, 0x20));
52 cpld_read(cobalt, 0x24));
55 cpld_read(cobalt, 0x28));
58 cpld_read(cobalt, 0x2c));
60 cpld_read(cobalt, 0x30));
63 cpld_read(cobalt, 0x34) / 4);
65 cpld_read(cobalt, 0x38) / 4);
66 rd = cpld_read(cobalt, 0x3c);
69 rd = cpld_read(cobalt, 0x40);
72 rd = cpld_read(cobalt, 0x44);
75 rd = cpld_read(cobalt, 0x48);
78 rd = cpld_read(cobalt, 0x4c);
81 rd = cpld_read(cobalt, 0x50);
84 rd = cpld_read(cobalt, 0x54);
89 void cobalt_cpld_status(struct cobalt *cobalt)
91 u32 rev = cpld_read(cobalt, 0x30);
97 cpld_info_ver3(cobalt);
228 bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsigned f_out)
263 clock_ctrl = cpld_read(cobalt, SI570_CLOCK_CTRL);
286 cpld_write(cobalt, SI570_CLOCK_CTRL,
290 cpld_write(cobalt, SI570_REG7, regs[0]);
291 cpld_write(cobalt, SI570_REG8, regs[1]);
292 cpld_write(cobalt, SI570_REG9, regs[2]);
293 cpld_write(cobalt, SI570_REG10, regs[3]);
294 cpld_write(cobalt, SI570_REG11, regs[4]);
295 cpld_write(cobalt, SI570_REG12, regs[5]);
296 cpld_write(cobalt, SI570_CLOCK_CTRL,
300 cpld_write(cobalt, SI570_CLOCK_CTRL,
304 read_regs[0] = cpld_read(cobalt, SI570_REG7);
305 read_regs[1] = cpld_read(cobalt, SI570_REG8);
306 read_regs[2] = cpld_read(cobalt, SI570_REG9);
307 read_regs[3] = cpld_read(cobalt, SI570_REG10);
308 read_regs[4] = cpld_read(cobalt, SI570_REG11);
309 read_regs[5] = cpld_read(cobalt, SI570_REG12);
310 cpld_write(cobalt, SI570_CLOCK_CTRL,
315 cpld_write(cobalt, SI570_CLOCK_CTRL,