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

📄 ppc405.h

📁 U-boot源码 ARM7启动代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define PLL_FBKDIV_8               0x00800000#define PLL_FBKDIV_9               0x00900000#define PLL_FBKDIV_10              0x00A00000#define PLL_FBKDIV_11              0x00B00000#define PLL_FBKDIV_12              0x00C00000#define PLL_FBKDIV_13              0x00D00000#define PLL_FBKDIV_14              0x00E00000#define PLL_FBKDIV_15              0x00F00000    /* Forward A divisor */#define PLL_FWDDIVA                0x00070000#define CPC0_PLLMR1_FWDVA          0x00070000#define PLL_FWDDIVA_8              0x00000000#define PLL_FWDDIVA_7              0x00010000#define PLL_FWDDIVA_6              0x00020000#define PLL_FWDDIVA_5              0x00030000#define PLL_FWDDIVA_4              0x00040000#define PLL_FWDDIVA_3              0x00050000#define PLL_FWDDIVA_2              0x00060000#define PLL_FWDDIVA_1              0x00070000    /* Forward B divisor */#define PLL_FWDDIVB                0x00007000#define CPC0_PLLMR1_FWDVB          0x00007000#define PLL_FWDDIVB_8              0x00000000#define PLL_FWDDIVB_7              0x00001000#define PLL_FWDDIVB_6              0x00002000#define PLL_FWDDIVB_5              0x00003000#define PLL_FWDDIVB_4              0x00004000#define PLL_FWDDIVB_3              0x00005000#define PLL_FWDDIVB_2              0x00006000#define PLL_FWDDIVB_1              0x00007000    /* PLL tune bits */#define PLL_TUNE_MASK            0x000003FF#define PLL_TUNE_2_M_3           0x00000133     /*  2 <= M <= 3               */#define PLL_TUNE_4_M_6           0x00000134     /*  3 <  M <= 6               */#define PLL_TUNE_7_M_10          0x00000138     /*  6 <  M <= 10              */#define PLL_TUNE_11_M_14         0x0000013C     /* 10 <  M <= 14              */#define PLL_TUNE_15_M_40         0x0000023E     /* 14 <  M <= 40              */#define PLL_TUNE_VCO_LOW         0x00000000     /* 500MHz <= VCO <=  800MHz   */#define PLL_TUNE_VCO_HI          0x00000080     /* 800MHz <  VCO <= 1000MHz   *//* Defines for CPC0_PLLMR0 Register fields */    /* CPU divisor */#define PLL_CPUDIV                 0x00300000#define CPC0_PLLMR0_CCDV           0x00300000#define PLL_CPUDIV_1               0x00000000#define PLL_CPUDIV_2               0x00100000#define PLL_CPUDIV_3               0x00200000#define PLL_CPUDIV_4               0x00300000    /* PLB divisor */#define PLL_PLBDIV                 0x00030000#define CPC0_PLLMR0_CBDV           0x00030000#define PLL_PLBDIV_1               0x00000000#define PLL_PLBDIV_2               0x00010000#define PLL_PLBDIV_3               0x00020000#define PLL_PLBDIV_4               0x00030000    /* OPB divisor */#define PLL_OPBDIV                 0x00003000#define CPC0_PLLMR0_OPDV           0x00003000#define PLL_OPBDIV_1               0x00000000#define PLL_OPBDIV_2               0x00001000#define PLL_OPBDIV_3               0x00002000#define PLL_OPBDIV_4               0x00003000    /* EBC divisor */#define PLL_EXTBUSDIV              0x00000300#define CPC0_PLLMR0_EPDV           0x00000300#define PLL_EXTBUSDIV_2            0x00000000#define PLL_EXTBUSDIV_3            0x00000100#define PLL_EXTBUSDIV_4            0x00000200#define PLL_EXTBUSDIV_5            0x00000300    /* MAL divisor */#define PLL_MALDIV                 0x00000030#define CPC0_PLLMR0_MPDV           0x00000030#define PLL_MALDIV_1               0x00000000#define PLL_MALDIV_2               0x00000010#define PLL_MALDIV_3               0x00000020#define PLL_MALDIV_4               0x00000030    /* PCI divisor */#define PLL_PCIDIV                 0x00000003#define CPC0_PLLMR0_PPFD           0x00000003#define PLL_PCIDIV_1               0x00000000#define PLL_PCIDIV_2               0x00000001#define PLL_PCIDIV_3               0x00000002#define PLL_PCIDIV_4               0x00000003/* *------------------------------------------------------------------------------- * PLL settings for 266MHz CPU, 133MHz PLB/SDRAM, 66MHz EBC, 33MHz PCI, * assuming a 33.3MHz input clock to the 405EP. *------------------------------------------------------------------------------- */#define PLLMR0_266_133_66  (PLL_CPUDIV_1 | PLL_PLBDIV_2 |  \			    PLL_OPBDIV_2 | PLL_EXTBUSDIV_2 |  \			    PLL_MALDIV_1 | PLL_PCIDIV_4)#define PLLMR1_266_133_66  (PLL_FBKDIV_8  |  \			    PLL_FWDDIVA_3 | PLL_FWDDIVB_3 |  \			    PLL_TUNE_15_M_40 | PLL_TUNE_VCO_LOW)#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#endif /* #if 0 */#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 ******************************************************************************/#if defined(CONFIG_405EZ)#define	MAL_DCR_BASE	0x380#define	malmcr		(MAL_DCR_BASE+0x00)	/* MAL Config reg	      */#define	malesr		(MAL_DCR_BASE+0x01)	/* Err 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    *//*				      0x08-0x0F	   Reserved		      */#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  *//*				      0x14-0x1F	   Reserved		    */#define	maltxctp0r	(MAL_DCR_BASE+0x20)  /* TX 0 Channel table ptr reg  */#define	maltxctp1r	(MAL_DCR_BASE+0x21)  /* TX 1 Channel table ptr reg  */#define	maltxctp2r	(MAL_DCR_BASE+0x22)  /* TX 2 Channel table ptr reg  */#define	maltxctp3r	(MAL_DCR_BASE+0x23)  /* TX 3 Channel table ptr reg  */#define	maltxctp4r	(MAL_DCR_BASE+0x24)  /* TX 4 Channel table ptr reg  */#define	maltxctp5r	(MAL_DCR_BASE+0x25)  /* TX 5 Channel table ptr reg  */#define	maltxctp6r	(MAL_DCR_BASE+0x26)  /* TX 6 Channel table ptr reg  */#define	maltxctp7r	(MAL_DCR_BASE+0x27)  /* TX 7 Channel table ptr reg  */#define	maltxctp8r	(MAL_DCR_BASE+0x28)  /* TX 8 Channel table ptr reg  */#define	maltxctp9r	(MAL_DCR_BASE+0x29)  /* TX 9 Channel table ptr reg  */#define	maltxctp10r	(MAL_DCR_BASE+0x2A)  /* TX 10 Channel table ptr reg */#define	maltxctp11r	(MAL_DCR_BASE+0x2B)  /* TX 11 Channel table ptr reg */#define	maltxctp12r	(MAL_DCR_BASE+0x2C)  /* TX 12 Channel table ptr reg */#define	maltxctp13r	(MAL_DCR_BASE+0x2D)  /* TX 13 Channel table ptr reg */#define	maltxctp14r	(MAL_DCR_BASE+0x2E)  /* TX 14 Channel table ptr reg */#define	maltxctp15r	(MAL_DCR_BASE+0x2F)  /* TX 15 Channel table ptr reg */#define	maltxctp16r	(MAL_DCR_BASE+0x30)  /* TX 16 Channel table ptr reg */#define	maltxctp17r	(MAL_DCR_BASE+0x31)  /* TX 17 Channel table ptr reg */#define	maltxctp18r	(MAL_DCR_BASE+0x32)  /* TX 18 Channel table ptr reg */#define	maltxctp19r	(MAL_DCR_BASE+0x33)  /* TX 19 Channel table ptr reg */#define	maltxctp20r	(MAL_DCR_BASE+0x34)  /* TX 20 Channel table ptr reg */#define	maltxctp21r	(MAL_DCR_BASE+0x35)  /* TX 21 Channel table ptr reg */#define	maltxctp22r	(MAL_DCR_BASE+0x36)  /* TX 22 Channel table ptr reg */#define	maltxctp23r	(MAL_DCR_BASE+0x37)  /* TX 23 Channel table ptr reg */#define	maltxctp24r	(MAL_DCR_BASE+0x38)  /* TX 24 Channel table ptr reg */#define	maltxctp25r	(MAL_DCR_BASE+0x39)  /* TX 25 Channel table ptr reg */#define	maltxctp26r	(MAL_DCR_BASE+0x3A)  /* TX 26 Channel table ptr reg */#define	maltxctp27r	(MAL_DCR_BASE+0x3B)  /* TX 27 Channel table ptr reg */#define	maltxctp28r	(MAL_DCR_BASE+0x3C)  /* TX 28 Channel table ptr reg */

⌨️ 快捷键说明

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