?? ads88x.h
字號:
/* ads88x.h - Motorola MPC88xADS DUET board header *//* Copyright 1984-2005 Wind River Systems, Inc. *//*modification history--------------------01c,10apr05,mig Fix compile warnings. SPR# 10724501b,08mar04,dtr Add Security engine mapping.01a,01mar04,dtr created from ads860/ads860.h.*//*This file contains I/O addresses and related constants for theMotorola MPC88xads DUET board. */#ifndef INCads88xh#define INCads88xh#ifdef __cplusplus extern "C" {#endif#include "drv/mem/memDev.h"#include "drv/intrCtl/ppc860Intr.h"#define BUS 0 /* bus-less board */#define N_SIO_CHANNELS 2 /* No. serial I/O channels */#define FREQ_10_MHZ 10000000#define FREQ_20_MHZ 20000000 /* 20 Mhz */#define FREQ_25_MHZ 25000000 /* 25 Mhz */#define FREQ_50_MHZ 50000000 /* 50 Mhz */#define FREQ_100_MHZ 100000000 /* 100 Mhz */#define PLPRCR_100 0x001a0000 /* 100MHz */#define PC_BASE_ADRS_0 0x04000000 /* PCMCIA base address */#define PC_SIZE_0 0x00100000 /* PCMCIA mapping size */#define PC_BASE_ADRS_1 0x06000000 /* PCMCIA base address */#define PC_SIZE_1 0x02000000 /* PCMCIA mapping size *//* RTC register values *//* Key Register Unlock Value */#define KEYED_REG_UNLOCK_VALUE 0x55CCAA33/* * SPLL Multiplication Factor: use to set the MF bits of the PLPRCR register. * PLPRCR is set by sysHwInit() in sysLib.c. * SPLL_FREQ_REQUESTED and CRISTAL_FREQ are defined in config.h */#define SPLL_MUL_FACTOR ((SPLL_FREQ_REQUESTED / CRISTAL_FREQ) - 1)/* * SPLL Multiplication Factor to get a 20 MHZ running frequency */#define SPLL_MUL_FACTOR_20MHZ ((FREQ_20_MHZ / CRISTAL_FREQ) - 1)/* * SPLL Frequency - gives the SPLL real frequency divide by 2 */#define SPLL_FREQ ((SPLL_MUL_FACTOR + 1) * CRISTAL_FREQ)/* * Baud Rate Generator Clock - gives the Baud Rate Generator Clock (BRGCLK) * Frequency. */#define BRGCLK_FREQ (SPLL_FREQ / ( 1 << (2 * BRGCLK_DIV_FACTOR)))/* * Refresh value - defines the number of BRGCLK period between two * DRAM refresh cycle. */#define REFRESH_VALUE (BRGCLK_FREQ / DRAM_REFRESH_FREQ)/* * Periodic Timer A period - value used to set the PTA bits of * the Machine A Mode Register (MAMR). This register is used to * controle the User_Programmable Machine A (UPM). The UPM is part of * the memory controller. */#define PTA_VALUE (( REFRESH_VALUE / 64) != 0 ? (REFRESH_VALUE / 64) : \ ((REFRESH_VALUE / 32) != 0 ? (REFRESH_VALUE / 32) : \ ((REFRESH_VALUE / 16) != 0 ? (REFRESH_VALUE / 16) : \ ((REFRESH_VALUE / 8) != 0 ? (REFRESH_VALUE / 8) : \ ((REFRESH_VALUE / 4) != 0 ? (REFRESH_VALUE / 4) : \ (REFRESH_VALUE / 2))))))/* * Periodic Timer Prescaler Division Factor - gives the division factor * of the Periodic Timer Prescaler (PTP). The PTP is part of the * memory controller. It divide the BRGCLK (Baud Rate Generator Clock) by * either 2, 4, 8, 16, 32 or 64 and send this divided clock to the * Periodic Timer. * This macro is used to set the DRAM refresh cycle period. */#define PTP_DIV_FACTOR (REFRESH_VALUE / PTA_VALUE)/* * PTP Value - translate the Periodic Timer Prescaler Division Factor * to the value to place in the PTP register. */#define PTP_VALUE ( PTP_DIV_FACTOR == 2 ? MPTPR_PTP_DIV2 : \ (PTP_DIV_FACTOR == 4 ? MPTPR_PTP_DIV4 : \ (PTP_DIV_FACTOR == 8 ? MPTPR_PTP_DIV8 : \ (PTP_DIV_FACTOR == 16 ? MPTPR_PTP_DIV16 : \ (PTP_DIV_FACTOR == 32 ? MPTPR_PTP_DIV32 : \ MPTPR_PTP_DIV64)))))/* */#define TMBCLK_FREQ CRISTAL_FREQ/* define the decrementer input clock frequency */#define DEC_CLOCK_FREQ TMBCLK_FREQ/* define system clock rate */#define SYS_CPU_FREQ SPLL_FREQ/* Internal Memory Map base Address */#define INTERNAL_MEM_MAP_ADDR 0x02200000 #define INTERNAL_MEM_MAP_SIZE 0x00010000 /* 64 K bytes *//* size of the on-board SDRAM */#define SDRAM_SIZE 0x00800000 /* 8 Meg */#define SDRAM_REFRESH_FREQ 64000 /* 64 Khz *//* Board Status and Control Registers - unique to ADS */#define BCSR_BASE_ADDR 0x02100000 /* BCSR base address */#define BCSR5 0x02000300 /* BCSR5 address */#define PBDIR(base) (CAST(VUINT32 *)((base) + 0x0AB8)) /* PB data dir*/#define PBPAR(base) (CAST(VUINT32 *)((base) + 0x0ABC)) /* PB pin assign*/#define PEDIR(base) (CAST(VUINT32 *)((base) + 0x0AC8)) /* PE data dir*/#define PEPAR(base) (CAST(VUINT32 *)((base) + 0x0ACC)) /* PE pin assign*/#define PESO(base) (CAST(VUINT32 *)((base) + 0x0AD0)) /* PE special option assign*//* Port A pin map */#define PA00 0x8000#define PA01 0x4000#define PA02 0x2000#define PA03 0x1000#define PA04 0x0800#define PA05 0x0400#define PA06 0x0200#define PA07 0x0100#define PA08 0x0080#define PA09 0x0040#define PA10 0x0020#define PA11 0x0010#define PA12 0x0008#define PA13 0x0004#define PA14 0x0002#define PA15 0x0001/* Port B pin map */#define PB00 0x80000000#define PB01 0x40000000#define PB02 0x20000000#define PB03 0x10000000#define PB04 0x08000000#define PB05 0x04000000#define PB06 0x02000000#define PB07 0x01000000#define PB08 0x00800000#define PB09 0x00400000#define PB10 0x00200000#define PB11 0x00100000#define PB12 0x00080000#define PB13 0x00040000#define PB14 0x00020000#define PB15 0x00010000#define PB16 0x00008000#define PB17 0x00004000#define PB18 0x00002000#define PB19 0x00001000#define PB20 0x00000800#define PB21 0x00000400#define PB22 0x00000200#define PB23 0x00000100#define PB24 0x00000080#define PB25 0x00000040#define PB26 0x00000020#define PB27 0x00000010#define PB28 0x00000008#define PB29 0x00000004#define PB30 0x00000002#define PB31 0x00000001/* Port C pin map */#define PC04 0x00800#define PC05 0x00400#define PC06 0x00200#define PC07 0x00100#define PC08 0x00080#define PC09 0x00040#define PC10 0x00020#define PC11 0x00010#define PC12 0x00008#define PC13 0x00004#define PC14 0x00002#define PC15 0x00001/* Port D pin map */#define PD00 0x08000#define PD01 0x04000#define PD02 0x02000#define PD03 0x01000#define PD04 0x00800#define PD05 0x00400#define PD06 0x00200#define PD07 0x00100#define PD08 0x00080#define PD09 0x00040#define PD10 0x00020#define PD11 0x00010#define PD12 0x00008#define PD13 0x00004#define PD14 0x00002#define PD15 0x00001/* Port E pin map */#define PE00 0x80000000#define PE01 0x40000000#define PE02 0x20000000#define PE03 0x10000000#define PE04 0x08000000#define PE05 0x04000000#define PE06 0x02000000#define PE07 0x01000000#define PE08 0x00800000#define PE09 0x00400000#define PE10 0x00200000#define PE11 0x00100000#define PE12 0x00080000#define PE13 0x00040000#define PE14 0x00020000#define PE15 0x00010000#define PE16 0x00008000#define PE17 0x00004000#define PE18 0x00002000#define PE19 0x00001000#define PE20 0x00000800#define PE21 0x00000400#define PE22 0x00000200#define PE23 0x00000100#define PE24 0x00000080#define PE25 0x00000040#define PE26 0x00000020#define PE27 0x00000010#define PE28 0x00000008#define PE29 0x00000004#define PE30 0x00000002#define PE31 0x00000001#ifdef _ASMLANGUAGE#define BCSR0 BCSR_BASE_ADDR /* Register 0 */#define BCSR1 BCSR_BASE_ADDR + 0x04 /* Register 1 */#define BCSR2 BCSR_BASE_ADDR + 0x08 /* Register 2 */#define BCSR3 BCSR_BASE_ADDR + 0x0c /* Register 3 */#define BCSR4 BCSR_BASE_ADDR + 0x10 /* Register 4 */#else#define BCSR0 ((VINT32 *) (BCSR_BASE_ADDR)) /* Register 0 */#define BCSR1 ((VINT32 *) (BCSR_BASE_ADDR + 0x04)) /* Register 1 */#define BCSR2 ((VINT32 *) (BCSR_BASE_ADDR + 0x08)) /* Register 2 */#define BCSR3 ((VINT32 *) (BCSR_BASE_ADDR + 0x0c)) /* Register 3 */#define BCSR4 ((VINT32 *) (BCSR_BASE_ADDR + 0x10)) /* Register 4 */#endif /* _ASMLANGUAGE *//* BCSR0 bit definition */#define BCSR0_ERB 0x80000000 /* BCSR0 */#define BCSR0_IP_L 0x40000000 /* 0 = ROM */#define BCSR0_BDIS 0x10000000 /* boot disable */#define BCSR0_PORT_SIZE_32 0x00000000 /* CS0~ port size */#define BCSR0_PORT_SIZE_16 0x08000000 /* CS0~ port size */#define BCSR0_PORT_SIZE_8 0x04000000 /* CS0~ port size */#define BCSR0_MEM_SPACE_0 0x00000000 /* initial mem space */#define BCSR0_MEM_SPACE_00F 0x00800000 /* initial mem space */#define BCSR0_MEM_SPACE_FF 0x01000000 /* initial mem space */#define BCSR0_MEM_SPACE_FFF 0x01800000 /* initial mem space */#define BCSR0_PCMCIA_II 0x00000000 /* Debug pins */#define BCSR0_WATCH_POINTS 0x00200000 /* Debug pins */#define BCSR0_SHOW_CYCLE 0x00600000 /* Debug pins */#define BCSR0_JTAG_PORT 0x00000000 /* debug port pins */#define BCSR0_NO_DBG_PORT 0x00080000 /* debug port pins */#define BCSR0_PCMCIA_PORT 0x00180000 /* debug port pins *//* BCSR1 bit definition (active at low level when _L) */#define BCSR1_FLASH_EN_L 0x80000000 /* Flash mem enable */#define BCSR1_DRAM_EN 0x40000000 /* Dram mem enable */#define BCSR1_ETHN_EN_L 0x20000000 /* Ethernet enable */#define BCSR1_IR_EN_L 0x10000000 /* Infra-red enable */#define BCSR1_FLCFG_EN_L 0x08000000 /* Flach config enable*/#define BCSR1_CRPROT_EN_L 0x04000000 /* Ctrl Reg protect */#define BCSR1_BCSR_EN_L 0x02000000 /* BCSR enable */#define BCSR1_RS232_EN_L 0x01000000 /* RS232 port enable */#define BCSR1_PCCARD_EN_L 0x00800000 /* PC card enable */#define BCSR1_PCCARD_VCCON_L 0x00400000 /* PC card VCC on */#define BCSR1_PCCVPP_MSK 0x00300000 /* PC card VPP */#define BCSR1_DRAM_HALF_WORD_L 0x00080000 /* Dram half word */#define BCSR1_RS232_2_EN_L 0x00040000 /* RS232 port 2 */#define BCSR1_SDRAM_EN 0x00020000 /* SDRAM */#define BCSR1_PCCVCC1_SEL 0x00010000 /* Voltage select for PCMCIA */#define BCSR1_RESET_VAL (~BCSR1_DRAM_EN & BCSR1_ETHN_EN_L | \ BCSR1_IR_EN_L | BCSR1_FLCFG_EN_L | \ BCSR1_RS232_EN_L | BCSR1_PCCARD_EN_L | \ BCSR1_PCCARD_VCCON_L | BCSR1_PCCVPP_MSK | \ BCSR1_DRAM_HALF_WORD_L | BCSR1_RS232_2_EN_L)#define BCSR1_RESET_VAL_ENG (BCSR1_DRAM_EN | BCSR1_ETHN_EN_L | \ BCSR1_IR_EN_L | BCSR1_FLCFG_EN_L | \ BCSR1_RS232_EN_L | BCSR1_PCCARD_EN_L | \ BCSR1_PCCARD_VCCON_L | BCSR1_PCCVPP_MSK | \ BCSR1_DRAM_HALF_WORD_L | BCSR1_RS232_2_EN_L) /* BCSR2 bit definition */#define BCSR2_FLASH_PD_2MEG_SIMM 0x80000000 /* Flash presence 2 M */#define BCSR2_FLASH_PD_4MEG_SIMM 0x70000000 /* Flash presence 4 M */#define BCSR2_FLASH_PD_8MEG_SIMM 0x60000000 /* Flash presence 8 M *//* BCSR3 bit definition */#define BCSR3_CTR_REG_PROT_EN 0x02000000 /* Ctrl reg Protect */#define BCSR3_BREVN 0x008b0000 /* Board rev number */#define BCSR3_FLASH_PD 0x00700000 /* Flash Presence det *//* BCSR4 bit definition */#define BCSR4_10BASET_RST 0x80000000 /* Phy Reset */#define BCSR4_SIGNAL_LAMP_L 0x10000000 /* Signal Lamp Enable Low*/#define BCSR4_USB_LO_SPEED 0x04000000 /* USB lo speed */#define BCSR4_USB_VCC 0x02000000 /* route VCC to connector A*/#define BCSR4_USB_FULL_SPEED 0x00040000 /* 860T's PHY disable */#define BCSR4_USB_EN 0x00020000 /* 860T's PHY conf pin 0 */#define BCSR4_EXPANS_EN 0x00010000 /* 860T's PHY FD enable *//* BCSR5 bit definition */#define BCSR5_MII2_EN 0x40#define BCSR5_MII2_RST 0x20#define BCSR5_T1_RST 0x10#define BCSR5_RESET_ATM155 0x08#define BCSR5_RESET_ATM25 0x04#define BCSR5_MII_EN 0x02#define BCSR5_MII_RST 0x01#define BCSR0_RESET_VAL 0x41000000#undef BCSR1_RESET_VAL#define BCSR1_RESET_VAL 0x38be0000#define BCSR2_RESET_VAL 0x87F80000#define BCSR3_RESET_VAL 0x00300000#define BCSR4_RESET_VAL 0x7fbf0000#define BCSR5_RESET_VAL ( BCSR5_MII2_EN | BCSR5_MII2_RST | BCSR5_MII_EN | BCSR5_MII_RST)/* CPU type in the PVR */#define CPU_TYPE_860 0x0050 /* value for PPC860 */#define CPU_REV_A1_MASK_NUM 0x0010 /* revision mask num *//* Security Block */#define SEC1_ADDR (INTERNAL_MEM_MAP_ADDR | 0x00020000)#define SEC1_SIZE 0x8000/* Ethernet parameters */#ifdef __cplusplus }#endif#endif /* INCads88xh */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -