#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.
|
#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 } |
|
#define cfg_debug |
( |
|
fmt... | ) |
|
#define DEF_PCI_AC_NORET |
( |
|
name, |
|
|
|
at, |
|
|
|
al, |
|
|
|
space, |
|
|
|
aa |
|
) |
| DEF_PCI_AC_NORET_##space(name, at, al, aa) \ |
#define DEF_PCI_AC_NORET_mem |
( |
|
name, |
|
|
|
at, |
|
|
|
al, |
|
|
|
aa |
|
) |
| |
#define DEF_PCI_AC_NORET_pio |
( |
|
name, |
|
|
|
at, |
|
|
|
al, |
|
|
|
aa |
|
) |
| |
Value:static void wsp_pci_##
name at \
WARN_ON(!bus); \
phb = bus->private; \
spin_lock_irqsave(&phb->lock, flags); \
wsp_pci_wait_io_idle(phb, aa); \
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) |
#define DEF_PCI_AC_RET_mem |
( |
|
name, |
|
|
|
ret, |
|
|
|
at, |
|
|
|
al, |
|
|
|
aa |
|
) |
| |
#define DEF_PCI_AC_RET_pio |
( |
|
name, |
|
|
|
ret, |
|
|
|
at, |
|
|
|
al, |
|
|
|
aa |
|
) |
| |
Value:
ret rval; \
WARN_ON(!bus); \
phb = bus->private; \
spin_lock_irqsave(&phb->lock, flags); \
wsp_pci_wait_io_idle(phb, aa); \
spin_unlock_irqrestore(&phb->lock, flags); \
return rval; \
}
Definition at line 587 of file wsp_pci.c.
#define dma_debug |
( |
|
fmt... | ) |
|
#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 MAX_TABLE_TVT_COUNT 8 |
#define NUM_DMA32_REGIONS 1 |
#define TCE_PCI_READ 0x1 /* read from PCI allowed */ |
#define TCE_PCI_WRITE 0x2 /* write from PCI allowed */ |
#define TCE_RPN_MASK 0x3fffffffffful /* 42-bit RPN (4K pages) */ |
arch_initcall |
( |
wsp_setup_pci_late |
| ) |
|
DEFINE_SIMPLE_ATTRIBUTE |
( |
wsp_pci_reg_fops |
, |
|
|
wsp_pci_reg_get |
, |
|
|
wsp_pci_reg_set |
, |
|
|
"0x%llx\n" |
|
|
) |
| |