📄 m5445x.h
字号:
#define GPIO_DSCR_FLEXBUS_FBADL(x) (((x)&0x03))#define GPIO_DSCR_FLEXBUS_FBADH(x) (((x)&0x03)<<2)#define GPIO_DSCR_FLEXBUS_FBCTL(x) (((x)&0x03)<<4)#define GPIO_DSCR_FLEXBUS_FBCLK(x) (((x)&0x03)<<6)#define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_50PF (0xC0)#define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_30PF (0x80)#define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_20PF (0x40)#define GPIO_DSCR_FLEXBUS_FBCLK_LOAD_10PF (0x00)#define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_50PF (0x30)#define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_30PF (0x20)#define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_20PF (0x10)#define GPIO_DSCR_FLEXBUS_FBCTL_LOAD_10PF (0x00)#define GPIO_DSCR_FLEXBUS_FBADH_LOAD_50PF (0x0C)#define GPIO_DSCR_FLEXBUS_FBADH_LOAD_30PF (0x08)#define GPIO_DSCR_FLEXBUS_FBADH_LOAD_20PF (0x04)#define GPIO_DSCR_FLEXBUS_FBADH_LOAD_10PF (0x00)#define GPIO_DSCR_FLEXBUS_FBADL_LOAD_50PF (0x03)#define GPIO_DSCR_FLEXBUS_FBADL_LOAD_30PF (0x02)#define GPIO_DSCR_FLEXBUS_FBADL_LOAD_20PF (0x01)#define GPIO_DSCR_FLEXBUS_FBADL_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_FEC */#define GPIO_DSCR_FEC_FEC0(x) (((x)&0x03))#define GPIO_DSCR_FEC_FEC1(x) (((x)&0x03)<<2)#define GPIO_DSCR_FEC_FEC1_LOAD_50PF (0x0C)#define GPIO_DSCR_FEC_FEC1_LOAD_30PF (0x08)#define GPIO_DSCR_FEC_FEC1_LOAD_20PF (0x04)#define GPIO_DSCR_FEC_FEC1_LOAD_10PF (0x00)#define GPIO_DSCR_FEC_FEC0_LOAD_50PF (0x03)#define GPIO_DSCR_FEC_FEC0_LOAD_30PF (0x02)#define GPIO_DSCR_FEC_FEC0_LOAD_20PF (0x01)#define GPIO_DSCR_FEC_FEC0_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_UART */#define GPIO_DSCR_UART_UART0(x) (((x)&0x03))#define GPIO_DSCR_UART_UART1(x) (((x)&0x03)<<2)#define GPIO_DSCR_UART_UART1_LOAD_50PF (0x0C)#define GPIO_DSCR_UART_UART1_LOAD_30PF (0x08)#define GPIO_DSCR_UART_UART1_LOAD_20PF (0x04)#define GPIO_DSCR_UART_UART1_LOAD_10PF (0x00)#define GPIO_DSCR_UART_UART0_LOAD_50PF (0x03)#define GPIO_DSCR_UART_UART0_LOAD_30PF (0x02)#define GPIO_DSCR_UART_UART0_LOAD_20PF (0x01)#define GPIO_DSCR_UART_UART0_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_DSPI */#define GPIO_DSCR_DSPI_DSPI(x) (((x)&0x03))#define GPIO_DSCR_DSPI_DSPI_LOAD_50PF (0x03)#define GPIO_DSCR_DSPI_DSPI_LOAD_30PF (0x02)#define GPIO_DSCR_DSPI_DSPI_LOAD_20PF (0x01)#define GPIO_DSCR_DSPI_DSPI_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_TIMER */#define GPIO_DSCR_TIMER_TIMER(x) (((x)&0x03))#define GPIO_DSCR_TIMER_TIMER_LOAD_50PF (0x03)#define GPIO_DSCR_TIMER_TIMER_LOAD_30PF (0x02)#define GPIO_DSCR_TIMER_TIMER_LOAD_20PF (0x01)#define GPIO_DSCR_TIMER_TIMER_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_SSI */#define GPIO_DSCR_SSI_SSI(x) (((x)&0x03))#define GPIO_DSCR_SSI_SSI_LOAD_50PF (0x03)#define GPIO_DSCR_SSI_SSI_LOAD_30PF (0x02)#define GPIO_DSCR_SSI_SSI_LOAD_20PF (0x01)#define GPIO_DSCR_SSI_SSI_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_DMA */#define GPIO_DSCR_DMA_DMA(x) (((x)&0x03))#define GPIO_DSCR_DMA_DMA_LOAD_50PF (0x03)#define GPIO_DSCR_DMA_DMA_LOAD_30PF (0x02)#define GPIO_DSCR_DMA_DMA_LOAD_20PF (0x01)#define GPIO_DSCR_DMA_DMA_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_DEBUG */#define GPIO_DSCR_DEBUG_DEBUG(x) (((x)&0x03))#define GPIO_DSCR_DEBUG_DEBUG_LOAD_50PF (0x03)#define GPIO_DSCR_DEBUG_DEBUG_LOAD_30PF (0x02)#define GPIO_DSCR_DEBUG_DEBUG_LOAD_20PF (0x01)#define GPIO_DSCR_DEBUG_DEBUG_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_RESET */#define GPIO_DSCR_RESET_RESET(x) (((x)&0x03))#define GPIO_DSCR_RESET_RESET_LOAD_50PF (0x03)#define GPIO_DSCR_RESET_RESET_LOAD_30PF (0x02)#define GPIO_DSCR_RESET_RESET_LOAD_20PF (0x01)#define GPIO_DSCR_RESET_RESET_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_IRQ */#define GPIO_DSCR_IRQ_IRQ(x) (((x)&0x03))#define GPIO_DSCR_IRQ_IRQ_LOAD_50PF (0x03)#define GPIO_DSCR_IRQ_IRQ_LOAD_30PF (0x02)#define GPIO_DSCR_IRQ_IRQ_LOAD_20PF (0x01)#define GPIO_DSCR_IRQ_IRQ_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_USB */#define GPIO_DSCR_USB_USB(x) (((x)&0x03))#define GPIO_DSCR_USB_USB_LOAD_50PF (0x03)#define GPIO_DSCR_USB_USB_LOAD_30PF (0x02)#define GPIO_DSCR_USB_USB_LOAD_20PF (0x01)#define GPIO_DSCR_USB_USB_LOAD_10PF (0x00)/* Bit definitions and macros for DSCR_ATA */#define GPIO_DSCR_ATA_ATA(x) (((x)&0x03))#define GPIO_DSCR_ATA_ATA_LOAD_50PF (0x03)#define GPIO_DSCR_ATA_ATA_LOAD_30PF (0x02)#define GPIO_DSCR_ATA_ATA_LOAD_20PF (0x01)#define GPIO_DSCR_ATA_ATA_LOAD_10PF (0x00)/********************************************************************** Random Number Generator (RNG)*********************************************************************//* Bit definitions and macros for RNGCR */#define RNG_RNGCR_GO (0x00000001)#define RNG_RNGCR_HA (0x00000002)#define RNG_RNGCR_IM (0x00000004)#define RNG_RNGCR_CI (0x00000008)/* Bit definitions and macros for RNGSR */#define RNG_RNGSR_SV (0x00000001)#define RNG_RNGSR_LRS (0x00000002)#define RNG_RNGSR_FUF (0x00000004)#define RNG_RNGSR_EI (0x00000008)#define RNG_RNGSR_OFL(x) (((x)&0x000000FF)<<8)#define RNG_RNGSR_OFS(x) (((x)&0x000000FF)<<16)/********************************************************************** SDRAM Controller (SDRAMC)*********************************************************************//* Bit definitions and macros for SDMR */#define SDRAMC_SDMR_DDR2_AD(x) (((x)&0x00003FFF)) /* Address for DDR2 */#define SDRAMC_SDMR_CMD (0x00010000) /* Command */#define SDRAMC_SDMR_AD(x) (((x)&0x00000FFF)<<18) /* Address */#define SDRAMC_SDMR_BK(x) (((x)&0x00000003)<<30) /* Bank Address */#define SDRAMC_SDMR_BK_LMR (0x00000000)#define SDRAMC_SDMR_BK_LEMR (0x40000000)/* Bit definitions and macros for SDCR */#define SDRAMC_SDCR_DPD (0x00000001) /* Deep Power-Down Mode */#define SDRAMC_SDCR_IPALL (0x00000002) /* Initiate Precharge All */#define SDRAMC_SDCR_IREF (0x00000004) /* Initiate Refresh */#define SDRAMC_SDCR_DQS_OE(x) (((x)&0x00000003)<<10) /* DQS Output Enable */#define SDRAMC_SDCR_MEM_PS (0x00002000) /* Data Port Size */#define SDRAMC_SDCR_REF_CNT(x) (((x)&0x0000003F)<<16) /* Periodic Refresh Counter */#define SDRAMC_SDCR_OE_RULE (0x00400000) /* Drive Rule Selection */#define SDRAMC_SDCR_ADDR_MUX(x) (((x)&0x00000003)<<24) /* Internal Address Mux Select */#define SDRAMC_SDCR_DDR2_MODE (0x08000000) /* DDR2 Mode Select */#define SDRAMC_SDCR_REF_EN (0x10000000) /* Refresh Enable */#define SDRAMC_SDCR_DDR_MODE (0x20000000) /* DDR Mode Select */#define SDRAMC_SDCR_CKE (0x40000000) /* Clock Enable */#define SDRAMC_SDCR_MODE_EN (0x80000000) /* SDRAM Mode Register Programming Enable */#define SDRAMC_SDCR_DQS_OE_BOTH (0x00000C000)/* Bit definitions and macros for SDCFG1 */#define SDRAMC_SDCFG1_WT_LAT(x) (((x)&0x00000007)<<4) /* Write Latency */#define SDRAMC_SDCFG1_REF2ACT(x) (((x)&0x0000000F)<<8) /* Refresh to active delay */#define SDRAMC_SDCFG1_PRE2ACT(x) (((x)&0x00000007)<<12) /* Precharge to active delay */#define SDRAMC_SDCFG1_ACT2RW(x) (((x)&0x00000007)<<16) /* Active to read/write delay */#define SDRAMC_SDCFG1_RD_LAT(x) (((x)&0x0000000F)<<20) /* Read CAS Latency */#define SDRAMC_SDCFG1_SWT2RWP(x) (((x)&0x00000007)<<24) /* Single write to read/write/precharge delay */#define SDRAMC_SDCFG1_SRD2RWP(x) (((x)&0x0000000F)<<28) /* Single read to read/write/precharge delay *//* Bit definitions and macros for SDCFG2 */#define SDRAMC_SDCFG2_BL(x) (((x)&0x0000000F)<<16) /* Burst Length */#define SDRAMC_SDCFG2_BRD2W(x) (((x)&0x0000000F)<<20) /* Burst read to write delay */#define SDRAMC_SDCFG2_BWT2RWP(x) (((x)&0x0000000F)<<24) /* Burst write to read/write/precharge delay */#define SDRAMC_SDCFG2_BRD2RP(x) (((x)&0x0000000F)<<28) /* Burst read to read/precharge delay *//* Bit definitions and macros for SDCS group */#define SDRAMC_SDCS_CSSZ(x) (((x)&0x0000001F)) /* Chip-Select Size */#define SDRAMC_SDCS_CSBA(x) (((x)&0x00000FFF)<<20) /* Chip-Select Base Address */#define SDRAMC_SDCS_BA(x) ((x)&0xFFF00000)#define SDRAMC_SDCS_CSSZ_DISABLE (0x00000000)#define SDRAMC_SDCS_CSSZ_1MBYTE (0x00000013)#define SDRAMC_SDCS_CSSZ_2MBYTE (0x00000014)#define SDRAMC_SDCS_CSSZ_4MBYTE (0x00000015)#define SDRAMC_SDCS_CSSZ_8MBYTE (0x00000016)#define SDRAMC_SDCS_CSSZ_16MBYTE (0x00000017)#define SDRAMC_SDCS_CSSZ_32MBYTE (0x00000018)#define SDRAMC_SDCS_CSSZ_64MBYTE (0x00000019)#define SDRAMC_SDCS_CSSZ_128MBYTE (0x0000001A)#define SDRAMC_SDCS_CSSZ_256MBYTE (0x0000001B)#define SDRAMC_SDCS_CSSZ_512MBYTE (0x0000001C)#define SDRAMC_SDCS_CSSZ_1GBYTE (0x0000001D)#define SDRAMC_SDCS_CSSZ_2GBYTE (0x0000001E)#define SDRAMC_SDCS_CSSZ_4GBYTE (0x0000001F)/********************************************************************** Phase Locked Loop (PLL)*********************************************************************//* Bit definitions and macros for PCR */#define PLL_PCR_OUTDIV1(x) (((x)&0x0000000F)) /* Output divider for CPU clock frequency */#define PLL_PCR_OUTDIV2(x) (((x)&0x0000000F)<<4) /* Output divider for internal bus clock frequency */#define PLL_PCR_OUTDIV3(x) (((x)&0x0000000F)<<8) /* Output divider for Flexbus clock frequency */#define PLL_PCR_OUTDIV4(x) (((x)&0x0000000F)<<12) /* Output divider for PCI clock frequency */#define PLL_PCR_OUTDIV5(x) (((x)&0x0000000F)<<16) /* Output divider for USB clock frequency */#define PLL_PCR_PFDR(x) (((x)&0x000000FF)<<24) /* Feedback divider for VCO frequency */#define PLL_PCR_PFDR_MASK (0x000F0000)#define PLL_PCR_OUTDIV5_MASK (0x000F0000)#define PLL_PCR_OUTDIV4_MASK (0x0000F000)#define PLL_PCR_OUTDIV3_MASK (0x00000F00)#define PLL_PCR_OUTDIV2_MASK (0x000000F0)#define PLL_PCR_OUTDIV1_MASK (0x0000000F)/* Bit definitions and macros for PSR */#define PLL_PSR_LOCKS (0x00000001) /* PLL lost lock - sticky */#define PLL_PSR_LOCK (0x00000002) /* PLL lock status */#define PLL_PSR_LOLIRQ (0x00000004) /* PLL loss-of-lock interrupt enable */#define PLL_PSR_LOLRE (0x00000008) /* PLL loss-of-lock reset enable *//********************************************************************** PCI*********************************************************************//* Bit definitions and macros for SCR */#define PCI_SCR_PE (0x80000000) /* Parity Error detected */#define PCI_SCR_SE (0x40000000) /* System error signalled */#define PCI_SCR_MA (0x20000000) /* Master aboart received */#define PCI_SCR_TR (0x10000000) /* Target abort received */#define PCI_SCR_TS (0x08000000) /* Target abort signalled */#define PCI_SCR_DT (0x06000000) /* PCI_DEVSEL timing */#define PCI_SCR_DP (0x01000000) /* Master data parity err */#define PCI_SCR_FC (0x00800000) /* Fast back-to-back */#define PCI_SCR_R (0x00400000) /* Reserved */#define PCI_SCR_66M (0x00200000) /* 66Mhz */#define PCI_SCR_C (0x00100000) /* Capabilities list */#define PCI_SCR_F (0x00000200) /* Fast back-to-back enable */#define PCI_SCR_S (0x00000100) /* SERR enable */#define PCI_SCR_ST (0x00000080) /* Addr and Data stepping */#define PCI_SCR_PER (0x00000040) /* Parity error response */#define PCI_SCR_V (0x00000020) /* VGA palette snoop enable */#define PCI_SCR_MW (0x00000010) /* Memory write and invalidate enable */#define PCI_SCR_SP (0x00000008) /* Special cycle monitor or ignore */#define PCI_SCR_B (0x00000004) /* Bus master enable */#define PCI_SCR_M (0x00000002) /* Memory access control */#define PCI_SCR_IO (0x00000001) /* I/O access control */#define PCI_CR1_BIST(x) ((x & 0xFF) << 24) /* Built in self test */#define PCI_CR1_HDR(x) ((x & 0xFF) << 16) /* Header type */#define PCI_CR1_LTMR(x) ((x & 0xF8) << 8) /* Latency timer */#define PCI_CR1_CLS(x) (x & 0x0F) /* Cache line size */#define PCI_BAR_BAR0(x) (x & 0xFFFC0000)#define PCI_BAR_BAR1(x) (x & 0xFFF00000)#define PCI_BAR_BAR2(x) (x & 0xFFC00000)#define PCI_BAR_BAR3(x) (x & 0xFF000000)#define PCI_BAR_BAR4(x) (x & 0xF8000000)#define PCI_BAR_BAR5(x) (x & 0xE0000000)#define PCI_BAR_PREF (0x00000004) /* Prefetchable access */#define PCI_BAR_RANGE (0x00000002) /* Fixed to 00 */#define PCI_BAR_IO_M (0x00000001) /* IO / memory space */#define PCI_CR2_MAXLAT(x) ((x & 0xFF) << 24) /* Maximum latency */#define PCI_CR2_MINGNT(x) ((x & 0xFF) << 16) /* Minimum grant */#define PCI_CR2_INTPIN(x) ((x & 0xFF) << 8) /* Interrupt Pin */#define PCI_CR2_INTLIN(x) (x & 0xFF) /* Interrupt Line */#define PCI_GSCR_DRD (0x80000000) /* Delayed read discarded */#define PCI_GSCR_PE (0x20000000) /* PCI_PERR detected */#define PCI_GSCR_SE (0x10000000) /* SERR detected */#define PCI_GSCR_ER (0x08000000) /* Error response detected */#define PCI_GSCR_DRDE (0x00008000) /* Delayed read discarded enable */#define PCI_GSCR_PEE (0x00002000) /* PERR detected interrupt enable */#define PCI_GSCR_SEE (0x00001000) /* SERR detected interrupt enable */#define PCI_GSCR_PR (0x00000001) /* PCI reset */#define PCI_TCR1_LD (0x01000000) /* Latency rule disable */#define PCI_TCR1_PID (0x00020000) /* Prefetch invalidate and disable */#define PCI_TCR1_P (0x00010000) /* Prefetch reads */#define PCI_TCR1_WCD (0x00000100) /* Write combine disable */#define PCI_TCR2_B5E (0x00002000) /* */#define PCI_TCR2_B4E (0x00001000) /* */#define PCI_TCR2_B3E (0x00000800) /* */#define PCI_TCR2_B2E (0x00000400) /* */#define PCI_TCR2_B1E (0x00000200) /* */#define PCI_TCR2_B0E (0x00000100) /* */#define PCI_TCR2_CR (0x00000001) /* */#define PCI_TBATR_BAT(x) ((x & 0xFFF) << 20)#define PCI_TBATR_EN (0x00000001) /* Enable */#define PCI_IWCR_W0C_IO (0x08000000) /* Windows Maps to PCI I/O */#define PCI_IWCR_W0C_PRC_RDMUL (0x04000000) /* PCI Memory Read multiple */#define PCI_IWCR_W0C_PRC_RDLN (0x02000000) /* PCI Memory Read line */#define PCI_IWCR_W0C_PRC_RD (0x00000000) /* PCI Memory Read */#define PCI_IWCR_W0C_EN (0x01000000) /* Enable - Register initialize */#define PCI_IWCR_W1C_IO (0x00080000) /* Windows Maps to PCI I/O */#define PCI_IWCR_W1C_PRC_RDMUL (0x00040000) /* PCI Memory Read multiple */#define PCI_IWCR_W1C_PRC_RDLN (0x00020000) /* PCI Memory Read line */#define PCI_IWCR_W1C_PRC_RD (0x00000000) /* PCI Memory Read */#define PCI_IWCR_W1C_EN (0x00010000) /* Enable - Register initialize */#define PCI_IWCR_W2C_IO (0x00000800) /* Windows Maps to PCI I/O */#define PCI_IWCR_W2C_PRC_RDMUL (0x00000400) /* PCI Memory Read multiple */#define PCI_IWCR_W2C_PRC_RDLN (0x00000200) /* PCI Memory Read line */#define PCI_IWCR_W2C_PRC_RD (0x00000000) /* PCI Memory Read */#define PCI_IWCR_W2C_EN (0x00000100) /* Enable - Register initialize */#define PCI_ICR_REE (0x04000000) /* Retry error enable */#define PCI_ICR_IAE (0x02000000) /* Initiator abort enable */#define PCI_ICR_TAE (0x01000000) /* Target abort enable */#define PCI_ICR_MAXRETRY(x) ((x) & 0x000000FF)/********************************************************************/#endif /* __MCF5445X__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -