All of lore.kernel.org
 help / color / mirror / Atom feed
From: kostap at marvell.com <kostap@marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] arm64: mvebu: Trigger PCI devices scan at early init stage
Date: Tue, 28 Mar 2017 18:36:33 +0300	[thread overview]
Message-ID: <1490715395-24751-2-git-send-email-kostap@marvell.com> (raw)
In-Reply-To: <1490715395-24751-1-git-send-email-kostap@marvell.com>

From: Konstantin Porotchkin <kostap@marvell.com>

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.
Also convert the SATA first device scan to a walk through
all availabel SATA devices.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Igal Liberman <igall@marvell.com>
Cc: Nadav Haklai <nadavh@marvell.com>
---
 arch/arm/mach-mvebu/arm64-common.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 8f02655..ff28750 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -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>
@@ -142,8 +143,16 @@ int arch_early_init_r(void)
 			break;
 	}
 
-	/* Cause the SATA device to do its early init */
-	uclass_first_device(UCLASS_AHCI, &dev);
+	/* Cause the SATA devices to do their early init */
+	for (uclass_first_device(UCLASS_AHCI, &dev);
+	     dev;
+	     uclass_next_device(&dev))
+		;
+
+#ifdef CONFIG_DM_PCI
+	/* Trigger PCIe devices detection */
+	pci_init();
+#endif
 
 	return 0;
 }
-- 
2.7.4

  reply	other threads:[~2017-03-28 15:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 15:36 [U-Boot] [PATCH 0/3] Marvell A7K/A8K PCIe fixes and extensions kostap at marvell.com
2017-03-28 15:36 ` kostap at marvell.com [this message]
2017-03-30 13:31   ` [U-Boot] [PATCH 1/3] arm64: mvebu: Trigger PCI devices scan at early init stage Stefan Roese
2017-03-30 13:58     ` Konstantin Porotchkin
2017-04-01  4:23       ` Simon Glass
2017-04-02 11:50         ` [U-Boot] [EXT] " Konstantin Porotchkin
2017-04-09 19:27           ` Simon Glass
2017-03-28 15:36 ` [U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots kostap at marvell.com
2017-03-30 13:39   ` Stefan Roese
2017-05-09 14:42   ` Stefan Roese
2017-03-28 15:36 ` [U-Boot] [PATCH 3/3] mvebu: dts: a80x0: Sync the DB DTS with standard config A kostap at marvell.com
2017-03-30 13:40   ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490715395-24751-2-git-send-email-kostap@marvell.com \
    --to=kostap@marvell.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.