Lines Matching refs:address
194 static int ezport_section_erase(struct spi_device *spi, u32 address) in ezport_section_erase() argument
196 u8 query[] = {EZPORT_CMD_SE, (address >> 16) & 0xff, (address >> 8) & 0xff, address & 0xff}; in ezport_section_erase()
199 dev_dbg(&spi->dev, "Ezport section erase @ 0x%06x...\n", address); in ezport_section_erase()
201 if (address & EZPORT_SECTOR_MASK) in ezport_section_erase()
215 static int ezport_flash_transfer(struct spi_device *spi, u32 address, in ezport_flash_transfer() argument
222 dev_dbg(&spi->dev, "EzPort write %zu bytes @ 0x%06x...\n", payload_size, address); in ezport_flash_transfer()
233 command[1] = address >> 16; in ezport_flash_transfer()
234 command[2] = address >> 8; in ezport_flash_transfer()
235 command[3] = address >> 0; in ezport_flash_transfer()
251 static int ezport_flash_compare(struct spi_device *spi, u32 address, in ezport_flash_compare() argument
263 buffer[1] = address >> 16; in ezport_flash_compare()
264 buffer[2] = address >> 8; in ezport_flash_compare()
265 buffer[3] = address >> 0; in ezport_flash_compare()
283 dev_dbg(&spi->dev, "Verification failure @ %06x", address); in ezport_flash_compare()
297 size_t address = 0; in ezport_firmware_compare_data() local
312 while (size - address > 0) { in ezport_firmware_compare_data()
313 transfer_size = min((size_t) EZPORT_TRANSFER_SIZE, size - address); in ezport_firmware_compare_data()
315 ret = ezport_flash_compare(spi, address, data+address, transfer_size); in ezport_firmware_compare_data()
319 address += transfer_size; in ezport_firmware_compare_data()
329 size_t address = 0; in ezport_firmware_flash_data() local
346 while (size - address > 0) { in ezport_firmware_flash_data()
347 if (!(address & EZPORT_SECTOR_MASK)) { in ezport_firmware_flash_data()
348 ret = ezport_section_erase(spi, address); in ezport_firmware_flash_data()
355 transfer_size = min((size_t) EZPORT_TRANSFER_SIZE, size - address); in ezport_firmware_flash_data()
357 ret = ezport_flash_transfer(spi, address, in ezport_firmware_flash_data()
358 data+address, transfer_size); in ezport_firmware_flash_data()
366 address += transfer_size; in ezport_firmware_flash_data()