Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pci.c File Reference
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/bootmem.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/export.h>
#include <asm/processor.h>
#include <asm/sections.h>
#include <asm/byteorder.h>
#include <asm/hv_driver.h>
#include <hv/drv_pcie_rc_intf.h>

Go to the source code of this file.

Macros

#define TILE_READ(size, type)
 
#define TILE_WRITE(size, type)
 

Functions

resource_size_t pcibios_align_resource (void *data, const struct resource *res, resource_size_t size, resource_size_t align)
 
 EXPORT_SYMBOL (pcibios_align_resource)
 
int __init tile_pci_init (void)
 
int __init pcibios_init (void)
 
 subsys_initcall (pcibios_init)
 
void __devinit pcibios_fixup_bus (struct pci_bus *bus)
 
void pcibios_set_master (struct pci_dev *dev)
 
int pcibios_enable_device (struct pci_dev *dev, int mask)
 
 TILE_READ (b, u8)
 
 TILE_READ (w, u16)
 
 TILE_READ (l, u32)
 
 TILE_READ (q, u64)
 
 TILE_WRITE (b, u8)
 
 TILE_WRITE (w, u16)
 
 TILE_WRITE (l, u32)
 
 TILE_WRITE (q, u64)
 

Variables

int __write_once tile_plx_gen1
 

Macro Definition Documentation

#define TILE_READ (   size,
  type 
)
Value:
type _tile_read##size(unsigned long addr) \
{ \
int idx = 0; \
if (addr > controllers[0].mem_resources[1].end && \
addr > controllers[0].mem_resources[2].end) \
idx = 1; \
if (hv_dev_pread(controllers[idx].hv_mem_fd, 0, \
(HV_VirtAddr)(&val), sizeof(type), addr)) \
pr_err("PCI: read %zd bytes at 0x%lX failed\n", \
sizeof(type), addr); \
return val; \
} \
EXPORT_SYMBOL(_tile_read##size)

Definition at line 565 of file pci.c.

#define TILE_WRITE (   size,
  type 
)
Value:
void _tile_write##size(type val, unsigned long addr) \
{ \
int idx = 0; \
if (addr > controllers[0].mem_resources[1].end && \
addr > controllers[0].mem_resources[2].end) \
idx = 1; \
if (hv_dev_pwrite(controllers[idx].hv_mem_fd, 0, \
(HV_VirtAddr)(&val), sizeof(type), addr)) \
pr_err("PCI: write %zd bytes at 0x%lX failed\n", \
sizeof(type), addr); \
} \
EXPORT_SYMBOL(_tile_write##size)

Definition at line 586 of file pci.c.

Function Documentation

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

Definition at line 71 of file pci.c.

int pcibios_enable_device ( struct pci_dev dev,
int  mask 
)

Definition at line 399 of file pci.c.

void __devinit pcibios_fixup_bus ( struct pci_bus bus)

Definition at line 382 of file pci.c.

int __init pcibios_init ( void  )

Definition at line 276 of file pci.c.

void pcibios_set_master ( struct pci_dev dev)

Definition at line 387 of file pci.c.

subsys_initcall ( pcibios_init  )
int __init tile_pci_init ( void  )

Definition at line 144 of file pci.c.

TILE_READ ( b  ,
u8   
)
TILE_READ ( w  ,
u16   
)
TILE_READ ( l  ,
u32   
)
TILE_READ ( q  ,
u64   
)
TILE_WRITE ( b  ,
u8   
)
TILE_WRITE ( w  ,
u16   
)
TILE_WRITE ( l  ,
u32   
)
TILE_WRITE ( q  ,
u64   
)

Variable Documentation

int __write_once tile_plx_gen1

Definition at line 59 of file pci.c.