From patchwork Sat Feb 9 13:39:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1039239 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=megous.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=megous.com header.i=@megous.com header.b="mRqQElYZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43xZCj1yTkz9sMp for ; Sun, 10 Feb 2019 01:28:17 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B15A7C21FEC; Sat, 9 Feb 2019 14:27:21 +0000 (UTC) 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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B9994C21F8E; Sat, 9 Feb 2019 14:27:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 29CCAC21F0C; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lists.denx.de (Postfix) with ESMTPS id DB3FBC21F37 for ; Sat, 9 Feb 2019 13:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1549719867; bh=dNtKVvyc7TlvLGlRjdEcHQZk46goRBEKxarxJo1rKH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mRqQElYZOpDo+/QqmTDV2w+gzvqWlmhQtX/v+joi6WsoitCZTo0PYs20lzMw/Quzk Z6Zs/RSkGFodOv+l4tydMOC5aGerVKUm2Adjjk2uD3P0JTOaU1w5jZn86cqzlm7pZ4 njUXQoKmLBa62TzCbeTkUG+aDcSXzoQA19KhKYu8= From: megous@megous.com To: u-boot@lists.denx.de Date: Sat, 9 Feb 2019 14:39:54 +0100 Message-Id: <20190209133957.12713-2-megous@megous.com> In-Reply-To: <20190209133957.12713-1-megous@megous.com> References: <20190209133957.12713-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 09 Feb 2019 14:27:04 +0000 Cc: Ondrej Jirman , Hans de Goede , Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH 1/4] sunxi: Fix build when CONFIG_CMD_NET is disabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ondrej Jirman Signed-off-by: Ondřej Jirman --- board/sunxi/board.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 98bc3cd0c1..e918bdf36b 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -774,9 +774,12 @@ static void setup_environment(const void *fdt) { char serial_string[17] = { 0 }; unsigned int sid[4]; +#if defined CONFIG_CMD_NET uint8_t mac_addr[6]; char ethaddr[16]; - int i, ret; + int i; +#endif + int ret; ret = sunxi_get_sid(sid); if (ret == 0 && sid[0] != 0) { @@ -801,6 +804,7 @@ static void setup_environment(const void *fdt) if ((sid[3] & 0xffffff) == 0) sid[3] |= 0x800000; +#if defined CONFIG_CMD_NET for (i = 0; i < 4; i++) { sprintf(ethaddr, "ethernet%d", i); if (!fdt_get_alias(fdt, ethaddr)) @@ -824,6 +828,7 @@ static void setup_environment(const void *fdt) eth_env_set_enetaddr(ethaddr, mac_addr); } +#endif if (!env_get("serial#")) { snprintf(serial_string, sizeof(serial_string), From patchwork Sat Feb 9 13:39:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1039240 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=megous.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=megous.com header.i=@megous.com header.b="aPm5O44l"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43xZCn0XgWz9sMp for ; Sun, 10 Feb 2019 01:28:20 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id ADF0BC21F97; Sat, 9 Feb 2019 14:27:34 +0000 (UTC) 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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 48A53C21FB5; Sat, 9 Feb 2019 14:27:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A6483C21F4A; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lists.denx.de (Postfix) with ESMTPS id 66212C21F0C for ; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1549719867; bh=Caem45ywQykjcecdeqTyXU7NWr/xEny/kluk36pNPTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aPm5O44ldyduu4gCej9b9F2/DOIqVHsOVddC1M/Z0/wXXhGnh7H0wGyZoRXEsdY9d KI9vXKj0Zssp+3wK1OE6EktUdEJbTAoL39OaA7DKKwcSYMzskYxDYMom/E4l85KAAp jqpIdhZ6srigdPBy74UDV+grCiKXmcbXluyUwIYE= From: megous@megous.com To: u-boot@lists.denx.de Date: Sat, 9 Feb 2019 14:39:55 +0100 Message-Id: <20190209133957.12713-3-megous@megous.com> In-Reply-To: <20190209133957.12713-1-megous@megous.com> References: <20190209133957.12713-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 09 Feb 2019 14:27:04 +0000 Cc: Ondrej Jirman , Stefan Mavrodiev , Maxime Ripard , Andre Przywara , Icenowy Zheng Subject: [U-Boot] [PATCH 2/4] sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ondrej Jirman Signed-off-by: Ondřej Jirman --- include/configs/sunxi-common.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b01d1c3c84..d421b93509 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -399,6 +399,18 @@ extern int soft_i2c_gpio_scl; #define BOOT_TARGET_DEVICES_USB(func) #endif +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES_DHCP(func) +#endif + /* FEL boot support, auto-execute boot.scr if a script address was provided */ #define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \ "bootcmd_fel=" \ @@ -414,8 +426,8 @@ extern int soft_i2c_gpio_scl; BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_USB(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_DEVICES_PXE(func) \ + BOOT_TARGET_DEVICES_DHCP(func) #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \ From patchwork Sat Feb 9 13:39:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1039242 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=megous.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=megous.com header.i=@megous.com header.b="ZdbLdzBA"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43xZDV5wXtz9sMp for ; Sun, 10 Feb 2019 01:28:58 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7EC61C21FB2; Sat, 9 Feb 2019 14:27:47 +0000 (UTC) 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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CA739C21FCA; Sat, 9 Feb 2019 14:27:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EBC4EC21F4A; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lists.denx.de (Postfix) with ESMTPS id 9EECCC21F37 for ; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1549719868; bh=y1mSZPwDt5+mNFk6oHM+sMYaTEE/vV5bX2jvE9wjraQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZdbLdzBAQEMWEgW5//CBKxs62ujYAgMAqQoE+A0b+13aq800/9VhrxUC4KVW5vBff 2xEdEXb+jdj14D2CQl54S9Gl82WgHIEmbt6sprGgl5yBFPq5Twqj0FHiaEtV5cyrOT iwEbdtUBN6Jhq8r9jZgJ0t25b/GL1khQlpBA7D8c= From: megous@megous.com To: u-boot@lists.denx.de Date: Sat, 9 Feb 2019 14:39:56 +0100 Message-Id: <20190209133957.12713-4-megous@megous.com> In-Reply-To: <20190209133957.12713-1-megous@megous.com> References: <20190209133957.12713-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 09 Feb 2019 14:27:04 +0000 Cc: Ondrej Jirman Subject: [U-Boot] [PATCH 3/4] lib: decode_timing_property should return -NOENT when proprty is not found X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ondrej Jirman Length may be unitialized when fdt_getprop fails. Signed-off-by: Ondřej Jirman --- lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 18663ce6bd..3510de78e1 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name, if (!prop) { debug("%s: could not find property %s\n", fdt_get_name(blob, node, NULL), name); - return length; + return -ENOENT; } if (length == sizeof(u32)) { From patchwork Sat Feb 9 13:39:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1039241 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=megous.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=megous.com header.i=@megous.com header.b="dwrXnlFk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43xZDP5s6jz9sMp for ; Sun, 10 Feb 2019 01:28:53 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 834C4C21FB5; Sat, 9 Feb 2019 14:28:00 +0000 (UTC) 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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5CECCC21FE1; Sat, 9 Feb 2019 14:27:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2FA0BC21F37; Sat, 9 Feb 2019 13:44:29 +0000 (UTC) Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lists.denx.de (Postfix) with ESMTPS id E058EC21F0C for ; Sat, 9 Feb 2019 13:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1549719868; bh=RzI8C7lKIh55zlaMVMMNV23h5rSocqfqchABAFKli4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dwrXnlFkXX/W/ElJVpIurGM1Fcv1vrQO6OYKnwJ3dUw4QczQo+8sr9MdIXEHM7inX 9SY7PwyqPYsBN/UVojMO5+5FU1di2xK7yDtK9Ds3M6NotFxdjTQqpgstl3nzgil3YM 4zoF4oDoU4EmWUbBa3FXKGl8PXXWzhXWFjXPbivc= From: megous@megous.com To: u-boot@lists.denx.de Date: Sat, 9 Feb 2019 14:39:57 +0100 Message-Id: <20190209133957.12713-5-megous@megous.com> In-Reply-To: <20190209133957.12713-1-megous@megous.com> References: <20190209133957.12713-1-megous@megous.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 09 Feb 2019 14:27:04 +0000 Cc: Ondrej Jirman Subject: [U-Boot] [PATCH 4/4] power: axp818: Fix typo in axp_set_dldo X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ondrej Jirman Signed-off-by: Ondřej Jirman --- drivers/power/axp818.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c index c737da1180..834919ddd4 100644 --- a/drivers/power/axp818.c +++ b/drivers/power/axp818.c @@ -161,7 +161,7 @@ int axp_set_dldo(int dldo_num, unsigned int mvolt) cfg = axp818_mvolt_to_cfg(mvolt, 700, 3300, 100); if (dldo_num == 2 && mvolt > 3300) cfg += 1 + axp818_mvolt_to_cfg(mvolt, 3400, 4200, 200); - ret = pmic_bus_write(AXP818_ELDO1_CTRL + (dldo_num - 1), cfg); + ret = pmic_bus_write(AXP818_DLDO1_CTRL + (dldo_num - 1), cfg); if (ret) return ret;