of: Calculate device DMA masks based on DT dma-range size
authorMurali Karicheri <m-karicheri2@ti.com>
Tue, 3 Mar 2015 20:44:57 +0000 (14:44 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 12 Mar 2015 16:43:09 +0000 (11:43 -0500)
commit9a6d7298b0833614c411f774c46514efb1bd5651
tree3d05e9319e0fe78acb70dab565e497a86b68a60b
parent22b3c181c6c324a46f71aae806d8ddbe61d25761
of: Calculate device DMA masks based on DT dma-range size

Calculate the dma_mask and coherent_dma_mask based on the dma-range values
set in DT for the device.

Limit the mask to lower of the default mask and mask calculated.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
CC: Joerg Roedel <joro@8bytes.org>
CC: Grant Likely <grant.likely@linaro.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Will Deacon <will.deacon@arm.com>
CC: Russell King <linux@arm.linux.org.uk>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
drivers/of/device.c