OSDN Git Service

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)
commit9d55bebd9816903b821a403a69a94190442ac043
treea48b5eb8dea1012bc225b62e0445595b89e5508a
parent7a8b64d17e35810dc3176fe61208b45c15d25402
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