From: Daniel Schwierzeck Date: Tue, 21 Nov 2017 23:13:35 +0100 Subject: [U-Boot] [PATCH 1/8] pci: Make PCI bridge memory alignment configurable In-Reply-To: <20171121203347.10908-2-paul.burton@mips.com> References: <20171121203347.10908-1-paul.burton@mips.com> <20171121203347.10908-2-paul.burton@mips.com> Message-ID: <4f5785d2-e5c5-0c01-8830-5d571ed3bcd1@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21.11.2017 21:33, Paul Burton wrote: > On some systems aligning PCI memory to a 1MB boundary every time a > bridge is encountered may lead to exhausting the available memory space > before all devices have been assigned addresses. > > For example on the MIPS Boston development board we have an Intel EG20T > Platform Controller Hub connected to a Xilinx AXI to PCIe root port > which is only assigned a 1MB memory region. The Intel EG20T contains a > bridge device beneath which all of its peripheral devices can be found, > and that bridge device contains a ROM. If we align to 1MB when we > encounter each bridge device we therefore do something like this: > > - Start with bus_lower at 0x16000000. > > - Find the Xilinx root bridge, which has no visible BARs so we do very > little to it. > > - Probe the bus beneath the Xilinx bridge device, aligning bus_lower > to a 1MB boundary first. That leaves it still at 0x16000000. > > - Find the EG20T bridge device, which we find has a 64KiB ROM. We > assign it the address range 0x16000000-0x1600ffff which leaves > bus_lower at 0x16010000. > > - Probe the bus beneath the EG20T bridge device, aligning bus_lower to > a 1MB boundary first. This leaves bus_lower at 0x16100000, which is > the end of the available memory space. > > - Find the various peripheral devices the EG20T contains, but fail to > assign any memory space to them since bus_lower is at the end of the > memory space available to the PCI bus. > > This patch allows that 1MB alignment to be changed or disabled via > Kconfig, so that systems such as this can select an alignment which > works for them. > > Signed-off-by: Paul Burton > Cc: Daniel Schwierzeck > Cc: Simon Glass > Cc: u-boot at lists.denx.de > Signed-off-by: Paul Burton > --- > > drivers/pci/Kconfig | 7 +++++++ > drivers/pci/pci_auto.c | 24 ++++++++++++++++-------- > 2 files changed, 23 insertions(+), 8 deletions(-) > Reviewed-by: Daniel Schwierzeck -- - Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: