Lines Matching refs:addr
158 static int write_swreg_config(enum sw_reg reg_id, uint32_t addr, uint32_t data) in write_swreg_config() argument
163 cmd = BSTI_CMD(0x1, BSTI_WRITE, reg_id, addr, BSTI_COMMAND_TA, data); in write_swreg_config()
169 sw_reg_name[reg_id-1], addr); in write_swreg_config()
175 static int read_swreg_config(enum sw_reg reg_id, uint32_t addr, uint32_t *data) in read_swreg_config() argument
180 cmd = BSTI_CMD(0x1, BSTI_READ, reg_id, addr, BSTI_COMMAND_TA, PHY_REG0); in read_swreg_config()
186 sw_reg_name[reg_id-1], addr); in read_swreg_config()
227 int addr; in dump_swreg_firmware() local
232 for (addr = MIN_REG_ADDR; addr <= MAX_REG_ADDR; addr++) { in dump_swreg_firmware()
233 ret = read_swreg_config(reg_id, addr, &data); in dump_swreg_firmware()
235 ERROR("Failed to read offset %d\n", addr); in dump_swreg_firmware()
236 INFO("\t0x%x: 0x%04x\n", addr, data); in dump_swreg_firmware()
304 int addr; in swreg_firmware_update() local
310 for (addr = MAX_REG_ADDR; addr >= MIN_REG_ADDR; addr--) { in swreg_firmware_update()
311 ret = write_swreg_config(reg_id, addr, in swreg_firmware_update()
312 FM_DATA[reg_id - 1][addr]); in swreg_firmware_update()
344 for (addr = MIN_REG_ADDR; addr <= MAX_REG_ADDR; addr++) { in swreg_firmware_update()
345 ret = read_swreg_config(reg_id, addr, &data); in swreg_firmware_update()
347 (data != FM_DATA[reg_id - 1][addr]))) { in swreg_firmware_update()
349 sw_reg_name[reg_id - 1], addr); in swreg_firmware_update()
351 data, FM_DATA[reg_id - 1][addr]); in swreg_firmware_update()