ARM: at91: sfr: implement DDR input buffers open function

Add a function in SFR implementation that will open the DDR input
buffers.
This can be called at DRAM initialization time.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
This commit is contained in:
Eugen Hristev
2019-08-08 07:48:30 +00:00
parent d231e37a20
commit b1c7b33be2
2 changed files with 14 additions and 0 deletions

View File

@@ -29,3 +29,14 @@ void configure_2nd_sram_as_l2_cache(void)
}
#endif
void configure_ddrcfg_input_buffers(bool open)
{
struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
if (open)
writel(ATMEL_SFR_DDRCFG_FDQIEN | ATMEL_SFR_DDRCFG_FDQSIEN,
&sfr->ddrcfg);
else
writel(0, &sfr->ddrcfg);
}

View File

@@ -35,6 +35,9 @@ void at91_disable_wdt(void);
void matrix_init(void);
void redirect_int_from_saic_to_aic(void);
void configure_2nd_sram_as_l2_cache(void);
#ifdef CONFIG_ATMEL_SFR
void configure_ddrcfg_input_buffers(bool open);
#endif
int at91_set_ethaddr(int offset);
int at91_video_show_board_info(void);