Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wsp_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/bootmem.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/debugfs.h>
#include <asm/sections.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include <asm/ppc-pci.h>
#include <asm/iommu.h>
#include <asm/io-workarounds.h>
#include <asm/debug.h>
#include "wsp.h"
#include "wsp_pci.h"
#include "msi.h"
#include <asm/io-defs.h>

Go to the source code of this file.

Data Structures

struct  wsp_dma_table
 
struct  wsp_phb
 

Macros

#define DEBUG
 
#define MAX_TABLE_TVT_COUNT   8
 
#define NUM_DMA32_REGIONS   1
 
#define cfg_debug(fmt...)
 
#define TCE_SHIFT   12
 
#define TCE_PAGE_SIZE   (1 << TCE_SHIFT)
 
#define TCE_PCI_WRITE   0x2 /* write from PCI allowed */
 
#define TCE_PCI_READ   0x1 /* read from PCI allowed */
 
#define TCE_RPN_MASK   0x3fffffffffful /* 42-bit RPN (4K pages) */
 
#define TCE_RPN_SHIFT   12
 
#define dma_debug(fmt...)
 
#define DUMP_REG(x)   pr_debug("%-30s : 0x%016llx\n", #x, in_be64(hose->cfg_data + x))
 
#define DEF_PCI_AC_RET_pio(name, ret, at, al, aa)
 
#define DEF_PCI_AC_NORET_pio(name, at, al, aa)
 
#define DEF_PCI_AC_RET_mem(name, ret, at, al, aa)
 
#define DEF_PCI_AC_NORET_mem(name, at, al, aa)
 
#define DEF_PCI_AC_RET(name, ret, at, al, space, aa)   DEF_PCI_AC_RET_##space(name, ret, at, al, aa)
 
#define DEF_PCI_AC_NORET(name, at, al, space, aa)   DEF_PCI_AC_NORET_##space(name, at, al, aa) \
 
#define err_debug(fmt...)   pr_debug(fmt)
 
#define DREG(x)   { PCIE_REG_##x, #x }
 
#define DUTL(x)   { PCIE_UTL_##x, "UTL_" #x }
 

Functions

void __init wsp_setup_pci (void)
 
 DEFINE_SIMPLE_ATTRIBUTE (wsp_pci_reg_fops, wsp_pci_reg_get, wsp_pci_reg_set,"0x%llx\n")
 
 arch_initcall (wsp_setup_pci_late)
 

Macro Definition Documentation

#define cfg_debug (   fmt...)

Definition at line 105 of file wsp_pci.c.

#define DEBUG

Definition at line 10 of file wsp_pci.c.

#define DEF_PCI_AC_NORET (   name,
  at,
  al,
  space,
  aa 
)    DEF_PCI_AC_NORET_##space(name, at, al, aa) \

Definition at line 625 of file wsp_pci.c.

#define DEF_PCI_AC_NORET_mem (   name,
  at,
  al,
  aa 
)

Definition at line 620 of file wsp_pci.c.

#define DEF_PCI_AC_NORET_pio (   name,
  at,
  al,
  aa 
)
Value:
static void wsp_pci_##name at \
{ \
unsigned long flags; \
bus = iowa_pio_find_bus(aa); \
WARN_ON(!bus); \
phb = bus->private; \
spin_lock_irqsave(&phb->lock, flags); \
wsp_pci_wait_io_idle(phb, aa); \
__do_##name al; \
spin_unlock_irqrestore(&phb->lock, flags); \
}

Definition at line 604 of file wsp_pci.c.

#define DEF_PCI_AC_RET (   name,
  ret,
  at,
  al,
  space,
  aa 
)    DEF_PCI_AC_RET_##space(name, ret, at, al, aa)

Definition at line 622 of file wsp_pci.c.

#define DEF_PCI_AC_RET_mem (   name,
  ret,
  at,
  al,
  aa 
)

Definition at line 619 of file wsp_pci.c.

#define DEF_PCI_AC_RET_pio (   name,
  ret,
  at,
  al,
  aa 
)
Value:
static ret wsp_pci_##name at \
{ \
unsigned long flags; \
ret rval; \
bus = iowa_pio_find_bus(aa); \
WARN_ON(!bus); \
phb = bus->private; \
spin_lock_irqsave(&phb->lock, flags); \
wsp_pci_wait_io_idle(phb, aa); \
rval = __do_##name al; \
spin_unlock_irqrestore(&phb->lock, flags); \
return rval; \
}

Definition at line 587 of file wsp_pci.c.

#define dma_debug (   fmt...)

Definition at line 229 of file wsp_pci.c.

#define DREG (   x)    { PCIE_REG_##x, #x }
#define DUMP_REG (   x)    pr_debug("%-30s : 0x%016llx\n", #x, in_be64(hose->cfg_data + x))
#define DUTL (   x)    { PCIE_UTL_##x, "UTL_" #x }
#define err_debug (   fmt...)    pr_debug(fmt)

Definition at line 745 of file wsp_pci.c.

#define MAX_TABLE_TVT_COUNT   8

Definition at line 41 of file wsp_pci.c.

#define NUM_DMA32_REGIONS   1

Definition at line 78 of file wsp_pci.c.

#define TCE_PAGE_SIZE   (1 << TCE_SHIFT)

Definition at line 222 of file wsp_pci.c.

#define TCE_PCI_READ   0x1 /* read from PCI allowed */

Definition at line 224 of file wsp_pci.c.

#define TCE_PCI_WRITE   0x2 /* write from PCI allowed */

Definition at line 223 of file wsp_pci.c.

#define TCE_RPN_MASK   0x3fffffffffful /* 42-bit RPN (4K pages) */

Definition at line 225 of file wsp_pci.c.

#define TCE_RPN_SHIFT   12

Definition at line 226 of file wsp_pci.c.

#define TCE_SHIFT   12

Definition at line 221 of file wsp_pci.c.

Function Documentation

arch_initcall ( wsp_setup_pci_late  )
DEFINE_SIMPLE_ATTRIBUTE ( wsp_pci_reg_fops  ,
wsp_pci_reg_get  ,
wsp_pci_reg_set  ,
"0x%llx\n"   
)
void __init wsp_setup_pci ( void  )

Definition at line 717 of file wsp_pci.c.

Variable Documentation

const char* name

Definition at line 780 of file wsp_pci.c.

Definition at line 779 of file wsp_pci.c.