]> git.baikalelectronics.ru Git - kernel.git/commit
of/address: Support multiple 'dma-ranges' entries
authorRob Herring <robh@kernel.org>
Thu, 6 Feb 2020 14:26:40 +0000 (14:26 +0000)
committerRob Herring <robh@kernel.org>
Fri, 14 Feb 2020 21:27:08 +0000 (15:27 -0600)
commit916bea55b24bf62701b242418a98918ae9a6dfad
treea48b5eb8dea1012bc225b62e0445595b89e5508a
parentdb9d36c5db4aadb0dd3f5032b814f1062c6f08e1
of/address: Support multiple 'dma-ranges' entries

Currently, the DMA offset and mask for a device are set based only on the
first 'dma-ranges' entry. We should really be using all the entries. The
kernel doesn't yet support multiple offsets and sizes, so the best we can
do is to find the biggest size for a single offset. The algorithm is
copied from acpi_dma_get_range().

If there's different offsets from the first entry, then we warn and
continue. It really should be an error, but this will likely break
existing DTs.

Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c