public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] ARM: at91: sfr: implement DDR input buffers open function
Date: Thu, 8 Aug 2019 07:48:30 +0000	[thread overview]
Message-ID: <1565250163-21502-4-git-send-email-eugen.hristev@microchip.com> (raw)
In-Reply-To: <1565250163-21502-1-git-send-email-eugen.hristev@microchip.com>

From: Eugen Hristev <eugen.hristev@microchip.com>

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>
---
 arch/arm/mach-at91/atmel_sfr.c                | 11 +++++++++++
 arch/arm/mach-at91/include/mach/at91_common.h |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm/mach-at91/atmel_sfr.c b/arch/arm/mach-at91/atmel_sfr.c
index 07bd8ab..13cfba0 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 df7d0e7..e929b5e 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);
-- 
2.7.4

  parent reply	other threads:[~2019-08-08  7:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  7:48 [U-Boot] [PATCH 1/7] ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 2/7] board: atmel: add sama5d27_wlsom1_ek board Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 3/7] ARM: at91: sfr: convert to Kconfig Eugen.Hristev at microchip.com
2019-08-08  7:48 ` Eugen.Hristev at microchip.com [this message]
2019-08-08  7:48 ` [U-Boot] [PATCH 5/7] board: laird: wb50n: use configure_ddrcfg_input_buffers Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 6/7] ARM: at91: mpddrc: add lpddr2 initialization procedure Eugen.Hristev at microchip.com
2019-08-08  7:48 ` [U-Boot] [PATCH 7/7] board: atmel: sama5d2_wlsom1_ek: add SPL support Eugen.Hristev at microchip.com
2019-08-26 11:43 ` [U-Boot] [PATCH 1/7] ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP Eugen.Hristev at microchip.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1565250163-21502-4-git-send-email-eugen.hristev@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox