Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
iomap.h File Reference

Go to the source code of this file.

Macros

#define XLP_DEFAULT_IO_BASE   0x18000000
 
#define XLP_DEFAULT_PCI_ECFG_BASE   XLP_DEFAULT_IO_BASE
 
#define XLP_DEFAULT_PCI_CFG_BASE   0x1c000000
 
#define NMI_BASE   0xbfc00000
 
#define XLP_IO_CLK   133333333
 
#define XLP_PCIE_CFG_SIZE   0x1000 /* 4K */
 
#define XLP_PCIE_DEV_BLK_SIZE   (8 * XLP_PCIE_CFG_SIZE)
 
#define XLP_PCIE_BUS_BLK_SIZE   (256 * XLP_PCIE_DEV_BLK_SIZE)
 
#define XLP_IO_SIZE   (64 << 20) /* ECFG space size */
 
#define XLP_IO_PCI_HDRSZ   0x100
 
#define XLP_IO_DEV(node, dev)   ((dev) + (node) * 8)
 
#define XLP_HDR_OFFSET(node, bus, dev, fn)
 
#define XLP_IO_BRIDGE_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 0, 0)
 
#define XLP_IO_CIC0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 0, 1)
 
#define XLP_IO_CIC1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 0, 2)
 
#define XLP_IO_CIC2_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 0, 3)
 
#define XLP_IO_PIC_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 0, 4)
 
#define XLP_IO_PCIE_OFFSET(node, i)   XLP_HDR_OFFSET(node, 0, 1, i)
 
#define XLP_IO_PCIE0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 1, 0)
 
#define XLP_IO_PCIE1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 1, 1)
 
#define XLP_IO_PCIE2_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 1, 2)
 
#define XLP_IO_PCIE3_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 1, 3)
 
#define XLP_IO_USB_OFFSET(node, i)   XLP_HDR_OFFSET(node, 0, 2, i)
 
#define XLP_IO_USB_EHCI0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 0)
 
#define XLP_IO_USB_OHCI0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 1)
 
#define XLP_IO_USB_OHCI1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 2)
 
#define XLP_IO_USB_EHCI1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 3)
 
#define XLP_IO_USB_OHCI2_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 4)
 
#define XLP_IO_USB_OHCI3_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 2, 5)
 
#define XLP_IO_NAE_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 3, 0)
 
#define XLP_IO_POE_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 3, 1)
 
#define XLP_IO_CMS_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 4, 0)
 
#define XLP_IO_DMA_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 5, 1)
 
#define XLP_IO_SEC_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 5, 2)
 
#define XLP_IO_CMP_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 5, 3)
 
#define XLP_IO_UART_OFFSET(node, i)   XLP_HDR_OFFSET(node, 0, 6, i)
 
#define XLP_IO_UART0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 0)
 
#define XLP_IO_UART1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 1)
 
#define XLP_IO_I2C_OFFSET(node, i)   XLP_HDR_OFFSET(node, 0, 6, 2 + i)
 
#define XLP_IO_I2C0_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 2)
 
#define XLP_IO_I2C1_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 3)
 
#define XLP_IO_GPIO_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 4)
 
#define XLP_IO_SYS_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 5)
 
#define XLP_IO_JTAG_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 6, 6)
 
#define XLP_IO_NOR_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 7, 0)
 
#define XLP_IO_NAND_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 7, 1)
 
#define XLP_IO_SPI_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 7, 2)
 
#define XLP_IO_SD_OFFSET(node)   XLP_HDR_OFFSET(node, 0, 7, 3)
 
#define XLP_IO_MMC_OFFSET(node, slot)   ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ)
 
#define XLP_PCI_CFGREG0   0x00
 
#define XLP_PCI_CFGREG1   0x01
 
#define XLP_PCI_CFGREG2   0x02
 
#define XLP_PCI_CFGREG3   0x03
 
#define XLP_PCI_CFGREG4   0x04
 
#define XLP_PCI_CFGREG5   0x05
 
#define XLP_PCI_DEVINFO_REG0   0x30
 
#define XLP_PCI_DEVINFO_REG1   0x31
 
#define XLP_PCI_DEVINFO_REG2   0x32
 
#define XLP_PCI_DEVINFO_REG3   0x33
 
#define XLP_PCI_DEVINFO_REG4   0x34
 
#define XLP_PCI_DEVINFO_REG5   0x35
 
#define XLP_PCI_DEVINFO_REG6   0x36
 
#define XLP_PCI_DEVINFO_REG7   0x37
 
#define XLP_PCI_DEVSCRATCH_REG0   0x38
 
#define XLP_PCI_DEVSCRATCH_REG1   0x39
 
#define XLP_PCI_DEVSCRATCH_REG2   0x3a
 
#define XLP_PCI_DEVSCRATCH_REG3   0x3b
 
#define XLP_PCI_MSGSTN_REG   0x3c
 
#define XLP_PCI_IRTINFO_REG   0x3d
 
#define XLP_PCI_UCODEINFO_REG   0x3e
 
#define XLP_PCI_SBB_WT_REG   0x3f
 
#define PCI_VENDOR_NETLOGIC   0x184e
 
#define PCI_DEVICE_ID_NLM_ROOT   0x1001
 
#define PCI_DEVICE_ID_NLM_ICI   0x1002
 
#define PCI_DEVICE_ID_NLM_PIC   0x1003
 
#define PCI_DEVICE_ID_NLM_PCIE   0x1004
 
#define PCI_DEVICE_ID_NLM_EHCI   0x1007
 
#define PCI_DEVICE_ID_NLM_OHCI   0x1008
 
#define PCI_DEVICE_ID_NLM_NAE   0x1009
 
#define PCI_DEVICE_ID_NLM_POE   0x100A
 
#define PCI_DEVICE_ID_NLM_FMN   0x100B
 
#define PCI_DEVICE_ID_NLM_RAID   0x100D
 
#define PCI_DEVICE_ID_NLM_SAE   0x100D
 
#define PCI_DEVICE_ID_NLM_RSA   0x100E
 
#define PCI_DEVICE_ID_NLM_CMP   0x100F
 
#define PCI_DEVICE_ID_NLM_UART   0x1010
 
#define PCI_DEVICE_ID_NLM_I2C   0x1011
 
#define PCI_DEVICE_ID_NLM_NOR   0x1015
 
#define PCI_DEVICE_ID_NLM_NAND   0x1016
 
#define PCI_DEVICE_ID_NLM_MMC   0x1018
 
#define nlm_read_pci_reg(b, r)   nlm_read_reg(b, r)
 
#define nlm_write_pci_reg(b, r, v)   nlm_write_reg(b, r, v)
 

Macro Definition Documentation

#define nlm_read_pci_reg (   b,
  r 
)    nlm_read_reg(b, r)

Definition at line 151 of file iomap.h.

#define nlm_write_pci_reg (   b,
  r,
  v 
)    nlm_write_reg(b, r, v)

Definition at line 152 of file iomap.h.

#define NMI_BASE   0xbfc00000

Definition at line 42 of file iomap.h.

#define PCI_DEVICE_ID_NLM_CMP   0x100F

Definition at line 142 of file iomap.h.

#define PCI_DEVICE_ID_NLM_EHCI   0x1007

Definition at line 134 of file iomap.h.

#define PCI_DEVICE_ID_NLM_FMN   0x100B

Definition at line 138 of file iomap.h.

#define PCI_DEVICE_ID_NLM_I2C   0x1011

Definition at line 144 of file iomap.h.

#define PCI_DEVICE_ID_NLM_ICI   0x1002

Definition at line 131 of file iomap.h.

#define PCI_DEVICE_ID_NLM_MMC   0x1018

Definition at line 147 of file iomap.h.

#define PCI_DEVICE_ID_NLM_NAE   0x1009

Definition at line 136 of file iomap.h.

#define PCI_DEVICE_ID_NLM_NAND   0x1016

Definition at line 146 of file iomap.h.

#define PCI_DEVICE_ID_NLM_NOR   0x1015

Definition at line 145 of file iomap.h.

#define PCI_DEVICE_ID_NLM_OHCI   0x1008

Definition at line 135 of file iomap.h.

#define PCI_DEVICE_ID_NLM_PCIE   0x1004

Definition at line 133 of file iomap.h.

#define PCI_DEVICE_ID_NLM_PIC   0x1003

Definition at line 132 of file iomap.h.

#define PCI_DEVICE_ID_NLM_POE   0x100A

Definition at line 137 of file iomap.h.

#define PCI_DEVICE_ID_NLM_RAID   0x100D

Definition at line 139 of file iomap.h.

#define PCI_DEVICE_ID_NLM_ROOT   0x1001

Definition at line 130 of file iomap.h.

#define PCI_DEVICE_ID_NLM_RSA   0x100E

Definition at line 141 of file iomap.h.

#define PCI_DEVICE_ID_NLM_SAE   0x100D

Definition at line 140 of file iomap.h.

#define PCI_DEVICE_ID_NLM_UART   0x1010

Definition at line 143 of file iomap.h.

#define PCI_VENDOR_NETLOGIC   0x184e

Definition at line 128 of file iomap.h.

#define XLP_DEFAULT_IO_BASE   0x18000000

Definition at line 38 of file iomap.h.

#define XLP_DEFAULT_PCI_CFG_BASE   0x1c000000

Definition at line 40 of file iomap.h.

#define XLP_DEFAULT_PCI_ECFG_BASE   XLP_DEFAULT_IO_BASE

Definition at line 39 of file iomap.h.

#define XLP_HDR_OFFSET (   node,
  bus,
  dev,
  fn 
)
Value:
(((bus) << 20) | \
((XLP_IO_DEV(node, dev)) << 15) | ((fn) << 12))

Definition at line 51 of file iomap.h.

#define XLP_IO_BRIDGE_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 0, 0)

Definition at line 54 of file iomap.h.

#define XLP_IO_CIC0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 0, 1)

Definition at line 56 of file iomap.h.

#define XLP_IO_CIC1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 0, 2)

Definition at line 57 of file iomap.h.

#define XLP_IO_CIC2_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 0, 3)

Definition at line 58 of file iomap.h.

#define XLP_IO_CLK   133333333

Definition at line 43 of file iomap.h.

#define XLP_IO_CMP_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 5, 3)

Definition at line 82 of file iomap.h.

#define XLP_IO_CMS_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 4, 0)

Definition at line 78 of file iomap.h.

#define XLP_IO_DEV (   node,
  dev 
)    ((dev) + (node) * 8)

Definition at line 50 of file iomap.h.

#define XLP_IO_DMA_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 5, 1)

Definition at line 80 of file iomap.h.

#define XLP_IO_GPIO_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 4)

Definition at line 90 of file iomap.h.

#define XLP_IO_I2C0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 2)

Definition at line 88 of file iomap.h.

#define XLP_IO_I2C1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 3)

Definition at line 89 of file iomap.h.

#define XLP_IO_I2C_OFFSET (   node,
  i 
)    XLP_HDR_OFFSET(node, 0, 6, 2 + i)

Definition at line 87 of file iomap.h.

#define XLP_IO_JTAG_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 6)

Definition at line 93 of file iomap.h.

#define XLP_IO_MMC_OFFSET (   node,
  slot 
)    ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ)

Definition at line 100 of file iomap.h.

#define XLP_IO_NAE_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 3, 0)

Definition at line 75 of file iomap.h.

#define XLP_IO_NAND_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 7, 1)

Definition at line 96 of file iomap.h.

#define XLP_IO_NOR_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 7, 0)

Definition at line 95 of file iomap.h.

#define XLP_IO_PCI_HDRSZ   0x100

Definition at line 49 of file iomap.h.

#define XLP_IO_PCIE0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 1, 0)

Definition at line 62 of file iomap.h.

#define XLP_IO_PCIE1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 1, 1)

Definition at line 63 of file iomap.h.

#define XLP_IO_PCIE2_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 1, 2)

Definition at line 64 of file iomap.h.

#define XLP_IO_PCIE3_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 1, 3)

Definition at line 65 of file iomap.h.

#define XLP_IO_PCIE_OFFSET (   node,
  i 
)    XLP_HDR_OFFSET(node, 0, 1, i)

Definition at line 61 of file iomap.h.

#define XLP_IO_PIC_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 0, 4)

Definition at line 59 of file iomap.h.

#define XLP_IO_POE_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 3, 1)

Definition at line 76 of file iomap.h.

#define XLP_IO_SD_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 7, 3)

Definition at line 99 of file iomap.h.

#define XLP_IO_SEC_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 5, 2)

Definition at line 81 of file iomap.h.

