Lines Matching refs:cobalt
27 static u16 cpld_read(struct cobalt *cobalt, u32 offset) in cpld_read() argument
29 return cobalt_bus_read32(cobalt->bar1, ADRS(offset)); in cpld_read()
32 static void cpld_write(struct cobalt *cobalt, u32 offset, u16 val) in cpld_write() argument
34 return cobalt_bus_write32(cobalt->bar1, ADRS(offset), val); in cpld_write()
37 static void cpld_info_ver3(struct cobalt *cobalt) in cpld_info_ver3() argument
44 cpld_read(cobalt, 0)); in cpld_info_ver3()
47 cpld_read(cobalt, 0x04)); in cpld_info_ver3()
50 cpld_read(cobalt, 0x08)); in cpld_info_ver3()
52 cpld_read(cobalt, 0x0c)); in cpld_info_ver3()
54 cpld_read(cobalt, 0x10)); in cpld_info_ver3()
56 cpld_read(cobalt, 0x14)); in cpld_info_ver3()
58 cpld_read(cobalt, 0x18)); in cpld_info_ver3()
60 cpld_read(cobalt, 0x1c)); in cpld_info_ver3()
62 cpld_read(cobalt, 0x20)); in cpld_info_ver3()
64 cpld_read(cobalt, 0x24)); in cpld_info_ver3()
67 cpld_read(cobalt, 0x28)); in cpld_info_ver3()
70 cpld_read(cobalt, 0x2c)); in cpld_info_ver3()
72 cpld_read(cobalt, 0x30)); in cpld_info_ver3()
75 cpld_read(cobalt, 0x34) / 4); in cpld_info_ver3()
77 cpld_read(cobalt, 0x38) / 4); in cpld_info_ver3()
78 rd = cpld_read(cobalt, 0x3c); in cpld_info_ver3()
81 rd = cpld_read(cobalt, 0x40); in cpld_info_ver3()
84 rd = cpld_read(cobalt, 0x44); in cpld_info_ver3()
87 rd = cpld_read(cobalt, 0x48); in cpld_info_ver3()
90 rd = cpld_read(cobalt, 0x4c); in cpld_info_ver3()
93 rd = cpld_read(cobalt, 0x50); in cpld_info_ver3()
96 rd = cpld_read(cobalt, 0x54); in cpld_info_ver3()
101 void cobalt_cpld_status(struct cobalt *cobalt) in cobalt_cpld_status() argument
103 u32 rev = cpld_read(cobalt, 0x30); in cobalt_cpld_status()
109 cpld_info_ver3(cobalt); in cobalt_cpld_status()
240 bool cobalt_cpld_set_freq(struct cobalt *cobalt, unsigned f_out) in cobalt_cpld_set_freq() argument
275 clock_ctrl = cpld_read(cobalt, SI570_CLOCK_CTRL); in cobalt_cpld_set_freq()
298 cpld_write(cobalt, SI570_CLOCK_CTRL, in cobalt_cpld_set_freq()
302 cpld_write(cobalt, SI570_REG7, regs[0]); in cobalt_cpld_set_freq()
303 cpld_write(cobalt, SI570_REG8, regs[1]); in cobalt_cpld_set_freq()
304 cpld_write(cobalt, SI570_REG9, regs[2]); in cobalt_cpld_set_freq()
305 cpld_write(cobalt, SI570_REG10, regs[3]); in cobalt_cpld_set_freq()
306 cpld_write(cobalt, SI570_REG11, regs[4]); in cobalt_cpld_set_freq()
307 cpld_write(cobalt, SI570_REG12, regs[5]); in cobalt_cpld_set_freq()
308 cpld_write(cobalt, SI570_CLOCK_CTRL, in cobalt_cpld_set_freq()
312 cpld_write(cobalt, SI570_CLOCK_CTRL, in cobalt_cpld_set_freq()
316 read_regs[0] = cpld_read(cobalt, SI570_REG7); in cobalt_cpld_set_freq()
317 read_regs[1] = cpld_read(cobalt, SI570_REG8); in cobalt_cpld_set_freq()
318 read_regs[2] = cpld_read(cobalt, SI570_REG9); in cobalt_cpld_set_freq()
319 read_regs[3] = cpld_read(cobalt, SI570_REG10); in cobalt_cpld_set_freq()
320 read_regs[4] = cpld_read(cobalt, SI570_REG11); in cobalt_cpld_set_freq()
321 read_regs[5] = cpld_read(cobalt, SI570_REG12); in cobalt_cpld_set_freq()
322 cpld_write(cobalt, SI570_CLOCK_CTRL, in cobalt_cpld_set_freq()
327 cpld_write(cobalt, SI570_CLOCK_CTRL, in cobalt_cpld_set_freq()