📄 ppc405.h
字号:
#define PLLMR0_133_66_66_33 (PLL_CPUDIV_1 | PLL_PLBDIV_1 | \ PLL_OPBDIV_2 | PLL_EXTBUSDIV_4 | \ PLL_MALDIV_1 | PLL_PCIDIV_4)#define PLLMR1_133_66_66_33 (PLL_FBKDIV_4 | \ PLL_FWDDIVA_6 | PLL_FWDDIVB_6 | \ PLL_TUNE_15_M_40 | PLL_TUNE_VCO_LOW)#define PLLMR0_200_100_50_33 (PLL_CPUDIV_1 | PLL_PLBDIV_2 | \ PLL_OPBDIV_2 | PLL_EXTBUSDIV_3 | \ PLL_MALDIV_1 | PLL_PCIDIV_4)#define PLLMR1_200_100_50_33 (PLL_FBKDIV_6 | \ PLL_FWDDIVA_4 | PLL_FWDDIVB_4 | \ PLL_TUNE_15_M_40 | PLL_TUNE_VCO_LOW)#define PLLMR0_266_133_66_33 (PLL_CPUDIV_1 | PLL_PLBDIV_2 | \ PLL_OPBDIV_2 | PLL_EXTBUSDIV_4 | \ PLL_MALDIV_1 | PLL_PCIDIV_4)#define PLLMR1_266_133_66_33 (PLL_FBKDIV_8 | \ PLL_FWDDIVA_3 | PLL_FWDDIVB_3 | \ PLL_TUNE_15_M_40 | PLL_TUNE_VCO_LOW)#define PLLMR0_266_66_33_33 (PLL_CPUDIV_1 | PLL_PLBDIV_4 | \ PLL_OPBDIV_2 | PLL_EXTBUSDIV_2 | \ PLL_MALDIV_1 | PLL_PCIDIV_2)#define PLLMR1_266_66_33_33 (PLL_FBKDIV_8 | \ PLL_FWDDIVA_3 | PLL_FWDDIVB_3 | \ PLL_TUNE_15_M_40 | PLL_TUNE_VCO_LOW)/* * PLL Voltage Controlled Oscillator (VCO) definitions * Maximum and minimum values (in MHz) for correct PLL operation. */#define VCO_MIN 500#define VCO_MAX 1000#else /* #ifdef CONFIG_405EP *//****************************************************************************** * Control ******************************************************************************/#define CNTRL_DCR_BASE 0x0b0#define pllmd (CNTRL_DCR_BASE+0x0) /* PLL mode register */#define cntrl0 (CNTRL_DCR_BASE+0x1) /* Control 0 register */#define cntrl1 (CNTRL_DCR_BASE+0x2) /* Control 1 register */#define reset (CNTRL_DCR_BASE+0x3) /* reset register */#define strap (CNTRL_DCR_BASE+0x4) /* strap register */#define ecr (0xaa) /* edge conditioner register (405gpr) *//* Bit definitions */#define PLLMR_FWD_DIV_MASK 0xE0000000 /* Forward Divisor */#define PLLMR_FWD_DIV_BYPASS 0xE0000000#define PLLMR_FWD_DIV_3 0xA0000000#define PLLMR_FWD_DIV_4 0x80000000#define PLLMR_FWD_DIV_6 0x40000000#define PLLMR_FB_DIV_MASK 0x1E000000 /* Feedback Divisor */#define PLLMR_FB_DIV_1 0x02000000#define PLLMR_FB_DIV_2 0x04000000#define PLLMR_FB_DIV_3 0x06000000#define PLLMR_FB_DIV_4 0x08000000#define PLLMR_TUNING_MASK 0x01F80000#define PLLMR_CPU_TO_PLB_MASK 0x00060000 /* CPU:PLB Frequency Divisor */#define PLLMR_CPU_PLB_DIV_1 0x00000000#define PLLMR_CPU_PLB_DIV_2 0x00020000#define PLLMR_CPU_PLB_DIV_3 0x00040000#define PLLMR_CPU_PLB_DIV_4 0x00060000#define PLLMR_OPB_TO_PLB_MASK 0x00018000 /* OPB:PLB Frequency Divisor */#define PLLMR_OPB_PLB_DIV_1 0x00000000#define PLLMR_OPB_PLB_DIV_2 0x00008000#define PLLMR_OPB_PLB_DIV_3 0x00010000#define PLLMR_OPB_PLB_DIV_4 0x00018000#define PLLMR_PCI_TO_PLB_MASK 0x00006000 /* PCI:PLB Frequency Divisor */#define PLLMR_PCI_PLB_DIV_1 0x00000000#define PLLMR_PCI_PLB_DIV_2 0x00002000#define PLLMR_PCI_PLB_DIV_3 0x00004000#define PLLMR_PCI_PLB_DIV_4 0x00006000#define PLLMR_EXB_TO_PLB_MASK 0x00001800 /* External Bus:PLB Divisor */#define PLLMR_EXB_PLB_DIV_2 0x00000000#define PLLMR_EXB_PLB_DIV_3 0x00000800#define PLLMR_EXB_PLB_DIV_4 0x00001000#define PLLMR_EXB_PLB_DIV_5 0x00001800/* definitions for PPC405GPr (new mode strapping) */#define PLLMR_FWDB_DIV_MASK 0x00000007 /* Forward Divisor B */#define PSR_PLL_FWD_MASK 0xC0000000#define PSR_PLL_FDBACK_MASK 0x30000000#define PSR_PLL_TUNING_MASK 0x0E000000#define PSR_PLB_CPU_MASK 0x01800000#define PSR_OPB_PLB_MASK 0x00600000#define PSR_PCI_PLB_MASK 0x00180000#define PSR_EB_PLB_MASK 0x00060000#define PSR_ROM_WIDTH_MASK 0x00018000#define PSR_ROM_LOC 0x00004000#define PSR_PCI_ASYNC_EN 0x00001000#define PSR_PERCLK_SYNC_MODE_EN 0x00000800 /* PPC405GPr only */#define PSR_PCI_ARBIT_EN 0x00000400#define PSR_NEW_MODE_EN 0x00000020 /* PPC405GPr only */#ifndef CONFIG_IOP480/* * PLL Voltage Controlled Oscillator (VCO) definitions * Maximum and minimum values (in MHz) for correct PLL operation. */#define VCO_MIN 400#define VCO_MAX 800#endif /* #ifndef CONFIG_IOP480 */#endif /* #ifdef CONFIG_405EP *//****************************************************************************** * Memory Access Layer ******************************************************************************/#define MAL_DCR_BASE 0x180#define malmcr (MAL_DCR_BASE+0x00) /* MAL Config reg */#define malesr (MAL_DCR_BASE+0x01) /* Error Status reg (Read/Clear) */#define malier (MAL_DCR_BASE+0x02) /* Interrupt enable reg */#define maldbr (MAL_DCR_BASE+0x03) /* Mal Debug reg (Read only) */#define maltxcasr (MAL_DCR_BASE+0x04) /* TX Channel active reg (set) */#define maltxcarr (MAL_DCR_BASE+0x05) /* TX Channel active reg (Reset) */#define maltxeobisr (MAL_DCR_BASE+0x06) /* TX End of buffer int status reg */#define maltxdeir (MAL_DCR_BASE+0x07) /* TX Descr. Error Int reg */#define malrxcasr (MAL_DCR_BASE+0x10) /* RX Channel active reg (set) */#define malrxcarr (MAL_DCR_BASE+0x11) /* RX Channel active reg (Reset) */#define malrxeobisr (MAL_DCR_BASE+0x12) /* RX End of buffer int status reg */#define malrxdeir (MAL_DCR_BASE+0x13) /* RX Descr. Error Int reg */#define maltxctp0r (MAL_DCR_BASE+0x20) /* TX 0 Channel table pointer reg */#define maltxctp1r (MAL_DCR_BASE+0x21) /* TX 1 Channel table pointer reg */#define maltxctp2r (MAL_DCR_BASE+0x22) /* TX 2 Channel table pointer reg */#define malrxctp0r (MAL_DCR_BASE+0x40) /* RX 0 Channel table pointer reg */#define malrxctp1r (MAL_DCR_BASE+0x41) /* RX 1 Channel table pointer reg */#define malrcbs0 (MAL_DCR_BASE+0x60) /* RX 0 Channel buffer size reg */#define malrcbs1 (MAL_DCR_BASE+0x61) /* RX 1 Channel buffer size reg *//*-----------------------------------------------------------------------------| IIC Register Offsets'----------------------------------------------------------------------------*/#define IICMDBUF 0x00#define IICSDBUF 0x02#define IICLMADR 0x04#define IICHMADR 0x05#define IICCNTL 0x06#define IICMDCNTL 0x07#define IICSTS 0x08#define IICEXTSTS 0x09#define IICLSADR 0x0A#define IICHSADR 0x0B#define IICCLKDIV 0x0C#define IICINTRMSK 0x0D#define IICXFRCNT 0x0E#define IICXTCNTLSS 0x0F#define IICDIRECTCNTL 0x10/*-----------------------------------------------------------------------------| UART Register Offsets'----------------------------------------------------------------------------*/#define DATA_REG 0x00#define DL_LSB 0x00#define DL_MSB 0x01#define INT_ENABLE 0x01#define FIFO_CONTROL 0x02#define LINE_CONTROL 0x03#define MODEM_CONTROL 0x04#define LINE_STATUS 0x05#define MODEM_STATUS 0x06#define SCRATCH 0x07/****************************************************************************** * On Chip Memory ******************************************************************************/#define OCM_DCR_BASE 0x018#define ocmisarc (OCM_DCR_BASE+0x00) /* OCM I-side address compare reg */#define ocmiscntl (OCM_DCR_BASE+0x01) /* OCM I-side control reg */#define ocmdsarc (OCM_DCR_BASE+0x02) /* OCM D-side address compare reg */#define ocmdscntl (OCM_DCR_BASE+0x03) /* OCM D-side control reg *//****************************************************************************** * GPIO macro register defines ******************************************************************************/#define GPIO_BASE 0xEF600700#define GPIO0_OR (GPIO_BASE+0x0)#define GPIO0_TCR (GPIO_BASE+0x4)#define GPIO0_OSRH (GPIO_BASE+0x8)#define GPIO0_OSRL (GPIO_BASE+0xC)#define GPIO0_TSRH (GPIO_BASE+0x10)#define GPIO0_TSRL (GPIO_BASE+0x14)#define GPIO0_ODR (GPIO_BASE+0x18)#define GPIO0_IR (GPIO_BASE+0x1C)#define GPIO0_RR1 (GPIO_BASE+0x20)#define GPIO0_RR2 (GPIO_BASE+0x24)#define GPIO0_ISR1H (GPIO_BASE+0x30)#define GPIO0_ISR1L (GPIO_BASE+0x34)#define GPIO0_ISR2H (GPIO_BASE+0x38)#define GPIO0_ISR2L (GPIO_BASE+0x3C)/* * Macro for accessing the indirect EBC register */#define mtebc(reg, data) mtdcr(ebccfga,reg);mtdcr(ebccfgd,data)#define mfebc(reg, data) mtdcr(ebccfga,reg);data = mfdcr(ebccfgd)#ifndef __ASSEMBLY__typedef struct{ unsigned long pllFwdDiv; unsigned long pllFwdDivB; unsigned long pllFbkDiv; unsigned long pllPlbDiv; unsigned long pllPciDiv; unsigned long pllExtBusDiv; unsigned long pllOpbDiv; unsigned long freqVCOMhz; /* in MHz */ unsigned long freqProcessor; unsigned long freqPLB; unsigned long freqPCI; unsigned long pciIntArbEn; /* Internal PCI arbiter is enabled */ unsigned long pciClkSync; /* PCI clock is synchronous */ unsigned long freqVCOHz;} PPC405_SYS_INFO;#endif /* _ASMLANGUAGE */#define RESET_VECTOR 0xfffffffc#define CACHELINE_MASK (CFG_CACHELINE_SIZE - 1) /* Address mask for cache line aligned data. */#endif /* __PPC405_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -