#define CFG_INIT_RAM_END 0x2f00 /* End of used area in DPRAM */
#define CFG_INIT_DATA_SIZE 64 /* size in bytes reserved for initial data */
#define CFG_INIT_DATA_OFFSET (CFG_INIT_RAM_END - CFG_INIT_DATA_SIZE)
-#define CFG_INIT_SERIAL_SIZE 64 /* size in bytes reserved for serial rx/tx bd+buffers */
-#define CFG_INIT_SERIAL_OFFSET (CFG_INIT_DATA_OFFSET - CFG_INIT_SERIAL_SIZE)
#define CFG_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */
-#define CFG_INIT_VPD_OFFSET (CFG_INIT_SERIAL_OFFSET - CFG_INIT_VPD_SIZE)
+#define CFG_INIT_VPD_OFFSET (CFG_INIT_DATA_OFFSET - CFG_INIT_VPD_SIZE)
#define CFG_INIT_SP_OFFSET (CFG_INIT_VPD_OFFSET-8)
-/*-----------------------------------------------------------------------
- * Offset in DPMEM where we keep serial BDs and buffers
- */
-#define CFG_DPRAMSERIAL (CFG_INIT_SERIAL_OFFSET - 0x2000)
-
/*-----------------------------------------------------------------------
* Offset in DPMEM where we keep the VPD data
*/
#define CFG_SDRAM_BASE 0x00000000
#define CFG_FLASH_BASE 0xfe000000
#ifdef DEBUG
-#define CFG_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */
+#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#else
-#define CFG_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */
+#define CFG_MONITOR_LEN (256 << 10) /* Reserve 128 kB for Monitor */
#endif
#undef CFG_MONITOR_BASE 0x200000 /* to run ppcboot from RAM */
#define CFG_MONITOR_BASE CFG_FLASH_BASE
#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
SYPCR_SWE | SYPCR_SWP)
#else
-#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
+#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
#endif
/*-----------------------------------------------------------------------
*-----------------------------------------------------------------------
* PCMCIA config., multi-function pin tri-state
*/
-#define CFG_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
+#define CFG_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC10 | \
+ SIUMCR_SEME)
/*-----------------------------------------------------------------------
* TBSCR - Time Base Status and Control 11-26
*-----------------------------------------------------------------------
* Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
*/
-#define CFG_PISCR (PISCR_PS | PISCR_PITF)
+#define CFG_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE)
/*-----------------------------------------------------------------------
* PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
* Set clock output, timebase and RTC source and divider,
* power management and some other internal clocks
*/
-#define CFG_SCCR (SCCR_TBS | SCCR_COM11)
+#define SCCR_MASK (SCCR_RTDIV | SCCR_RTSEL)
+#define CFG_SCCR SCCR_TBS
/*-----------------------------------------------------------------------
* PCMCIA stuff
{
volatile immap_t *immr = (immap_t *)CFG_IMMR;
volatile memctl8xx_t *memctl = &immr->im_memctl;
- unsigned int speed, refclock, plprcr;
-
-#if 0
- /* SIUMCR - contains debug pin configuration (11-6) */
- immr->im_siu_conf.sc_siumcr = CFG_SIUMCR;
-
- /* timebase status and control register */
- immr->im_sitk.sitk_tbscrk = KAPWR_KEY;
- immr->im_sit.sit_tbscr = 0xc3;
-
- /* pit status and control register */
- immr->im_sitk.sitk_piscrk = KAPWR_KEY;
- immr->im_sit.sit_piscr = CFG_PISCR;
-
- /* pll, low power, and reset control register */
- immr->im_clkrstk.cark_plprcrk = KAPWR_KEY;
-
- /* system clock and reset control register */
- immr->im_clkrstk.cark_sccrk = KAPWR_KEY;
- immr->im_clkrst.car_sccr = CFG_SCCR;
-#endif
+ ulong speed, refclock, plprcr, sccr;
/* real-time clock status and control register */
immr->im_sitk.sitk_rtcsck = KAPWR_KEY;
immr->im_sit.sit_rtcsc = 0x00C3;
+ /* SIEL and SIMASK Registers (see MBX PRG 2-3) */
+ immr->im_siu_conf.sc_simask = 0x00000000;
+ immr->im_siu_conf.sc_siel = 0xAAAA0000;
+ immr->im_siu_conf.sc_tesr = 0xFFFFFFFF;
+
/*
* Prepare access to i2c bus. The MBX offers 3 devices on the i2c
* bus:
*/
vpd_init();
+ /* system clock and reset control register */
+ immr->im_clkrstk.cark_sccrk = KAPWR_KEY;
+ sccr = immr->im_clkrst.car_sccr;
+ sccr &= SCCR_MASK;
+ sccr |= CFG_SCCR;
+ immr->im_clkrst.car_sccr = sccr;
+
speed = board_get_cpufreq();
refclock = get_reffreq();
memctl->memc_or5 = CFG_PCIMEM_OR;
memctl->memc_br6 = CFG_PCIBRIDGE_BASE | 0x001;
memctl->memc_or6 = CFG_PCIBRIDGE_OR;
-
- MBX_CSR1 = 0;
}
void board_serial_init(void)
void board_ether_init(void)
{
- MBX_CSR1 &= ~CSR1_EAEN | CSR1_ELEN;
- MBX_CSR1 |= CSR1_ETEN | CSR1_TPEN | CSR1_FDDIS;
+ MBX_CSR1 &= ~(CSR1_EAEN | CSR1_ELEN);
+ MBX_CSR1 |= CSR1_ETEN | CSR1_TPEN | CSR1_FDDIS ;
}
static unsigned int board_get_cpufreq(void)
upmconfig(UPMA, (uint *)sdram_table_40,
sizeof(sdram_table_40) / sizeof(uint));
memctl->memc_mptpr = 0x0200;
- memctl->memc_mamr = dimm_sz ? 0x0682100 : 0x13801000;
+ memctl->memc_mamr = dimm_sz ? 0x06801000 : 0x13801000;
memctl->memc_br0 = 0xfe000000 | br0_32 | 1;
memctl->memc_or0 = 0xff800930;
memctl->memc_br7 = 0xfc000000 | (br0_32 ^ br0_32) | 1;
upmconfig(UPMA, (uint *)sdram_table_50,
sizeof(sdram_table_50) / sizeof(uint));
memctl->memc_mptpr = 0x0200;
- memctl->memc_mamr = dimm_sz ? 0x0882100 : 0x1882100;
+ memctl->memc_mamr = dimm_sz ? 0x08801000 : 0x1880100;
memctl->memc_br0 = 0xfe000000 | br0_32 | 1;
memctl->memc_or0 = 0xff800940;
memctl->memc_br7 = 0xfc000000 | (br0_32 ^ br0_32) | 1;