public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] db410c: use fdt passed from lk
Date: Fri, 21 Jul 2017 15:10:11 -0400	[thread overview]
Message-ID: <20170721191014.8161-3-robdclark@gmail.com> (raw)
In-Reply-To: <20170721191014.8161-1-robdclark@gmail.com>

lk patches the fdt to set some device's MAC addresses and more
importantly to patch in the simple-framebuffer node that we want u-boot
to see.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 board/qualcomm/dragonboard410c/Makefile          |  1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c |  8 ++++++
 board/qualcomm/dragonboard410c/lowlevel_init.S   | 36 ++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 board/qualcomm/dragonboard410c/lowlevel_init.S

diff --git a/board/qualcomm/dragonboard410c/Makefile b/board/qualcomm/dragonboard410c/Makefile
index cd678088fa..5082383be4 100644
--- a/board/qualcomm/dragonboard410c/Makefile
+++ b/board/qualcomm/dragonboard410c/Makefile
@@ -5,4 +5,5 @@
 #
 
 obj-y	:= dragonboard410c.o
+obj-y	+= lowlevel_init.o
 extra-y += head.o
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 37d0b85e0e..1fa4dc1b15 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -27,6 +27,14 @@ int dram_init_banksize(void)
 	return 0;
 }
 
+extern unsigned long fw_dtb_pointer;
+
+void *board_fdt_blob_setup(void)
+{
+	if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
+		return NULL;
+	return (void *)fw_dtb_pointer;
+}
 
 int board_prepare_usb(enum usb_init_type type)
 {
diff --git a/board/qualcomm/dragonboard410c/lowlevel_init.S b/board/qualcomm/dragonboard410c/lowlevel_init.S
new file mode 100644
index 0000000000..cdbd8e14db
--- /dev/null
+++ b/board/qualcomm/dragonboard410c/lowlevel_init.S
@@ -0,0 +1,36 @@
+/*
+ * (C) Copyright 2016
+ * Cédric Schieli <cschieli@gmail.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <config.h>
+
+.align 8
+.global fw_dtb_pointer
+fw_dtb_pointer:
+#ifdef CONFIG_ARM64
+	.dword 0x0
+#else
+	.word 0x0
+#endif
+
+/*
+ * Routine: save_boot_params (called after reset from start.S)
+ * Description: save ATAG/FDT address provided by the firmware at boot time
+ */
+
+.global save_boot_params
+save_boot_params:
+
+	/* The firmware provided ATAG/FDT address can be found in r2/x0 */
+#ifdef CONFIG_ARM64
+	adr	x8, fw_dtb_pointer
+	str	x0, [x8]
+#else
+	str	r2, fw_dtb_pointer
+#endif
+
+	/* Returns */
+	b	save_boot_params_ret
-- 
2.13.0

  parent reply	other threads:[~2017-07-21 19:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 19:10 [U-Boot] [PATCH 0/5] dragonboard 410c patches Rob Clark
2017-07-21 19:10 ` [U-Boot] [PATCH 1/5] Makefile: also build fdt for snapdragon Rob Clark
2017-07-21 22:18   ` Tom Rini
2017-07-21 22:57     ` Rob Clark
2017-07-24 13:41       ` Tom Rini
2017-07-21 19:10 ` Rob Clark [this message]
2017-07-21 19:10 ` [U-Boot] [PATCH 3/5] db410c: add reserved-memory node to dts Rob Clark
2017-07-21 19:10 ` [U-Boot] [PATCH 4/5] db410c: on aarch64 the fdtfile is in per-vendor subdirectory Rob Clark
2017-07-21 19:10 ` [U-Boot] [PATCH 5/5] db410c: config updates Rob Clark
2017-07-21 22:20   ` Tom Rini
2017-07-21 23:08     ` Rob Clark
2017-07-24 13:46       ` Tom Rini

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=20170721191014.8161-3-robdclark@gmail.com \
    --to=robdclark@gmail.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