diff options
author | Stefan Roese <sr@denx.de> | 2020-07-23 16:34:10 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2020-08-25 05:41:09 +0200 |
commit | e002474158d1054a7a2ff9a66149384c639ff242 (patch) | |
tree | 629bcc2a0fe703b8b83825453188d40aee6f4766 /include/pci.h | |
parent | 65f8c7edd8052f8b31dda321fe11e7ecfeebf5de (diff) | |
download | u-boot-e002474158d1054a7a2ff9a66149384c639ff242.tar.gz u-boot-e002474158d1054a7a2ff9a66149384c639ff242.tar.bz2 u-boot-e002474158d1054a7a2ff9a66149384c639ff242.zip |
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>
Diffstat (limited to 'include/pci.h')
-rw-r--r-- | include/pci.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/pci.h b/include/pci.h index 2089db9f16..da755af852 100644 --- a/include/pci.h +++ b/include/pci.h @@ -590,8 +590,6 @@ extern void pci_cfgfunc_do_nothing(struct pci_controller* hose, pci_dev_t dev, extern void pci_cfgfunc_config_device(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *); -#define MAX_PCI_REGIONS 7 - #define INDIRECT_TYPE_NO_PCIE_LINK 1 /** @@ -632,7 +630,7 @@ struct pci_controller { * for PCI controllers and a separate UCLASS (or perhaps * UCLASS_PCI_GENERIC) is used for bridges. */ - struct pci_region regions[MAX_PCI_REGIONS]; + struct pci_region *regions; int region_count; struct pci_config_table *config_table; |