/* This function is called to initialize external sdram.  */
static void rt_hw_exdram_init(void)
/* This function is called to initialize external sdram.  */
static void rt_hw_exdram_init(void)
{
    *pEBIU_AMBCTL1 = 0xFFFFFF02;
    ssync();
    *pEBIU_AMGCTL = 0x00FF;
    ssync();
    if (SDRS != ((*pEBIU_SDSTAT) & SDRS))
    {
        return;
    }
    *pEBIU_SDRRC = 0x01A0;
    *pEBIU_SDBCTL = 0x0025;
    *pEBIU_SDGCTL = 0x0091998D;
    ssync();
}