mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH v2 1/2] RISC-V: enable HW_HAS_PCI
Date: Mon, 22 Nov 2021 22:34:35 +0100	[thread overview]
Message-ID: <20211122213436.309749-1-ahmad@a3f.at> (raw)

With the recently added generic ECAM PCI driver, we can now use PCI
device drivers on the RISC-V Virt machine. Enable HW_HAS_PCI, so the
driver and bus support can be selected. As HW_HAS_PCI on its own doesn't
add any code, just enable it for the whole architecture.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
v1 -> v2:
  - add missing <asm/pci.h>
  - select CONFIG_HW_HAS_PCI from CONFIG_RISCV, instead of CONFIG_SOC_VIRT
---
 arch/riscv/Kconfig           | 1 +
 arch/riscv/include/asm/pci.h | 7 +++++++
 2 files changed, 8 insertions(+)
 create mode 100644 arch/riscv/include/asm/pci.h

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a814a1a45b1c..8c6669718554 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -14,6 +14,7 @@ config RISCV
 	select HAS_ARCH_SJLJ
 	select HAS_KALLSYMS
 	select RISCV_TIMER if RISCV_SBI
+	select HW_HAS_PCI
 
 config ARCH_TEXT_BASE
 	hex
diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
new file mode 100644
index 000000000000..dd18499a3709
--- /dev/null
+++ b/arch/riscv/include/asm/pci.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __ASM_PCI_H
+#define __ASM_PCI_H
+
+#define pcibios_assign_all_busses()	1
+
+#endif
-- 
2.33.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2021-11-22 21:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 21:34 Ahmad Fatoum [this message]
2021-11-22 21:34 ` [PATCH v2 2/2] RISC-V: configs: virt: enable networking and PCI Ahmad Fatoum
2021-11-25  7:48 ` [PATCH v2 1/2] RISC-V: enable HW_HAS_PCI Sascha Hauer

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=20211122213436.309749-1-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox