/* Setup CS4 to enable the Board Control/Status registers. Otherwise the smcs won't work.  */
int board_early_init_f(void)
/* Setup CS4 to enable the Board Control/Status registers. Otherwise the smcs won't work.  */
int board_early_init_f(void)
{
    volatile t_rpx_regs *regs = (t_rpx_regs*)CONFIG_SYS_REGS_BASE;
    volatile immap_t *immap  = (immap_t *)CONFIG_SYS_IMMR;
    volatile memctl8260_t *memctl = &immap->im_memctl;
    memctl->memc_br4 = CONFIG_SYS_BR4_PRELIM;
    memctl->memc_or4 = CONFIG_SYS_OR4_PRELIM;
    regs->bcsr1 = 0x70;
    regs->bcsr2 = 0x20;
    return 0;
}