]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: host: xhci-tegra: Set DMA mask correctly
authorNagarjuna Kristam <nkristam@nvidia.com>
Wed, 28 Aug 2019 10:54:57 +0000 (16:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Aug 2019 20:48:38 +0000 (22:48 +0200)
commit993cc8753453fccfe060a535bbe21fcf1001b626
tree35ab49133ebedb644cb8bbdff0c50f613533616f
parent1902a01e2bcc3abd7c9a18dc05e78c7ab4a53c54
usb: host: xhci-tegra: Set DMA mask correctly

The Falcon microcontroller that runs the XUSB firmware and which is
responsible for exposing the XHCI interface can address only 40 bits of
memory. Typically that's not a problem because Tegra devices don't have
enough system memory to exceed those 40 bits.

However, if the ARM SMMU is enable on Tegra186 and later, the addresses
passed to the XUSB controller can be anywhere in the 48-bit IOV address
space of the ARM SMMU. Since the DMA/IOMMU API starts allocating from
the top of the IOVA space, the Falcon microcontroller is not able to
load the firmware successfully.

Fix this by setting the DMA mask to 40 bits, which will force the DMA
API to map the buffer for the firmware to an IOVA that is addressable by
the Falcon.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/1566989697-13049-1-git-send-email-nkristam@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-tegra.c