aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorEugen Hristev2019-08-08 07:48:30 +0000
committerEugen Hristev2019-10-08 09:16:11 +0300
commitb1c7b33be20e81adc45a4f25bba30f9439ce4e17 (patch)
treeef53892c0bcf53346b87920087c460e1137f676e /arch/arm
parentd231e37a2056c18159f2fbe5518518a9a86ca8a4 (diff)
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/atmel_sfr.c11
-rw-r--r--arch/arm/mach-at91/include/mach/at91_common.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/atmel_sfr.c b/arch/arm/mach-at91/atmel_sfr.c
index 07bd8abe939..13cfba0ba0c 100644
--- a/arch/arm/mach-at91/atmel_sfr.c
+++ b/arch/arm/mach-at91/atmel_sfr.c
@@ -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);
+}
+
diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h
index df7d0e7051f..e929b5e1d20 100644
--- a/arch/arm/mach-at91/include/mach/at91_common.h
+++ b/arch/arm/mach-at91/include/mach/at91_common.h
@@ -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);