From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68E52C61DA3 for ; Wed, 22 Feb 2023 01:40:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4675E85A86; Wed, 22 Feb 2023 02:39:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="P7WdTkNE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF21B857C4; Wed, 22 Feb 2023 02:38:53 +0100 (CET) Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 810C3858D6 for ; Wed, 22 Feb 2023 02:38:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troykiskyboundary@gmail.com Received: by mail-pl1-x632.google.com with SMTP id q5so7111777plh.9 for ; Tue, 21 Feb 2023 17:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=64OKT5dmaqQEyUv5AJuzRFxsxXkQY8Fsri8HY0DdQeU=; b=P7WdTkNEP11PQb9Cowgp6gwj4mLMKp3EkJjtRicleSw584vZmUOqsxaZiic8lZjT13 l9/Fy9Bm0W59JRQEKqwFSNlwf/6UZhRGIQeH56B9cthqwD/mDKMlK7UqDG9bgg+ede8B gHY7OMTC0U767CceW1fDJTimYkKSpVcBkU75TT4OahBtQN9MsRZdd/4nOwLXF+yUDL1C 9Ae1uRqhsnkafIWCHz5Hv6EknuFdkW83Lub/VVJjxv6m7Yv+xt19LIOlsJ67EbFoLGL2 b+UUBSiVwWR0sFgfF3BoZHzpkhsMLY0DSb7PZpF3kt/7R9ztkWS8M/pyEQSthxNMy/J+ yrLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=64OKT5dmaqQEyUv5AJuzRFxsxXkQY8Fsri8HY0DdQeU=; b=tgLi0Cuft59mF6jlpEAuSXYS8ezYr/dsfMNO1R+3eCjlLUn6Y4v+/fZSCEJBhv1AN0 /RbUVxEF09ZklWSShk7KggEDXnAkjabtY2daVerpJ0rYD5v0fwd/dQinJllBP8gKrGI8 Uv19GjTVfVb93Jn6g4fqBfAOFurNOGUGSjTDZYK6iQpxTqgQEIvsDZCzXEqq2V5hH3uv q/cyL1sRZ2Dcetk2HnQYsYuHWvcREErh1FdwPGJaqUue+LhZGM8HfwzIK5ub7CRPWn6c YkOQ4YRkZfecg1WVYr1RvbVZoK+5gfFUdhw/sDWaqg934igiz4gMXd+H6luNqZ3Uxq72 RLpA== X-Gm-Message-State: AO0yUKVJCJ8gZZfgEIkr8hRy377Yavr6Oy8oCowVISEAFMSqGZ+rnZDQ tcHjIAoSS1+IoNvSi4nnSvL9muTFUnZAFA== X-Google-Smtp-Source: AK7set/mkxo2SOOq/Dk8MVmEbtmaR628eKeJZ3gi71CwnVJkmvcwd9oCVNtY6zaknELW9B3kX9Od5w== X-Received: by 2002:a05:6a20:4405:b0:bc:d601:ebfc with SMTP id ce5-20020a056a20440500b000bcd601ebfcmr7892146pzb.54.1677029927828; Tue, 21 Feb 2023 17:38:47 -0800 (PST) Received: from OS2.boundarydevices.com. (wsip-184-189-120-117.oc.oc.cox.net. [184.189.120.117]) by smtp.gmail.com with ESMTPSA id d6-20020aa78e46000000b005accb31201fsm4200976pfr.26.2023.02.21.17.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 17:38:47 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Marek Vasut , Stefan Roese Subject: [PATCH v1 06/24] lib: sha512: prepare for CONFIG_IS_ENABLED changes Date: Tue, 21 Feb 2023 17:38:03 -0800 Message-Id: <20230222013821.1144691-7-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222013821.1144691-1-troykiskyboundary@gmail.com> References: <20230222013821.1144691-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean We need to include in order to include files that use CONFIG_IS_ENABLED. TO prepare for that don't pet the watchdog when USE_HOSTCC is defined. Signed-off-by: Troy Kisky --- lib/sha512.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/sha512.c b/lib/sha512.c index fbe8d5f5bfe..4db2e5c08e4 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -13,7 +13,11 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else +#include #include #endif /* USE_HOSTCC */ #include @@ -292,7 +296,7 @@ void sha384_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha512_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end; unsigned char *curr; int chunk; @@ -300,7 +304,7 @@ void sha384_csum_wd(const unsigned char *input, unsigned int ilen, sha384_starts(&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = (unsigned char *)input; end = input + ilen; while (curr < end) { @@ -355,7 +359,7 @@ void sha512_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha512_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end; unsigned char *curr; int chunk; @@ -363,7 +367,7 @@ void sha512_csum_wd(const unsigned char *input, unsigned int ilen, sha512_starts(&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = (unsigned char *)input; end = input + ilen; while (curr < end) { -- 2.34.1