Skip to contentSkip to conversation

arm64: mvebu: Trigger PCI devices scan at early init stage

PATCH New kostap at marvell.com 2 participants 3 messages Apr 5, 2017 – May 9, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 arm64: mvebu: Trigger PCI devices scan at early init stage

From: Konstantin Porotchkin <[email protected]>

Add PCIe initialization at early init stage. This operation has a side effect of detecting all PCIe plug-in cards, so the operator is not obligated to issue "pci enum" command though CLI for this purpose.

Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Nadav Haklai <[email protected]>

---
Changes from v1:
- Remove changes to SATA devices scan

 arch/arm/mach-mvebu/arm64-common.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-mvebu/arm64-common.c +6 -0
index 8f02655..45e6d35 100644
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <libfdt.h>
+#include <pci.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/arch/cpu.h>
@@ -145,5 +146,10 @@ int arch_early_init_r(void)
 	/* Cause the SATA device to do its early init */
 	uclass_first_device(UCLASS_AHCI, &dev);
 
+#ifdef CONFIG_DM_PCI
+	/* Trigger PCIe devices detection */
+	pci_init();
+#endif
+
 	return 0;
 }
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/3 arm64: mvebu: Trigger PCI devices scan at early init stage

Quoted 11 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

Add PCIe initialization at early init stage. This operation has a side effect of detecting all PCIe plug-in cards, so the operator is not obligated to issue "pci enum" command though CLI for this purpose.

Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Nadav Haklai <[email protected]>

Thanks,
Stefan

#2 lore raw

PATCH v2 1/3 arm64: mvebu: Trigger PCI devices scan at early init stage

In reply to kostap at marvell.com
Quoted 11 lines · kostap at marvell.com

From: Konstantin Porotchkin <[email protected]>

Add PCIe initialization at early init stage. This operation has a side effect of detecting all PCIe plug-in cards, so the operator is not obligated to issue "pci enum" command though CLI for this purpose.

Cc Stefan Roese <[email protected]>
Cc Igal Liberman <[email protected]>
Cc Nadav Haklai <[email protected]>

Applied to u-boot-marvell/master.

Thanks,
Stefan