Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
pcibr_provider.h File Reference
#include <asm/sn/intr.h>
#include <asm/sn/pcibus_provider_defs.h>

Go to the source code of this file.

Data Structures

struct  ate_resource
 
struct  pcibus_info
 

Macros

#define PV907516   (1 << 1) /* TIOCP: Don't write the write buffer flush reg */
 
#define BUSTYPE_MASK   0x1
 
#define IS_PCIX(ps)   ((ps)->pbi_bridge_mode & BUSTYPE_MASK)
 
#define IS_PCI_BRIDGE_ASIC(asic)
 
#define IS_PIC_SOFT(ps)   (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_PIC)
 
#define IS_TIOCP_SOFT(ps)   (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_TIOCP)
 
#define PCIBR_BRIDGETYPE_UNKNOWN   -1
 
#define PCIBR_BRIDGETYPE_PIC   2
 
#define PCIBR_BRIDGETYPE_TIOCP   3
 
#define PCI64_ATTR_PREF   (1ull << 59)
 
#define PCI64_ATTR_PREC   (1ull << 58)
 
#define PCI64_ATTR_VIRTUAL   (1ull << 57)
 
#define PCI64_ATTR_BAR   (1ull << 56)
 
#define PCI64_ATTR_SWAP   (1ull << 55)
 
#define PCI64_ATTR_VIRTUAL1   (1ull << 54)
 
#define PCI32_LOCAL_BASE   0
 
#define PCI32_MAPPED_BASE   0x40000000
 
#define PCI32_DIRECT_BASE   0x80000000
 
#define IS_PCI32_MAPPED(x)
 
#define IS_PCI32_DIRECT(x)   ((u64)(x) >= PCI32_MAPPED_BASE)
 
#define PCI32_ATE_V   (0x1 << 0)
 
#define PCI32_ATE_CO   (0x1 << 1) /* PIC ASIC ONLY */
 
#define PCI32_ATE_PIO   (0x1 << 1) /* TIOCP ASIC ONLY */
 
#define PCI32_ATE_MSI   (0x1 << 2)
 
#define PCI32_ATE_PREF   (0x1 << 3)
 
#define PCI32_ATE_BAR   (0x1 << 4)
 
#define PCI32_ATE_ADDR_SHFT   12
 
#define MINIMAL_ATES_REQUIRED(addr, size)   (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1))
 
#define MINIMAL_ATE_FLAG(addr, size)   (MINIMAL_ATES_REQUIRED((u64)addr, size) ? 1 : 0)
 
#define ATE_SWAPSHIFT   29
 
#define ATE_SWAP_ON(x)   ((x) |= (1 << ATE_SWAPSHIFT))
 
#define ATE_SWAP_OFF(x)   ((x) &= ~(1 << ATE_SWAPSHIFT))
 
#define IOPFNSHIFT   12 /* 4K per mapped page */
 
#define IOPGSIZE   (1 << IOPFNSHIFT)
 
#define IOPG(x)   ((x) >> IOPFNSHIFT)
 
#define IOPGOFF(x)   ((x) & (IOPGSIZE-1))
 
#define PCIBR_DEV_SWAP_DIR   (1ull << 19)
 
#define PCIBR_CTRL_PAGE_SIZE   (0x1 << 21)
 

Functions

int pcibr_init_provider (void)
 
voidpcibr_bus_fixup (struct pcibus_bussoft *, struct pci_controller *)
 
dma_addr_t pcibr_dma_map (struct pci_dev *, unsigned long, size_t, int type)
 
dma_addr_t pcibr_dma_map_consistent (struct pci_dev *, unsigned long, size_t, int type)
 
void pcibr_dma_unmap (struct pci_dev *, dma_addr_t, int)
 
void pcireg_control_bit_clr (struct pcibus_info *, u64)
 
void pcireg_control_bit_set (struct pcibus_info *, u64)
 
u64 pcireg_tflush_get (struct pcibus_info *)
 
u64 pcireg_intr_status_get (struct pcibus_info *)
 
void pcireg_intr_enable_bit_clr (struct pcibus_info *, u64)
 
void pcireg_intr_enable_bit_set (struct pcibus_info *, u64)
 
void pcireg_intr_addr_addr_set (struct pcibus_info *, int, u64)
 
void pcireg_force_intr_set (struct pcibus_info *, int)
 
u64 pcireg_wrb_flush_get (struct pcibus_info *, int)
 
void pcireg_int_ate_set (struct pcibus_info *, int, u64)
 
u64 __iomempcireg_int_ate_addr (struct pcibus_info *, int)
 
