@ -11,6 +11,7 @@
# include <fsl_ddr_sdram.h>
# include <fsl_ddr_sdram.h>
# include <fsl_ddr_dimm_params.h>
# include <fsl_ddr_dimm_params.h>
# include <asm/fsl_law.h>
# include <asm/fsl_law.h>
# include <asm/mpc85xx_gpio.h>
# include "ddr.h"
# include "ddr.h"
DECLARE_GLOBAL_DATA_PTR ;
DECLARE_GLOBAL_DATA_PTR ;
@ -109,6 +110,19 @@ found:
popts - > ddr_cdr2 = DDR_CDR2_ODT ( DDR_CDR_ODT_75ohm ) ;
popts - > ddr_cdr2 = DDR_CDR2_ODT ( DDR_CDR_ODT_75ohm ) ;
}
}
# if defined(CONFIG_DEEP_SLEEP)
void board_mem_sleep_setup ( void )
{
void __iomem * cpld_base = ( void * ) CONFIG_SYS_CPLD_BASE ;
/* does not provide HW signals for power management */
clrbits_8 ( cpld_base + 0x17 , 0x40 ) ;
/* Disable MCKE isolation */
gpio_set_value ( 2 , 0 ) ;
udelay ( 1 ) ;
}
# endif
phys_size_t initdram ( int board_type )
phys_size_t initdram ( int board_type )
{
{
phys_size_t dram_size ;
phys_size_t dram_size ;
@ -124,5 +138,10 @@ phys_size_t initdram(int board_type)
# else
# else
dram_size = fsl_ddr_sdram_size ( ) ;
dram_size = fsl_ddr_sdram_size ( ) ;
# endif
# endif
# if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
fsl_dp_resume ( ) ;
# endif
return dram_size ;
return dram_size ;
}
}