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

📄 ppchameleonevb.h

📁 U BOOT源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define CFG_ENV_OFFSET          0x100   /* environment starts at the beginning of the EEPROM */#define CFG_ENV_SIZE            0x700   /* 2048 bytes may be used for env vars*/				   /* total size of a CAT24WC16 is 2048 bytes */#define CFG_NVRAM_BASE_ADDR	0xF0000500		/* NVRAM base address	*/#define CFG_NVRAM_SIZE		242		        /* NVRAM size		*//*----------------------------------------------------------------------- * I2C EEPROM (CAT24WC16) for environment */#define CONFIG_HARD_I2C			/* I2c with hardware support */#define CFG_I2C_SPEED		400000	/* I2C speed and slave address */#define CFG_I2C_SLAVE		0x7F#define CFG_I2C_EEPROM_ADDR	0x50	/* EEPROM CAT28WC08		*/#define CFG_I2C_EEPROM_ADDR_LEN	1	/* Bytes of address		*//* mask of address bits that overflow into the "EEPROM chip address"    *//*#define CFG_I2C_EEPROM_ADDR_OVERFLOW	0x07*/#define CFG_EEPROM_PAGE_WRITE_BITS 4	/* The Catalyst CAT24WC08 has	*/					/* 16 byte page write mode using*/					/* last	4 bits of the address	*/#define CFG_EEPROM_PAGE_WRITE_DELAY_MS	10   /* and takes up to 10 msec */#define CFG_EEPROM_PAGE_WRITE_ENABLE/*----------------------------------------------------------------------- * Cache Configuration */#define CFG_DCACHE_SIZE		16384	/* For IBM 405 CPUs, older 405 ppc's    */					/* have only 8kB, 16kB is save here     */#define CFG_CACHELINE_SIZE	32	/* ...			*/#if (CONFIG_COMMANDS & CFG_CMD_KGDB)#define CFG_CACHELINE_SHIFT	5	/* log base 2 of the above value	*/#endif/* * Init Memory Controller: * * BR0/1 and OR0/1 (FLASH) */#define FLASH_BASE0_PRELIM	0xFFC00000	/* FLASH bank #0	*//*----------------------------------------------------------------------- * External Bus Controller (EBC) Setup *//* Memory Bank 0 (Flash Bank 0, NOR-FLASH) initialization                       */#define CFG_EBC_PB0AP           0x92015480#define CFG_EBC_PB0CR           0xFFC5A000  /* BAS=0xFFC,BS=4MB,BU=R/W,BW=16bit *//* Memory Bank 1 (External SRAM) initialization                      		*//* Since this must replace NOR Flash, we use the same settings for CS0		*/#define CFG_EBC_PB1AP           0x92015480#define CFG_EBC_PB1CR           0xFF85A000  /* BAS=0xFF8,BS=4MB,BU=R/W,BW=8bit  *//* Memory Bank 2 (Flash Bank 1, NAND-FLASH) initialization                      */#define CFG_EBC_PB2AP           0x92015480#define CFG_EBC_PB2CR           0xFF458000  /* BAS=0xFF4,BS=4MB,BU=R/W,BW=8bit  *//* Memory Bank 3 (Flash Bank 2, NAND-FLASH) initialization                      */#define CFG_EBC_PB3AP           0x92015480#define CFG_EBC_PB3CR           0xFF058000  /* BAS=0xFF0,BS=4MB,BU=R/W,BW=8bit  */#if 0 /* Roese *//* Memory Bank 1 (Flash Bank 1, NAND-FLASH) initialization                      */#define CFG_EBC_PB1AP           0x92015480#define CFG_EBC_PB1CR           0xFF858000  /* BAS=0xFF8,BS=4MB,BU=R/W,BW=8bit  *//* Memory Bank 2 (CAN0, 1) initialization                                       */#define CFG_EBC_PB2AP           0x010053C0  /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */#define CFG_EBC_PB2CR           0xF0018000  /* BAS=0xF00,BS=1MB,BU=R/W,BW=8bit  *//* Memory Bank 3 (CompactFlash IDE) initialization                              */#define CFG_EBC_PB3AP           0x010053C0  /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */#define CFG_EBC_PB3CR           0xF011A000  /* BAS=0xF01,BS=1MB,BU=R/W,BW=16bit *//* Memory Bank 4 (NVRAM/RTC) initialization                                     */#define CFG_EBC_PB4AP           0x01005280  /* TWT=2,WBN=1,WBF=1,TH=1,SOR=1     */#define CFG_EBC_PB4CR           0xF0218000  /* BAS=0xF02,BS=1MB,BU=R/W,BW=8bit  */#endif/*----------------------------------------------------------------------- * FPGA stuff *//* FPGA internal regs */#define CFG_FPGA_MODE           0x00#define CFG_FPGA_STATUS         0x02#define CFG_FPGA_TS             0x04#define CFG_FPGA_TS_LOW         0x06#define CFG_FPGA_TS_CAP0        0x10#define CFG_FPGA_TS_CAP0_LOW    0x12#define CFG_FPGA_TS_CAP1        0x14#define CFG_FPGA_TS_CAP1_LOW    0x16#define CFG_FPGA_TS_CAP2        0x18#define CFG_FPGA_TS_CAP2_LOW    0x1a#define CFG_FPGA_TS_CAP3        0x1c#define CFG_FPGA_TS_CAP3_LOW    0x1e/* FPGA Mode Reg */#define CFG_FPGA_MODE_CF_RESET  0x0001#define CFG_FPGA_MODE_TS_IRQ_ENABLE 0x0100#define CFG_FPGA_MODE_TS_IRQ_CLEAR  0x1000#define CFG_FPGA_MODE_TS_CLEAR  0x2000/* FPGA Status Reg */#define CFG_FPGA_STATUS_DIP0    0x0001#define CFG_FPGA_STATUS_DIP1    0x0002#define CFG_FPGA_STATUS_DIP2    0x0004#define CFG_FPGA_STATUS_FLASH   0x0008#define CFG_FPGA_STATUS_TS_IRQ  0x1000#define CFG_FPGA_SPARTAN2       1           /* using Xilinx Spartan 2 now    */#define CFG_FPGA_MAX_SIZE       128*1024    /* 128kByte is enough for XC2S50E*//* FPGA program pin configuration */#define CFG_FPGA_PRG            0x04000000  /* FPGA program pin (ppc output) */#define CFG_FPGA_CLK            0x02000000  /* FPGA clk pin (ppc output)     */#define CFG_FPGA_DATA           0x01000000  /* FPGA data pin (ppc output)    */#define CFG_FPGA_INIT           0x00010000  /* FPGA init pin (ppc input)     */#define CFG_FPGA_DONE           0x00008000  /* FPGA done pin (ppc input)     *//*----------------------------------------------------------------------- * Definitions for initial stack pointer and data area (in data cache) */#if 0 /* test-only */#define CFG_INIT_DCACHE_CS      4       /* use cs # 4 for data cache memory    */#define CFG_INIT_RAM_ADDR       0x40000000  /* use data cache                  */#define CFG_INIT_RAM_END        0x2000  /* End of used area in RAM             */#else/* use on chip memory ( OCM ) for temperary stack until sdram is tested */#define CFG_TEMP_STACK_OCM        1/* On Chip Memory location */#define CFG_OCM_DATA_ADDR	0xF8000000#define CFG_OCM_DATA_SIZE	0x1000#define CFG_INIT_RAM_ADDR	CFG_OCM_DATA_ADDR /* inside of SDRAM		*/#define CFG_INIT_RAM_END	CFG_OCM_DATA_SIZE /* End of used area in RAM	*/#endif#define CFG_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */#define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)#define CFG_INIT_SP_OFFSET      CFG_GBL_DATA_OFFSET/*----------------------------------------------------------------------- * Definitions for GPIO setup (PPC405EP specific) * * GPIO0[0]     - External Bus Controller BLAST output * GPIO0[1-9]   - Instruction trace outputs -> GPIO * GPIO0[10-13] - External Bus Controller CS_1 - CS_4 outputs * GPIO0[14-16] - External Bus Controller ABUS3-ABUS5 outputs -> GPIO * GPIO0[17-23] - External Interrupts IRQ0 - IRQ6 inputs * GPIO0[24-27] - UART0 control signal inputs/outputs * GPIO0[28-29] - UART1 data signal input/output * GPIO0[30]    - EMAC0 input * GPIO0[31]    - EMAC1 reject packet as output */#define CFG_GPIO0_OSRH          0x40000550#define CFG_GPIO0_OSRL          0x00000110#define CFG_GPIO0_ISR1H         0x00000000/*#define CFG_GPIO0_ISR1L         0x15555445*/#define CFG_GPIO0_ISR1L         0x15555444#define CFG_GPIO0_TSRH          0x00000000#define CFG_GPIO0_TSRL          0x00000000#define CFG_GPIO0_TCR           0xF7FF8014/* * Internal Definitions * * Boot Flags */#define BOOTFLAG_COLD	0x01		/* Normal Power-On: Boot from FLASH	*/#define BOOTFLAG_WARM	0x02		/* Software reboot			*/#if 1 /* test-only */#define CONFIG_NO_SERIAL_EEPROM/*#undef CONFIG_NO_SERIAL_EEPROM*//*--------------------------------------------------------------------*/#ifdef CONFIG_NO_SERIAL_EEPROM/*!-----------------------------------------------------------------------! Defines for entry options.! Note: Because the 405EP SDRAM controller does not support ECC, ECC DIMMs that!       are plugged in the board will be utilized as non-ECC DIMMs.!-----------------------------------------------------------------------*/#undef        AUTO_MEMORY_CONFIG#define        DIMM_READ_ADDR 0xAB#define        DIMM_WRITE_ADDR 0xAA#define CPC0_PLLMR0  (CNTRL_DCR_BASE+0x0)  /* PLL mode 0 register          */#define CPC0_BOOT    (CNTRL_DCR_BASE+0x1)  /* Chip Clock Status register   */#define CPC0_CR1     (CNTRL_DCR_BASE+0x2)  /* Chip Control 1 register      */#define CPC0_EPRCSR  (CNTRL_DCR_BASE+0x3)  /* EMAC PHY Rcv Clk Src register*/#define CPC0_PLLMR1  (CNTRL_DCR_BASE+0x4)  /* PLL mode 1 register          */#define CPC0_UCR     (CNTRL_DCR_BASE+0x5)  /* UART Control register        */#define CPC0_SRR     (CNTRL_DCR_BASE+0x6)  /* Soft Reset register          */#define CPC0_JTAGID  (CNTRL_DCR_BASE+0x7)  /* JTAG ID register             */#define CPC0_SPARE   (CNTRL_DCR_BASE+0x8)  /* Spare DCR                    */#define CPC0_PCI     (CNTRL_DCR_BASE+0x9)  /* PCI Control register         *//* Defines for CPC0_PLLMR1 Register fields */#define PLL_ACTIVE                 0x80000000#define CPC0_PLLMR1_SSCS           0x80000000#define PLL_RESET                  0x40000000#define CPC0_PLLMR1_PLLR           0x40000000    /* Feedback multiplier */#define PLL_FBKDIV                 0x00F00000#define CPC0_PLLMR1_FBDV           0x00F00000#define PLL_FBKDIV_16              0x00000000#define PLL_FBKDIV_1               0x00100000#define PLL_FBKDIV_2               0x00200000#define PLL_FBKDIV_3               0x00300000#define PLL_FBKDIV_4               0x00400000#define PLL_FBKDIV_5               0x00500000#define PLL_FBKDIV_6               0x00600000#define PLL_FBKDIV_7               0x00700000#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_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)#if 0 /* test-only */#define PLLMR0_DEFAULT   PLLMR0_266_133_66_33#define PLLMR1_DEFAULT   PLLMR1_266_133_66_33#endif#if 0 /* test-only */#define PLLMR0_DEFAULT   PLLMR0_200_100_50_33#define PLLMR1_DEFAULT   PLLMR1_200_100_50_33#endif#if 1 /* test-only */#define PLLMR0_DEFAULT   PLLMR0_133_66_66_33#define PLLMR1_DEFAULT   PLLMR1_133_66_66_33#endif#endif#endif#endif	/* __CONFIG_H */

⌨️ 快捷键说明

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