mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 08:12:06 +02:00
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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user