Hi expers,
I try to boot from spi nor flash (ospi1), the rom code load tiboot3.bin from nor flash success but uboot r5 spl run sf probe got stuck while read sfdp.
spi_nor_scan->
spi_nor_init_params->
spi_nor_parse_sfdp->
spi_nor_read_sfdp->
...
cadence_qspi_apb_indirect_read_execute
static int cadence_qspi_apb_indirect_read_execute(struct cadence_spi_platdata *plat, unsigned int n_rx, u8 *rxbuf) { unsigned int remaining = n_rx; unsigned int bytes_to_read = 0; int ret; writel(n_rx, plat->regbase + CQSPI_REG_INDIRECTRDBYTES); /* Start the indirect read transfer */ writel(CQSPI_REG_INDIRECTRD_START, plat->regbase + CQSPI_REG_INDIRECTRD); while (remaining > 0) { ret = cadence_qspi_wait_for_data(plat); if (ret < 0) { printf("Indirect write timed out (%i)\n", ret); goto failrd; } bytes_to_read = ret; while (bytes_to_read != 0) { bytes_to_read *= plat->fifo_width; bytes_to_read = bytes_to_read > remaining ? remaining : bytes_to_read; /* * Handle non-4-byte aligned access to avoid * data abort. */ if (((uintptr_t)rxbuf % 4) || (bytes_to_read % 4)) readsb(plat->ahbbase, rxbuf, bytes_to_read); else readsl(plat->ahbbase, rxbuf, bytes_to_read >> 2); rxbuf += bytes_to_read; remaining -= bytes_to_read; bytes_to_read = cadence_qspi_get_rd_sram_level(plat); } }
the vaule of bytes_to_read always 16.
But the nor flash access is normal on uboot-a72.
Can you provide some suggestions (sdk ti-processor-sdk-linux-j721s2-evm-08_00_04_05)?
Regards,
Li quan