{"id":812922,"url":"http://patchwork.ozlabs.org/api/patches/812922/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505230666-14290-2-git-send-email-philipp.tomsich@theobroma-systems.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1505230666-14290-2-git-send-email-philipp.tomsich@theobroma-systems.com>","list_archive_url":null,"date":"2017-09-12T15:37:37","name":"[U-Boot,RESEND,01/10] rockchip: rk3399: make spl_board_init board-specific","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3e6bf7cea0cd3adcced50330e00c2eff6feef957","submitter":{"id":53488,"url":"http://patchwork.ozlabs.org/api/people/53488/?format=json","name":"Philipp Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"delegate":{"id":69486,"url":"http://patchwork.ozlabs.org/api/users/69486/?format=json","username":"ptomsich","first_name":"Philipp","last_name":"Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1505230666-14290-2-git-send-email-philipp.tomsich@theobroma-systems.com/mbox/","series":[{"id":2729,"url":"http://patchwork.ozlabs.org/api/series/2729/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=2729","date":"2017-09-12T15:37:37","name":"rockchip: puma-rk3399: support 'same-as-spl' for boot-order and always power-up eMMC/SPI","version":1,"mbox":"http://patchwork.ozlabs.org/series/2729/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812922/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812922/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xs88D4WZwz9ryr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 01:38:20 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 44A9FC2227B; Tue, 12 Sep 2017 15:37:57 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 172BCC220BE;\n\tTue, 12 Sep 2017 15:37:55 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C000EC221A4; Tue, 12 Sep 2017 15:37:53 +0000 (UTC)","from mail.theobroma-systems.com (vegas.theobroma-systems.com\n\t[144.76.126.164])\n\tby lists.denx.de (Postfix) with ESMTPS id 6AB97C2206D\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 15:37:53 +0000 (UTC)","from [86.59.122.178] (port=59704 helo=android.lan)\n\tby mail.theobroma-systems.com with esmtpsa\n\t(TLS1.2:RSA_AES_128_CBC_SHA256:128)\n\t(Exim 4.80) (envelope-from <philipp.tomsich@theobroma-systems.com>)\n\tid 1drnG3-0007is-KZ; Tue, 12 Sep 2017 17:37:51 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0","From":"Philipp Tomsich <philipp.tomsich@theobroma-systems.com>","To":"u-boot@lists.denx.de","Date":"Tue, 12 Sep 2017 17:37:37 +0200","Message-Id":"<1505230666-14290-2-git-send-email-philipp.tomsich@theobroma-systems.com>","X-Mailer":"git-send-email 2.1.4","In-Reply-To":"<1505230666-14290-1-git-send-email-philipp.tomsich@theobroma-systems.com>","References":"<1505230666-14290-1-git-send-email-philipp.tomsich@theobroma-systems.com>","Cc":"Albert Aribaud <albert.u.boot@aribaud.net>,\n\tKlaus Goger <klaus.goger@theobroma-systems.com>","Subject":"[U-Boot] [RESEND PATCH 01/10] rockchip: rk3399: make spl_board_init\n\tboard-specific","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"The later-stage spl_board_init (as opposed to board_init_f) should set\nup board-specific details: these differ between the EVB-RK3399 and the\nRK3399-Q7 (Puma).\n\nThis moves spl_board_init back into the individual boards and removes\nthe unneeded functionality from Puma.\n\nAs we are touching these files, we also sort the #include directives\nand drop the inclusion of unneeded files.\n\nSigned-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n---\n\n arch/arm/mach-rockchip/rk3399-board-spl.c         | 27 -------------------\n board/rockchip/evb_rk3399/evb-rk3399.c            | 32 +++++++++++++++++++++--\n board/theobroma-systems/puma_rk3399/puma-rk3399.c | 15 ++++++++---\n 3 files changed, 41 insertions(+), 33 deletions(-)","diff":"diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c\nindex 1c39d9b..8e38ef1 100644\n--- a/arch/arm/mach-rockchip/rk3399-board-spl.c\n+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c\n@@ -149,33 +149,6 @@ void board_init_f(ulong dummy)\n \t}\n }\n \n-void spl_board_init(void)\n-{\n-\tstruct udevice *pinctrl;\n-\tint ret;\n-\n-\tret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);\n-\tif (ret) {\n-\t\tdebug(\"%s: Cannot find pinctrl device\\n\", __func__);\n-\t\tgoto err;\n-\t}\n-\n-\t/* Enable debug UART */\n-\tret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);\n-\tif (ret) {\n-\t\tdebug(\"%s: Failed to set up console UART\\n\", __func__);\n-\t\tgoto err;\n-\t}\n-\n-\tpreloader_console_init();\n-\treturn;\n-err:\n-\tprintf(\"spl_board_init: Error %d\\n\", ret);\n-\n-\t/* No way to report error here */\n-\thang();\n-}\n-\n #ifdef CONFIG_SPL_LOAD_FIT\n int board_fit_config_name_match(const char *name)\n {\ndiff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c\nindex d50c59d..506efff 100644\n--- a/board/rockchip/evb_rk3399/evb-rk3399.c\n+++ b/board/rockchip/evb_rk3399/evb-rk3399.c\n@@ -3,13 +3,14 @@\n  *\n  * SPDX-License-Identifier:     GPL-2.0+\n  */\n+\n #include <common.h>\n+#include <asm/arch/periph.h>\n #include <dm.h>\n-#include <ram.h>\n #include <dm/pinctrl.h>\n #include <dm/uclass-internal.h>\n-#include <asm/arch/periph.h>\n #include <power/regulator.h>\n+#include <spl.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n \n@@ -67,3 +68,30 @@ int board_init(void)\n out:\n \treturn 0;\n }\n+\n+void spl_board_init(void)\n+{\n+\tstruct udevice *pinctrl;\n+\tint ret;\n+\n+\tret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);\n+\tif (ret) {\n+\t\tdebug(\"%s: Cannot find pinctrl device\\n\", __func__);\n+\t\tgoto err;\n+\t}\n+\n+\t/* Enable debug UART */\n+\tret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG);\n+\tif (ret) {\n+\t\tdebug(\"%s: Failed to set up console UART\\n\", __func__);\n+\t\tgoto err;\n+\t}\n+\n+\tpreloader_console_init();\n+\treturn;\n+err:\n+\tprintf(\"spl_board_init: Error %d\\n\", ret);\n+\n+\t/* No way to report error here */\n+\thang();\n+}\ndiff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c\nindex c6f8eed..01b90e3 100644\n--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c\n+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c\n@@ -3,15 +3,16 @@\n  *\n  * SPDX-License-Identifier:     GPL-2.0+\n  */\n+\n #include <common.h>\n+#include <asm/arch/periph.h>\n+#include <asm/setup.h>\n #include <dm.h>\n-#include <misc.h>\n-#include <ram.h>\n #include <dm/pinctrl.h>\n #include <dm/uclass-internal.h>\n-#include <asm/setup.h>\n-#include <asm/arch/periph.h>\n+#include <misc.h>\n #include <power/regulator.h>\n+#include <spl.h>\n #include <u-boot/sha256.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n@@ -59,6 +60,12 @@ out:\n \treturn 0;\n }\n \n+void spl_board_init(void)\n+{\n+\tpreloader_console_init();\n+\treturn;\n+}\n+\n static void setup_macaddr(void)\n {\n #if CONFIG_IS_ENABLED(CMD_NET)\n","prefixes":["U-Boot","RESEND","01/10"]}