void pcibr_force_interrupt (struct sn_irq_info *sn_irq_info)
 
void pcibr_change_devices_irq (struct sn_irq_info *sn_irq_info)
 
int pcibr_ate_alloc (struct pcibus_info *, int)
 
void pcibr_ate_free (struct pcibus_info *, int)
 
void ate_write (struct pcibus_info *, int, int, u64)
 
int sal_pcibr_slot_enable (struct pcibus_info *soft, int device, void *resp, char **ssdt)
 
int sal_pcibr_slot_disable (struct pcibus_info *soft, int device, int action, void *resp)
 
u16 sn_ioboard_to_pci_bus (struct pci_bus *pci_bus)
 

Macro Definition Documentation

#define ATE_SWAP_OFF (   x)    ((x) &= ~(1 << ATE_SWAPSHIFT))

Definition at line 73 of file pcibr_provider.h.

#define ATE_SWAP_ON (   x)    ((x) |= (1 << ATE_SWAPSHIFT))

Definition at line 72 of file pcibr_provider.h.

#define ATE_SWAPSHIFT   29

Definition at line 71 of file pcibr_provider.h.

#define BUSTYPE_MASK   0x1

Definition at line 17 of file pcibr_provider.h.

#define IOPFNSHIFT   12 /* 4K per mapped page */

Definition at line 79 of file pcibr_provider.h.

#define IOPG (   x)    ((x) >> IOPFNSHIFT)

Definition at line 85 of file pcibr_provider.h.

#define IOPGOFF (   x)    ((x) & (IOPGSIZE-1))

Definition at line 86 of file pcibr_provider.h.

#define IOPGSIZE   (1 << IOPFNSHIFT)

Definition at line 84 of file pcibr_provider.h.

#define IS_PCI32_DIRECT (   x)    ((u64)(x) >= PCI32_MAPPED_BASE)

Definition at line 50 of file pcibr_provider.h.

#define IS_PCI32_MAPPED (   x)
Value:

Definition at line 48 of file pcibr_provider.h.

#define IS_PCI_BRIDGE_ASIC (   asic)
Value:

Definition at line 21 of file pcibr_provider.h.

#define IS_PCIX (   ps)    ((ps)->pbi_bridge_mode & BUSTYPE_MASK)

Definition at line 20 of file pcibr_provider.h.

#define IS_PIC_SOFT (   ps)    (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_PIC)

Definition at line 23 of file pcibr_provider.h.

#define IS_TIOCP_SOFT (   ps)    (ps->pbi_bridge_type == PCIBR_BRIDGETYPE_TIOCP)

Definition at line 24 of file pcibr_provider.h.

#define MINIMAL_ATE_FLAG (   addr,
  size 
)    (MINIMAL_ATES_REQUIRED((u64)addr, size) ? 1 : 0)

Definition at line 67 of file pcibr_provider.h.

#define MINIMAL_ATES_REQUIRED (   addr,
  size 
)    (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1))

Definition at line 64 of file pcibr_provider.h.

#define PCI32_ATE_ADDR_SHFT   12

Definition at line 62 of file pcibr_provider.h.

#define PCI32_ATE_BAR   (0x1 << 4)

Definition at line 61 of file pcibr_provider.h.

#define PCI32_ATE_CO   (0x1 << 1) /* PIC ASIC ONLY */

Definition at line 57 of file pcibr_provider.h.

#define PCI32_ATE_MSI   (0x1 << 2)

Definition at line 59 of file pcibr_provider.h.

#define PCI32_ATE_PIO   (0x1 << 1) /* TIOCP ASIC ONLY */

Definition at line 58 of file pcibr_provider.h.

#define PCI32_ATE_PREF   (0x1 << 3)

Definition at line 60 of file pcibr_provider.h.

#define PCI32_ATE_V   (0x1 << 0)

Definition at line 56 of file pcibr_provider.h.

#define PCI32_DIRECT_BASE   0x80000000

Definition at line 46 of file pcibr_provider.h.

#define PCI32_LOCAL_BASE   0

Definition at line 44 of file pcibr_provider.h.

#define PCI32_MAPPED_BASE   0x40000000

Definition at line 45 of file pcibr_provider.h.

#define PCI64_ATTR_BAR   (1ull << 56)

Definition at line 40 of file pcibr_provider.h.

#define PCI64_ATTR_PREC   (1ull << 58)

Definition at line 38 of file pcibr_provider.h.

#define PCI64_ATTR_PREF   (1ull << 59)

