Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
pci.c File Reference
#include <linux/acpi.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/bootmem.h>
#include <linux/export.h>
#include <asm/machvec.h>
#include <asm/page.h>
#include <asm/io.h>
#include <asm/sal.h>
#include <asm/smp.h>
#include <asm/irq.h>
#include <asm/hw_irq.h>

Go to the source code of this file.

Data Structures

struct  pci_root_info


#define PCI_SAL_ADDRESS(seg, bus, devfn, reg)   (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg))
#define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg)   (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg))


int raw_pci_read (unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value)
int raw_pci_write (unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value)
struct pci_bus *__devinit pci_acpi_scan_root (struct acpi_pci_root *root)
void __devinit pcibios_fixup_device_resources (struct pci_dev *dev)
 EXPORT_SYMBOL_GPL (pcibios_fixup_device_resources)
void __devinit pcibios_fixup_bus (struct pci_bus *b)
void pcibios_set_master (struct pci_dev *dev)
int pcibios_enable_device (struct pci_dev *dev, int mask)
void pcibios_disable_device (struct pci_dev *dev)
resource_size_t pcibios_align_resource (void *data, const struct resource *res, resource_size_t size, resource_size_t align)
int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state, int write_combine)
charia64_pci_get_legacy_mem (struct pci_bus *bus)
int pci_mmap_legacy_page_range (struct pci_bus *bus, struct vm_area_struct *vma, enum pci_mmap_state mmap_state)
int ia64_pci_legacy_read (struct pci_bus *bus, u16 port, u32 *val, u8 size)
int ia64_pci_legacy_write (struct pci_bus *bus, u16 port, u32 val, u8 size)
u64 ia64_dma_get_required_mask (struct device *dev)
 EXPORT_SYMBOL_GPL (ia64_dma_get_required_mask)
u64 dma_get_required_mask (struct device *dev)
 EXPORT_SYMBOL_GPL (dma_get_required_mask)
 subsys_initcall (pcibios_init)


struct pci_ops pci_root_ops

Macro Definition Documentation

#define PCI_SAL_ADDRESS (   seg,
)    (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg))

Definition at line 39 of file pci.c.

#define PCI_SAL_EXT_ADDRESS (   seg,
)    (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg))

Definition at line 44 of file pci.c.

Function Documentation

u64 dma_get_required_mask ( struct device dev)

Definition at line 715 of file pci.c.

EXPORT_SYMBOL_GPL ( pcibios_fixup_device_resources  )
EXPORT_SYMBOL_GPL ( ia64_dma_get_required_mask  )
EXPORT_SYMBOL_GPL ( dma_get_required_mask  )
u64 ia64_dma_get_required_mask ( struct device dev)

Definition at line 695 of file pci.c.

char* ia64_pci_get_legacy_mem ( struct pci_bus bus)

ia64_pci_get_legacy_mem - generic legacy mem routine : bus to get legacy memory base address for

Find the base of legacy memory for . This is typically the first megabyte of bus address space for or is simply 0 on platforms whose chipsets support legacy I/O and memory routing. Returns the base address or an error pointer if an error occurred.

This is the ia64 generic version of this routine. Other platforms are free to override it with a machine vector.

Definition at line 550 of file pci.c.

int ia64_pci_legacy_read ( struct pci_bus bus,
u16  port,
u32 val,
u8  size 

ia64_pci_legacy_read - read from legacy I/O space : bus to read : legacy port value : caller allocated storage for returned value : number of bytes to read

Simply reads bytes from and puts the result in .

Again, this (and the write routine) are generic versions that can be overridden by the platform. This is necessary on platforms that don't support legacy I/O routing or that hard fail on legacy I/O timeouts.

Definition at line 611 of file pci.c.

int ia64_pci_legacy_write ( struct pci_bus bus,
u16  port,
u32  val,
u8  size 

ia64_pci_legacy_write - perform a legacy I/O write : bus pointer : port to write : value to write : number of bytes to write from

Simply writes bytes of to .

Definition at line 642 of file pci.c.

struct pci_bus* __devinit pci_acpi_scan_root ( struct acpi_pci_root *  root)

Definition at line 328 of file pci.c.

int pci_mmap_legacy_page_range ( struct pci_bus bus,
struct vm_area_struct vma,
enum pci_mmap_state  mmap_state 

pci_mmap_legacy_page_range - map legacy memory space to userland : bus whose legacy space we're mapping : vma passed in by mmap

Map legacy memory space for this device back to userspace using a machine vector to get the base address.

Definition at line 564 of file pci.c.

int pci_mmap_page_range ( struct pci_dev dev,
struct vm_area_struct vma,
enum pci_mmap_state  mmap_state,
int  write_combine 

Definition at line 493 of file pci.c.

resource_size_t pcibios_align_resource ( void data,
const struct resource res,
resource_size_t  size,
resource_size_t  align 

Definition at line 486 of file pci.c.

void pcibios_disable_device ( struct pci_dev dev)

Definition at line 478 of file pci.c.

int pcibios_enable_device ( struct pci_dev dev,
int  mask 

Definition at line 464 of file pci.c.

void __devinit pcibios_fixup_bus ( struct pci_bus b)

Definition at line 445 of file pci.c.

void __devinit pcibios_fixup_device_resources ( struct pci_dev dev)

Definition at line 430 of file pci.c.

void pcibios_set_master ( struct pci_dev dev)

Definition at line 458 of file pci.c.

int raw_pci_read ( unsigned int  seg,
unsigned int  bus,
unsigned int  devfn,
int  reg,
int  len,
u32 value 

Definition at line 47 of file pci.c.

int raw_pci_write ( unsigned int  seg,
unsigned int  bus,
unsigned int  devfn,
int  reg,
int  len,
u32  value 

Definition at line 74 of file pci.c.

subsys_initcall ( pcibios_init  )

Variable Documentation

struct pci_ops pci_root_ops
Initial value:
= {
.read = pci_read,
.write = pci_write,

Definition at line 112 of file pci.c.