📄 sbc8260.h
字号:
#define CFG_RCCR 0/* * Initialize Memory Controller: * * Bank Bus Machine PortSz Device * ---- --- ------- ------ ------ * 0 60x GPCM 32 bit FLASH (SIMM - 4MB) * * 1 60x GPCM 32 bit FLASH (SIMM - Unused) * 2 60x SDRAM 64 bit SDRAM (DIMM - 16MB or 64MB) * 3 60x SDRAM 64 bit SDRAM (DIMM - Unused) * 4 Local SDRAM 32 bit SDRAM (on board - 4MB) * 5 60x GPCM 8 bit EEPROM (8KB) * 6 60x GPCM 8 bit FLASH (on board - 2MB) * * 7 60x GPCM 8 bit LEDs, switches * * (*) This configuration requires the SBC8260 be configured * so that *CS0 goes to the FLASH SIMM, and *CS6 goes to * the on board FLASH. In other words, JP24 should have * pins 1 and 2 jumpered and pins 3 and 4 jumpered. * *//*----------------------------------------------------------------------- * BR0,BR1 - Base Register * Ref: Section 10.3.1 on page 10-14 * OR0,OR1 - Option Register * Ref: Section 10.3.2 on page 10-18 *----------------------------------------------------------------------- *//* Bank 0,1 - FLASH SIMM * * This expects the FLASH SIMM to be connected to *CS0 * It consists of 4 AM29F080B parts. * * Note: For the 4 MB SIMM, *CS1 is unused. *//* BR0 is configured as follows: * * - Base address of 0x40000000 * - 32 bit port size * - Data errors checking is disabled * - Read and write access * - GPCM 60x bus * - Access are handled by the memory controller according to MSEL * - Not used for atomic operations * - No data pipelining is done * - Valid */#define CFG_BR0_PRELIM ((CFG_FLASH0_BASE & BRx_BA_MSK) |\ BRx_PS_32 |\ BRx_MS_GPCM_P |\ BRx_V)/* OR0 is configured as follows: * * - 4 MB * - *BCTL0 is asserted upon access to the current memory bank * - *CW / *WE are negated a quarter of a clock earlier * - *CS is output at the same time as the address lines * - Uses a clock cycle length of 5 * - *PSDVAL is generated internally by the memory controller * unless *GTA is asserted earlier externally. * - Relaxed timing is generated by the GPCM for accesses * initiated to this memory region. * - One idle clock is inserted between a read access from the * current bank and the next access. */#define CFG_OR0_PRELIM (MEG_TO_AM(CFG_FLASH0_SIZE) |\ ORxG_CSNT |\ ORxG_ACS_DIV1 |\ ORxG_SCY_5_CLK |\ ORxG_TRLX |\ ORxG_EHTR)/*----------------------------------------------------------------------- * BR2,BR3 - Base Register * Ref: Section 10.3.1 on page 10-14 * OR2,OR3 - Option Register * Ref: Section 10.3.2 on page 10-16 *----------------------------------------------------------------------- *//* Bank 2,3 - SDRAM DIMM * * 16MB DIMM: P/N * 64MB DIMM: P/N 1W-8864X8-4-P1-EST * * Note: *CS3 is unused for this DIMM *//* With a 16 MB or 64 MB DIMM, the BR2 is configured as follows: * * - Base address of 0x00000000 * - 64 bit port size (60x bus only) * - Data errors checking is disabled * - Read and write access * - SDRAM 60x bus * - Access are handled by the memory controller according to MSEL * - Not used for atomic operations * - No data pipelining is done * - Valid */#define CFG_BR2_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\ BRx_PS_64 |\ BRx_MS_SDRAM_P |\ BRx_V)#define CFG_BR3_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\ BRx_PS_64 |\ BRx_MS_SDRAM_P |\ BRx_V)/* With a 16 MB DIMM, the OR2 is configured as follows: * * - 16 MB * - 2 internal banks per device * - Row start address bit is A9 with PSDMR[PBI] = 0 * - 11 row address lines * - Back-to-back page mode * - Internal bank interleaving within save device enabled */#if (CFG_SDRAM0_SIZE == 16)#define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\ ORxS_BPD_2 |\ ORxS_ROWST_PBI0_A9 |\ ORxS_NUMR_11)#endif/* With a 64 MB DIMM, the OR2 is configured as follows: * * - 64 MB * - 4 internal banks per device * - Row start address bit is A8 with PSDMR[PBI] = 0 * - 12 row address lines * - Back-to-back page mode * - Internal bank interleaving within save device enabled */#if (CFG_SDRAM0_SIZE == 64)#define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\ ORxS_BPD_4 |\ ORxS_ROWST_PBI0_A8 |\ ORxS_NUMR_12)#endif/*----------------------------------------------------------------------- * PSDMR - 60x Bus SDRAM Mode Register * Ref: Section 10.3.3 on page 10-21 *----------------------------------------------------------------------- *//* Address that the DIMM SPD memory lives at. */#define SDRAM_SPD_ADDR 0x54#if (CFG_SDRAM0_SIZE == 16)/* With a 16 MB DIMM, the PSDMR is configured as follows: * * - Bank Based Interleaving, * - Refresh Enable, * - Address Multiplexing where A5 is output on A14 pin * (A6 on A15, and so on), * - use address pins A16-A18 as bank select, * - A9 is output on SDA10 during an ACTIVATE command, * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks, * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command * is 3 clocks, * - earliest timing for READ/WRITE command after ACTIVATE command is * 2 clocks, * - earliest timing for PRECHARGE after last data was read is 1 clock, * - earliest timing for PRECHARGE after last data was written is 1 clock, * - CAS Latency is 2. */#define CFG_PSDMR (PSDMR_RFEN |\ PSDMR_SDAM_A14_IS_A5 |\ PSDMR_BSMA_A16_A18 |\ PSDMR_SDA10_PBI0_A9 |\ PSDMR_RFRC_7_CLK |\ PSDMR_PRETOACT_3W |\ PSDMR_ACTTORW_2W |\ PSDMR_LDOTOPRE_1C |\ PSDMR_WRC_1C |\ PSDMR_CL_2)#endif#if (CFG_SDRAM0_SIZE == 64)/* With a 64 MB DIMM, the PSDMR is configured as follows: * * - Bank Based Interleaving, * - Refresh Enable, * - Address Multiplexing where A5 is output on A14 pin * (A6 on A15, and so on), * - use address pins A14-A16 as bank select, * - A9 is output on SDA10 during an ACTIVATE command, * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks, * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command * is 3 clocks, * - earliest timing for READ/WRITE command after ACTIVATE command is * 2 clocks, * - earliest timing for PRECHARGE after last data was read is 1 clock, * - earliest timing for PRECHARGE after last data was written is 1 clock, * - CAS Latency is 2. */#define CFG_PSDMR (PSDMR_RFEN |\ PSDMR_SDAM_A14_IS_A5 |\ PSDMR_BSMA_A14_A16 |\ PSDMR_SDA10_PBI0_A9 |\ PSDMR_RFRC_7_CLK |\ PSDMR_PRETOACT_3W |\ PSDMR_ACTTORW_2W |\ PSDMR_LDOTOPRE_1C |\ PSDMR_WRC_1C |\ PSDMR_CL_2)#endif/* * Shoot for approximately 1MHz on the prescaler. */#if (CONFIG_8260_CLKIN == (66 * 1000 * 1000))#define CFG_MPTPR MPTPR_PTP_DIV64#elif (CONFIG_8260_CLKIN == (33 * 1000 * 1000))#define CFG_MPTPR MPTPR_PTP_DIV32#else#warning "Unconfigured bus clock freq: check CFG_MPTPR and CFG_PSRT are OK"#define CFG_MPTPR MPTPR_PTP_DIV32#endif#define CFG_PSRT 14/* Bank 4 - On board SDRAM * * This is not implemented yet. *//*----------------------------------------------------------------------- * BR6 - Base Register * Ref: Section 10.3.1 on page 10-14 * OR6 - Option Register * Ref: Section 10.3.2 on page 10-18 *----------------------------------------------------------------------- *//* Bank 6 - On board FLASH * * This expects the on board FLASH SIMM to be connected to *CS6 * It consists of 1 AM29F016A part. */#if (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE))/* BR6 is configured as follows: * * - Base address of 0x60000000 * - 8 bit port size * - Data errors checking is disabled * - Read and write access * - GPCM 60x bus * - Access are handled by the memory controller according to MSEL * - Not used for atomic operations * - No data pipelining is done * - Valid */# define CFG_BR6_PRELIM ((CFG_FLASH1_BASE & BRx_BA_MSK) |\ BRx_PS_8 |\ BRx_MS_GPCM_P |\ BRx_V)/* OR6 is configured as follows: * * - 2 MB * - *BCTL0 is asserted upon access to the current memory bank * - *CW / *WE are negated a quarter of a clock earlier * - *CS is output at the same time as the address lines * - Uses a clock cycle length of 5 * - *PSDVAL is generated internally by the memory controller * unless *GTA is asserted earlier externally. * - Relaxed timing is generated by the GPCM for accesses * initiated to this memory region. * - One idle clock is inserted between a read access from the * current bank and the next access. */# define CFG_OR6_PRELIM (MEG_TO_AM(CFG_FLASH1_SIZE) |\ ORxG_CSNT |\ ORxG_ACS_DIV1 |\ ORxG_SCY_5_CLK |\ ORxG_TRLX |\ ORxG_EHTR)#endif /* (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) *//*----------------------------------------------------------------------- * BR7 - Base Register * Ref: Section 10.3.1 on page 10-14 * OR7 - Option Register * Ref: Section 10.3.2 on page 10-18 *----------------------------------------------------------------------- *//* Bank 7 - LEDs and switches * * LEDs are at 0x00001 (write only) * switches are at 0x00001 (read only) */#ifdef CFG_LED_BASE/* BR7 is configured as follows: * * - Base address of 0xA0000000 * - 8 bit port size * - Data errors checking is disabled * - Read and write access * - GPCM 60x bus * - Access are handled by the memory controller according to MSEL * - Not used for atomic operations * - No data pipelining is done * - Valid */# define CFG_BR7_PRELIM ((CFG_LED_BASE & BRx_BA_MSK) |\ BRx_PS_8 |\ BRx_MS_GPCM_P |\ BRx_V)/* OR7 is configured as follows: * * - 1 byte * - *BCTL0 is asserted upon access to the current memory bank * - *CW / *WE are negated a quarter of a clock earlier * - *CS is output at the same time as the address lines * - Uses a clock cycle length of 15 * - *PSDVAL is generated internally by the memory controller * unless *GTA is asserted earlier externally. * - Relaxed timing is generated by the GPCM for accesses * initiated to this memory region. * - One idle clock is inserted between a read access from the * current bank and the next access. */# define CFG_OR7_PRELIM (ORxG_AM_MSK |\ ORxG_CSNT |\ ORxG_ACS_DIV1 |\ ORxG_SCY_15_CLK |\ ORxG_TRLX |\ ORxG_EHTR)#endif /* CFG_LED_BASE *//* * Internal Definitions * * Boot Flags */#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */#define BOOTFLAG_WARM 0x02 /* Software reboot */#endif /* __CONFIG_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -