Failed to read/write rpmb in uboot phase

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to read/write rpmb in uboot phase

Jump to solution
646 Views
jiankang
Contributor III

hello,

I'm working on a product based on s32g platform using bsp32-release.

I find that the rpmb read/ write function doesn't work in uboot phase.

after adding some logs in "drivers/mmc/fsl_esdhc_imx.c"

I find that emmc register status is incorrect after try to read/write rpmb storage: (line 577)

 563     /* Wait until all of the blocks are transferred */
 564     if (data) {
 565 #ifdef CONFIG_SYS_FSL_ESDHC_USE_PIO
 566         esdhc_pio_read_write(priv, data);
 567 #else
 568         flags = DATA_COMPLETE;
 569         if ((cmd->cmdidx == MMC_CMD_SEND_TUNING_BLOCK) ||
 570             (cmd->cmdidx == MMC_CMD_SEND_TUNING_BLOCK_HS200)) {
 571             flags = IRQSTAT_BRR;
 572         }
 573
 574         do {
 575             irqstat = esdhc_read32(&regs->irqstat);
 576
 577             if (irqstat & IRQSTAT_DTOE) {
/* error occurs in this condition check */
 578                 err = -ETIMEDOUT;
 579                 goto out;
 580             }
 581
 582             if (irqstat & DATA_ERR) {
 583                 err = -ECOMM;
 584                 goto out;
 585             }
 586         } while ((irqstat & flags) != flags);

 

please help to check, thanks a lot!

0 Kudos
Reply
1 Solution
634 Views
jiankang
Contributor III

this issue is cuased by mmc DMA memory access error. fixed by adding memory rotatation logic.

View solution in original post

0 Kudos
Reply
1 Reply
635 Views
jiankang
Contributor III

this issue is cuased by mmc DMA memory access error. fixed by adding memory rotatation logic.

0 Kudos
Reply