Commit 51b3e170 authored by Rob Herring's avatar Rob Herring Committed by Steve Muckle
Browse files

UPSTREAM: PCI: dwc: Support multiple ATU memory regions

The current ATU setup only supports a single memory resource which
isn't sufficient if there are also prefetchable memory regions. In order
to support multiple memory regions, we need to move away from fixed ATU
slots and rework the assignment. As there's always an ATU entry for
config space, let's assign index 0 to config space. Then we assign
memory resources to index 1 and up. Finally, if we have an I/O region
and slots remaining, we assign the I/O region last. If there aren't
remaining slots, we keep the same config and I/O space sharing.

Bug: 239396464

Link: https://lore.kernel.org/r/20201026181652.418729-1-robh@kernel.org


Tested-by: default avatarVidya Sagar <vidyas@nvidia.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarVidya Sagar <vidyas@nvidia.com>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Cc: Vidya Sagar <vidyas@nvidia.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarJon Lin <jon.lin@rock-chips.com>
Change-Id: Ib945de723c29a80f055227474a01806283bd1873
(cherry picked from commit 9f9e59a4)
Signed-off-by: default avatarKever Yang <kever.yang@rock-chips.com>
parent a8d7f651
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment