On Thu, Mar 05, 2020 at 03:29:55PM +0100, Linus Walleij wrote: > I agree. This relates to my reply to Greg K-H recently: > https://lore.kernel.org/lkml/CACRpkdajhivkOkZ63v-hr7+6ObhTffYOx5uZP0P-MYvuVnyweA@xxxxxxxxxxxxxx/ > > The core of the problem is that drivers/of/platform.c is > very simple and has no idea what kind of bus it is populating > with devices from Device Tree. It is just guessing. > > For example platform.c contains this: > > dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > if (!dev->dev.dma_mask) > dev->dev.dma_mask = &dev->dev.coherent_dma_mask; > > And again part of the problem is that the device tree parser > mostly just create struct platform_device's on the platform bus > and has no real idea about any constraints on the bus where > it will eventually end up after the platform device is probed and > a new device on some other bus has been created. the plaform device code should allocate the dma_params for every device. It should not set any limits in that, that is up to the host drivers.