mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 21:01:29 +00:00
x86, pci: move arch/x86/pci/pci.h to arch/x86/include/asm/pci_x86.h
Impact: cleanup Now that arch/x86/pci/pci.h is used in a number of other places as well, move the lowlevel x86 pci definitions into the architecture include files. (not to be confused with the existing arch/x86/include/asm/pci.h file, which provides public details about x86 PCI) Tested on: X86_32_UP, X86_32_SMP and X86_64_SMP Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c854c91979
commit
824877111c
@ -57,7 +57,8 @@ extern struct pci_ops pci_root_ops;
|
|||||||
struct irq_info {
|
struct irq_info {
|
||||||
u8 bus, devfn; /* Bus, device and function */
|
u8 bus, devfn; /* Bus, device and function */
|
||||||
struct {
|
struct {
|
||||||
u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
|
u8 link; /* IRQ line ID, chipset dependent,
|
||||||
|
0 = not routed */
|
||||||
u16 bitmap; /* Available IRQs */
|
u16 bitmap; /* Available IRQs */
|
||||||
} __attribute__((packed)) irq[4];
|
} __attribute__((packed)) irq[4];
|
||||||
u8 slot; /* Slot number, 0=onboard */
|
u8 slot; /* Slot number, 0=onboard */
|
||||||
@ -69,11 +70,13 @@ struct irq_routing_table {
|
|||||||
u16 version; /* PIRQ_VERSION */
|
u16 version; /* PIRQ_VERSION */
|
||||||
u16 size; /* Table size in bytes */
|
u16 size; /* Table size in bytes */
|
||||||
u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
|
u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
|
||||||
u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
|
u16 exclusive_irqs; /* IRQs devoted exclusively to
|
||||||
u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
|
PCI usage */
|
||||||
|
u16 rtr_vendor, rtr_device; /* Vendor and device ID of
|
||||||
|
interrupt router */
|
||||||
u32 miniport_data; /* Crap */
|
u32 miniport_data; /* Crap */
|
||||||
u8 rfu[11];
|
u8 rfu[11];
|
||||||
u8 checksum; /* Modulo 256 checksum must give zero */
|
u8 checksum; /* Modulo 256 checksum must give 0 */
|
||||||
struct irq_info slots[0];
|
struct irq_info slots[0];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
@ -148,15 +151,15 @@ static inline unsigned int mmio_config_readl(void __iomem *pos)
|
|||||||
|
|
||||||
static inline void mmio_config_writeb(void __iomem *pos, u8 val)
|
static inline void mmio_config_writeb(void __iomem *pos, u8 val)
|
||||||
{
|
{
|
||||||
asm volatile("movb %%al,(%1)" :: "a" (val), "r" (pos) : "memory");
|
asm volatile("movb %%al,(%1)" : : "a" (val), "r" (pos) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mmio_config_writew(void __iomem *pos, u16 val)
|
static inline void mmio_config_writew(void __iomem *pos, u16 val)
|
||||||
{
|
{
|
||||||
asm volatile("movw %%ax,(%1)" :: "a" (val), "r" (pos) : "memory");
|
asm volatile("movw %%ax,(%1)" : : "a" (val), "r" (pos) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mmio_config_writel(void __iomem *pos, u32 val)
|
static inline void mmio_config_writel(void __iomem *pos, u32 val)
|
||||||
{
|
{
|
||||||
asm volatile("movl %%eax,(%1)" :: "a" (val), "r" (pos) : "memory");
|
asm volatile("movl %%eax,(%1)" : : "a" (val), "r" (pos) : "memory");
|
||||||
}
|
}
|
@ -13,8 +13,7 @@
|
|||||||
#include <asm/msr.h>
|
#include <asm/msr.h>
|
||||||
#include <asm/acpi.h>
|
#include <asm/acpi.h>
|
||||||
#include <asm/mmconfig.h>
|
#include <asm/mmconfig.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include "../pci/pci.h"
|
|
||||||
|
|
||||||
struct pci_hostbridge_probe {
|
struct pci_hostbridge_probe {
|
||||||
u32 bus;
|
u32 bus;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <asm/proto.h>
|
#include <asm/proto.h>
|
||||||
#include <asm/reboot_fixups.h>
|
#include <asm/reboot_fixups.h>
|
||||||
#include <asm/reboot.h>
|
#include <asm/reboot.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
# include <linux/dmi.h>
|
# include <linux/dmi.h>
|
||||||
@ -22,8 +23,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mach_ipi.h>
|
#include <mach_ipi.h>
|
||||||
#include "../pci/pci.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Power off function, if any
|
* Power off function, if any
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include <asm/numa.h>
|
#include <asm/numa.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
struct pci_root_info {
|
struct pci_root_info {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/topology.h>
|
#include <linux/topology.h>
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
#include <asm/pci-direct.h>
|
#include <asm/pci-direct.h>
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
#include <asm/segment.h>
|
#include <asm/segment.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
|
unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
|
||||||
PCI_PROBE_MMCONF;
|
PCI_PROBE_MMCONF;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions for accessing PCI base (first 256 bytes) and extended
|
* Functions for accessing PCI base (first 256 bytes) and extended
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <asm/pci-direct.h>
|
#include <asm/pci-direct.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/* Direct PCI access. This is used for PCI accesses in early boot before
|
/* Direct PCI access. This is used for PCI accesses in early boot before
|
||||||
the PCI subsystem works. */
|
the PCI subsystem works. */
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
|
|
||||||
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
|
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
|
||||||
{
|
{
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
#include <asm/pat.h>
|
#include <asm/pat.h>
|
||||||
#include <asm/e820.h>
|
#include <asm/e820.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
skip_isa_ioresource_align(struct pci_dev *dev) {
|
skip_isa_ioresource_align(struct pci_dev *dev) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/* arch_initcall has too random ordering, so call the initializers
|
/* arch_initcall has too random ordering, so call the initializers
|
||||||
in the right sequence from here. */
|
in the right sequence from here. */
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
#include <asm/io_apic.h>
|
#include <asm/io_apic.h>
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
||||||
#define PIRQ_VERSION 0x0100
|
#define PIRQ_VERSION 0x0100
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Discover remaining PCI buses in case there are peer host bridges.
|
* Discover remaining PCI buses in case there are peer host bridges.
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/bitmap.h>
|
#include <linux/bitmap.h>
|
||||||
#include <asm/e820.h>
|
#include <asm/e820.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
/* aperture is up to 256MB but BIOS may reserve less */
|
/* aperture is up to 256MB but BIOS may reserve less */
|
||||||
#define MMCONFIG_APER_MIN (2 * 1024*1024)
|
#define MMCONFIG_APER_MIN (2 * 1024*1024)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <asm/e820.h>
|
#include <asm/e820.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/* Assume systems with more busses have correct MCFG */
|
/* Assume systems with more busses have correct MCFG */
|
||||||
#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
|
#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/bitmap.h>
|
#include <linux/bitmap.h>
|
||||||
#include <asm/e820.h>
|
#include <asm/e820.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
/* Static virtual mapping of the MMCONFIG aperture */
|
/* Static virtual mapping of the MMCONFIG aperture */
|
||||||
struct mmcfg_virt {
|
struct mmcfg_virt {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <linux/nodemask.h>
|
#include <linux/nodemask.h>
|
||||||
#include <mach_apic.h>
|
#include <mach_apic.h>
|
||||||
#include <asm/mpspec.h>
|
#include <asm/mpspec.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
#define XQUAD_PORTIO_BASE 0xfe400000
|
#define XQUAD_PORTIO_BASE 0xfe400000
|
||||||
#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */
|
#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <asm/olpc.h>
|
#include <asm/olpc.h>
|
||||||
#include <asm/geode.h>
|
#include <asm/geode.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In the tables below, the first two line (8 longwords) are the
|
* In the tables below, the first two line (8 longwords) are the
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include "pci.h"
|
#include <asm/pci_x86.h>
|
||||||
#include "pci-functions.h"
|
#include <asm/mach-default/pci-functions.h>
|
||||||
|
|
||||||
|
|
||||||
/* BIOS32 signature: "_32_" */
|
/* BIOS32 signature: "_32_" */
|
||||||
#define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24))
|
#define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24))
|
||||||
|
@ -9,11 +9,10 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
#include <asm/pci_x86.h>
|
||||||
#include <asm/visws/cobalt.h>
|
#include <asm/visws/cobalt.h>
|
||||||
#include <asm/visws/lithium.h>
|
#include <asm/visws/lithium.h>
|
||||||
|
|
||||||
#include "pci.h"
|
|
||||||
|
|
||||||
static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
|
static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
|
||||||
static void pci_visws_disable_irq(struct pci_dev *dev) { }
|
static void pci_visws_disable_irq(struct pci_dev *dev) { }
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include "cpqphp.h"
|
#include "cpqphp.h"
|
||||||
#include "cpqphp_nvram.h"
|
#include "cpqphp_nvram.h"
|
||||||
#include "../../../arch/x86/pci/pci.h" /* horrible hack showing how processor dependent we are... */
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include "../pci.h"
|
#include "../pci.h"
|
||||||
#include "cpqphp.h"
|
#include "cpqphp.h"
|
||||||
#include "cpqphp_nvram.h"
|
#include "cpqphp_nvram.h"
|
||||||
#include "../../../arch/x86/pci/pci.h" /* horrible hack showing how processor dependent we are... */
|
#include <asm/pci_x86.h>
|
||||||
|
|
||||||
|
|
||||||
u8 cpqhp_nic_irq;
|
u8 cpqhp_nic_irq;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
#include "../pci.h"
|
#include "../pci.h"
|
||||||
#include "../../../arch/x86/pci/pci.h" /* for struct irq_routing_table */
|
#include <asm/pci_x86.h> /* for struct irq_routing_table */
|
||||||
#include "ibmphp.h"
|
#include "ibmphp.h"
|
||||||
|
|
||||||
#define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
|
#define attn_on(sl) ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
|
||||||
|
Loading…
Reference in New Issue
Block a user