I am working on a SOC which it's RAM starts at 0x200M. For some reason I need to limit the DMA allocations up to 0x220M, and I've done it by creating a shared DMA pool in the DTS:
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
reserved: buffer@0 {
compatible = "shared-dma-pool";
no-map;
reg = <0x2 0x0 0x0 0x1000000>;
}
which each platform driver in the DTS uses, by referencing the pool:
memory-region = <&reserved>;
But how can I enforce allocation from this pool (or other reserved area) of usb devices such as usb2eth dongle? After all they are also devices (probed at usbnet_probe) that allocate DMA, but are not represented at the DTS.