⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ads85xx.h

📁 这是WINDRIVER公司所开发的针对freescale公司最新的powerpc系列MPC8560的针对vxworks的bsp。对做powerpc嵌入式的很有用了。
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ads85xx.h - Motorola MPC85xx ADS board header *//* Copyright 1984-2002 Wind River Systems, Inc. *//*modification history--------------------01t,28jul04,dtr  Mod for PCI DEVNO with RevA board.01s,31mar04,dtr  Add a new PCI ID for rev2 silicon.01r,12feb04,dtr  Add in extra DDR register defines.01q,04feb04,dtr  Adding in DDRDLL reg define.01p,08oct03,dtr  Adding in DLL debug registers.01o,08sep03,dtr  Fixing windows compilation.01n,22aug03,dtr  Adding General registers.01m,04aug03,dtr  Changing allocation of LAWBAR/LAWAR registers to accomdate                 LBC SDRAM.01l,07jul03,mil  Added offsets for SCC regs.01k,08jul02,dtr  Adding some PCI defines and macros.*//*This file contains I/O addresses and related constants for theMotorola MPC85xx ADS board. */#ifndef	INCads85xxh#define	INCads85xxh#ifdef __cplusplus    extern "C" {#endif /* __cplusplus */#ifndef M8260ABBREVIATIONS#define M8260ABBREVIATIONS#ifdef  _ASMLANGUAGE#define CAST(x)#else /* _ASMLANGUAGE */typedef volatile UCHAR VCHAR;   /* shorthand for volatile UCHAR */typedef volatile INT32 VINT32; /* volatile unsigned word */typedef volatile INT16 VINT16; /* volatile unsigned halfword */typedef volatile INT8 VINT8;   /* volatile unsigned byte */typedef volatile UINT32 VUINT32; /* volatile unsigned word */typedef volatile UINT16 VUINT16; /* volatile unsigned halfword */typedef volatile UINT8 VUINT8;   /* volatile unsigned byte */#define CAST(x) (x)#endif  /* _ASMLANGUAGE */#endif /* M8260ABBREVIATIONS *//* Base Address of Memory Mapped Registers */#define CCSBAR  0xFE000000/* add PCI access macros */#define PCI_MEMIO2LOCAL(x) \         (((UINT32)x  - PCI_MEMIO_ADRS) + CPU_PCI_MEMIO_ADRS)     /* PCI IO memory adrs to CPU (60x bus) adrs */       #define PCI_IO2LOCAL(x) \     (((UINT32)x  - PCI_IO_ADRS) + CPU_PCI_IO_ADRS)	     #define PCI_MEM2LOCAL(x) \         (((UINT32)x  - PCI_MEM_ADRS) + CPU_PCI_MEM_ADRS)/* 60x bus adrs to PCI (non-prefetchable) memory address */	      #define LOCAL2PCI_MEMIO(x) \     ((int)(x) + PCI_MSTR_MEM_BUS)/* PCI defines begin */#define PCI_CFG_ADR_REG  (CCSBAR + 0x8000)#define PCI_CFG_DATA_REG (CCSBAR + 0x8004)#define PCI_AUTO_CONFIG_ADRS  0x4c00#define PPCACR_PRKM_MASK 0XF0#define PCI_REQUEST_LEVEL 0x3#define CLASS_OFFSET      0xB#define CLASS_WIDTH       0x1#define BRIDGE_CLASS_TYPE 0x6#define PCICMD_ADRS     (PCI_CFG_BASE + 0x04)  /* PCI cmd reg */#define PCICMD_VAL      0x00000006             /* PCI COMMAND Default value */#define PCISTAT_ADRS    (PCI_CFG_BASE + 0x06)  /* PCI status reg */#define NUM_PCI_SLOTS           0x4            /* 3 PCI slots: 0 to 2 */#define PCI_XINT1_LVL           0x0            /* PCI XINT1 routed to IRQ0  */#define PCI_XINT2_LVL           0x1            /* PCI XINT2 routed to IRQ1 */#define PCI_XINT3_LVL           0x2            /* PCI XINT3 routed to IRQ2 */#define PCI_XINT4_LVL           0x3            /* PCI XINT3 routed to IRQ2 */#ifdef ADS_BOARD_REVA#define PCI_SLOT1_DEVNO        0x12            /* PCI SLOT 1 Device no */#else#define PCI_SLOT1_DEVNO        0x0C            /* PCI SLOT 1 Device no */#endif#define PCI_LAT_TIMER          0x40            /* latency timer value, 64 PCI clocks */#define PCI1_DEV_ID      0x826010E3#define PCI2_DEV_ID      0x826110E3#define PCI3_DEV_ID      0x826210E3#define PCI_DEV_ID_82XX  0x00031057  /* Id for MPC8266ADS-PCI board - Rev1 */#define PCI_DEV_ID_85XX  0x00091057  /* Id for MPC85xxADS-PCI board - Rev2 */#define PCI_ID_I82559           0x12298086     /* Id for Intel 82559 */#define PCI_ID_I82559ER         0x12098086     /* Id for Intel 82559 ER */#define MPC8266ADS_PCI_IRQ       08#define PCI_INTA_IRQ     MPC8266ADS_PCI_IRQ#define PCI_INTB_IRQ     MPC8266ADS_PCI_IRQ#define PCI_INTC_IRQ     MPC8266ADS_PCI_IRQ#define PCI_INTD_IRQ     MPC8266ADS_PCI_IRQ#define DELTA(a,b)                 (abs((int)a - (int)b))#define BUS	0				/* bus-less board */#define N_SIO_CHANNELS	 	2		/* No. serial I/O channels */#define DEC_CLOCK_FREQ	OSCILLATOR_FREQ/* Local Access Windows Regster Offsets from CCSBAR *//* LAWBARx  * 0-11 Reserved - read 0 * 12-31 Base address - Most significan 20 bits  * * LAWARx * 0   Enable window * 1-7 Reserved * 8-11 Target interface - 0000 PCI/PCI-X *                       - 0001 -> 0011 Reserved *                       - 0100 Local Bus memory controller eg SDRAM/L2SRAM *                       - 0101 -> 1011 Reserved *                       - 1100 Rapid IO *                       - 1101 -> 1110 Reserved *                       - 1111 DDR SDRAM * 12-25 Reserved - read 0 * 26-31 Size of Window  - min 001011 -> 4KBytes *                       step power of 2 *                       - max 011110 -> 2 Gbytes *//* Used for DDR SDRAM */#define  M85XX_LAWBAR0(base)        (CAST(VUINT32 *)((base) + 0xc08))#define  M85XX_LAWAR0(base)         (CAST(VUINT32 *)((base) + 0xc10))/* Used for LBC SDRAM */#define  M85XX_LAWBAR1(base)        (CAST(VUINT32 *)((base) + 0xc28))#define  M85XX_LAWAR1(base)         (CAST(VUINT32 *)((base) + 0xc30))/* Not Used   */#define  M85XX_LAWBAR2(base)        (CAST(VUINT32 *)((base) + 0xc48))#define  M85XX_LAWAR2(base)         (CAST(VUINT32 *)((base) + 0xc50))/* Used for PCI */#define  M85XX_LAWBAR3(base)        (CAST(VUINT32 *)((base) + 0xc68))#define  M85XX_LAWAR3(base)         (CAST(VUINT32 *)((base) + 0xc70))/* Flash */#define  M85XX_LAWBAR4(base)        (CAST(VUINT32 *)((base) + 0xc88))#define  M85XX_LAWAR4(base)         (CAST(VUINT32 *)((base) + 0xc90))/* Not Used */#define  M85XX_LAWBAR5(base)        (CAST(VUINT32 *)((base) + 0xcA8))#define  M85XX_LAWAR5(base)         (CAST(VUINT32 *)((base) + 0xcB0))/* Not Used */#define  M85XX_LAWBAR6(base)        (CAST(VUINT32 *)((base) + 0xcc8))    #define  M85XX_LAWAR6(base)         (CAST(VUINT32 *)((base) + 0xcd0))/* Not Used */#define  M85XX_LAWBAR7(base)        (CAST(VUINT32 *)((base) + 0xce8))#define  M85XX_LAWAR7(base)         (CAST(VUINT32 *)((base) + 0xcf0))#define  LAWBAR_ADRS_SHIFT  12#define  LAWAR_ENABLE       0x80000000#define  LAWAR_TGTIF_PCI       0x00000000#define  LAWAR_TGTIF_LBC       0x00400000#define  LAWAR_TGTIF_RAPIDIO   0x00c00000#define  LAWAR_TGTIF_DDRSDRAM  0x00F00000/* LAWAR SIZE Settings */ #define  LAWAR_SIZE_4KB     0x0000000B#define  LAWAR_SIZE_8KB     0x0000000C#define  LAWAR_SIZE_16KB    0x0000000D#define  LAWAR_SIZE_32KB    0x0000000E#define  LAWAR_SIZE_64KB    0x0000000F#define  LAWAR_SIZE_128KB   0x00000010#define  LAWAR_SIZE_256KB   0x00000011#define  LAWAR_SIZE_512KB   0x00000012#define  LAWAR_SIZE_1MB     0x00000013#define  LAWAR_SIZE_2MB     0x00000014#define  LAWAR_SIZE_4MB     0x00000015#define  LAWAR_SIZE_8MB     0x00000016#define  LAWAR_SIZE_16MB    0x00000017#define  LAWAR_SIZE_32MB    0x00000018#define  LAWAR_SIZE_64MB    0x00000019#define  LAWAR_SIZE_128MB   0x0000001A#define  LAWAR_SIZE_256MB   0x0000001B#define  LAWAR_SIZE_512MB   0x0000001C#define  LAWAR_SIZE_1GB     0x0000001D#define  LAWAR_SIZE_2GB     0x0000001E/* Local Bus Controller (LBC) Registers *//* BRx 0-16 Base Address *     17-18 Extended Base Address  *     19-20 Port Size - 00 reserved *                     - 01 8bit *                     - 10 16bit *                     - 11 32bit *     21-22 Data Error Correction *                     - 00 reserved *                     - 01 Normal parity  *                     - 10 RMW parity generation (32-bit) *                     - 11 reserved *     23    Write Protect *     24-26 Machine Select = 000 GPCM *                          - 001->010 reserved *                          - 011 SDRAM *                          - 100->110 UPMA->UPMC *                          - 111 reserved *     28-29 Atomic Access  - 00 No atomic access *                          - 01 Read-after-write *                          - 10 Write-after-read *                          - 11 reserved *     31    Valid      *       * ORx for SDRAM *     0-16  Address mask  *     17-18 Extended address mask *     19-21 Column address lines - 000->111 7->14 *     23-25 Number of row address lines - 000->110 9->15 *                                       - 111 Reserved *     26    Page mode select *     31    External address latch delay  * * ORx for GPCM Mode *     0-16  Address mask  *     17-18 Extended address mask *     19    Buffer Control Disable *     20    Chip select negation *     21-22 Addres to chip select setup *     23    Extra Address to chip select setup *     24-27 Cycle length in Bus clocks - 0000->1111 0->15 wait states *     28    External address termination *     29    Timing relaxed *     30    Extended hold time for read access *     31    External address latch delay   */#define  M85XX_BR0(base)         (CAST(VUINT32 *)((base) + 0x5000))#define  M85XX_OR0(base)         (CAST(VUINT32 *)((base) + 0x5004))#define  M85XX_BR1(base)         (CAST(VUINT32 *)((base) + 0x5008))#define  M85XX_OR1(base)         (CAST(VUINT32 *)((base) + 0x500c))#define  M85XX_BR2(base)         (CAST(VUINT32 *)((base) + 0x5010))#define  M85XX_OR2(base)         (CAST(VUINT32 *)((base) + 0x5014))#define  M85XX_BR3(base)         (CAST(VUINT32 *)((base) + 0x5018))#define  M85XX_OR3(base)         (CAST(VUINT32 *)((base) + 0x501c))#define  M85XX_BR4(base)         (CAST(VUINT32 *)((base) + 0x5020))#define  M85XX_OR4(base)         (CAST(VUINT32 *)((base) + 0x5024))#define  M85XX_BR5(base)         (CAST(VUINT32 *)((base) + 0x5028))#define  M85XX_OR5(base)         (CAST(VUINT32 *)((base) + 0x502C))#define  M85XX_BR6(base)         (CAST(VUINT32 *)((base) + 0x5030))#define  M85XX_OR6(base)         (CAST(VUINT32 *)((base) + 0x5034))#define  M85XX_BR7(base)         (CAST(VUINT32 *)((base) + 0x5038))#define  M85XX_OR7(base)         (CAST(VUINT32 *)((base) + 0x503C))#define  M85XX_MAR(base)         (CAST(VUINT32 *)((base) + 0x5068))#define  M85XX_MAMR(base)         (CAST(VUINT32 *)((base) + 0x5070))#define  M85XX_MBMR(base)         (CAST(VUINT32 *)((base) + 0x5074))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -