Lines Matching refs:addr
100 * Returns the word read from nvram @addr.
147 * @addr: Address in NVRAM to read
149 * Returns the word read from nvram @addr.
152 qla2x00_get_nvram_word(struct qla_hw_data *ha, uint32_t addr)
157 nv_cmd = addr << 16;
181 * @addr: Address in NVRAM to write
185 qla2x00_write_nvram_word(struct qla_hw_data *ha, uint32_t addr, __le16 data)
203 nv_cmd = (addr << 16) | NV_WRITE_OP;
242 qla2x00_write_nvram_word_tmo(struct qla_hw_data *ha, uint32_t addr,
262 nv_cmd = (addr << 16) | NV_WRITE_OP;
453 qla24xx_read_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t *data)
458 wrt_reg_dword(®->flash_addr, addr & ~FARX_DATA_FLAG);
470 "Flash read dword at %x timeout.\n", addr);
496 qla24xx_write_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t data)
502 wrt_reg_dword(®->flash_addr, addr | FARX_DATA_FLAG);
512 "Flash write dword at %x timeout.\n", addr);
1999 * @addr: Address in flash to read
2003 * Returns the byte read from flash @addr.
2006 qla2x00_read_flash_byte(struct qla_hw_data *ha, uint32_t addr)
2018 bank_select |= addr >> 12 & 0xf0;
2023 wrt_reg_word(®->flash_address, (uint16_t)addr);
2030 if ((addr & BIT_16) && ((bank_select & CSR_FLASH_64K_BANK) == 0)) {
2034 } else if (((addr & BIT_16) == 0) &&
2045 WRT_REG_WORD_PIO(PIO_REG(ha, flash_address), (uint16_t)addr);
2053 wrt_reg_word(®->flash_address, (uint16_t)addr);
2063 * @addr: Address in flash to write
2067 qla2x00_write_flash_byte(struct qla_hw_data *ha, uint32_t addr, uint8_t data)
2077 bank_select |= addr >> 12 & 0xf0;
2082 wrt_reg_word(®->flash_address, (uint16_t)addr);
2091 if ((addr & BIT_16) && ((bank_select & CSR_FLASH_64K_BANK) == 0)) {
2095 } else if (((addr & BIT_16) == 0) &&
2104 WRT_REG_WORD_PIO(PIO_REG(ha, flash_address), (uint16_t)addr);
2107 wrt_reg_word(®->flash_address, (uint16_t)addr);
2117 * @addr: Address in flash to poll
2130 qla2x00_poll_flash(struct qla_hw_data *ha, uint32_t addr, uint8_t poll_data,
2142 flash_data = qla2x00_read_flash_byte(ha, addr);
2162 * @addr: Address in flash to program
2170 qla2x00_program_flash_address(struct qla_hw_data *ha, uint32_t addr,
2178 qla2x00_write_flash_byte(ha, addr, data);
2181 qla2x00_write_flash_byte(ha, addr, data);
2182 if (addr & 0x7e)
2188 qla2x00_write_flash_byte(ha, addr, data);
2195 return qla2x00_poll_flash(ha, addr, data, man_id, flash_id);
2235 * @addr: Flash sector to erase
2243 qla2x00_erase_flash_sector(struct qla_hw_data *ha, uint32_t addr,
2253 qla2x00_write_flash_byte(ha, addr & sec_mask, 0x10);
2255 qla2x00_write_flash_byte(ha, addr & sec_mask, 0x30);
2260 return qla2x00_poll_flash(ha, addr, 0x80, man_id, flash_id);
2354 uint32_t addr, midpoint;
2368 for (addr = offset, data = buf; addr < length; addr++, data++) {
2369 if (addr == midpoint) {
2374 *data = qla2x00_read_flash_byte(ha, addr);
2392 uint32_t addr, liter, sec_mask, rest_addr;
2517 for (addr = offset, liter = 0; liter < length; liter++,
2518 addr++) {
2521 if ((addr & rest_addr) == 0) {
2523 if (addr >= 0x10000UL) {
2524 if (((addr >> 12) & 0xf0) &&
2551 } else if (addr == ha->optrom_size / 2) {
2566 addr, sec_mask, man_id,
2578 addr == (rest_addr - 1)) {
2581 } else if (sec_number == 3 && (addr & 0x7ffe)) {
2587 if (qla2x00_program_flash_address(ha, addr, *data,