Lines Matching refs:qspi_dev
62 alt_qspi_controller2_dev qspi_dev; member
78 alt_qspi_controller2_dev *qspi_dev = &flash_cfg->qspi_dev; in flash_nios2_qspi_erase() local
95 if (((offset + len) > qspi_dev->data_end) || in flash_nios2_qspi_erase()
103 for (i = offset/qspi_dev->sector_size; in flash_nios2_qspi_erase()
104 i < qspi_dev->number_of_sectors; i++) { in flash_nios2_qspi_erase()
116 block_offset = erase_offset & ~(qspi_dev->sector_size - 1); in flash_nios2_qspi_erase()
124 length_to_erase = MIN(qspi_dev->sector_size - offset_in_block, in flash_nios2_qspi_erase()
128 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_erase()
131 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_erase()
145 flag_status = IORD_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_erase()
186 alt_qspi_controller2_dev *qspi_dev = &flash_cfg->qspi_dev; in flash_nios2_qspi_write_block() local
250 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_block()
255 IOWR_32DIRECT(qspi_dev->data_base, write_offset, word_to_write); in flash_nios2_qspi_write_block()
258 flag_status = IORD_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_block()
283 alt_qspi_controller2_dev *qspi_dev = &flash_cfg->qspi_dev; in flash_nios2_qspi_write() local
300 if ((data == NULL) || ((offset + len) > qspi_dev->data_end) || in flash_nios2_qspi_write()
308 for (i = offset/qspi_dev->sector_size; in flash_nios2_qspi_write()
309 i < qspi_dev->number_of_sectors; i++) { in flash_nios2_qspi_write()
320 block_offset = write_offset & ~(qspi_dev->sector_size - 1); in flash_nios2_qspi_write()
328 length_to_write = MIN(qspi_dev->sector_size - offset_in_block, in flash_nios2_qspi_write()
360 alt_qspi_controller2_dev *qspi_dev = &flash_cfg->qspi_dev; in flash_nios2_qspi_read() local
370 if ((data == NULL) || (offset < qspi_dev->data_base) || in flash_nios2_qspi_read()
371 ((offset + len) > qspi_dev->data_end)) { in flash_nios2_qspi_read()
391 word_to_read = IORD_32DIRECT(qspi_dev->data_base, read_offset); in flash_nios2_qspi_read()
410 word_to_read = IORD_32DIRECT(qspi_dev->data_base, read_offset); in flash_nios2_qspi_read()
427 alt_qspi_controller2_dev *qspi_dev = &flash_cfg->qspi_dev; in flash_nios2_qspi_write_protection() local
432 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
436 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
441 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
460 IORD_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
464 status = IORD_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
480 IOWR_32DIRECT(qspi_dev->csr_base, in flash_nios2_qspi_write_protection()
513 .qspi_dev = {