Skip to content

Commit ded2ee3

Browse files
committed
openrisc: Add pci bus support
This patch adds required definitions to allow for PCI buses on OpenRISC. This is being tested on the OpenRISC QEMU virt platform which is in development. OpenRISC does not have IO ports so we keep the definition of IO_SPACE_LIMIT and PIO_RESERVED to be 0. Note, since commit 66bcd06 ("parport_pc: Also enable driver for PCI systems") all platforms that support PCI also need to support parallel port. We add a generic header to support compiling parallel port drivers, though they generally will not work as they require IO ports. Signed-off-by: Stafford Horne <[email protected]>
1 parent 0757060 commit ded2ee3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

arch/openrisc/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ config OPENRISC
2020
select GENERIC_IRQ_CHIP
2121
select GENERIC_IRQ_PROBE
2222
select GENERIC_IRQ_SHOW
23-
select GENERIC_IOMAP
23+
select GENERIC_PCI_IOMAP
2424
select GENERIC_CPU_DEVICES
25+
select HAVE_PCI
2526
select HAVE_UID16
2627
select GENERIC_ATOMIC64
2728
select GENERIC_CLOCKEVENTS_BROADCAST
@@ -32,6 +33,8 @@ config OPENRISC
3233
select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
3334
select ARCH_USE_QUEUED_RWLOCKS
3435
select OMPIC if SMP
36+
select PCI_DOMAINS_GENERIC if PCI
37+
select PCI_MSI if PCI
3538
select ARCH_WANT_FRAME_POINTERS
3639
select GENERIC_IRQ_MULTI_HANDLER
3740
select MMU_GATHER_NO_RANGE if MMU

arch/openrisc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generic-y += extable.h
33
generic-y += kvm_para.h
4+
generic-y += parport.h
45
generic-y += spinlock_types.h
56
generic-y += spinlock.h
67
generic-y += qrwlock_types.h

arch/openrisc/include/asm/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <linux/types.h>
1818

1919
/*
20-
* PCI: can we really do 0 here if we have no port IO?
20+
* PCI: We do not use IO ports in OpenRISC
2121
*/
2222
#define IO_SPACE_LIMIT 0
2323

0 commit comments

Comments
 (0)