Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* MPI_BASE = 0xfffe2000 */
- typedef struct MpiRegisters {
- EbiChipSelect cs[7]; /*0x0 size chip select configuration (14 uin32)*/
- #define EBI_CS0_BASE 0
- #define EBI_CS1_BASE 1
- #define EBI_CS2_BASE 2
- #define EBI_CS3_BASE 3
- #define PCMCIA_COMMON_BASE 4
- #define PCMCIA_ATTRIBUTE_BASE 5
- #define PCMCIA_IO_BASE 6
- uint32 unused0[2]; /*0x38 reserved */
- uint32 ebi_control; /*0x40 ebi control */
- uint32 unused1[4]; /*0x44 reserved */
- #define EBI_ACCESS_TIMEOUT 0x000007FF
- uint32 pcmcia_cntl1; /*0x54 pcmcia control 1 */
- #define PCCARD_CARD_RESET 0x00040000
- #define CARDBUS_ENABLE 0x00008000
- #define PCMCIA_ENABLE 0x00004000
- #define PCMCIA_GPIO_ENABLE 0x00002000
- #define CARDBUS_IDSEL 0x00001F00
- #define VS2_OEN 0x00000080
- #define VS1_OEN 0x00000040
- #define VS2_OUT 0x00000020
- #define VS1_OUT 0x00000010
- #define VS2_IN 0x00000008
- #define VS1_IN 0x00000004
- #define CD2_IN 0x00000002
- #define CD1_IN 0x00000001
- #define VS_MASK 0x0000000C
- #define CD_MASK 0x00000003
- uint32 unused2; /*0x58 reserved */
- uint32 pcmcia_cntl2; /*0x5c pcmcia control 2 */
- #define PCMCIA_BYTESWAP_DIS 0x00000002
- #define PCMCIA_HALFWORD_EN 0x00000001
- #define RW_ACTIVE_CNT_BIT 2
- #define INACTIVE_CNT_BIT 8
- #define CE_SETUP_CNT_BIT 16
- #define CE_HOLD_CNT_BIT 24
- uint32 unused3[40]; /*0x60 reserved */
- uint32 sp0range; /*0x100 PCI to internal system bus address space */
- uint32 sp0remap; /*0x104*/
- uint32 sp0cfg; /*0x108*/
- uint32 sp1range; /*0x10c*/
- uint32 sp1remap; /*0x110*/
- uint32 sp1cfg; /*0x114*/
- uint32 EndianCfg; /*0x118*/
- uint32 l2pcfgctl; /*0x11c internal system bus to PCI IO/Cfg control */
- #define DIR_CFG_SEL 0x80000000 /* change from PCI I/O access to PCI config access */
- #define DIR_CFG_USEREG 0x40000000 /* use this register info for PCI configuration access */
- #define DEVICE_NUMBER 0x00007C00 /* device number for the PCI configuration access */
- #define FUNC_NUMBER 0x00000300 /* function number for the PCI configuration access */
- #define REG_NUMBER 0x000000FC /* register number for the PCI configuration access */
- #define CONFIG_TYPE 0x00000003 /* configuration type for the PCI configuration access */
- uint32 l2pmrange1; /*0x120 internal system bus to PCI memory space */
- #define PCI_SIZE_64K 0xFFFF0000
- #define PCI_SIZE_128K 0xFFFE0000
- #define PCI_SIZE_256K 0xFFFC0000
- #define PCI_SIZE_512K 0xFFF80000
- #define PCI_SIZE_1M 0xFFF00000
- #define PCI_SIZE_2M 0xFFE00000
- #define PCI_SIZE_4M 0xFFC00000
- #define PCI_SIZE_8M 0xFF800000
- #define PCI_SIZE_16M 0xFF000000
- #define PCI_SIZE_32M 0xFE000000
- uint32 l2pmbase1; /*0x124 kseg0 or kseg1 address & 0x1FFFFFFF */
- uint32 l2pmremap1; /*0x128*/
- #define CARDBUS_MEM 0x00000004
- #define MEM_WINDOW_EN 0x00000001
- uint32 l2pmrange2; /*0x12c**/
- uint32 l2pmbase2; /*0x130**/
- uint32 l2pmremap2; /*0x134**/
- uint32 l2piorange; /*0x138 internal system bus to PCI I/O space */
- uint32 l2piobase; /*0x13c**/
- uint32 l2pioremap; /*0x140**/
- uint32 pcimodesel; /*0x144**/
- #define PCI_INT_BUS_RD_PREFETCH 0x000001F0
- #define PCI_BAR2_NOSWAP 0x00000002 /* BAR at offset 0x20 */
- #define PCI_BAR1_NOSWAP 0x00000001 /* BAR at affset 0x1c */
- uint32 pciintstat; /*0x148 PCI interrupt mask/status */
- #define MAILBOX1_SENT 0x08
- #define MAILBOX0_SENT 0x04
- #define MAILBOX1_MSG_RCV 0x02
- #define MAILBOX0_MSG_RCV 0x01
- uint32 locbuscntrl; /*0x14c internal system bus control */
- #define DIR_U2P_NOSWAP 0x00000002
- #define EN_PCI_GPIO 0x00000001
- uint32 locintstat; /*0x150 internal system bus interrupt mask/status */
- #define CSERR 0x0200
- #define SERR 0x0100
- #define EXT_PCI_INT 0x0080
- #define DIR_FAILED 0x0040
- #define DIR_COMPLETE 0x0020
- #define PCI_CFG 0x0010
- uint32 unused5[7]; /*0x154**/
- uint32 mailbox0; /*0x170**/
- uint32 mailbox1; /*0x174**/
- uint32 pcicfgcntrl; /*0x178 internal system bus PCI configuration control */
- #define PCI_CFG_REG_WRITE_EN 0x00000080
- #define PCI_CFG_ADDR 0x0000003C
- uint32 pcicfgdata; /*0x17c internal system bus PCI configuration data */
- uint32 locch2ctl; /*0x180 PCI to interrnal system bus DMA (downstream) local control */
- #define MPI_DMA_HALT 0x00000008 /* idle after finish current memory burst */
- #define MPI_DMA_PKT_HALT 0x00000004 /* idle after an EOP flag is detected */
- #define MPI_DMA_STALL 0x00000002 /* idle after an EOP flag is detected */
- #define MPI_DMA_ENABLE 0x00000001 /* set to enable channel */
- uint32 locch2intStat; /*0x184*/
- #define MPI_DMA_NO_DESC 0x00000004 /* no valid descriptors */
- #define MPI_DMA_DONE 0x00000002 /* packet xfer complete */
- #define MPI_DMA_BUFF_DONE 0x00000001 /* buffer done */
- uint32 locch2intMask;
- uint32 unused6;
- uint32 locch2descaddr;
- uint32 locch2status1;
- #define LOCAL_DESC_STATE 0xE0000000
- #define PCI_DESC_STATE 0x1C000000
- #define BYTE_DONE 0x03FFC000
- #define RING_ADDR 0x00003FFF
- uint32 locch2status2;
- #define BUFPTR_OFFSET 0x1FFF0000
- #define PCI_MASTER_STATE 0x000000C0
- #define LOC_MASTER_STATE 0x00000038
- #define CONTROL_STATE 0x00000007
- uint32 unused7;
- uint32 locch1Ctl; /*internal system bus to PCI DMA (upstream) local control */
- #define DMA_U2P_LE 0x00000200 /* local bus is little endian */
- #define DMA_U2P_NOSWAP 0x00000100 /* lccal bus is little endian but no data swapped */
- uint32 locch1intstat;
- uint32 locch1intmask;
- uint32 unused8;
- uint32 locch1descaddr;
- uint32 locch1status1;
- uint32 locch1status2;
- uint32 unused9;
- uint32 pcich1ctl; /* internal system bus to PCI DMA PCI control */
- uint32 pcich1intstat;
- uint32 pcich1intmask;
- uint32 pcich1descaddr;
- uint32 pcich1status1;
- uint32 pcich1status2;
- uint32 pcich2Ctl; /* PCI to internal system bus DMA PCI control */
- uint32 pcich2intstat;
- uint32 pcich2intmask;
- uint32 pcich2descaddr;
- uint32 pcich2status1;
- uint32 pcich2status2;
- uint32 perm_id; /* permanent device and vendor id */
- uint32 perm_rev; /* permanent revision id */
- } MpiRegisters;
- #define MPI ((volatile MpiRegisters * const) MPI_BASE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement