forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds required definitions to allow for PCI buses on OpenRISC. This is being in the QEMU virt platform. OpenRISC does not have IO ports so this defines PCI IO to be allowed in any range. Keeping PIO_RESERVED defined as 0 allows OpenRISC to use MMIO for all IO. Signed-off-by: Stafford Horne <shorne@gmail.com>
- Loading branch information
Showing
3 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#ifndef __ASM_OPENRISC_PCI_H | ||
#define __ASM_OPENRISC_PCI_H | ||
|
||
#include <linux/types.h> | ||
#include <linux/slab.h> | ||
#include <linux/dma-mapping.h> | ||
|
||
#include <asm/io.h> | ||
|
||
#define PCIBIOS_MIN_IO 0 | ||
#define PCIBIOS_MIN_MEM 0 | ||
|
||
/* OpenRISC bootloaders do not initialize PCI bus */ | ||
#define pcibios_assign_all_busses() 1 | ||
|
||
#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1 | ||
|
||
extern int isa_dma_bridge_buggy; | ||
|
||
#ifdef CONFIG_PCI | ||
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | ||
{ | ||
/* no legacy IRQs on or1k */ | ||
return -ENODEV; | ||
} | ||
|
||
static inline int pci_proc_domain(struct pci_bus *bus) | ||
{ | ||
/* always show the domain in /proc */ | ||
return 1; | ||
} | ||
#endif /* CONFIG_PCI */ | ||
|
||
#endif /* __ASM_OPENRISC_PCI_H */ |