[Patch V4 3/3] configs: rpi_4 : enable SDHCI_SDMA config

Marek Szyprowski m.szyprowski at samsung.com
Wed Apr 29 10:14:44 CEST 2020

Hi Matthias and Jaehoon,

On 27.03.2020 14:12, Matthias Brugger wrote:
> On 27/03/2020 05:08, Jaehoon Chung wrote:
>> Enable SDHCI_SDMA configuration.
>> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
>> Reviewed-by: Peng Fan <peng.fan at nxp.com>
>> Reviewed-by: Minkyu Kang <mk7.kang at samsung.com>
>> ---
>>   configs/rpi_4_32b_defconfig | 1 +
>>   configs/rpi_4_defconfig     | 1 +
>>   2 files changed, 2 insertions(+)
> Please address the comments I had in v3 of this patch:
> https://protect2.fireeye.com/url?k=006fd2e9-5dbfda25-006e59a6-000babff3793-1cb73b2d76c550f7&u=https://patchwork.ozlabs.org/patch/1261047/
> If you just send a new version of the patch that won't convince me to take it.
> We will need to make sure that we are fine with patch. Especially I'm concerned
> about the limitation of the device to only be able to access the first GiB of
> RAM for DMA. I'd like to see an explanation why this won't happen on U-Boot.

According to my investigation related to the PCIe XHCI driver and its DMA:


transfers to any buffer which has been allocated with malloc/memalign 
are safe. Malloc region is initialized in runtime and placed nearly by 
the end of the first memory bank, which in case of Pi4 is always below 
the first GiB. Transfers to the arbitrary regions above the first GiB 
will fail. Adding a check for such case might be a good idea. Later one 
can even add a fallback with temporary malloc buffer (or PIO mode if 
switching on fly is possible) and memcpy for the transfers above the 
first GiB if there is such need.

Best regards
Marek Szyprowski, PhD
Samsung R&D Institute Poland

More information about the U-Boot mailing list