All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matwey V. Kornilov <matwey.kornilov@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/5] rockchip: rk3328: add SPL board file support
Date: Sun, 19 May 2019 15:10:16 +0300	[thread overview]
Message-ID: <20190519121020.13866-2-matwey.kornilov@gmail.com> (raw)
In-Reply-To: <20190519121020.13866-1-matwey.kornilov@gmail.com>

From: Kever Yang <kever.yang@rock-chips.com>

rk3328 SPL is locate at dram, so do not have strict size limit,
suppose to enable storage media controller driver, load ATF and
U-Boot, then boot into ATF.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[cherry picked from https://github.com/rockchip-linux/u-boot/commit/4ebe3968b683190cb8e5741aa7227b4fa7497874 with minor modifications]
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 arch/arm/mach-rockchip/Makefile           |  1 +
 arch/arm/mach-rockchip/rk3328-board-spl.c | 59 +++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 arch/arm/mach-rockchip/rk3328-board-spl.c

diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index 846c82d70a..23760a959a 100644
--- a/arch/arm/mach-rockchip/Makefile
+++ b/arch/arm/mach-rockchip/Makefile
@@ -18,6 +18,7 @@ obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o
 obj-spl-$(CONFIG_ROCKCHIP_RK3188) += rk3188-board-spl.o
 obj-spl-$(CONFIG_ROCKCHIP_RK322X) += rk322x-board-spl.o spl-boot-order.o
 obj-spl-$(CONFIG_ROCKCHIP_RK3288) += rk3288-board-spl.o
+obj-spl-$(CONFIG_ROCKCHIP_RK3328) += rk3328-board-spl.o
 obj-spl-$(CONFIG_ROCKCHIP_RK3368) += rk3368-board-spl.o spl-boot-order.o
 obj-spl-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board-spl.o spl-boot-order.o
 
diff --git a/arch/arm/mach-rockchip/rk3328-board-spl.c b/arch/arm/mach-rockchip/rk3328-board-spl.c
new file mode 100644
index 0000000000..7f49d056a0
--- /dev/null
+++ b/arch/arm/mach-rockchip/rk3328-board-spl.c
@@ -0,0 +1,59 @@
+/*
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <debug_uart.h>
+#include <dm.h>
+#include <dm/pinctrl.h>
+#include <ram.h>
+#include <spl.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void board_debug_uart_init(void)
+{
+}
+
+void board_init_f(ulong dummy)
+{
+	struct udevice *dev;
+	int ret;
+
+	ret = spl_early_init();
+	if (ret) {
+		debug("spl_early_init() failed: %d\n", ret);
+		hang();
+	}
+
+	preloader_console_init();
+
+	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+	if (ret) {
+		debug("DRAM init failed: %d\n", ret);
+		return;
+	}
+}
+
+u32 spl_boot_mode(const u32 boot_device)
+{
+	return MMCSD_MODE_RAW;
+}
+
+u32 spl_boot_device(void)
+{
+	return BOOT_DEVICE_MMC1;
+}
+
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+	/* Just empty function now - can't decide what to choose */
+	debug("%s: %s\n", __func__, name);
+
+	return 0;
+}
+#endif
-- 
2.16.4

  reply	other threads:[~2019-05-19 12:10 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  6:34 [U-Boot] [PATCH 0/5] Add initial support for Pine64 Rock64 board Matwey V. Kornilov
2019-05-08  6:34 ` [U-Boot] [PATCH 1/5] rockchip: rk3328: add spl board file support Matwey V. Kornilov
2019-05-18 16:08   ` Simon Glass
2019-05-08  6:34 ` [U-Boot] [PATCH 2/5] rockchip: rk3328: add config option for SPL Matwey V. Kornilov
2019-05-18 16:08   ` Simon Glass
2019-05-08  6:34 ` [U-Boot] [PATCH 3/5] rockchip: Kconfig: enable SPL support for rk3328 Matwey V. Kornilov
2019-05-18 16:08   ` Simon Glass
2019-05-08  6:34 ` [U-Boot] [PATCH 4/5] rockchip: dts: rk3328: add rk3328-rock64.dts Matwey V. Kornilov
2019-05-16  6:56   ` Kever Yang
2019-05-19 12:11     ` Matwey V. Kornilov
2019-05-08  6:34 ` [U-Boot] [PATCH 5/5] rockchip: rk3328: add rock64-rk3328_defconfig Matwey V. Kornilov
2019-05-13 16:25   ` Vagrant Cascadian
2019-05-13 22:59     ` Vagrant Cascadian
2019-05-13 23:13       ` Vagrant Cascadian
2019-05-14  9:41         ` Matwey V. Kornilov
2019-05-16  7:00   ` Kever Yang
2019-05-19 12:11     ` Matwey V. Kornilov
2019-05-19 12:10 ` [U-Boot] [PATCH v2 0/5] Add initial support for Pine64 Rock64 board Matwey V. Kornilov
2019-05-19 12:10   ` Matwey V. Kornilov [this message]
2019-05-30  1:13     ` [U-Boot] [PATCH v2 1/5] rockchip: rk3328: add SPL board file support Kever Yang
2019-05-19 12:10   ` [U-Boot] [PATCH v2 2/5] rockchip: rk3328: add SPL support Matwey V. Kornilov
2019-05-30  1:13     ` Kever Yang
2019-05-19 12:10   ` [U-Boot] [PATCH v2 3/5] rockchip: Kconfig: enable SPL support for rk3328 Matwey V. Kornilov
2019-05-30  1:24     ` Kever Yang
2019-05-19 12:10   ` [U-Boot] [PATCH v2 4/5] rockchip: dts: rk3328: add rk3328-rock64.dts Matwey V. Kornilov
2019-05-30  1:25     ` Kever Yang
2019-05-19 12:10   ` [U-Boot] [PATCH v2 5/5] rockchip: rk3328: add rock64-rk3328_defconfig Matwey V. Kornilov
2019-05-20 17:11     ` Vagrant Cascadian
2019-05-20 17:22       ` Matwey V. Kornilov
2019-05-20 18:15         ` Vagrant Cascadian
2019-05-22 16:59           ` Matwey V. Kornilov
2019-05-30  1:26     ` Kever Yang
2019-05-30  1:23   ` [U-Boot] [PATCH v2 0/5] Add initial support for Pine64 Rock64 board Kever Yang
2019-05-31  0:37   ` Kever Yang
2019-06-01 14:47   ` [U-Boot] [PATCH v3 0/6] " Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 1/6] rockchip: rk3328: add SPL board file support Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 2/6] rockchip: rk3328: add SPL support Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 3/6] rockchip: Kconfig: enable SPL support for rk3328 Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 4/6] rockchip: dts: rk3328: add rk3328-rock64.dts Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 5/6] rockchip: rk3328: add rock64-rk3328_defconfig Matwey V. Kornilov
2019-06-04  7:42       ` Kever Yang
2019-06-04 11:48         ` Matwey V. Kornilov
2019-06-01 14:47     ` [U-Boot] [PATCH v3 6/6] doc: rockchip: Add note for Pine64 Rock64 board Matwey V. Kornilov
2019-06-04  2:48       ` Kever Yang
2019-06-08 21:27     ` [U-Boot] [PATCH v4 0/6] Add initial support " Matwey V. Kornilov
2019-06-08 21:27       ` [U-Boot] [PATCH v4 1/6] rockchip: rk3328: add SPL board file support Matwey V. Kornilov
2019-06-08 21:27       ` [U-Boot] [PATCH v4 2/6] rockchip: rk3328: add SPL support Matwey V. Kornilov
2019-06-08 21:27       ` [U-Boot] [PATCH v4 3/6] rockchip: Kconfig: enable SPL support for rk3328 Matwey V. Kornilov
2019-06-08 21:27       ` [U-Boot] [PATCH v4 4/6] rockchip: dts: rk3328: add rk3328-rock64.dts Matwey V. Kornilov
2019-06-08 21:27       ` [U-Boot] [PATCH v4 5/6] rockchip: rk3328: add rock64-rk3328_defconfig Matwey V. Kornilov
2019-06-18  7:47         ` Kever Yang
2019-06-08 21:27       ` [U-Boot] [PATCH v4 6/6] doc: rockchip: Add note for Pine64 Rock64 board Matwey V. Kornilov

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=20190519121020.13866-2-matwey.kornilov@gmail.com \
    --to=matwey.kornilov@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 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.