/* When wakeup from deep sleep, the first 128 bytes space will be used to do DDR training which corrupts the data in there. This function will restore them.  */
static void dp_ddr_restore(void)
/* When wakeup from deep sleep, the first 128 bytes space will be used to do DDR training which corrupts the data in there. This function will restore them.  */
static void dp_ddr_restore(void)
{
	u64 *src, *dst;
	int i;
	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_MPC85xx_SCFG;
	src = (u64 *)(in_be32(&scfg->sparecr[2]) + DDR_BUFF_LEN - 8);
	dst = (u64 *)(CONFIG_SYS_SDRAM_BASE + DDR_BUFF_LEN - 8);
	for (i = 0; i < DDR_BUFF_LEN / 8; i++)
		*dst-- = *src--;
	flush_dcache();
}