From patchwork Fri May 29 17:51:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1300910 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=ui7TQHAM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49YXFG3zpyz9sSm for ; Sat, 30 May 2020 03:51:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A342813B3; Fri, 29 May 2020 19:51:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1590774703; bh=cptCsAZQN/V+kzw58aGpqyI11xaC9QXiJwWnvCcckTI=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ui7TQHAMmAxYdjhix1K3I74OI4ueEi4N1ICQrSHqInBT4hrptCX65sIYWg1RR3gEx NEZo78/VJThJXCxCQL6ZGZiue2TH9Tv2tomcZSj5Z5GcsazmDacmkoHRQwdXlXZIwm T1mEBC00m1FCjbWltrT4/NuAR6WSWxlnRO9H1k2o9iiAqZs3cTeTtUPdNFUDMWxI5u WmFRJD5DJyds6M+QlzlMrFg0UHUsM9zZ+SJ1wJ40J0TtpJzJRHfPgzAz2QipY36vRF 7xWCM98ePyP/9i6EBOZInIvyckMOpQjZCFl/SadRnxHfgQSJDG7Q4xGrJoVS9Uf0Wx EokG0VWrd5+mQ== Received: by phobos.denx.de (Postfix, from userid 109) id A02F88160C; Fri, 29 May 2020 19:51:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2012681015 for ; Fri, 29 May 2020 19:51:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49YXF54jR8z1rtM5; Fri, 29 May 2020 19:51:37 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49YXF54NCRz1qqkq; Fri, 29 May 2020 19:51:37 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id KjchjAKLL1et; Fri, 29 May 2020 19:51:36 +0200 (CEST) X-Auth-Info: 7oFUQQEmkS4sxz3VR2/zKuYQhSksVq7Iefr4kLVxi1g= Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz [86.49.35.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 29 May 2020 19:51:36 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Cc: trini@konsulko.com, Marek Vasut Subject: [PATCH] env: nowhere: Implement .load callback Date: Fri, 29 May 2020 19:51:34 +0200 Message-Id: <20200529175134.627282-1-marex@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add .load callback for the 'nowhere' environment driver. This is useful for when the 'nowhere' driver is used in combination with other drivers and should be used to load the default environment. Signed-off-by: Marek Vasut --- env/nowhere.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/env/nowhere.c b/env/nowhere.c index f5b0a17652..417a636f83 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -15,6 +15,12 @@ DECLARE_GLOBAL_DATA_PTR; +static int env_nowhere_load(void) +{ + env_set_default(NULL, 0); + + return 0; +} /* * Because we only ever have the default environment available we must mark * it as invalid. @@ -30,5 +36,6 @@ static int env_nowhere_init(void) U_BOOT_ENV_LOCATION(nowhere) = { .location = ENVL_NOWHERE, .init = env_nowhere_init, + .load = env_nowhere_load, ENV_NAME("nowhere") };