Skip to content

Commit

Permalink
added delays for debuging
Browse files Browse the repository at this point in the history
  • Loading branch information
jad13041 committed Jan 30, 2020
1 parent 5872f8e commit edd6a48
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions common/board_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,16 +943,22 @@ static init_fnc_t init_sequence_f[] = {
/* TODO: unify all these dram functions? */
#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_NDS32) || \
defined(CONFIG_MICROBLAZE) || defined(CONFIG_AVR32)
printf("dram_init\n");
mdelay(5000);
dram_init, /* configure available RAM banks */
#endif
#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_M68K)
printf("init_func_ram\n");
mdelay(5000);
init_func_ram,
#endif
#ifdef CONFIG_POST
post_init_f,
#endif
INIT_FUNC_WATCHDOG_RESET
#if defined(CONFIG_SYS_DRAM_TEST)
printf("test dram\n");
mdelay(5000);
testdram,
#endif /* CONFIG_SYS_DRAM_TEST */
INIT_FUNC_WATCHDOG_RESET
Expand Down
8 changes: 7 additions & 1 deletion drivers/ddr/fsl/ctrl_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,9 @@ static void set_ddr_sdram_cfg(fsl_ddr_cfg_regs_t *ddr,
const memctl_options_t *popts,
const common_timing_params_t *common_dimm)
{
unsigned int mem_en; /* DDR SDRAM interface logic enable */
printf("DRAM cfg\n");
mdelay(5000);
unsigned int mem_en = 0; /* DDR SDRAM interface logic enable */
unsigned int sren; /* Self refresh enable (during sleep) */
unsigned int ecc_en; /* ECC enable. */
unsigned int rd_en; /* Registered DIMM enable */
Expand Down Expand Up @@ -844,6 +846,8 @@ static void set_ddr_sdram_cfg(fsl_ddr_cfg_regs_t *ddr,
}

static void set_ddr_sdram_cfg_mem_en(fsl_ddr_cfg_regs_t *ddr){
printf("Mem enable\n");
mdelay(5000);
int mem_en = 1;
ddr->ddr_sdram_cfg = ( ddr->ddr_sdram_cfg
| ((mem_en & 0x1) << 31));
Expand All @@ -856,6 +860,8 @@ static void set_ddr_sdram_cfg_2(const unsigned int ctrl_num,
const memctl_options_t *popts,
const unsigned int unq_mrs_en)
{
printf("DRAM cfg2\n");
mdelay(5000);
unsigned int frc_sr = 0; /* Force self refresh */
unsigned int sr_ie = 0; /* Self-refresh interrupt enable */
unsigned int odt_cfg = 0; /* ODT configuration */
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/fsl_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void dma_meminit(uint val, uint size)
if (((uint)p & 0x1f) == 0)
ppcDcbz((ulong)p);

*p = (uint) 0x11111111//CONFIG_MEM_INIT_VALUE;
*p = (uint) 0x11111111;//CONFIG_MEM_INIT_VALUE;

if (((uint)p & 0x1c) == 0x1c)
ppcDcbf((ulong)p);
Expand Down

0 comments on commit edd6a48

Please sign in to comment.