Attention is currently required from: Paul Menzel, Arthur Heymans. Sam Lewis has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44384 )
Change subject: soc/ti/am335x: Add MMC/SD driver ......................................................................
Patch Set 11:
(3 comments)
Patchset:
PS10:
Sam, to get this committed, are you planning on addressing Arthur’s comments, or should it be submit […]
I've addressed Arthur's comments and it should be good to be merged now. Sorry for taking so long!
File src/soc/ti/am335x/mmc.h:
https://review.coreboot.org/c/coreboot/+/44384/comment/a7072a06_46f0f34c PS10, Line 11: struct am335x_mmc { : uint8_t res1[0x110]; : uint32_t sysconfig; : uint32_t sysstatus; : uint8_t res2[0x14]; : uint32_t con; : uint32_t pwcnt; : uint32_t dll; : uint8_t res3[0xcc]; : uint32_t blk; : uint32_t arg; : uint32_t cmd; : uint32_t rsp10; : uint32_t rsp32; : uint32_t rsp54; : uint32_t rsp76; : uint32_t data; : uint32_t pstate; : uint32_t hctl; : uint32_t sysctl; : uint32_t stat; : uint32_t ie; : uint8_t res4[0x4]; : uint32_t ac12; : uint32_t capa; : uint32_t capa2; : uint8_t res5[0xc]; : uint32_t admaes; : uint32_t admasal; : };
You might want to use the __packed directive?
Done
File src/soc/ti/am335x/mmc.c:
https://review.coreboot.org/c/coreboot/+/44384/comment/69b95af2_7322536a PS10, Line 50: while (!(read32(&mmc->sysstatus) & SYSSTATUS_RESETDONE)) : ;
It would be nicer with timeouts.
Have now added a rudimentary timeout for all of the polling register loops.