pci: pci-uclass: Dynamically allocate the PCI regions
authorStefan Roese <sr@denx.de>
Thu, 23 Jul 2020 14:34:10 +0000 (16:34 +0200)
committerStefan Roese <sr@denx.de>
Tue, 25 Aug 2020 03:41:09 +0000 (05:41 +0200)
commite002474158d1054a7a2ff9a66149384c639ff242
tree629bcc2a0fe703b8b83825453188d40aee6f4766
parent65f8c7edd8052f8b31dda321fe11e7ecfeebf5de
pci: pci-uclass: Dynamically allocate the PCI regions

Instead of using a fixed length pre-allocated array of regions, this
patch moves to dynamically allocating the regions based on the number
of available regions plus the necessary regions for DRAM banks.

Since MAX_PCI_REGIONS is not needed any more, its removed completely
with this patch.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
drivers/pci/pci-uclass.c
include/pci.h