Re: [PATCH v4 14/14] mmc: queue: create dev->dma_parms before call dma_set_max_seg_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux