ppc440.h

来自「uboot详细解读可用启动引导LINUX2.6内核」· C头文件 代码 · 共 1,185 行 · 第 1/5 页

H
1,185
字号
#define uiccr  uic0cr#define uicpr  uic0pr#define uictr  uic0tr#define uicmsr uic0msr#define uicvr  uic0vr#define uicvcr uic0vcr#if defined(CONFIG_440SPE) || defined(CONFIG_440EPX)/*----------------------------------------------------------------------------+| Clock / Power-on-reset DCR's.+----------------------------------------------------------------------------*/#define CPR0_CLKUPD			0x20#define CPR0_CLKUPD_BSY_MASK		0x80000000#define CPR0_CLKUPD_BSY_COMPLETED	0x00000000#define CPR0_CLKUPD_BSY_BUSY		0x80000000#define CPR0_CLKUPD_CUI_MASK		0x80000000#define CPR0_CLKUPD_CUI_DISABLE		0x00000000#define CPR0_CLKUPD_CUI_ENABLE		0x80000000#define CPR0_CLKUPD_CUD_MASK		0x40000000#define CPR0_CLKUPD_CUD_DISABLE		0x00000000#define CPR0_CLKUPD_CUD_ENABLE		0x40000000#define CPR0_PLLC			0x40#define CPR0_PLLC_RST_MASK		0x80000000#define CPR0_PLLC_RST_PLLLOCKED		0x00000000#define CPR0_PLLC_RST_PLLRESET		0x80000000#define CPR0_PLLC_ENG_MASK		0x40000000#define CPR0_PLLC_ENG_DISABLE		0x00000000#define CPR0_PLLC_ENG_ENABLE		0x40000000#define CPR0_PLLC_ENG_ENCODE(n)		((((unsigned long)(n))&0x01)<<30)#define CPR0_PLLC_ENG_DECODE(n)		((((unsigned long)(n))>>30)&0x01)#define CPR0_PLLC_SRC_MASK		0x20000000#define CPR0_PLLC_SRC_PLLOUTA		0x00000000#define CPR0_PLLC_SRC_PLLOUTB		0x20000000#define CPR0_PLLC_SRC_ENCODE(n)		((((unsigned long)(n))&0x01)<<29)#define CPR0_PLLC_SRC_DECODE(n)		((((unsigned long)(n))>>29)&0x01)#define CPR0_PLLC_SEL_MASK		0x07000000#define CPR0_PLLC_SEL_PLLOUT		0x00000000#define CPR0_PLLC_SEL_CPU		0x01000000#define CPR0_PLLC_SEL_EBC		0x05000000#define CPR0_PLLC_SEL_ENCODE(n)		((((unsigned long)(n))&0x07)<<24)#define CPR0_PLLC_SEL_DECODE(n)		((((unsigned long)(n))>>24)&0x07)#define CPR0_PLLC_TUNE_MASK		0x000003FF#define CPR0_PLLC_TUNE_ENCODE(n)	((((unsigned long)(n))&0x3FF)<<0)#define CPR0_PLLC_TUNE_DECODE(n)	((((unsigned long)(n))>>0)&0x3FF)#define CPR0_PLLD			0x60#define CPR0_PLLD_FBDV_MASK		0x1F000000#define CPR0_PLLD_FBDV_ENCODE(n)	((((unsigned long)(n))&0x1F)<<24)#define CPR0_PLLD_FBDV_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x1F)+1)#define CPR0_PLLD_FWDVA_MASK		0x000F0000#define CPR0_PLLD_FWDVA_ENCODE(n)	((((unsigned long)(n))&0x0F)<<16)#define CPR0_PLLD_FWDVA_DECODE(n)	((((((unsigned long)(n))>>16)-1)&0x0F)+1)#define CPR0_PLLD_FWDVB_MASK		0x00000700#define CPR0_PLLD_FWDVB_ENCODE(n)	((((unsigned long)(n))&0x07)<<8)#define CPR0_PLLD_FWDVB_DECODE(n)	((((((unsigned long)(n))>>8)-1)&0x07)+1)#define CPR0_PLLD_LFBDV_MASK		0x0000003F#define CPR0_PLLD_LFBDV_ENCODE(n)	((((unsigned long)(n))&0x3F)<<0)#define CPR0_PLLD_LFBDV_DECODE(n)	((((((unsigned long)(n))>>0)-1)&0x3F)+1)#define CPR0_PRIMAD			0x80#define CPR0_PRIMAD_PRADV0_MASK		0x07000000#define CPR0_PRIMAD_PRADV0_ENCODE(n)	((((unsigned long)(n))&0x07)<<24)#define CPR0_PRIMAD_PRADV0_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x07)+1)#define CPR0_PRIMBD			0xA0#define CPR0_PRIMBD_PRBDV0_MASK		0x07000000#define CPR0_PRIMBD_PRBDV0_ENCODE(n)	((((unsigned long)(n))&0x07)<<24)#define CPR0_PRIMBD_PRBDV0_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x07)+1)#define CPR0_OPBD			0xC0#define CPR0_OPBD_OPBDV0_MASK		0x03000000#define CPR0_OPBD_OPBDV0_ENCODE(n)	((((unsigned long)(n))&0x03)<<24)#define CPR0_OPBD_OPBDV0_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x03)+1)#define CPR0_PERD			0xE0#if !defined(CONFIG_440EPX)#define CPR0_PERD_PERDV0_MASK		0x03000000#define CPR0_PERD_PERDV0_ENCODE(n)	((((unsigned long)(n))&0x03)<<24)#define CPR0_PERD_PERDV0_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x03)+1)#endif#define CPR0_MALD			0x100#define CPR0_MALD_MALDV0_MASK		0x03000000#define CPR0_MALD_MALDV0_ENCODE(n)	((((unsigned long)(n))&0x03)<<24)#define CPR0_MALD_MALDV0_DECODE(n)	((((((unsigned long)(n))>>24)-1)&0x03)+1)#define CPR0_ICFG			0x140#define CPR0_ICFG_RLI_MASK		0x80000000#define CPR0_ICFG_RLI_RESETCPR		0x00000000#define CPR0_ICFG_RLI_PRESERVECPR	0x80000000#define CPR0_ICFG_ICS_MASK		0x00000007#define CPR0_ICFG_ICS_ENCODE(n)		((((unsigned long)(n))&0x3F)<<0)#define CPR0_ICFG_ICS_DECODE(n)		((((((unsigned long)(n))>>0)-1)&0x3F)+1)/************************//* IIC defines          *//************************/#define IIC0_MMIO_BASE 0xA0000400#define IIC1_MMIO_BASE 0xA0000500#endif /* CONFIG_440SP *//*----------------------------------------------------------------------------- | DMA +----------------------------------------------------------------------------*/#if defined(CONFIG_460EX) || defined(CONFIG_460GT)#define DMA_DCR_BASE 0x200#else#define DMA_DCR_BASE 0x100#endif#define dmacr0	(DMA_DCR_BASE+0x00)  /* DMA channel control register 0	     */#define dmact0	(DMA_DCR_BASE+0x01)  /* DMA count register 0		     */#define dmasah0 (DMA_DCR_BASE+0x02)  /* DMA source address high 0	     */#define dmasal0 (DMA_DCR_BASE+0x03)  /* DMA source address low 0	     */#define dmadah0 (DMA_DCR_BASE+0x04)  /* DMA destination address high 0	     */#define dmadal0 (DMA_DCR_BASE+0x05)  /* DMA destination address low 0	     */#define dmasgh0 (DMA_DCR_BASE+0x06)  /* DMA scatter/gather desc addr high 0  */#define dmasgl0 (DMA_DCR_BASE+0x07)  /* DMA scatter/gather desc addr low 0   */#define dmacr1	(DMA_DCR_BASE+0x08)  /* DMA channel control register 1	     */#define dmact1	(DMA_DCR_BASE+0x09)  /* DMA count register 1		     */#define dmasah1 (DMA_DCR_BASE+0x0a)  /* DMA source address high 1	     */#define dmasal1 (DMA_DCR_BASE+0x0b)  /* DMA source address low 1	     */#define dmadah1 (DMA_DCR_BASE+0x0c)  /* DMA destination address high 1	     */#define dmadal1 (DMA_DCR_BASE+0x0d)  /* DMA destination address low 1	     */#define dmasgh1 (DMA_DCR_BASE+0x0e)  /* DMA scatter/gather desc addr high 1  */#define dmasgl1 (DMA_DCR_BASE+0x0f)  /* DMA scatter/gather desc addr low 1   */#define dmacr2	(DMA_DCR_BASE+0x10)  /* DMA channel control register 2	     */#define dmact2	(DMA_DCR_BASE+0x11)  /* DMA count register 2		     */#define dmasah2 (DMA_DCR_BASE+0x12)  /* DMA source address high 2	     */#define dmasal2 (DMA_DCR_BASE+0x13)  /* DMA source address low 2	     */#define dmadah2 (DMA_DCR_BASE+0x14)  /* DMA destination address high 2	     */#define dmadal2 (DMA_DCR_BASE+0x15)  /* DMA destination address low 2	     */#define dmasgh2 (DMA_DCR_BASE+0x16)  /* DMA scatter/gather desc addr high 2  */#define dmasgl2 (DMA_DCR_BASE+0x17)  /* DMA scatter/gather desc addr low 2   */#define dmacr3	(DMA_DCR_BASE+0x18)  /* DMA channel control register 2	     */#define dmact3	(DMA_DCR_BASE+0x19)  /* DMA count register 2		     */#define dmasah3 (DMA_DCR_BASE+0x1a)  /* DMA source address high 2	     */#define dmasal3 (DMA_DCR_BASE+0x1b)  /* DMA source address low 2	     */#define dmadah3 (DMA_DCR_BASE+0x1c)  /* DMA destination address high 2	     */#define dmadal3 (DMA_DCR_BASE+0x1d)  /* DMA destination address low 2	     */#define dmasgh3 (DMA_DCR_BASE+0x1e)  /* DMA scatter/gather desc addr high 2  */#define dmasgl3 (DMA_DCR_BASE+0x1f)  /* DMA scatter/gather desc addr low 2   */#define dmasr	(DMA_DCR_BASE+0x20)  /* DMA status register		     */#define dmasgc	(DMA_DCR_BASE+0x23)  /* DMA scatter/gather command register  */#define dmaslp	(DMA_DCR_BASE+0x25)  /* DMA sleep mode register		     */#define dmapol	(DMA_DCR_BASE+0x26)  /* DMA polarity configuration register  *//*----------------------------------------------------------------------------- | 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 maltxtattrr (MAL_DCR_BASE+0x08) /* TX PLB attribute reg		    */#define maltxbattr  (MAL_DCR_BASE+0x09) /* TX descriptor base addr 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 malrxtattrr (MAL_DCR_BASE+0x14) /* RX PLB attribute reg		    */#define malrxbattr  (MAL_DCR_BASE+0x15) /* RX descriptor base addr 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 maltxctp3r  (MAL_DCR_BASE+0x23) /* TX 3 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	    */#if defined(CONFIG_440GX) || \    defined(CONFIG_460EX) || defined(CONFIG_460GT)#define malrxctp2r  (MAL_DCR_BASE+0x42) /* RX 2 Channel table pointer reg   */#define malrxctp3r  (MAL_DCR_BASE+0x43) /* RX 3 Channel table pointer reg   */#define malrxctp8r  (MAL_DCR_BASE+0x48) /* RX 8 Channel table pointer reg   */#define malrxctp16r (MAL_DCR_BASE+0x50) /* RX 16 Channel table pointer reg  */#define malrxctp24r (MAL_DCR_BASE+0x58) /* RX 24 Channel table pointer reg  */#define malrcbs2    (MAL_DCR_BASE+0x62) /* RX 2 Channel buffer size reg	    */#define malrcbs3    (MAL_DCR_BASE+0x63) /* RX 3 Channel buffer size reg	    */#define malrcbs8    (MAL_DCR_BASE+0x68) /* RX 8 Channel buffer size reg	    */#define malrcbs16   (MAL_DCR_BASE+0x70) /* RX 16 Channel buffer size reg    */#define malrcbs24   (MAL_DCR_BASE+0x78) /* RX 24 Channel buffer size reg    */#endif /* CONFIG_440GX *//*---------------------------------------------------------------------------+|  Universal interrupt controller 0 interrupts (UIC0)+---------------------------------------------------------------------------*/#if defined(CONFIG_440SP)#define UIC_U0		0x80000000	/* UART 0			    */#define UIC_U1		0x40000000	/* UART 1			    */#define UIC_IIC0	0x20000000	/* IIC				    */#define UIC_IIC1	0x10000000	/* IIC				    */#define UIC_PIM		0x08000000	/* PCI0 inbound message		    */#define UIC_PCRW	0x04000000	/* PCI0 command write register	    */#define UIC_PPM		0x02000000	/* PCI0 power management	    */#define UIC_PVPD	0x01000000	/* PCI0 VPD Access		    */#define UIC_MSI0	0x00800000	/* PCI0 MSI level 0		    */#define UIC_P1IM	0x00400000	/* PCI1 Inbound Message		    */#define UIC_P1CRW	0x00200000	/* PCI1 command write register	    */#define UIC_P1PM	0x00100000	/* PCI1 power management	    */#define UIC_P1VPD	0x00080000	/* PCI1 VPD Access		    */#define UIC_P1MSI0	0x00040000	/* PCI1 MSI level 0		    */#define UIC_P2IM	0x00020000	/* PCI2 inbound message		    */#define UIC_P2CRW	0x00010000	/* PCI2 command register write	    */#define UIC_P2PM	0x00008000	/* PCI2 power management	    */#define UIC_P2VPD	0x00004000	/* PCI2 VPD access		    */#define UIC_P2MSI0	0x00002000	/* PCI2 MSI level 0		    */#define UIC_D0CPF	0x00001000	/* DMA0 command pointer		    */#define UIC_D0CSF	0x00000800	/* DMA0 command status		    */#define UIC_D1CPF	0x00000400	/* DMA1 command pointer		    */#define UIC_D1CSF	0x00000200	/* DMA1 command status		    */#define UIC_I2OID	0x00000100	/* I2O inbound doorbell		    */#define UIC_I2OPLF	0x00000080	/* I2O inbound post list	    */#define UIC_I2O0LL	0x00000040	/* I2O0 low latency PLB write	    */#define UIC_I2O1LL	0x00000020	/* I2O1 low latency PLB write	    */#define UIC_I2O0HB	0x00000010	/* I2O0 high bandwidth PLB write    */#define UIC_I2O1HB	0x00000008	/* I2O1 high bandwidth PLB write    */#define UIC_GPTCT	0x00000004	/* GPT count timer		    */#define UIC_UIC1NC	0x00000002	/* UIC1 non-critical interrupt	    */#define UIC_UIC1C	0x00000001	/* UIC1 critical interrupt	    */#elif defined(CONFIG_440GX) || defined(CONFIG_440EP)#define UIC_U0		0x80000000	/* UART 0			    */#define UIC_U1		0x40000000	/* UART 1			    */#define UIC_IIC0	0x20000000	/* IIC				    */#define UIC_IIC1	0x10000000	/* IIC				    */#define UIC_PIM		0x08000000	/* PCI inbound message		    */#define UIC_PCRW	0x04000000	/* PCI command register write	    */#define UIC_PPM		0x02000000	/* PCI power management		    */#define UIC_MSI0	0x01000000	/* PCI MSI level 0		    */#define UIC_MSI1	0x00800000	/* PC

⌨️ 快捷键说明

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