{"id":812929,"url":"http://patchwork.ozlabs.org/api/patches/812929/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505230666-14290-8-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-8-git-send-email-philipp.tomsich@theobroma-systems.com>","list_archive_url":null,"date":"2017-09-12T15:37:43","name":"[U-Boot,RESEND,07/10] rockchip: puma-rk3399: update board_init()","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8bc40913f1969fb92242a1400e2f49da6b258cf8","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-8-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/812929/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812929/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 3xs8Fg175xz9s0Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 01:43:02 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 73719C222AC; Tue, 12 Sep 2017 15:39:35 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 44CA4C2228D;\n\tTue, 12 Sep 2017 15:38:19 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid CA881C22290; Tue, 12 Sep 2017 15:37:59 +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 C92C5C22254\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 15:37:55 +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 1drnG6-0007is-Ik; Tue, 12 Sep 2017 17:37:54 +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:43 +0200","Message-Id":"<1505230666-14290-8-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":"Klaus Goger <klaus.goger@theobroma-systems.com>","Subject":"[U-Boot] [RESEND PATCH 07/10] rockchip: puma-rk3399: update\n\tboard_init()","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 original initialisation code for board_init() was largely lifted\nfrom the code on the EVB.  However, the RK3399-Q7 can do with a much\nmore concise init sequence.\n\nThis cleans up the board_init() by updating it to the essentials for\nthe RK3399-Q7 and getting rid of the accumulated cruft.\n\nSigned-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n---\n\n board/theobroma-systems/puma_rk3399/puma-rk3399.c | 36 +++--------------------\n 1 file changed, 4 insertions(+), 32 deletions(-)","diff":"diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c\nindex 01b90e3..cc572b5 100644\n--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c\n+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c\n@@ -19,44 +19,16 @@ DECLARE_GLOBAL_DATA_PTR;\n \n int board_init(void)\n {\n-\tstruct udevice *pinctrl, *regulator;\n \tint ret;\n \n \t/*\n-\t * The PWM does not have decicated interrupt number in dts and can\n-\t * not get periph_id by pinctrl framework, so let's init them here.\n-\t * The PWM2 and PWM3 are for pwm regulators.\n+\t * We need to call into regulators_enable_boot_on() again, as the call\n+\t * during SPL may have not included all regulators.\n \t */\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 out;\n-\t}\n-\n-\tret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);\n-\tif (ret) {\n-\t\tdebug(\"%s PWM2 pinctrl init fail!\\n\", __func__);\n-\t\tgoto out;\n-\t}\n-\n-\t/* rk3399 need to init vdd_center to get the correct output voltage */\n-\tret = regulator_get_by_platname(\"vdd_center\", &regulator);\n+\tret = regulators_enable_boot_on(false);\n \tif (ret)\n-\t\tdebug(\"%s: Cannot get vdd_center regulator\\n\", __func__);\n-\n-\tret = regulator_get_by_platname(\"vcc5v0_host\", &regulator);\n-\tif (ret) {\n-\t\tdebug(\"%s vcc5v0_host init fail! ret %d\\n\", __func__, ret);\n-\t\tgoto out;\n-\t}\n-\n-\tret = regulator_set_enable(regulator, true);\n-\tif (ret) {\n-\t\tdebug(\"%s vcc5v0-host-en set fail!\\n\", __func__);\n-\t\tgoto out;\n-\t}\n+\t\tdebug(\"%s: Cannot enable boot on regulator\\n\", __func__);\n \n-out:\n \treturn 0;\n }\n \n","prefixes":["U-Boot","RESEND","07/10"]}