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

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git