All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 05/10] armv7R: K3: am654: Add support for triggering ddr init from SPL
Date: Thu, 25 Oct 2018 13:30:55 +0530	[thread overview]
Message-ID: <20181025080100.30176-6-lokeshvutla@ti.com> (raw)
In-Reply-To: <20181025080100.30176-1-lokeshvutla@ti.com>

In SPL, DDR should be made available by the end of board_init_f()
so that apis in board_init_r() can use ddr. Adding support
for triggering DDR initialization from board_init_f().

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-k3/am6_init.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index fef0107505..e2fe00c422 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -11,6 +11,7 @@
 #include <spl.h>
 #include <asm/arch/hardware.h>
 #include "common.h"
+#include <dm.h>
 
 #ifdef CONFIG_SPL_BUILD
 static void mmr_unlock(u32 base, u32 partition)
@@ -57,6 +58,10 @@ static void store_boot_index_from_rom(void)
 
 void board_init_f(ulong dummy)
 {
+#if defined(CONFIG_K3_AM654_DDRSS)
+	struct udevice *dev;
+	int ret;
+#endif
 	/*
 	 * Cannot delay this further as there is a chance that
 	 * K3_BOOT_PARAM_TABLE_INDEX can be over written by SPL MALLOC section.
@@ -75,6 +80,14 @@ void board_init_f(ulong dummy)
 
 	/* Prepare console output */
 	preloader_console_init();
+
+#ifdef CONFIG_K3_AM654_DDRSS
+	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+	if (ret) {
+		printf("DRAM init failed: %d\n", ret);
+		return;
+	}
+#endif
 }
 
 u32 spl_boot_mode(const u32 boot_device)
-- 
2.19.1

  parent reply	other threads:[~2018-10-25  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25  8:00 [U-Boot] [PATCH v3 00/10] arm: am654: Add r5 support for am654-evm Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 01/10] ram: Introduce K3 AM654 DDR Sub System driver Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 02/10] armv7R: K3: am654: Enable MPU regions Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 03/10] armv7R: K3: am654: Add support for generating build targets Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 04/10] armv7R: K3: am654: Add support to start ATF from R5 SPL Lokesh Vutla
2018-10-25  8:00 ` Lokesh Vutla [this message]
2018-10-25  8:00 ` [U-Boot] [PATCH v3 06/10] board: ti: am654: r5: Add initial support for am654 Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 07/10] arm: dts: k3: Sync dts from Linux Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 08/10] armv7r: dts: am654: Add initial support Lokesh Vutla
2018-11-02  5:03   ` Lokesh Vutla
2018-10-25  8:00 ` [U-Boot] [PATCH v3 09/10] configs: am65x_evm_r5: " Lokesh Vutla
2018-10-25  8:01 ` [U-Boot] [PATCH v3 10/10] board: ti: am65x: Update README to add R5 build support Lokesh Vutla

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=20181025080100.30176-6-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.