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.
asm-generic: Add new pci.h and use it
The asm/pci.h used for many newer architectures share similar definitions. Move the common parts to asm-generic/pci.h to allow for sharing code. Two things to note are: - isa_dma_bridge_buggy, traditionally this is defined in asm/dma.h but these architectures avoid creating that file and add the definition to asm/pci.h. - ARCH_GENERIC_PCI_MMAP_RESOURCE, csky does not define this so we undefine it after including asm-generic/pci.h. Why doesn't csky define it? - pci_get_legacy_ide_irq, This function is only used on architectures that support PNP. It is only maintained for arm64, in other architectures it is removed. Suggested-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/lkml/CAK8P3a0JmPeczfmMBE__vn=Jbvf=nkbpVaZCycyv40pZNCJJXQ@mail.gmail.com/ Signed-off-by: Stafford Horne <shorne@gmail.com>
- Loading branch information
Showing
5 changed files
with
48 additions
and
73 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
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_GENERIC_PCI_H | ||
#define __ASM_GENERIC_PCI_H | ||
|
||
#include <linux/types.h> | ||
|
||
#ifndef PCIBIOS_MIN_IO | ||
#define PCIBIOS_MIN_IO 0 | ||
#endif | ||
|
||
#ifndef PCIBIOS_MIN_MEM | ||
#define PCIBIOS_MIN_MEM 0 | ||
#endif | ||
|
||
#ifndef pcibios_assign_all_busses | ||
/* For bootloaders that do not initialize the PCI bus */ | ||
#define pcibios_assign_all_busses() 1 | ||
#endif | ||
|
||
extern int isa_dma_bridge_buggy; | ||
|
||
/* Enable generic resource mapping code in drivers/pci/ */ | ||
#define ARCH_GENERIC_PCI_MMAP_RESOURCE | ||
|
||
#ifdef CONFIG_PCI | ||
|
||
static inline int pci_proc_domain(struct pci_bus *bus) | ||
{ | ||
/* always show the domain in /proc */ | ||
return 1; | ||
} | ||
|
||
#endif /* CONFIG_PCI */ | ||
|
||
#endif /* __ASM_GENERIC_PCI_H */ |