Lines Matching refs:addr
112 int rt5677_spi_read(u32 addr, void *rxbuf, size_t len) in rt5677_spi_read() argument
127 if ((addr & 3) || (len & 3)) { in rt5677_spi_read()
128 dev_err(&g_spi->dev, "Bad read align 0x%x(%zu)\n", addr, len); in rt5677_spi_read()
141 spi_cmd = rt5677_spi_select_cmd(true, (addr + offset) & 7, in rt5677_spi_read()
146 header[1] = ((addr + offset) & 0xff000000) >> 24; in rt5677_spi_read()
147 header[2] = ((addr + offset) & 0x00ff0000) >> 16; in rt5677_spi_read()
148 header[3] = ((addr + offset) & 0x0000ff00) >> 8; in rt5677_spi_read()
149 header[4] = ((addr + offset) & 0x000000ff) >> 0; in rt5677_spi_read()
166 int rt5677_spi_write(u32 addr, const void *txbuf, size_t len) in rt5677_spi_write() argument
181 if (addr & 3) { in rt5677_spi_write()
182 dev_err(&g_spi->dev, "Bad write align 0x%x(%zu)\n", addr, len); in rt5677_spi_write()
192 spi_cmd = rt5677_spi_select_cmd(false, (addr + offset) & 7, in rt5677_spi_write()
197 buf[1] = ((addr + offset) & 0xff000000) >> 24; in rt5677_spi_write()
198 buf[2] = ((addr + offset) & 0x00ff0000) >> 16; in rt5677_spi_write()
199 buf[3] = ((addr + offset) & 0x0000ff00) >> 8; in rt5677_spi_write()
200 buf[4] = ((addr + offset) & 0x000000ff) >> 0; in rt5677_spi_write()
215 int rt5677_spi_write_firmware(u32 addr, const struct firmware *fw) in rt5677_spi_write_firmware() argument
217 return rt5677_spi_write(addr, fw->data, fw->size); in rt5677_spi_write_firmware()