diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-23 16:56:40 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-24 11:55:04 +1000 |
commit | d65a2fd7e97a4aebecee5008be291860e52219ea (patch) | |
tree | 153d2f1922276c018fc7b06c8dc06bdf00ed8b2d | |
parent | ab74a46ad9d24b4ca6b4d9b057cf3b25dadf762c (diff) | |
download | pci-d65a2fd7e97a4aebecee5008be291860e52219ea.tar.gz |
arm: PCI: Set policy flag for full resource reassignment
All arch/arm platforms effectively want a full PCI resource reassignment
done by the kernel. This happens as a side effect of resource management
calls done directly by the host bridge drivers or by the old style
pci_common_init_dev() function.
Make it explicit so those policies can be moved out of the host bridge
drivers
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/arm/kernel/bios32.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index ed46ca69813d3a..e6d130d4208e33 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -522,6 +522,19 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, } } +/* + * Set global PCI policy for both old-style (hw_pci based) platforms + * and new-style (drivers/pci/controller DT based) platforms. + */ +static int pci_init_policy(void) +{ + /* By default, all arm platforms reassign all PCI resources */ + pci_set_flags(PCI_REASSIGN_ALL_RSRC); + + return 0; +} +arch_initcall(pci_init_policy); + void pci_common_init_dev(struct device *parent, struct hw_pci *hw) { struct pci_sys_data *sys; |