#define XLP_IO_SIZE   (64 << 20) /* ECFG space size */

Definition at line 48 of file iomap.h.

#define XLP_IO_SPI_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 7, 2)

Definition at line 97 of file iomap.h.

#define XLP_IO_SYS_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 5)

Definition at line 92 of file iomap.h.

#define XLP_IO_UART0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 0)

Definition at line 85 of file iomap.h.

#define XLP_IO_UART1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 6, 1)

Definition at line 86 of file iomap.h.

#define XLP_IO_UART_OFFSET (   node,
  i 
)    XLP_HDR_OFFSET(node, 0, 6, i)

Definition at line 84 of file iomap.h.

#define XLP_IO_USB_EHCI0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 0)

Definition at line 68 of file iomap.h.

#define XLP_IO_USB_EHCI1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 3)

Definition at line 71 of file iomap.h.

#define XLP_IO_USB_OFFSET (   node,
  i 
)    XLP_HDR_OFFSET(node, 0, 2, i)

Definition at line 67 of file iomap.h.

#define XLP_IO_USB_OHCI0_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 1)

Definition at line 69 of file iomap.h.

#define XLP_IO_USB_OHCI1_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 2)

Definition at line 70 of file iomap.h.

#define XLP_IO_USB_OHCI2_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 4)

Definition at line 72 of file iomap.h.

#define XLP_IO_USB_OHCI3_OFFSET (   node)    XLP_HDR_OFFSET(node, 0, 2, 5)

Definition at line 73 of file iomap.h.

#define XLP_PCI_CFGREG0   0x00

Definition at line 104 of file iomap.h.

#define XLP_PCI_CFGREG1   0x01

Definition at line 105 of file iomap.h.

#define XLP_PCI_CFGREG2   0x02

Definition at line 106 of file iomap.h.

#define XLP_PCI_CFGREG3   0x03

Definition at line 107 of file iomap.h.

#define XLP_PCI_CFGREG4   0x04

Definition at line 108 of file iomap.h.

#define XLP_PCI_CFGREG5   0x05

Definition at line 109 of file iomap.h.

#define XLP_PCI_DEVINFO_REG0   0x30

Definition at line 110 of file iomap.h.

#define XLP_PCI_DEVINFO_REG1   0x31

Definition at line 111 of file iomap.h.

#define XLP_PCI_DEVINFO_REG2   0x32

Definition at line 112 of file iomap.h.

#define XLP_PCI_DEVINFO_REG3   0x33

Definition at line 113 of file iomap.h.

#define XLP_PCI_DEVINFO_REG4   0x34

Definition at line 114 of file iomap.h.

#define XLP_PCI_DEVINFO_REG5   0x35

Definition at line 115 of file iomap.h.

#define XLP_PCI_DEVINFO_REG6   0x36

Definition at line 116 of file iomap.h.

#define XLP_PCI_DEVINFO_REG7   0x37

Definition at line 117 of file iomap.h.

#define XLP_PCI_DEVSCRATCH_REG0   0x38

Definition at line 118 of file iomap.h.

#define XLP_PCI_DEVSCRATCH_REG1   0x39

Definition at line 119 of file iomap.h.

#define XLP_PCI_DEVSCRATCH_REG2   0x3a

Definition at line 120 of file iomap.h.

#define XLP_PCI_DEVSCRATCH_REG3   0x3b

Definition at line 121 of file iomap.h.

#define XLP_PCI_IRTINFO_REG   0x3d

Definition at line 123 of file iomap.h.

#define XLP_PCI_MSGSTN_REG   0x3c

Definition at line 122 of file iomap.h.

#define XLP_PCI_SBB_WT_REG   0x3f

Definition at line 125 of file iomap.h.

#define XLP_PCI_UCODEINFO_REG   0x3e

Definition at line 124 of file iomap.h.

#define XLP_PCIE_BUS_BLK_SIZE   (256 * XLP_PCIE_DEV_BLK_SIZE)

Definition at line 47 of file iomap.h.

#define XLP_PCIE_CFG_SIZE   0x1000 /* 4K */

Definition at line 45 of file iomap.h.

#define XLP_PCIE_DEV_BLK_SIZE   (8 * XLP_PCIE_CFG_SIZE)

Definition at line 46 of file iomap.h.