Definition at line 37 of file pcibr_provider.h.

#define PCI64_ATTR_SWAP   (1ull << 55)

Definition at line 41 of file pcibr_provider.h.

#define PCI64_ATTR_VIRTUAL   (1ull << 57)

Definition at line 39 of file pcibr_provider.h.

#define PCI64_ATTR_VIRTUAL1   (1ull << 54)

Definition at line 42 of file pcibr_provider.h.

#define PCIBR_BRIDGETYPE_PIC   2

Definition at line 31 of file pcibr_provider.h.

#define PCIBR_BRIDGETYPE_TIOCP   3

Definition at line 32 of file pcibr_provider.h.

#define PCIBR_BRIDGETYPE_UNKNOWN   -1

Definition at line 30 of file pcibr_provider.h.

#define PCIBR_CTRL_PAGE_SIZE   (0x1 << 21)

Definition at line 89 of file pcibr_provider.h.

#define PCIBR_DEV_SWAP_DIR   (1ull << 19)

Definition at line 88 of file pcibr_provider.h.

#define PV907516   (1 << 1) /* TIOCP: Don't write the write buffer flush reg */

Definition at line 15 of file pcibr_provider.h.

Function Documentation

void ate_write ( struct pcibus_info ,
int  ,
int  ,
u64   
)
inline

Definition at line 144 of file pcibr_ate.c.

int pcibr_ate_alloc ( struct pcibus_info ,
int   
)

Definition at line 115 of file pcibr_ate.c.

void pcibr_ate_free ( struct pcibus_info ,
int   
)

Definition at line 160 of file pcibr_ate.c.

void* pcibr_bus_fixup ( struct pcibus_bussoft ,
struct pci_controller  
)

Definition at line 114 of file pcibr_provider.c.

void pcibr_change_devices_irq ( struct sn_irq_info sn_irq_info)
dma_addr_t pcibr_dma_map ( struct pci_dev ,
unsigned  long,
size_t  ,
int  type 
)

Definition at line 357 of file pcibr_dma.c.

dma_addr_t pcibr_dma_map_consistent ( struct pci_dev ,
unsigned  long,
size_t  ,
int  type 
)

Definition at line 395 of file pcibr_dma.c.

void pcibr_dma_unmap ( struct pci_dev ,
dma_addr_t  ,
int   
)

Definition at line 208 of file pcibr_dma.c.

void pcibr_force_interrupt ( struct sn_irq_info sn_irq_info)

Definition at line 197 of file pcibr_provider.c.

int pcibr_init_provider ( void  )

Definition at line 255 of file pcibr_provider.c.

void pcireg_control_bit_clr ( struct pcibus_info ,
u64   
)

Definition at line 26 of file pcibr_reg.c.

void pcireg_control_bit_set ( struct pcibus_info ,
u64   
)

Definition at line 46 of file pcibr_reg.c.

void pcireg_force_intr_set ( struct pcibus_info ,
int   
)

Definition at line 197 of file pcibr_reg.c.

u64 __iomem* pcireg_int_ate_addr ( struct pcibus_info ,
int   
)

Definition at line 265 of file pcibr_reg.c.

void pcireg_int_ate_set ( struct pcibus_info ,
int  ,
u64   
)

Definition at line 244 of file pcibr_reg.c.

void pcireg_intr_addr_addr_set ( struct pcibus_info ,
int  ,
u64   
)

Definition at line 167 of file pcibr_reg.c.

void pcireg_intr_enable_bit_clr ( struct pcibus_info ,
u64   
)

Definition at line 124 of file pcibr_reg.c.

void pcireg_intr_enable_bit_set ( struct pcibus_info ,
u64   
)

Definition at line 144 of file pcibr_reg.c.

u64 pcireg_intr_status_get ( struct pcibus_info )

Definition at line 99 of file pcibr_reg.c.

u64 pcireg_tflush_get ( struct pcibus_info )

Definition at line 69 of file pcibr_reg.c.

u64 pcireg_wrb_flush_get ( struct pcibus_info ,
int   
)

Definition at line 220 of file pcibr_reg.c.

int sal_pcibr_slot_disable ( struct pcibus_info soft,
int  device,
int  action,
void resp 
)

Definition at line 46 of file pcibr_provider.c.

int sal_pcibr_slot_enable ( struct pcibus_info soft,
int  device,
void resp,
char **  ssdt 
)

Definition at line 26 of file pcibr_provider.c.

u16 sn_ioboard_to_pci_bus ( struct pci_bus pci_bus)

Definition at line 82 of file pcibr_provider.c.