mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/2] RISC-V: enable HW_HAS_PCI
@ 2021-11-22 21:34 Ahmad Fatoum
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2021-11-22 21:34 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-25  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 21:34 [PATCH v2 1/2] RISC-V: enable HW_HAS_PCI Ahmad Fatoum
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox