Boot hangs during sdhci_transfer_data_dma
Robin van der Gracht
robin at protonic.nl
Mon Jun 20 07:33:02 PDT 2022
Today I tried to run barebox with CONFIG_KEYBOARD_GPIO=y added to my config.
and noticed my board hangs during boot. When I modify the probe function to
run without registering the poller it boots as expected.
I started digging into the code to see how far the boot gets when I do
register the poller. I found that Barebox hangs in a do/while loop in
The contents of the interrupt status (SDHCI_INT_STATUS) is 0 and stays that
way forever trapping the process in the loop.
initcall -> barebox_of_populate
I'm not sure how this happens. It's not the first transfer taking place. I
figured that mayby the poller just adds some cpu load that opens up a
window for this to occur.
Maybe something else cleared the status register right before we entered the
loop. Thats when I spotted this read/write construction. It's executed
right before we enter the do/while loop and (over)writes to the irq status
I removed the line with the write command and my board boots as expected.
Why are we (over)writing the status register right after reading it?
Other theories on how this could occur are also very welcome :)
More information about the barebox