From patchwork Mon Mar 13 21:31:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756571 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=d6UGR/Ny; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8xs1nG2z1yWs for ; Tue, 14 Mar 2023 08:32:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B51A860F8; Mon, 13 Mar 2023 22:32:08 +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="d6UGR/Ny"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6915385E75; Mon, 13 Mar 2023 22:32:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 3463385D0B for ; Mon, 13 Mar 2023 22:31:56 +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-pj1-x102d.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so3551185pjz.1 for ; Mon, 13 Mar 2023 14:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743114; 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=G6ZjqPWd9DOb9QJepl0ko1Yzkx24gnLWEHSZAQ90X7c=; b=d6UGR/Nyu7uPNWhUFE0v3Sp1ucQRVOwWIJdaVvYNSxwfv9nbxQFTxJ2ppArQx/Cov8 CVj6W09ZtcwL80EG+Kvhke/w2EX7d9wGaD/fR7w9c35xAi9oR2aheO/AkaE/o0OBSQJn YzARWCZ7zm9iPF2RsRBMxS7xwICgzy7ZsuKWJ02SnTadHZ8kdpq/QhV2EnN+zT77RxHX fd6ZFra/dn1loMMVe3yraso6Y4uI5ne8rMn64XG0NVew97BfWSPV0/ApN2fpl3/h43e9 aSGo2NDsSC68/RRbABEgKliVRpHaMTF1qdZ3cG+JgOQfvhyXgJy1eKOPuOp2zDB9Qmgb nfmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743114; 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=G6ZjqPWd9DOb9QJepl0ko1Yzkx24gnLWEHSZAQ90X7c=; b=0y09ht7/6IjIVrmWlYs0/HvZ771z8bJ4yczrlK3yZ7ZCM0P6YOOtzYee5V67oVRzY9 9MT3jEg4bfrMvnMB1HVU5Y4L1sNLmUCh0hHGQJqv/OUry0BNuV2v27ZRHuDWLBZOD/Ox XKOOZscovenxOpLu7cDHm7fQzedxo4ZrPdR3n5PKBoSJ5fS1LZcggf+uNid5hYxDeaFP MEMaeOk1AayOTG6NOj2cEcQ+rxusuSRvJy68dyaoBOKPYijUxuRDpZjkF1BAomJYaDCw On4VzzJf+PylXUZ8Z7R/7E5XQ88xiQbmTVs3y01KvY8I3r6FCAFrpshDsdO5qJSmfUi7 pxWw== X-Gm-Message-State: AO0yUKU1D0/9uZc6xzAuehO88jSwMdXmf4KV8vYa2MZoXpYgaF2ysb8m 3GPs0+njwiq6ZPHlbHj3sYE= X-Google-Smtp-Source: AK7set+zzmrEL/7PjSMxEGF6VpWIVSzpigCmcFtydqioFY6J96p6a+lsjjwCe8ZmOQ2dH/x4vAxYOA== X-Received: by 2002:a05:6a20:3d86:b0:d3:6d54:7852 with SMTP id s6-20020a056a203d8600b000d36d547852mr10535671pzi.31.1678743114297; Mon, 13 Mar 2023 14:31:54 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:54 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Masahiro Yamada Subject: [PATCH v3 01/23] kconfig: add IS_ENABLED_NOCHECK to bypass usage_of_is_enabled_check Date: Mon, 13 Mar 2023 14:31:23 -0700 Message-Id: <20230313213146.1775650-2-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean This is for use when a config with an SPL version needs to always check the non-spl verion of the config. It avoids error messages from CI test script usage_of_is_enabled_check.sh Signed-off-by: Troy Kisky --- (no changes since v2) Changes in v2: - new patch include/linux/kconfig.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 2bc704e1104..19b71723ab3 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -27,6 +27,11 @@ * 0 otherwise. */ #define IS_ENABLED(option) config_enabled(option, 0) +/* + * Using IS_ENABLED_NOCHECK instead of IS_ENABLED prevents + * complaints from test/usage_of_is_enabled_check.sh + */ +#define IS_ENABLED_NOCHECK(option) config_enabled(option, 0) /* * U-Boot add-on: Helper macros to reference to different macros (prefixed by From patchwork Mon Mar 13 21:31:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756573 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=knpjGu0f; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8zD0Zg8z1yWs for ; Tue, 14 Mar 2023 08:33:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2ACF48615C; Mon, 13 Mar 2023 22:32:16 +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="knpjGu0f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CAF3485DD7; Mon, 13 Mar 2023 22:32:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 62E1585D62 for ; Mon, 13 Mar 2023 22:31:57 +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-pj1-x1035.google.com with SMTP id k18-20020a17090a591200b0023d36e30cb5so234199pji.1 for ; Mon, 13 Mar 2023 14:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743115; 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=iSsBAGpwOQ1YCk+skd0Kzpj7738m7haGUVPSB8jdLA8=; b=knpjGu0f0zYi0/aKwrTDTzAr6jVhiqm0XkiSZj0BjR5NlhxV8i2J/rBkceVrNxyerq TgbO5XUi57Vgf8UItZKcsxEwbBh9DqJM8mTaw+HNGEJc6AvuYJekDEqDdzp1g02qiU1A Yy5tKlsTxSzI1KrL+hA7/5atJXMFDCNGjQpdYilB1/XiD2FJ6ywZ9I2RGg9VYxTGuQjm DmflqiKxahQ/RLQ8XXagxjMTixGpy/KWEnRnN3NeuiWUk6OTZRwprSmvyDghX81UBWng UQ30MpqPmUVS9lV1VF7bhw5YdRqHjcRMBgYVY3u/VneD9Jup3ypUWj5Ml+MuokuDongU P3nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743115; 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=iSsBAGpwOQ1YCk+skd0Kzpj7738m7haGUVPSB8jdLA8=; b=5iuM4ztECuwTDMPsLAcpzFVmUdFpeJp/KlW/DxSOrAp901g8ujSOKlYX/RMj71fVRH A7/nZoEu6BR8Z9xEwhGsM9rhh42nijmEpR0nxGbig06eGPR0xypMPAXiUlq8P44qUena 2DExQ5fTHF5wkEx9JI7KH6IBK/6FUO11/fXNVFaCNb6nWFwr+S8/LT8GxG8oYw7/TE+q 9c9x39u1SjlULyBzW5QKLV/s5AJywHekQja0JGJ1Vc+BnKG4xKGuTTBqy6gWf3TvvReo o8e705cW+TYi3qumqPkvepuehthVhwNRSnx5qPmpX3wec24HPHBtn6t1OQ6qAgtGmk2Z 5HEw== X-Gm-Message-State: AO0yUKVTu4uJzrkPKeHnfiuayhBSbQZ3Zb4iqBRrLPuPGourzJKTzMv8 UA0KQBPYNN6xoGZvuBHZAQw= X-Google-Smtp-Source: AK7set/XG8TzfEZmTXUUe6dRmJBHYN2psk0L5Wxqjfap06fa8cmID3JBpK/XPM3GPErqP0KdKvXlug== X-Received: by 2002:a05:6a20:3954:b0:cb:af96:ace7 with SMTP id r20-20020a056a20395400b000cbaf96ace7mr42850505pzg.46.1678743115403; Mon, 13 Mar 2023 14:31:55 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:55 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Joe Hershberger , =?utf-8?q?Marek_Beh=C3=BAn?= , Quentin Schulz , Samuel Dionne-Riel , Wolfgang Denk Subject: [PATCH v3 02/23] cmd: nvedit: remove error check, handle with Kconfig Date: Mon, 13 Mar 2023 14:31:24 -0700 Message-Id: <20230313213146.1775650-3-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Avoid error messages when SPL,TPL,VPL build don't have the environment options of the main build. This is needed when defined(CONFIG_ENV_IS_IN_xxx) is changed to CONFIG_IS_ENABLED(ENV_IS_IN_xxx). Signed-off-by: Troy Kisky --- Changes in v3: remove error entirely and prevent with Kconfig cmd/nvedit.c | 32 +++++--------------------------- env/Kconfig | 17 ++++++++++------- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7cbc3fd573a..96bbf1904b1 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -43,28 +43,6 @@ DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_ENV_IS_IN_EEPROM) || \ - defined(CONFIG_ENV_IS_IN_FLASH) || \ - defined(CONFIG_ENV_IS_IN_MMC) || \ - defined(CONFIG_ENV_IS_IN_FAT) || \ - defined(CONFIG_ENV_IS_IN_EXT4) || \ - defined(CONFIG_ENV_IS_IN_NAND) || \ - defined(CONFIG_ENV_IS_IN_NVRAM) || \ - defined(CONFIG_ENV_IS_IN_ONENAND) || \ - defined(CONFIG_ENV_IS_IN_SPI_FLASH) || \ - defined(CONFIG_ENV_IS_IN_REMOTE) || \ - defined(CONFIG_ENV_IS_IN_UBI) - -#define ENV_IS_IN_DEVICE - -#endif - -#if !defined(ENV_IS_IN_DEVICE) && \ - !defined(CONFIG_ENV_IS_NOWHERE) -# error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\ -NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE -#endif - /* * Maximum expected input data size for import command */ @@ -596,7 +574,7 @@ static int do_env_edit(struct cmd_tbl *cmdtp, int flag, int argc, } #endif /* CONFIG_CMD_EDITENV */ -#if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE) +#if defined(CONFIG_CMD_SAVEENV) && !IS_ENABLED(CONFIG_ENV_IS_DEFAULT) static int do_env_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -1108,7 +1086,7 @@ static int do_env_info(struct cmd_tbl *cmdtp, int flag, int eval_flags = 0; int eval_results = 0; bool quiet = false; -#if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE) +#if defined(CONFIG_CMD_SAVEENV) && !IS_ENABLED(CONFIG_ENV_IS_DEFAULT) enum env_location loc; #endif @@ -1151,7 +1129,7 @@ static int do_env_info(struct cmd_tbl *cmdtp, int flag, /* evaluate whether environment can be persisted */ if (eval_flags & ENV_INFO_IS_PERSISTED) { -#if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE) +#if defined(CONFIG_CMD_SAVEENV) && !IS_ENABLED(CONFIG_ENV_IS_DEFAULT) loc = env_get_location(ENVOP_SAVE, gd->env_load_prio); if (ENVL_NOWHERE != loc && ENVL_UNKNOWN != loc) { if (!quiet) @@ -1232,7 +1210,7 @@ static struct cmd_tbl cmd_env_sub[] = { #if defined(CONFIG_CMD_RUN) U_BOOT_CMD_MKENT(run, CONFIG_SYS_MAXARGS, 1, do_run, "", ""), #endif -#if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE) +#if defined(CONFIG_CMD_SAVEENV) && !IS_ENABLED(CONFIG_ENV_IS_DEFAULT) U_BOOT_CMD_MKENT(save, 1, 0, do_env_save, "", ""), #if defined(CONFIG_CMD_ERASEENV) U_BOOT_CMD_MKENT(erase, 1, 0, do_env_erase, "", ""), @@ -1323,7 +1301,7 @@ static char env_help_text[] = #if defined(CONFIG_CMD_RUN) "env run var [...] - run commands in an environment variable\n" #endif -#if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE) +#if defined(CONFIG_CMD_SAVEENV) && !IS_ENABLED(CONFIG_ENV_IS_DEFAULT) "env save - save environment\n" #if defined(CONFIG_CMD_ERASEENV) "env erase - erase environment\n" diff --git a/env/Kconfig b/env/Kconfig index 2bbe4c466a6..7342397e169 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -55,20 +55,23 @@ config ENV_MAX_ENTRIES be generous and should work in most cases. This setting can be used to tune behaviour; see lib/hashtable.c for details. -config ENV_IS_NOWHERE - bool "Environment is not stored" - default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \ +config ENV_IS_DEFAULT + def_bool y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \ !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \ !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \ !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \ !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \ !ENV_IS_IN_UBI + select ENV_IS_NOWHERE + +config ENV_IS_NOWHERE + bool "Environment is not stored" help - Define this if you don't want to or can't have an environment stored + Define this if you don't care whether or not an environment is stored on a storage medium. In this case the environment will still exist - while U-Boot is running, but once U-Boot exits it will not be - stored. U-Boot will therefore always start up with a default - environment. + while U-Boot is running, but once U-Boot exits it may not be + stored. If no other ENV_IS_IN_ is defined, U-Boot will always start + up with the default environment. config ENV_IS_IN_EEPROM bool "Environment in EEPROM" From patchwork Mon Mar 13 21:31:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756572 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=NqhrqaZN; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8ys1gmHz1yWs for ; Tue, 14 Mar 2023 08:33:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 59D8085DBC; Mon, 13 Mar 2023 22:32:13 +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="NqhrqaZN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1243985DAA; Mon, 13 Mar 2023 22:32:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 6F06585DB4 for ; Mon, 13 Mar 2023 22:31:58 +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-pf1-x42b.google.com with SMTP id bd34so8532421pfb.3 for ; Mon, 13 Mar 2023 14:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743116; 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=D48xtZOylkHjjC9nI9h3arO631yiEfUEDhd8y4BO0EM=; b=NqhrqaZN1xekh0SrimPZvwV8tw+o3d+qjZztj0n/vLD9F1/696c0CvtytxElGzMAew QXP8dTDynbcOh+RzOqrpLZu+xoNBKoKa8mObMJF6Ox0n9JBTB/RqkNZlZisQMErMEyHH ivHN+yZDMSPJASOmBTnP4DtX5ax0AKhHC1OqKQWlf87ZWCY6xLI8LSkBvOzxKQSinFKj NzNCrVVSTZNTs2bU6Ow0nVDD4llEaJVlupabnxqXG8EsJm7SvPvqt6GjOGQxpl+qmLvs 5ib2A5G6fEr2BaXy+mUo1+o+Ox8X/qj4nqbPgaZrXPJJSVruejDaREW/vG7yj33YsV3i cpRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743116; 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=D48xtZOylkHjjC9nI9h3arO631yiEfUEDhd8y4BO0EM=; b=RoJJPIbumSnPRExGd29E20h7iM1HtwFld3jQYdNLLoDhGGW9NrjdYNyYyEq+SrBQYt 5yXQ9MTFeDcihrs54IE5DoX6HzxDuIo+EJyrvq/TWW2nzFNxOjtB2zGTVJUQIZtJoJVI GheB1vrpXyo/YzobD9u5Uz20iLaVAB2RfgM5dLc1Fqtq39lUDd//bxrWvF9l50TyMWHB dwHZhMslstvQnDlsi+AfIqCmGisB+TjhI1h77wnE0yl92iuPqArOicZcrFpMgFAMSY7q ilk1JqxTUVjtI+lxEFCKHr4txLu64j7f1tA9E7jGcyKxUaSnbs7XUiah9DmU76m/KVR6 2tKA== X-Gm-Message-State: AO0yUKXEB6jvMSJZgBWxbYNbZ5whVlSZnB7ow2BVRC6uCvoi6dGAufhr hkk7TsjrvqrIlveoT5jDBBw= X-Google-Smtp-Source: AK7set++ZQcbHeuY6+DKdnzIJLOV8gCfARsntZdPs9UHZEp2A40DNuptLNrCItKrR3Oo5iQrQnE81w== X-Received: by 2002:a62:1991:0:b0:5e2:434d:116b with SMTP id 139-20020a621991000000b005e2434d116bmr27138532pfz.23.1678743116409; Mon, 13 Mar 2023 14:31:56 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:56 -0700 (PDT) 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 v3 03/23] lib: crc32: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:25 -0700 Message-Id: <20230313213146.1775650-4-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 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 be more direct with using defined(USE_HOSTCC). Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/crc32.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index aa94d70ef3e..12c104c62a4 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -14,11 +14,14 @@ #else #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #endif #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG #include #endif #include "u-boot/zlib.h" @@ -84,7 +87,7 @@ static void __efi_runtime make_crc_table(void) } crc_table_empty = 0; } -#elif !defined(CONFIG_ARM64_CRC32) +#elif !defined(CONFIG_ARM64_CRC32) || defined(USE_HOSTCC) /* ======================================================================== * Table of CRC-32's of all single-byte values (made by make_crc_table) */ @@ -184,7 +187,7 @@ const uint32_t * ZEXPORT get_crc_table() */ uint32_t __efi_runtime crc32_no_comp(uint32_t crc, const Bytef *buf, uInt len) { -#ifdef CONFIG_ARM64_CRC32 +#if defined(CONFIG_ARM64_CRC32) && !defined(USE_HOSTCC) crc = cpu_to_le32(crc); while (len--) crc = __builtin_aarch64_crc32b(crc, *buf++); @@ -243,7 +246,7 @@ uint32_t __efi_runtime crc32(uint32_t crc, const Bytef *p, uInt len) uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uInt len, uInt chunk_sz) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; From patchwork Mon Mar 13 21:31:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756574 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ME5+dEbe; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8zR2HtVz1yWs for ; Tue, 14 Mar 2023 08:33:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 930C585DF9; Mon, 13 Mar 2023 22:32:21 +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="ME5+dEbe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D61C386146; Mon, 13 Mar 2023 22:32:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 5DB5985DBC for ; Mon, 13 Mar 2023 22:31:59 +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-pf1-x42e.google.com with SMTP id ce7so8510474pfb.9 for ; Mon, 13 Mar 2023 14:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743117; 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=+EmDsxXwhYQfttTzMniE9YnqVjpK2DRcs0GpX/92HbU=; b=ME5+dEbeIDHjBH/9YxGDA49HuTXFxYOuYWhiJxa0ShK5Eoy+dccIk6bV1P3s3by/F9 cao6zu9UqO35HGKW3NBN7R6PzWVGediE/Q6EpF4EFbvmnlqOFN87wTr8UXHZ/Kt0P7NK r7lCtajG8PK8iUL54Dt7hatNpisKG89gdnGtpABQZ+wc4ZmKiVgUxx/qslTU4dYZerzi EzpCd7zJ7opCop6GjOl04rkdwSEF1dubUHVDEmAFfF6iG1gLwVxgo6SQ9UGd9qytTutV Ycy3VlDv5FO7JxEM/IULsQ+cEpC0X8PqYetmJ4cAVLLFLPB619aY603ydbfYC53G4eWr LKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743117; 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=+EmDsxXwhYQfttTzMniE9YnqVjpK2DRcs0GpX/92HbU=; b=dftQkPNUxRlAd/BVp3OnlR7pWAVMCOsn3SwMpir8t7Xvl8isMmGI6RutE/pqgyQ7lq fH8ETJ8AJoFtF1PYh36TnWDd5pHCSnACWAlCD43ztvXHpGNb6uZMTMm+sgiD2MfKSx/l opJoB9Fmdzxh5YVu41LFTt41vtmU62S8SdNwZ+DB9yabntG58acvNmzW6MHi35CecW6J FK9PwowVWwvUIP0edKod67Ew+D2W0opcbLil4z408UOlfKk+KlSqGmlAEZV7CB3lcTMf WopSRDNI2NOftIkStAFqSGzVyPLuEjZszHTCslr0s0loSGxP9tVef73lIjGrfs6sG75Z IoMA== X-Gm-Message-State: AO0yUKX2hEXqP0RtZ/jLCXy97xAK9OiFA4oTrmp+YpL9vvBfjnxEjJbZ 63wPtGgxGJ0U0BU4yks/yrc= X-Google-Smtp-Source: AK7set/Pls3VmAZFsf2n+BzZmRkBMmAQEM/uNiUDyZdgrHaO/r/IdosgAtSQKP9xn/KdYozH9DAxTw== X-Received: by 2002:a62:546:0:b0:5a8:bcf2:125 with SMTP id 67-20020a620546000000b005a8bcf20125mr25353529pff.21.1678743117357; Mon, 13 Mar 2023 14:31:57 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:57 -0700 (PDT) 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 v3 04/23] lib: md5: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:26 -0700 Message-Id: <20230313213146.1775650-5-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 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 Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/md5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/md5.c b/lib/md5.c index 1636ab93661..20d5e87814b 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -29,7 +29,10 @@ #ifndef USE_HOSTCC #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) #include +#define PET_WDG +#endif #endif /* USE_HOSTCC */ #include @@ -288,14 +291,14 @@ md5_wd(const unsigned char *input, unsigned int len, unsigned char output[16], unsigned int chunk_sz) { struct MD5Context context; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; #endif MD5Init(&context); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = input; end = input + len; while (curr < end) { From patchwork Mon Mar 13 21:31:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756575 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=dcqjCmLJ; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8zf47HKz1yWs for ; Tue, 14 Mar 2023 08:33:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F59E85BBD; Mon, 13 Mar 2023 22:32:24 +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="dcqjCmLJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B13E85DC9; Mon, 13 Mar 2023 22:32:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (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 1F60C85982 for ; Mon, 13 Mar 2023 22:32:00 +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-pf1-x42f.google.com with SMTP id ce7so8510490pfb.9 for ; Mon, 13 Mar 2023 14:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743118; 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=+X3CB7xw+1DnKGFYxxdATrZVisz+JzpwPv1WC6jEYiM=; b=dcqjCmLJuLZWyJXCDF8XwsfwfJdSsht0Gfm1UjhDvsRmkivP0ziYzyeEzFTM6tMe1i 4ZKgFE/8mkH5pVOFF2ZACkxRmYR9i8NMxpC4pCxRXh57JMo1urk/DxdHV2vQl8ta8SY0 rF82wjK/D0Zh+4LS3pISEmx/zcgqJH6lSgZgUw5FNm4PfCpzdyXp2+AXs8etFB1Kvjnf PBFpNVvt1M/TLAt0eGy5fuML4YwG9XyLQ2TLNASFpyUkJlVCQPbJhJ9dv7FDNLlgPXP6 PfqyykvtKrjrzzFozh7LuOWp17/WJUfR/gjxpYTICDrVLxSEujwJj/fUyqZlUkmJVeJD BHUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743118; 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=+X3CB7xw+1DnKGFYxxdATrZVisz+JzpwPv1WC6jEYiM=; b=veW495JOizy28Ugqi20OGISD0L/EyTEywWOYeUO50cu14hoZsoyxq7Ft6367eXyHmy 2mQ8uWXfyDuNLbAeVFeb5Bs4L4mx+XzHPU1VWXrBQljVbNLeVq3frprjwhoG3fEP576X dunimR++DZ8qxiRLyuC+b+e+eAuesr8ypvniK8ovXXgYjMtO1Rfi/vycDMVQ2o6jCB0l RsNg4cl52wjnor1ScJvKOnnVdamGBfjuGpCX2P6GhTExS38E9eePz76dqtyZk88bEvSG wJ9mkvwx9iBZSJy8kLQ0WigfBwnXP5Dj3dov6KLkB1aNLaGa3AMtLo5W2zaA1frobDq0 QJOg== X-Gm-Message-State: AO0yUKU1A89Ba0XEUZjy0Nzk7DJspTv92XUpQiQHgAs3E6rgviQ9o71J SYkLy2TN0KPtdFSM3a0Wvtc= X-Google-Smtp-Source: AK7set8A+RhdUtfYjEGnql+RLjDFpUUr+K/6Ojt9fH+9t9hpaTehccnlCm2tuBCgWz1EbdX0yygoow== X-Received: by 2002:a05:6a00:1d94:b0:625:4493:894c with SMTP id z20-20020a056a001d9400b006254493894cmr2073145pfw.1.1678743118392; Mon, 13 Mar 2023 14:31:58 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:58 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Loic Poulain , Marek Vasut , Stefan Roese Subject: [PATCH v3 05/23] lib: sha1: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:27 -0700 Message-Id: <20230313213146.1775650-6-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 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 Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/sha1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sha1.c b/lib/sha1.c index 8d074078934..cd5d7aead8d 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,6 +19,9 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else #include #endif /* USE_HOSTCC */ @@ -328,14 +331,14 @@ void sha1_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha1_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; #endif sha1_starts (&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = input; end = input + ilen; while (curr < end) { From patchwork Mon Mar 13 21:31:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756577 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Lre1Dkcs; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb9042qlRz1yWs for ; Tue, 14 Mar 2023 08:34:12 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4FBB985DEA; Mon, 13 Mar 2023 22:32:30 +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="Lre1Dkcs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B163B86159; Mon, 13 Mar 2023 22:32:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 3783A85DF7 for ; Mon, 13 Mar 2023 22:32:01 +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-x630.google.com with SMTP id x11so14454851pln.12 for ; Mon, 13 Mar 2023 14:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743119; 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=jtBP0rpJ+RdfJOb7MyQRuokJPcPHkrQU3B+2xC6eI18=; b=Lre1DkcsOWsiI6vOcCuAMIRvqkUm/L9jGx6Wsa4HxkAMQ8PCwNDxUop4R5i4FtH7nQ ZLOSIoVvkgWJSIIlpnRL5UG6Q8C23b6lBdKAKk0M0DPVzj+oD+Iq6zgWL+8TmFuJ0IkW avgnxO9d47+qeAmdyKVGam0F8cOXtJ0X/JaXSZ2gFZP6clWLfvPvH9JLvB9L2GPCJ6hZ 6cztM2+6xBTsHS3f8jMsDjtcUqKaEIWukrl1g3AOSZLMlK+Lj4fGU1ZqzTE8BaWmuBax 7vKY8fWIJiHCVbmuoO0TGShJI8AsZDqmw+sZeai/r5eXs3kQPqIUaSxtg3oIK0x+uA06 8rqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743119; 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=jtBP0rpJ+RdfJOb7MyQRuokJPcPHkrQU3B+2xC6eI18=; b=nIWC1b16qet6Qi6VnlS6JnYxNlSX9adgphMFoao6zT0l3t8s3RFOh299IEBTj4panq aOaL9ISNP2Hqt5I/CrYrpQKW5Z6Cg4rUzrTy5RsaoLhoFprFP8eV8Ym7qaGDqYv+qJwO xI3osY+yuUuH4zPBZeB14EL8MJLuDEI2wgjiAUZLwoxo2P/z1k3ZhrZXHox5TdC4HGFp AZLv4zQvDAZNXBhcDamZ890dGwb9f2HqXG25c5/2pinZDsA74ETUqanJlSFqKkkdF8Yx xJ7Ct9GXVa0PACEBsM27orj5/x7GAKVTklrb39YQcNdS2ImRbGOEzjSRUPxcipWB75op pEIQ== X-Gm-Message-State: AO0yUKUWcUjqDJmwWY1zkqReOWr2A4qYL/XHIH1gEuX3WC1RESh3vWRt MK9BMHvsAHQ+HAfWQjTOSm8= X-Google-Smtp-Source: AK7set9CoPxuQO5i8X+kZ7C1VlDTwzSCNNmFCWu+Mw/ulVOJ1HyVSn5phZBQWzfpNuvL1t4L+TnH0Q== X-Received: by 2002:a05:6a20:1e5b:b0:cb:9db3:e5e2 with SMTP id cy27-20020a056a201e5b00b000cb9db3e5e2mr29699592pzb.17.1678743119411; Mon, 13 Mar 2023 14:31:59 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:59 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Loic Poulain , Marek Vasut , Stefan Roese Subject: [PATCH v3 06/23] lib: sha256: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:28 -0700 Message-Id: <20230313213146.1775650-7-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 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 Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/sha256.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sha256.c b/lib/sha256.c index 4d26aea1c8c..8e1c3992674 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,6 +8,9 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else #include #endif /* USE_HOSTCC */ @@ -276,7 +279,7 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha256_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end; unsigned char *curr; int chunk; @@ -284,7 +287,7 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen, sha256_starts(&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = (unsigned char *)input; end = input + ilen; while (curr < end) { From patchwork Mon Mar 13 21:31:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756576 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=gtqvsYu3; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb8zs2Xn4z1yWs for ; Tue, 14 Mar 2023 08:34:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82A0685DDD; Mon, 13 Mar 2023 22:32:27 +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="gtqvsYu3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0AFBA8613C; Mon, 13 Mar 2023 22:32:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 E98FC85DE8 for ; Mon, 13 Mar 2023 22:32:00 +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-pf1-x42e.google.com with SMTP id ce7so8510529pfb.9 for ; Mon, 13 Mar 2023 14:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743120; 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=TeC2mM/3NW5s0/UEux6ourCyaKaVK7XHIRir60jkxbo=; b=gtqvsYu3/Vz8mQD6Y+17pZ5IJr3+Oogk7rYsA+yF29LIdaFqR/4bouYZAmm0Rb6UXy zoe8xui++iIvZvCJQiaWkaLQ7yBp+dP63zZrnrl3jfCsgwTvPEwx6RLcU7gV2XFGiql1 GeKxMSRtOM8HdgyCRuQ4c/aEoaI0Z0pBIg/56KrLvevntN0fFXXUj40WVsJ6K9au48zz wREfyrWiOrd9adIsVCHicikC1Gb7p/F77ZMNPAdmE3afSDRDt+erIy8jdzJQgOL73XLw Qh4nFXjy2lm4Iu4MVGMV65mSxpCrueiKf6P32nX6EshQNrjMLUH7KxEOn6ZMxxKkKJ7f JvGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743120; 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=TeC2mM/3NW5s0/UEux6ourCyaKaVK7XHIRir60jkxbo=; b=VQlimMkoWwc3WgwarC6Gs7yIviq1nO5OYBV1UhcEXDzuqY2p8aQN3dTP62ed+D7bqK kNduQV5BhlmUFcQClO078sxs8ip4kYk4LC+xrvc8nmxTbX/2IyqHXFG+GsLWmXGtzRHd LSaU45QTsZcmzeWwIl8QXu+hE408ZIFqluF299msudrSY89sa+56UiSG+PAPmofr3rwj tquMPr26OYzbvVY9buelKwUa6s/YCVqE4wtlj86F2Cdx36RKso2q3zC9LWW/s8hoqjp1 2CjMtE2QsBuBBL3L8gz9e6DfpmGXTJjK5caGu/OSg/0eRoQEEO+yi9bqe+wPCuRawKw8 RRUg== X-Gm-Message-State: AO0yUKV8SPfYOM2xc1zYLJLkqkSPT3RgC+7Q+K5UtHI/P12ITyoHNElD UTtrZwl2cO165nigh+8fdqy1PWP0YqU= X-Google-Smtp-Source: AK7set9QTVrJMfPgB6c43cBXIx5SYQnjzhZpyVtgGdUE9SWtMu+0n0BZMNUHDRovnz+gT9P3avVLRg== X-Received: by 2002:aa7:9485:0:b0:600:cc40:2589 with SMTP id z5-20020aa79485000000b00600cc402589mr30321211pfk.3.1678743120439; Mon, 13 Mar 2023 14:32:00 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:00 -0700 (PDT) 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 v3 07/23] lib: sha512: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:29 -0700 Message-Id: <20230313213146.1775650-8-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 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 Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/sha512.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/sha512.c b/lib/sha512.c index fbe8d5f5bfe..a504281bf93 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -13,6 +13,9 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else #include #endif /* USE_HOSTCC */ @@ -292,7 +295,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 +303,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 +358,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 +366,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) { From patchwork Mon Mar 13 21:31:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756578 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=YkFhuOR8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb90G6Qsgz1yWs for ; Tue, 14 Mar 2023 08:34:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 818FA85E71; Mon, 13 Mar 2023 22:32:33 +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="YkFhuOR8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D61686168; Mon, 13 Mar 2023 22:32:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 684FD85E73 for ; Mon, 13 Mar 2023 22:32:04 +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-x62e.google.com with SMTP id h8so14462688plf.10 for ; Mon, 13 Mar 2023 14:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743122; 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=ZXTZ02VwtB3B+l42oYNr3jv3DkwUbIwL2rgOAIfJPl8=; b=YkFhuOR8jyFij2JuMY/7UJuhtYPFckUgs8w8LpJ1WjflBm+xEoxa6RBWVsfOl2aiqy QCQH/JjJbNiXGtRQ+Sjppe9aNPO+Vm5xj8m635Z1BX42GQfaz3yPPQiu4ekuLzW3LK5S G3rcgSmOSTNA61ji3+vdMXHbPWfpbQhoSQSgqCoFctSaINwlwAgYrexVrFP7BcKKW+1M Pkdu+soBEZxmrHZTRHQYL52hwr8s8Dh2syQ1mAJ66Uzf2vHXeGsP7pCQ0w3FI0uXIVu6 frA+KH8DGf1uqD8crfwkhPdltKvZTPHoQfRlE/wlLrIihiMECejvRTUqy4y1Q7A+vl6b qr7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743122; 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=ZXTZ02VwtB3B+l42oYNr3jv3DkwUbIwL2rgOAIfJPl8=; b=dprig6VkUW6d8b2BFs4MSt0JkLKgElfaim8dynXokOrXnv6KXW0BFf8zOZy1uxwR/T mP0H/4PcDc25lRpEb4OrgRPL1z4wqwQCjgApyXJddlPT+0g8fYvoqQF9DAHW7CoYaThf dKxTRel2CeZsNfybZO0m0DjndeHiR5pHLvz6/8zO3gLohmlEvb5VQHLKqZDRing8PsIt eOlzAb4dlf8iXKXGH/HfHZVLwQYSBKVouiaDvLq/Zdv9jkuCNfXEi8oYEs+hiw6AeYGI smIS/K65tT42M55ksjnsepjj+kWOajPi8vBL0G7Ar1pVMJlCCMyA+3ZQ47KUGYneTw7a qfCA== X-Gm-Message-State: AO0yUKXn+Ed6trJ/O05Ak1X+cIYG/dIR2sulFeJEF0thuSwU2Ubt7GL3 /bHE8IdZi7uIZcwb2DsJvew= X-Google-Smtp-Source: AK7set+e2kXWpSHdLqZa2kCgKBTPgQ204otw/gpdEdFx7sVfEg8QHKMvo0ucJTHjcZNcNvZDU3ID1g== X-Received: by 2002:a05:6a21:3298:b0:cd:47dc:829e with SMTP id yt24-20020a056a21329800b000cd47dc829emr12662853pzb.12.1678743122410; Mon, 13 Mar 2023 14:32:02 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:02 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Alper Nebi Yasak , Andrew Davis , Angelo Dureghello , Ashok Reddy Soma , Aspeed BMC SW team , Chia-Wei Wang , Daniel Golle , Huan Wang , Joel Stanley , Loic Poulain , Mario Six , Michal Simek , Michal Suchanek , Oleksandr Suvorov , Ovidiu Panait , =?utf-8?q?Pali_Roh=C3=A1r?= , Rasmus Villemoes , Ryan Chen , Stefan Roese , Wolfgang Denk , Wolfgang Wegner Subject: [PATCH v3 08/23] watchdog: add and use Kconfig HAS_WATCHDOG_RUNNING Date: Mon, 13 Mar 2023 14:31:30 -0700 Message-Id: <20230313213146.1775650-9-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) is a common pattern. Create an new config symbol HAS_WATCHDOG_RUNNING to express it. Signed-off-by: Troy Kisky --- Changes in v3: new patch to address Tom's concerns arch/arm/mach-omap2/boot-common.c | 5 ++--- arch/m68k/lib/time.c | 7 +++---- arch/powerpc/lib/interrupts.c | 5 ++--- arch/powerpc/lib/ticks.S | 2 +- board/astro/mcf5373l/fpga.c | 10 ++++------ boot/image-board.c | 2 +- cmd/ximg.c | 10 ++++------ common/board_f.c | 4 ++-- common/spl/Kconfig | 4 ++++ drivers/crypto/aspeed/aspeed_hace.c | 2 +- drivers/crypto/hash/hash_sw.c | 2 +- drivers/timer/mpc83xx_timer.c | 5 ++--- drivers/watchdog/Kconfig | 3 +++ fs/cramfs/uncompress.c | 9 ++++----- include/watchdog.h | 7 ++----- lib/bzip2/bzlib.c | 5 ++--- lib/bzip2/bzlib_decompress.c | 20 ++++++++------------ lib/crc32.c | 2 +- lib/md5.c | 2 +- lib/sha1.c | 2 +- lib/sha256.c | 2 +- lib/sha512.c | 2 +- 22 files changed, 51 insertions(+), 61 deletions(-) diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 9a342a1bf95..928a4136781 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -302,9 +302,8 @@ void spl_board_init(void) #if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW) arch_misc_init(); #endif -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - hw_watchdog_init(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + hw_watchdog_init(); #ifdef CONFIG_AM33XX am33xx_spl_board_init(); #endif diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index 2ce69088d94..4a9841667b7 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -70,11 +70,10 @@ void dtimer_interrupt(void *not_used) timerp->ter = (DTIM_DTER_CAP | DTIM_DTER_REF); timestamp++; - #if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && + !(timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); - } - #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ return; } } diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index df312dfa28e..f76b2db9025 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -79,10 +79,9 @@ void timer_interrupt(struct pt_regs *regs) timestamp++; -#if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && !(timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); -#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS status_led_tick(timestamp); diff --git a/arch/powerpc/lib/ticks.S b/arch/powerpc/lib/ticks.S index 8647d77cc9a..dd9afe693df 100644 --- a/arch/powerpc/lib/ticks.S +++ b/arch/powerpc/lib/ticks.S @@ -41,7 +41,7 @@ wait_ticks: addc r14, r4, r14 /* Compute end time lower */ addze r15, r3 /* and end time upper */ -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) bl schedule /* Trigger watchdog, if needed */ #endif 1: bl get_ticks /* Get current time */ diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c index f85737432b3..3e1f507cdfe 100644 --- a/board/astro/mcf5373l/fpga.c +++ b/board/astro/mcf5373l/fpga.c @@ -122,9 +122,8 @@ int altera_write_fn(const void *buf, size_t len, int flush, int cookie) } while (i > 0); if (bytecount % len_40 == 0) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK putc('.'); /* let them know we are alive */ #endif @@ -342,9 +341,8 @@ int xilinx_fastwr_config_fn(void *buf, size_t len, int flush, int cookie) val <<= 1; } if (bytecount % len_40 == 0) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK putc('.'); /* let them know we are alive */ #endif diff --git a/boot/image-board.c b/boot/image-board.c index 25b60ec30b3..48215bdef78 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -173,7 +173,7 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz) if (to == from) return; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { if (to > from) { from += len; to += len; diff --git a/cmd/ximg.c b/cmd/ximg.c index 60ed2c9f6f9..a42a944ae19 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -186,8 +186,7 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (argc > 3) { switch (comp) { case IH_COMP_NONE: -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { size_t l = len; size_t tail; void *to = (void *) dest; @@ -203,11 +202,10 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) from += tail; l -= tail; } + } else { + printf(" Loading part %d ... ", part); + memmove((char *)dest, (char *)data, len); } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - printf(" Loading part %d ... ", part); - memmove((char *) dest, (char *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ break; #ifdef CONFIG_GZIP case IH_COMP_GZIP: diff --git a/common/board_f.c b/common/board_f.c index f3c1ab53b1c..54220bc1d3b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -84,7 +84,7 @@ __weak void blue_led_off(void) {} * a structure... */ -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) static int init_func_watchdog_init(void) { # if defined(CONFIG_HW_WATCHDOG) && \ @@ -106,7 +106,7 @@ int init_func_watchdog_reset(void) return 0; } -#endif /* CONFIG_WATCHDOG */ +#endif /* HAS_WATCHDOG_RUNNING */ __weak void board_add_ram_info(int use_default) { diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2c042ad3066..8f0edd66225 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1444,6 +1444,10 @@ config SPL_WATCHDOG detects no activity for a while (such as a software crash). This enables the drivers in drivers/watchdog as part of an SPL build. +config SPL_HAS_WATCHDOG_RUNNING + def_bool y if SPL_WATCHDOG || HW_WATCHDOG + depends on HAS_WATCHDOG_RUNNING + config SPL_YMODEM_SUPPORT bool "Support loading using Ymodem" depends on SPL_SERIAL diff --git a/drivers/crypto/aspeed/aspeed_hace.c b/drivers/crypto/aspeed/aspeed_hace.c index 6b6c8fa6588..28a39e7b599 100644 --- a/drivers/crypto/aspeed/aspeed_hace.c +++ b/drivers/crypto/aspeed/aspeed_hace.c @@ -288,7 +288,7 @@ static int aspeed_hace_digest_wd(struct udevice *dev, enum HASH_ALGO algo, if (rc) return rc; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c index d8065d68ea4..51cead45a4f 100644 --- a/drivers/crypto/hash/hash_sw.c +++ b/drivers/crypto/hash/hash_sw.c @@ -244,7 +244,7 @@ static int sw_hash_digest_wd(struct udevice *dev, enum HASH_ALGO algo, if (rc) return rc; - if (IS_ENABLED(CONFIG_HW_WATCHDOG) || CONFIG_IS_ENABLED(WATCHDOG)) { + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 7814cb6a5d6..a0858cc49b5 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -174,10 +174,9 @@ void timer_interrupt(struct pt_regs *regs) priv->timestamp++; -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) - if (CFG_SYS_WATCHDOG_FREQ && (priv->timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0) + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) && + CFG_SYS_WATCHDOG_FREQ && !(priv->timestamp % CFG_SYS_WATCHDOG_FREQ)) schedule(); -#endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS status_led_tick(priv->timestamp); diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b5ac8f7f50d..46c0c1efedf 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -35,6 +35,9 @@ config WATCHDOG_TIMEOUT_MSECS help Watchdog timeout in msec +config HAS_WATCHDOG_RUNNING + def_bool y if WATCHDOG || HW_WATCHDOG + config HW_WATCHDOG bool diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 0d071b69f4c..80000110d5d 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -62,11 +62,10 @@ int cramfs_uncompress_init (void) stream.next_in = 0; stream.avail_in = 0; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - stream.outcb = (cb_func)cyclic_run; -#else - stream.outcb = Z_NULL; -#endif /* CONFIG_HW_WATCHDOG */ + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + stream.outcb = (cb_func)cyclic_run; + else + stream.outcb = Z_NULL; err = inflateInit (&stream); if (err != Z_OK) { diff --git a/include/watchdog.h b/include/watchdog.h index ac5f11e376f..60086e1ae30 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -20,7 +20,7 @@ */ int init_func_watchdog_reset(void); -#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init, #define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset, #else @@ -35,10 +35,7 @@ int init_func_watchdog_reset(void); /* * Prototypes from $(CPU)/cpu.c. */ - -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - void hw_watchdog_init(void); -#endif +void hw_watchdog_init(void); #if defined(CONFIG_MPC85xx) void init_85xx_watchdog(void); diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c index bd589aa810c..904ff1332be 100644 --- a/lib/bzip2/bzlib.c +++ b/lib/bzip2/bzlib.c @@ -843,9 +843,8 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm ) if (s->strm != strm) return BZ_PARAM_ERROR; while (True) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR; if (s->state == BZ_X_OUTPUT) { if (s->smallDecompress) diff --git a/lib/bzip2/bzlib_decompress.c b/lib/bzip2/bzlib_decompress.c index 3b417d57b27..51f21d1e7f6 100644 --- a/lib/bzip2/bzlib_decompress.c +++ b/lib/bzip2/bzlib_decompress.c @@ -417,9 +417,8 @@ Int32 BZ2_decompress ( DState* s ) while (True) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); if (nextSym == EOB) break; if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { @@ -502,9 +501,8 @@ Int32 BZ2_decompress ( DState* s ) if (s->mtfbase[0] == 0) { kk = MTFA_SIZE-1; for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); for (jj = MTFL_SIZE-1; jj >= 0; jj--) { s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; kk--; @@ -567,9 +565,8 @@ Int32 BZ2_decompress ( DState* s ) } while (i != s->origPtr); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); s->tPos = s->origPtr; s->nblock_used = 0; if (s->blockRandomised) { @@ -582,9 +579,8 @@ Int32 BZ2_decompress ( DState* s ) } else { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - schedule(); -#endif + if (CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING)) + schedule(); /*-- compute the T^(-1) vector --*/ for (i = 0; i < nblock; i++) { uc = (UChar)(s->tt[i] & 0xff); diff --git a/lib/crc32.c b/lib/crc32.c index 12c104c62a4..124fadb62b0 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -14,7 +14,7 @@ #else #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #endif diff --git a/lib/md5.c b/lib/md5.c index 20d5e87814b..fb1a2b4ef61 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -29,7 +29,7 @@ #ifndef USE_HOSTCC #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #include #define PET_WDG #endif diff --git a/lib/sha1.c b/lib/sha1.c index cd5d7aead8d..9661fe487a7 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,7 +19,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else diff --git a/lib/sha256.c b/lib/sha256.c index 8e1c3992674..5aa7ad7b5c0 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,7 +8,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else diff --git a/lib/sha512.c b/lib/sha512.c index a504281bf93..389c792bd22 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -13,7 +13,7 @@ #ifndef USE_HOSTCC #include #include -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#if CONFIG_IS_ENABLED(HAS_WATCHDOG_RUNNING) #define PET_WDG #endif #else From patchwork Mon Mar 13 21:31:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756580 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UbQNJoVC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb90j4dS0z1yWs for ; Tue, 14 Mar 2023 08:34:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C51D385DBD; Mon, 13 Mar 2023 22:32:38 +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="UbQNJoVC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0A0B85D62; Mon, 13 Mar 2023 22:32:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 C86AC85D5D for ; Mon, 13 Mar 2023 22:32:05 +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-pj1-x102a.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so5635769pjb.0 for ; Mon, 13 Mar 2023 14:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743123; 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=nsA+xOx398EhBR2vEgc6LOWsFueFrU5OJCvsITv+Klk=; b=UbQNJoVCzY5hqXPbX8ttpxgfLwHugtmn2juF8ncOM/DVEIU1tsCAFD1La27JDJ07nF NO7eLZ9vrUlNQPOatOacbopzp5KHuNEBrhboDDaejS/lnd9UMzWhzBagL7nHVSKPXuFJ w7Ejj+J/2LfoVBA2QN2eYB9xNVyjuFXsAS5oKbXEVj8nwIVTSC+s4nM+0j9LH5LbLdg3 n1YZjvaerBA10R+0gqVLzl+oZ566xMpjNbPluHy+If6szq9s4PJbrvplDJL742Bs4BlY eg9D3M3RF6M2d6yKE2OIJc+Ck8rNtNK8WEOL7b2vonQpBFamsBVXQbKjvokjiYDsyz4+ k5dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743123; 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=nsA+xOx398EhBR2vEgc6LOWsFueFrU5OJCvsITv+Klk=; b=SYPEkK9yplLjKIdbQWdPfDgyVrIBgDr2sqbOJ4gT8biCu0ueH7tpEMy4eL0bt0UGyD 8WU0/3hyQZxACr9OJzL+jDu0sMaugcwx6Ht7s1BanNE8T1NpIHhq0TRKRfrY+A3Ynwko CiehhuiKJvwWb0otIsYaEv7JdWyhZajIxfA6vTIcXFl71D2tCJC295xOmPljGVdIZ8+5 GscbnjXvaOnrANdZNZ3bpui+RfuWoxJYT4HQcVUdkFZCSggyCVNRawFFeVXbk07WuFtO iIrTrF5XPQjncIUb2bI5U4qxlhdwpvzuBK+qzfMOwL317PJrhUd+6uXUhbpMi+FpfYyt VQ2Q== X-Gm-Message-State: AO0yUKUTzi89ttTDue00FL8h3lyeDpg7UL8Kre9o3PL51fnzOHGGJY2x x3osJQtmLuX4hHCYW01S2Hg= X-Google-Smtp-Source: AK7set+AD/vHvk/oTiduRqQf0rirA6Hd8H9J3DIi32csvUcpBHAd3odhq4isOqygGox0vbZx+r9aHA== X-Received: by 2002:a05:6a20:6a11:b0:c7:3c30:188f with SMTP id p17-20020a056a206a1100b000c73c30188fmr10165712pzk.20.1678743123631; Mon, 13 Mar 2023 14:32:03 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:03 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Andre Przywara , Heiko Thiery , Heinrich Schuchardt , Marek Vasut , Max Krummenacher , =?utf-8?q?Pali_Roh=C3=A1r?= , Samuel Holland Subject: [PATCH v3 09/23] tools: prevent CONFIG_IS_ENABLED errors by including linux/kconfig.h Date: Mon, 13 Mar 2023 14:31:31 -0700 Message-Id: <20230313213146.1775650-10-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean We need to include in order to include files that use CONFIG_IS_ENABLED. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - include linux/kconfig.h from tools/Makefile - as suggested by Simon tools/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Makefile b/tools/Makefile index e13effbb66a..5d6284e6451 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -298,6 +298,7 @@ endif # !LOGO_BMP # Define _GNU_SOURCE to obtain the getline prototype from stdio.h # HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ + -include $(srctree)/include/linux/kconfig.h \ $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ -I$(srctree)/scripts/dtc/libfdt \ -I$(srctree)/tools \ From patchwork Mon Mar 13 21:31:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756579 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UGewmcBY; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb90V280vz1yWs for ; Tue, 14 Mar 2023 08:34:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 074DF85D68; Mon, 13 Mar 2023 22:32:36 +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="UGewmcBY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E84885DF9; Mon, 13 Mar 2023 22:32:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 5F82B85FF3 for ; Mon, 13 Mar 2023 22:32:05 +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-pj1-x102d.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so3551675pjz.1 for ; Mon, 13 Mar 2023 14:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743125; 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=L6wWQpCl4196gg9RGS8TYFSSpXQeuFwtOdQK+EhwmEc=; b=UGewmcBYLLNj/7wZ5EXAj6pGgVgDKZtejD7Bn9GxyTjaERSxnqggnHShAhC1QKxBb5 aipkB1auD1Jg2qpP6+2aYynYlT2Q9Uer0vQuH9uDWzvUtUz/qj5MlZGZgOWtO1pdRoaK GqTE331GqL2gcMXFImXdpRBfCkobcWJB6j3/PQBBAG2yZxhddGZsDiiJAMBRbBfmuGbE xiDhQ6o7NwdrfExVVIrUdmdNGnC62us9rjavhO3qHDNMb8oFEgEaXC0gjDdX2wB9TQTi eCzjS2xt84RJYZRHYbv49fGsxZP1QXkeyiBlcU53GcR5mlrQKeFvdPSlD6CQeZWjF7z/ exVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743125; 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=L6wWQpCl4196gg9RGS8TYFSSpXQeuFwtOdQK+EhwmEc=; b=snexVDwO+eemUs2Kik8g/U+8vbONiTRChxYo+TBCMuPpXGMsupfdMqoat/tj1epfWF NSVrPcap/6fkKdBQlNvOZlDwL0B/loO675q87h5dNsItvQoQtjqlt3+79OiFIxPIwMJ6 TqRaGYxlSq23znklAoMI9lOm9nR45zJBu6jN9dCRS0WrD1/aDrnSn61g3TZC+U7TIycW O08CdpNRNKLgrPpN+jyLNRFLky5li8SS9lpTZTaDCX+q6GHk1Cf7CK6lY85NcTIaOIc0 KNRVzvEOKKSSG6Sjp/BWlgbRrzev3kiEc3wnMKKy1v9tyT3yfZ7+pZaCvgKzluMopBGd Biow== X-Gm-Message-State: AO0yUKU3PsxsXBKlBSW5U4QC5jbsedIqk8deKDjA4yHNTPufPI7WuEYC /hH8/ihMv+CMoGQ2eGzqNfc= X-Google-Smtp-Source: AK7set9UOihU1oyX1JSHQ3XuVzr5wAq6GZOKwzJ/VGdxYFEbQIjQMtczjpdW4AWPu7R4lZFC3Ux2Vw== X-Received: by 2002:a05:6a20:c289:b0:d3:a347:7db4 with SMTP id bs9-20020a056a20c28900b000d3a3477db4mr7098269pzb.15.1678743124896; Mon, 13 Mar 2023 14:32:04 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:04 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Andre Przywara , Heiko Thiery , Heinrich Schuchardt , Max Krummenacher , =?utf-8?q?Pali_Roh=C3=A1r?= , Samuel Holland , Stefan Roese , Sughosh Ganu Subject: [PATCH v3 10/23] tools: Makefile: prepare for CONFIG_IS_ENABLED changes by adding CONFIG_TOOLS_xxx Date: Mon, 13 Mar 2023 14:31:32 -0700 Message-Id: <20230313213146.1775650-11-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean CONFIG_IS_ENABLED(FIT_SIGNATURE) will check for CONFIG_TOOLS_FIT_SIGNATURE. So define it now in preparation. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) tools/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index 5d6284e6451..86f1b6b5049 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -162,8 +162,10 @@ ifdef CONFIG_TOOLS_LIBCRYPTO # This affects include/image.h, but including the board config file # is tricky, so manually define this options here. HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE +HOST_EXTRACFLAGS += -DCONFIG_TOOLS_FIT_SIGNATURE=1 HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff HOST_EXTRACFLAGS += -DCONFIG_FIT_CIPHER +HOST_EXTRACFLAGS += -DCONFIG_TOOLS_FIT_CIPHER=1 endif # MXSImage needs LibSSL From patchwork Mon Mar 13 21:31:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756581 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ac/ktajw; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb9134B4Rz1yWs for ; Tue, 14 Mar 2023 08:35:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 216CA860F7; Mon, 13 Mar 2023 22:32:45 +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="ac/ktajw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2123685D62; Mon, 13 Mar 2023 22:32:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 41F5385D68 for ; Mon, 13 Mar 2023 22:32:06 +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-x62e.google.com with SMTP id h8so14462811plf.10 for ; Mon, 13 Mar 2023 14:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743126; 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=l5lhKHDYJfT6f9Nw2MJ7BfMgCSW01N2Qx2juAMmiads=; b=ac/ktajwCq08BsPNmOJMSeTFg+BkAzRDw9w/9KJ7YkCpbfRNbtP5AZkmfZwQOFfU7R IxElrdUqKFssoP2z6NMHzOTv+tMYMAy/En6B5CEa17Jz7T9WsJ0daExkrpPu9G4WBPKc DL0yulZiujEHRMx0GoT9GvhbvzSFGaQUeAmgQNDVIBZ8KU8+t+vJ2o0hRx5KMmNxwfjq 4ugb/3Hg5pB/Q/xnhgCCVzFODSqjS/yqLuwn9CVedMj6yyZIU8l17rcJrIH18CDq3UjG MP7OSNQ1tsTe6+4Naao0knPRe5TpcFOajfH1P3eKErRXQXflcsqzayTJB7QOHV97Ol6H QQcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743126; 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=l5lhKHDYJfT6f9Nw2MJ7BfMgCSW01N2Qx2juAMmiads=; b=dQNqDygtrwA07qSSkQ+OK+gdnF1MnGamcz08NLU0wpZV94bxI6Ou+P+ZoKwLkWEU8x gI5kJWbCyuthduUiN9XWqNPNvZ4mYxukmbL6OgWYbepX3vr3JidPM1IPVsoS3ZXXRkP3 PdqfRh/CtUjoI5Jcs8R09UWt6DqEv0hViFYl7qy/NCHLrmcGrS62qk6ERH7yeoVb1QlZ bTVoWs8bm5HE/BDEmht53KyxQ87KlTMmbCyS59i9ulIUgwmnP3FfvT92KNVfRkXVLWOp runq5YmTLkLkjOnWb3AGN+AsjIfl5My1wC0p6PXr/eXsOZ9ypSxHbXm9XyycUsC4UArX ny9Q== X-Gm-Message-State: AO0yUKVnmfFj38ARQcW2/n8YYYyZsG/7MY8Z4LKgxIplu5C+jOYvc2d9 ZL5zQ2+m+odWavt3/FZVtDg= X-Google-Smtp-Source: AK7set8UeA4l23zAg8xO3kbHfkm8swVFK3VzhMrnKXOHauyLsw4+B8U3mSR/yM/N/XA6nav4/NHa2Q== X-Received: by 2002:a05:6a21:33a2:b0:cd:97f3:25e1 with SMTP id yy34-20020a056a2133a200b000cd97f325e1mr46707172pzb.51.1678743125817; Mon, 13 Mar 2023 14:32:05 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:05 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Bin Meng Subject: [PATCH v3 11/23] x86: cpu: qemu: qemu: remove SPL use with CONFIG_IS_ENABLED Date: Mon, 13 Mar 2023 14:31:33 -0700 Message-Id: <20230313213146.1775650-12-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) would check for CONFIG_SPL_SPL_X86_32BIT_INIT for SPL builds Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) arch/x86/cpu/qemu/qemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index e54082df7f9..274978c023b 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -97,7 +97,7 @@ static void qemu_chipset_init(void) } } -#if !CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) +#if CONFIG_IS_ENABLED(X86_32BIT_INIT) int arch_cpu_init(void) { post_code(POST_CPU_INIT); From patchwork Mon Mar 13 21:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756582 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lufNPWt6; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb91H6jn6z1yWr for ; Tue, 14 Mar 2023 08:35:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F9CE8616E; Mon, 13 Mar 2023 22:32:47 +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="lufNPWt6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9713885966; Mon, 13 Mar 2023 22:32:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 99628860F7 for ; Mon, 13 Mar 2023 22:32:08 +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-pf1-x432.google.com with SMTP id c4so8559778pfl.0 for ; Mon, 13 Mar 2023 14:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743127; 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=jKWc9qqFpw7GOwtvupRDsKDR/CRE+5iQgnkKIkBYeGo=; b=lufNPWt6Qyv58By/pJHLxgcgSq+WThyq0E368HwIx1+kfL2mLM0lUch5YLuSEIaQVl 2jpuilGH78/VW1oEsreUj2MgNdxS1hC9ofCsYlF8Zop4nR9ObIEtw4g8x6ogM+b0vhvp OtG0KW2w9KvExDfCu2CiFw+re6b9v2klrNaS39lKKyn2Rp/IAA0a5hHLtojC5WiaAEhD 7tnOss60+1tCcvOwUX7B48RHFnErE1JSLQ0l3CJMBVgPWWMCUKQ++BWiVIYaaRuBuqd/ oQ8w0HfLtB69oYDq9W71Ovuv+Dg4yx/cxOaWgqyyy3c4roFXzLlYWwIuFG4qREVUalF/ E/FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743127; 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=jKWc9qqFpw7GOwtvupRDsKDR/CRE+5iQgnkKIkBYeGo=; b=y5w8gaio6Dbl8NE/jejdUR+0O48SiB2bOZKS+gAd9g3oQ0hrACOl2jh3PwlWLAvwvk KHC/jW+ELCRFrxpV2HQexZy2gUgYmyC26Tv5Ur8fAF78hqTqv0A3hBUcM2yaZnArIjTT v6h7RvU0rkg2Kc7d3krJyDIfFyA/qh4Az/Aq/nXNZSQf3bcSdXBqO2PCU+54jGX9TrYN RB4tX2DxwG+J2uw9gb3bFQK9K7kxOZgmiIH6k3kKX+CW5v1H6raVButY0Ju2Phw9Nnpk UHRRNhUKm8zmj6khglWm4MJL9p6pq+43IXcnwWQTLIsGV95LCf02Nql6f3Hw0WNwL8Sm JWpQ== X-Gm-Message-State: AO0yUKX1Wrv0D8pX+UROUakgPY/rhgNDIXvoeDMx/+cdm5rIQ6S/wq3I cm0wgyW7ejvG2MaHsQTnPr0= X-Google-Smtp-Source: AK7set89rr3/hdKPcJbUBFBx++fxHYE4jTUvaafAJ3r51Jzi9C60Da8JlP9+2lyNCj0CHkZV+2c4cA== X-Received: by 2002:aa7:9496:0:b0:623:7b8c:a913 with SMTP id z22-20020aa79496000000b006237b8ca913mr4501450pfk.17.1678743126934; Mon, 13 Mar 2023 14:32:06 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:06 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Frieder Schrempf , Marek Vasut , "Matwey V. Kornilov" , =?utf-8?q?Pali_Roh=C3=A1r?= , Peter Hoyes Subject: [PATCH v3 12/23] config_distro_bootcmd: remove booting environment variables from SPL environment Date: Mon, 13 Mar 2023 14:31:34 -0700 Message-Id: <20230313213146.1775650-13-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean SPL environments don't need commands that they can never use. Avoid errors with CONFIG_IS_ENABLED conversions by skipping them now. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) include/config_distro_bootcmd.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 9d2a225e7eb..2a136b96a6d 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -35,11 +35,15 @@ #devtypel "_boot=" \ BOOTENV_SHARED_BLKDEV_BODY(devtypel) +#define BOOTENV_DEV_BLKDEV_NONE(devtypeu, devtypel, instance) + #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \ "bootcmd_" #devtypel #instance "=" \ "devnum=" #instance "; " \ "run " #devtypel "_boot\0" +#define BOOTENV_DEV_NAME_BLKDEV_NONE(devtypeu, devtypel, instance) + #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \ #devtypel #instance " " @@ -59,6 +63,10 @@ #define BOOTENV_SHARED_MMC BOOTENV_SHARED_BLKDEV(mmc) #define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_NAME_MMC BOOTENV_DEV_NAME_BLKDEV +#elif defined(CONFIG_SPL_BUILD) +#define BOOTENV_SHARED_MMC +#define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV_NONE +#define BOOTENV_DEV_NAME_MMC BOOTENV_DEV_NAME_BLKDEV_NONE #else #define BOOTENV_SHARED_MMC #define BOOTENV_DEV_MMC \ @@ -190,6 +198,10 @@ #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata) #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV +#elif defined(CONFIG_SPL_BUILD) +#define BOOTENV_SHARED_SATA +#define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV_NONE +#define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV_NONE #else #define BOOTENV_SHARED_SATA #define BOOTENV_DEV_SATA \ @@ -293,6 +305,11 @@ BOOTENV_SHARED_BLKDEV_BODY(usb) #define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV +#elif defined(CONFIG_SPL_BUILD) +#define BOOTENV_RUN_NET_USB_START +#define BOOTENV_SHARED_USB +#define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV_NONE +#define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV_NONE #else #define BOOTENV_RUN_NET_USB_START #define BOOTENV_SHARED_USB @@ -395,6 +412,9 @@ "\0" #define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \ "dhcp " +#elif defined(CONFIG_SPL_BUILD) +#define BOOTENV_DEV_DHCP BOOTENV_DEV_BLKDEV_NONE +#define BOOTENV_DEV_NAME_DHCP BOOTENV_DEV_NAME_BLKDEV_NONE #else #define BOOTENV_DEV_DHCP \ BOOT_TARGET_DEVICES_references_DHCP_without_CONFIG_CMD_DHCP @@ -413,6 +433,9 @@ "fi\0" #define BOOTENV_DEV_NAME_PXE(devtypeu, devtypel, instance) \ "pxe " +#elif defined(CONFIG_SPL_BUILD) +#define BOOTENV_DEV_PXE BOOTENV_DEV_BLKDEV_NONE +#define BOOTENV_DEV_NAME_PXE BOOTENV_DEV_NAME_BLKDEV_NONE #else #define BOOTENV_DEV_PXE \ BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE From patchwork Mon Mar 13 21:31:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756583 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=FhCrQu8E; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb91V4sb5z1yWr for ; Tue, 14 Mar 2023 08:35:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 901B386160; Mon, 13 Mar 2023 22:32:50 +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="FhCrQu8E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AFE3585D68; Mon, 13 Mar 2023 22:32:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (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 16FEA86138 for ; Mon, 13 Mar 2023 22:32:10 +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-pf1-x42d.google.com with SMTP id n16so2957132pfu.11 for ; Mon, 13 Mar 2023 14:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743128; 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=W4LvJi+SSXKUK2ku4W/K01aUABUPnqWUp7hLBFPrO+0=; b=FhCrQu8EZK2up7RPmY4J+nVZRrElTWEQgJWZL19JyAg5gWuNlHPM3ZWO2my0zRWGO6 k+kRY33V5FBSp8RrqAD2uAbnFVrFvz9adjvcHWe3b4S8+zRyyf/8Vdnx+aLieq8fZ944 Re9qNo9eL8gbW6iiMlzsP4i+leSknpuaicR7PL1GIi14WARINeX7H9J4ZHOVzKGfuc5I 1NbGzQ846gWpaNvmzkpKDEAgHWsuhi0KRwFGr7NHLiQ8RoAGHv078G7FZDyeFrqMIh29 2hVo4VLTmQ2slBaJ4fVHFiLTlYnyZnVAl305HIHvKFNnG3zu2qkqJzd0ayZ0zBdxEeBE I9fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743128; 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=W4LvJi+SSXKUK2ku4W/K01aUABUPnqWUp7hLBFPrO+0=; b=Me8eFG4SOM/PEc237t2xbac1gM3dvhPIol95Jpr/q8z/Jk5yHkyh/xYh12xS/tAc/S wAlQ/UHPuytP2C/7qRvic6iWCrSa2/cEZwPbJBWZBh7ciT/cite1KVC4ysGAPZ5KfCNi c1N1q0xyChf+PJAkAsF3O12ZvAnz86XrzoctorXvkWIDlwK0kiIV4ASQpiCuuH0hQRpt 59ClyEvig7WsaglLZfQOSnAE8j3GIJFObNcvkkzL6vqRckcekCAbicK7YYARV9/JXkVU IgBAmDr7FtpJo8kULXF2aMvGV83GtlXslNnYiIi0JjQ+pdBSTRp5469Ok+fam2V8H5Z9 MuOQ== X-Gm-Message-State: AO0yUKXZHmPasskuIeKLGHPr2J+WluBcKm9y1mGfm4oIfYBcCTqI89fU zs3tG2tm/cZjXlr3yo6NAyU= X-Google-Smtp-Source: AK7set/vOZtAcvQRHCiUcQ3zBP0SFOlmg0zlIAcIAFcZm201JQtcjqz8Y2yIqFCOS34FDa7KuNpr3A== X-Received: by 2002:aa7:973d:0:b0:623:60d4:91cf with SMTP id k29-20020aa7973d000000b0062360d491cfmr5006414pfg.18.1678743127963; Mon, 13 Mar 2023 14:32:07 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:07 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v3 13/23] ofnode: fdt_support definitions needed if OF_CONTROL is enabled Date: Mon, 13 Mar 2023 14:31:35 -0700 Message-Id: <20230313213146.1775650-14-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean With the use of CONFIG_IS_ENABLED in code, instead of at the preprocessor level, these defines are still needed if OF_CONTROL is enabled. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) include/fdt_support.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fdt_support.h b/include/fdt_support.h index 5638bd4f165..eeb83e6251d 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -7,7 +7,8 @@ #ifndef __FDT_SUPPORT_H #define __FDT_SUPPORT_H -#if defined(CONFIG_OF_LIBFDT) && !defined(USE_HOSTCC) +#if (defined(CONFIG_OF_LIBFDT) || defined(CONFIG_OF_CONTROL)) && \ + !defined(USE_HOSTCC) #include #include From patchwork Mon Mar 13 21:31:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756586 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qZRmncI+; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb91v6kYtz1yWr for ; Tue, 14 Mar 2023 08:35:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0F9C86185; Mon, 13 Mar 2023 22:32:55 +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="qZRmncI+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4247385982; Mon, 13 Mar 2023 22:32:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 7851586147 for ; Mon, 13 Mar 2023 22:32:10 +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-pj1-x102d.google.com with SMTP id f6-20020a17090ac28600b0023b9bf9eb63so4807214pjt.5 for ; Mon, 13 Mar 2023 14:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743129; 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=udnCJxfKMgTIlsmTbLo0qPLSxqJYu9FfdV6HSIB3/sk=; b=qZRmncI+UjNpWIZBAiwi1aEJ7aN6TnQzjJcrXBde+JpYytMiK25ydnEPFbk2umyWau V+Dw28Duk1MMCoNixRaCwttqJ4BayCG6GZEZ8GMU0fwE3difVQBNsZ34nEvBB9pKHBai eoJ1oX8dJwQs+LOXgB3mMkSI4vuw8YpFKpnrkvxKnvPZZ5RyeoBEFXGeIKvIDMR6UDI7 meEqoIKey6DxVCX1UaTSOJtcxLFXECJFm1lcqcGZFdt9S+lqHewFy2/sdK8rkz18GydV 6BpflAegf6GIDHRo+GnkPfQrEakc8VwRVCs3H46nHicFKfq3j8PIlj3weNP8OfWZj82K 6iwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743129; 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=udnCJxfKMgTIlsmTbLo0qPLSxqJYu9FfdV6HSIB3/sk=; b=V8uaES5pFQxA3I3SXb0XlOT/jkvh6fazkRw2Wit1SoUrXiNlwwYYR1unuimq6fv6JX mE1ckTgr1n16S1NZoiO5hr/b0YQweUKzPAD3Ey4nCC+8ZNZfVnUJLVntB/UVVBZpFDL9 tiDgWr94dT8hHUeOG8sWOuZsTt/LGZnQRbiGNgR2lwj7Ewq97XDPUt5U8h7hk77+EckQ DqiR7NPReJu+WWhRsVR62rk73nHhULQIIZwpGxjIwI5krU2bhFksSrhhOagCIgKHoRcx 71DznfKB/56gRkfP9sz4xnXY8l+kvlrTIhhL5LX0bFk5ANRoaJhXYdW0IpqX8SATnjmI GIug== X-Gm-Message-State: AO0yUKV8gZZiVWu/M2hn5RDO90fggsFJo7hT2h2vze9mtO7+hBMDTt2o YEhbOYD99+0tFiSaa3etSCOEJ5S6w1o= X-Google-Smtp-Source: AK7set/44h0fNtl0fiCj82wNahy9Xnve00nc5iPHFG2wE19FYdf26gHt//eHO++k5I7uFOhsHhfsjQ== X-Received: by 2002:a05:6a20:9143:b0:d3:f0af:4707 with SMTP id x3-20020a056a20914300b000d3f0af4707mr5348648pzc.20.1678743128919; Mon, 13 Mar 2023 14:32:08 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:08 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v3 14/23] fdt_support: always define fdt_fixup_mtdparts Date: Mon, 13 Mar 2023 14:31:36 -0700 Message-Id: <20230313213146.1775650-15-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean SPL code wants fdt_fixup_mtdparts defined as a NOP when the function isn't linked in. Prepare for ifdef CONFIG_OF_LIBFDT being converted to if CONFIG_IS_ENABLED(OF_LIBFDT) Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) include/fdt_support.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/include/fdt_support.h b/include/fdt_support.h index eeb83e6251d..94497d755a3 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -245,16 +245,6 @@ int fdt_increase_size(void *fdt, int add_len); int fdt_delete_disabled_nodes(void *blob); struct node_info; -#if defined(CONFIG_FDT_FIXUP_PARTITIONS) -void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info, - int node_info_size); -#else -static inline void fdt_fixup_mtdparts(void *fdt, - const struct node_info *node_info, - int node_info_size) -{ -} -#endif void fdt_del_node_and_alias(void *blob, const char *alias); @@ -412,6 +402,19 @@ int fdt_get_cells_len(const void *blob, char *nr_cells_name); #endif /* ifdef CONFIG_OF_LIBFDT */ +#if CONFIG_IS_ENABLED(OF_LIBFDT) && defined(CONFIG_FDT_FIXUP_PARTITIONS) +struct node_info; +void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info, + int node_info_size); +#else +struct node_info; +static inline void fdt_fixup_mtdparts(void *fdt, + const struct node_info *node_info, + int node_info_size) +{ +} +#endif + #ifdef USE_HOSTCC int fdtdec_get_int(const void *blob, int node, const char *prop_name, int default_val); From patchwork Mon Mar 13 21:31:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756584 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=eJIK0UW+; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb91j2JPmz1yWr for ; Tue, 14 Mar 2023 08:35:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB13986189; Mon, 13 Mar 2023 22:32:52 +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="eJIK0UW+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0909585D6A; Mon, 13 Mar 2023 22:32:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 7DAEE8614E for ; Mon, 13 Mar 2023 22:32:10 +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-pj1-x102d.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so3551910pjz.1 for ; Mon, 13 Mar 2023 14:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743130; 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=zqUkkJkvLdH5l9C9ID2Kf1bROpV0xBOkHPbd3Wa0IOs=; b=eJIK0UW+zskmBYPDECheJJV9SMz0/rJWxqBnzbkCoQAFGYOku0q7zsClg/T4fx2cuW zfOwuYKfTLynYP+IjQET2MHjMLzvrwINBM697n3pk66fA9/mbmVVWzdKPufSRy+xPOsi 2nbsufZ25MgPG9LiWA48wtLOQTYGdHWsD8uIWeUaN5d/uyWvLvTzJ4tXXuEBknCn2JaN hfYXHrbxrvvYy3IqGXru5BXRvvryACxDmH5RbSNkKCwaiwvPBwI1ussAhw7Q4gMFYPsU xaBsg19UKfFvCfCkcLVt+cuDN++CxxeVUuLkm+T0Wyuyq77NwCEuiLtkD+8buNHCnsIi WEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743130; 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=zqUkkJkvLdH5l9C9ID2Kf1bROpV0xBOkHPbd3Wa0IOs=; b=1k75gXB7gg7vpBmbNmj+PabngWUTbQ1/4E3X/dHMCmj76wryQ3+tBlIKsdrVbwg9CQ tDV0FF+GvzET/SvkK55sAsAkduxIekTNA9GjSerngAWfjJzyd07sOVenpDICxsxGwVFv kqYql3M9DUQH15E0SOl1XmvPcuBaDcx1NxpVzrw1XIzzi2i+8MlqPBxgeVJPRn/W6MMm 5105uhQ5SVs7oy8yMnRn79Vwt+8xzg0qvh7KlhZb93ZPc1PRFHiAATjE7jSY0ZiJ0gsX abtQFnIMr7afjF6erqc57n5RKUTgrJ+aKL5Vah1gW0OEQiHfNaOe1MkzqMbeS6Bdazur fjDg== X-Gm-Message-State: AO0yUKUV9qd1mbT797kZORHx7tgtUBpoChvbvFsu+kmvZUg8hHTfqH5L GY2PeUgROhIIeQKJHZyHMUE= X-Google-Smtp-Source: AK7set+8LJFNYy4ZqoB1NAsYSgmZF1VkS4RzbjymuqTnP4ziv4F/dgZumToGjPlgFhIu3QSMV7olFQ== X-Received: by 2002:a05:6a20:7f8e:b0:d3:6ee5:5a31 with SMTP id d14-20020a056a207f8e00b000d36ee55a31mr10588739pzj.49.1678743129952; Mon, 13 Mar 2023 14:32:09 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:09 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Marek Vasut , Olaf Mandel Subject: [PATCH v3 15/23] m53menlo: define ft_board_setup only if CONFIG_IS_ENABLED(OF_LIBFDT) Date: Mon, 13 Mar 2023 14:31:37 -0700 Message-Id: <20230313213146.1775650-16-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean The function ft_board_setup calls do_fixup_by_path_string which is only available on CONFIG_IS_ENABLED(OF_LIBFDT). This prepares for the conversion. ft_board_setup is only called from image-fdt which is linked by obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) board/menlo/m53menlo/m53menlo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index 14324c7087d..ca3b81c57ff 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -264,6 +264,7 @@ void board_preboot_os(void) gpio_direction_output(IMX_GPIO_NR(6, 0), 0); } +#if CONFIG_IS_ENABLED(OF_LIBFDT) int ft_board_setup(void *blob, struct bd_info *bd) { if (lvds_compat_string) @@ -272,6 +273,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) return 0; } +#endif struct display_info_t const displays[] = { { From patchwork Mon Mar 13 21:31:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756587 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=VPP8uF4f; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb92655pNz1yWr for ; Tue, 14 Mar 2023 08:35:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C581286191; Mon, 13 Mar 2023 22:32:57 +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="VPP8uF4f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A67485982; Mon, 13 Mar 2023 22:32:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (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 8900485DDD for ; Mon, 13 Mar 2023 22:32:12 +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-pg1-x52c.google.com with SMTP id d10so7754541pgt.12 for ; Mon, 13 Mar 2023 14:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743131; 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=7tbIPwEGYRAYLPxTWSokw4yIHRjDYZQyQwJQzRm3Bbc=; b=VPP8uF4fbdcrE/8Vg3G/sFz+JzNlfvg3KTCHAyBd+A9O9Hxyi5eKgrlTz35UOO4hRp TZ1IPgF56TtpfiSs/28Bp4jW7L0n4LgocAwWwBhxXAMqoWudTXJ+zYkOqtlf7pn3ZSa2 M+Hze8olVt5vVxzG+FTnIY1VSq1yoJIrgd8eNeod9ZpVgqL2X9iBO6eItXAO+mJrSFl+ sTRpo5bJ5IPiv6mG6199h9WUVRw9npodqP1sCBoKz62SRUmRKB5X6M7HHNKD1N/BcXFH xL5oq0hxlcXRQKt4hpCr0UKdjH6GIFg1HApmI3vbiwMXCJBs+oYU/p056lJnCef7CLiW ir+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743131; 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=7tbIPwEGYRAYLPxTWSokw4yIHRjDYZQyQwJQzRm3Bbc=; b=h4AExA835hWSCnuHQjsOsfEnecuEi6SHfSkA8vYMQaKk8y3WwDAnJfTeaqvBb6L73b W1AFaoUIvdqyTJqB8T1hxql78qJRj9Z1rVT1FGtJepWZihD4BXtBFWTRbf/s86R0FF1k u1csa6GhUmcyEvcvwLskImwrtA+HRXCmT2/MoW+9Ykc38Mkw4AvNrPqhi93qjkx+E4ZO nxPMPfCL9nsYG9kvvoF4MH3iYsxemgcbEyotuFz2pXDcCTu20FRSs2R3Ix6YG7NPx3dM OcPOI6UFH3RUVVlcqU2yMq1v+RER/GV4SY0ZJiuRWtt9UKCy7PnGYQNaAT9fqyOsxVw7 1wDg== X-Gm-Message-State: AO0yUKVXTt7LpJnWIn+RzEZbhM1IQkgYGEvptLNQlHDjWyR46PATmzQd COLA75Dr9X5MYV9L88YMWtE= X-Google-Smtp-Source: AK7set/GRO4hma1oa3KnVJOWPnXCW3BoS8SNlsOvV0RVWoBmNzqBI684POLNZqLKM9Z2k/ysbbd8JQ== X-Received: by 2002:a62:1803:0:b0:623:dfdd:f7eb with SMTP id 3-20020a621803000000b00623dfddf7ebmr5367661pfy.12.1678743130909; Mon, 13 Mar 2023 14:32:10 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:10 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Fabio Estevam Subject: [PATCH v3 16/23] freescale: common: pfuze: define pfuze_mode_init only if defined(CONFIG_DM_PMIC) Date: Mon, 13 Mar 2023 14:31:38 -0700 Message-Id: <20230313213146.1775650-17-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean pfuze_mode_init calls pmic_reg_read which is only available from obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o Prepare for conversion of defined(CONFIG_DM_PMIC) to CONFIG_IS_ENABLED(DM_PMIC). Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) board/freescale/common/pfuze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c index 6dca22960bf..a9288820b2e 100644 --- a/board/freescale/common/pfuze.c +++ b/board/freescale/common/pfuze.c @@ -91,7 +91,7 @@ struct pmic *pfuze_common_init(unsigned char i2cbus) return p; } -#else +#elif defined(CONFIG_DM_PMIC) int pfuze_mode_init(struct udevice *dev, u32 mode) { unsigned char offset, i, switch_num; From patchwork Mon Mar 13 21:31:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756588 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=SGqVTh7s; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb92K3fgwz1yWr for ; Tue, 14 Mar 2023 08:36:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E1A08613C; Mon, 13 Mar 2023 22:32:59 +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="SGqVTh7s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 40F2085D74; Mon, 13 Mar 2023 22:32:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 A804C86153 for ; Mon, 13 Mar 2023 22:32:13 +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-pg1-x52d.google.com with SMTP id h31so7775539pgl.6 for ; Mon, 13 Mar 2023 14:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743132; 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=fuerZTHyaqERmyUKjpfLjPr4X/6iWRaiXq1zs09E9u0=; b=SGqVTh7sCBgl6O/8DAX9Iy1EuczibNReYQIoa+Ye5jQEI19EtZUjD8Kzmzl4SicgbN BQjeszRd8XJb7rGsSp5vMHwo68/i0T8dVRoLEr46Y46MpDg8bYqBurt1WQSyCJKY5tSD kKDH6M1pjlDlDfzFa5I6gQ3u0X0foI99PmFmv6xKkKaWAByb1oTJRqOPAknDPrOyzTX0 NjeQH3fy1VCP/GsecuDcdQ+acBgmlaXQ3Yg/j1CjAGblgu716vSu+3x2+Hh99ImgEnD/ GnWQXNXsKoK4EI3V/9icos7vbH1hhQ4Ro8XHpVO3GJPVA+K2/30sw6odPMUP/BpZaxoI wNbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743132; 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=fuerZTHyaqERmyUKjpfLjPr4X/6iWRaiXq1zs09E9u0=; b=cTtm+wX79seWUHY7DuMwIXBqCslak7gttRWIGiXGZveN1YDgoeyuL/spuYfzoflGxB zyuwIkZHDm92Izdj53anbok5wmpZMvfPgR+mAFdfD+WWTWWU/wq8rUUcYhLH5Dj6T/DE c+w3tiBXQZXFij7Td7HvxNz5IKadLXD64r1QUOLUxq4HUE+GKYaBRDw4mDgzPtx7xvus ea1tTYJ7aC/SyvUWOBsugEpvxxweQKl3N6eIaheE2CXnPnGX76KAkqdvj3qYAJoPFZZf mS51W1WmSGnEav3ex/oprn550XBieSrnLeHasKN47lNxpsIZCP8AGm/zDkxOimOdUShb G9vw== X-Gm-Message-State: AO0yUKWUooo57jDpXEODb/9xVR5hLKAP8sizcvPt6LY+eZKNfPBYXKW1 5Yb8Zhi5OWSrRdT1nBL/DPE= X-Google-Smtp-Source: AK7set9xVHcBaQIVCdGFnumbNQDdn8oALDdLeMAE5AX4ixikC4OiIDxnkEhzaIjy7iD6x4hWeDIzZA== X-Received: by 2002:a62:3042:0:b0:5a8:31a1:2f05 with SMTP id w63-20020a623042000000b005a831a12f05mr29524489pfw.5.1678743131892; Mon, 13 Mar 2023 14:32:11 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:11 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Andre Przywara , Bin Meng Subject: [PATCH v3 17/23] ns16550: match when to define bdf with uart code Date: Mon, 13 Mar 2023 14:31:39 -0700 Message-Id: <20230313213146.1775650-18-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean When switching defined(CONFIG_PCI) to CONFIG_IS_ENABLED(PCI) bdf is no longer accessible. So add preprocessor protection to avoid access. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - changed condition of when to include field bdf - added protection to another instance of bdf in uart.c - Thanks to Simon for getting this corrected arch/x86/cpu/apollolake/uart.c | 4 ++++ include/ns16550.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c index a9362436000..878aa48ed76 100644 --- a/arch/x86/cpu/apollolake/uart.c +++ b/arch/x86/cpu/apollolake/uart.c @@ -79,10 +79,12 @@ void apl_uart_init(pci_dev_t bdf, ulong base) static int apl_ns16550_probe(struct udevice *dev) { +#if IS_ENABLED_NOCHECK(CONFIG_PCI) && defined(CONFIG_SPL_BUILD) struct apl_ns16550_plat *plat = dev_get_plat(dev); if (!CONFIG_IS_ENABLED(PCI)) apl_uart_init(plat->ns16550.bdf, plat->ns16550.base); +#endif return ns16550_serial_probe(dev); } @@ -110,7 +112,9 @@ static int apl_ns16550_of_to_plat(struct udevice *dev) ns.reg_offset = 0; ns.clock = dtplat->clock_frequency; ns.fcr = UART_FCR_DEFVAL; +#if IS_ENABLED_NOCHECK(CONFIG_PCI) && defined(CONFIG_SPL_BUILD) ns.bdf = pci_ofplat_get_devfn(dtplat->reg[0]); +#endif memcpy(plat, &ns, sizeof(ns)); #else int ret; diff --git a/include/ns16550.h b/include/ns16550.h index e7e68663d03..41b977b5b26 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -74,7 +74,7 @@ struct ns16550_plat { int clock; u32 fcr; int flags; -#if defined(CONFIG_PCI) && defined(CONFIG_SPL) +#if IS_ENABLED_NOCHECK(CONFIG_PCI) && defined(CONFIG_SPL_BUILD) int bdf; #endif }; From patchwork Mon Mar 13 21:31:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756589 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=qwvg5mQM; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb92X1ZDhz1yWr for ; Tue, 14 Mar 2023 08:36:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 614838619D; Mon, 13 Mar 2023 22:33:01 +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="qwvg5mQM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35B578598A; Mon, 13 Mar 2023 22:32:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 F0C2C85DC9 for ; Mon, 13 Mar 2023 22:32:14 +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-pg1-x529.google.com with SMTP id x37so3328411pga.1 for ; Mon, 13 Mar 2023 14:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743133; 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=eh8gzVWWXrGRj5DPIP/jrloZGIM/Sx6gOp6KQ072buc=; b=qwvg5mQMctjsi+7EuJ0kVK2P8tJG6Dn3NuUN9tFeoewnRWSSBoZBoUy8Mjon1jaGEN Axi0rlnlRm9PPafCO/kUm/zSLoZ2JCAbN338DBaJrO/p7QZRyxlOxporVTbDhrinApvk ql2KMVoJ135d+r2LbVAc3UAsDFiKIDk7+fDsw83106opIKMuBlX4K+kRspvn86LrGK+s hh5TTTlnLj+wBCJo3ock62WvRJKKHbdJMTHBIlCTul6IDjIUfhE6zHdqlumuDHJ/dG6w gjh00klCyawNXFMaZfH1U2pOU+PNUvgIto5kpqkcxXAr9p4fm2BMvuKBCZFhZkcQNEWl sx1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743133; 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=eh8gzVWWXrGRj5DPIP/jrloZGIM/Sx6gOp6KQ072buc=; b=dpUOpaAFc6hpXnm1PvdajsoKyChZVlAZe7F48HqQxlMtC99aFt00AxmunCbMu1z1XU WU06YD5Da2yHMAqZvq1aLat6XTFY5gudi9hpkc7/gWovaUH/FPX/zu52IBbT+Zj2i3Ga HDL1NpGaOEuhtohJOyiXDc1HtmZqCOfj+0NKEjvZwlGOB7QXXs5EH2qh73Mwr8mkJo4m VreT8Inpjl7r503KxeT2JHwsU0WL36y97Xw6IQL2w0fhYHi6rb+2ZipyPawuT96E0NiS he1IphsLGGaU/H3jnL5w0oVv2j39k1u63DhepaaLxWbeSClEyr91Yi6T5woMBZHr2dQf Iopw== X-Gm-Message-State: AO0yUKVPs13/fKhkthGJH9IZsKtIu+lyiB9Bjs9tB4kHionb+vR4VgaN URsjJGQmxEwPWohWGWCtG0w= X-Google-Smtp-Source: AK7set+4xjOGCku1OUXeAWDrHlPNMsTVoiPwROcu2gsZcMhBfKKdUcEtguilGa5fuHsRuDPaLu3TSw== X-Received: by 2002:aa7:9615:0:b0:625:4189:fcce with SMTP id q21-20020aa79615000000b006254189fccemr1949170pfg.23.1678743132893; Mon, 13 Mar 2023 14:32:12 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:12 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Baruch Siach , Fabio Estevam Subject: [PATCH v3 18/23] solidrun: mx6cuboxi: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATA Date: Mon, 13 Mar 2023 14:31:40 -0700 Message-Id: <20230313213146.1775650-19-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Prepare for linking setup_sata only when CONFIG_SATA/CONFIG_SPL_SATA is defined. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- Changes in v3: - Rebase on Simon's s/CMD_SATA/SATA/ change - commit message updated Changes in v2: - use normal if, not preprocessor board/solidrun/mx6cuboxi/mx6cuboxi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index cb14c2f30c9..6fa5cf4d27d 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -275,9 +275,8 @@ int board_early_init_f(void) { setup_iomux_uart(); -#ifdef CONFIG_SATA - setup_sata(); -#endif + if (CONFIG_IS_ENABLED(SATA)) + setup_sata(); setup_fec(); return 0; From patchwork Mon Mar 13 21:31:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756590 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=LbQvDBy3; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb92l5GVNz1yWr for ; Tue, 14 Mar 2023 08:36:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E1B9861A3; Mon, 13 Mar 2023 22:33:04 +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="LbQvDBy3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C75185E3E; Mon, 13 Mar 2023 22:32:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 5B3C385DE8 for ; Mon, 13 Mar 2023 22:32:14 +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-pf1-x42b.google.com with SMTP id bd34so8532799pfb.3 for ; Mon, 13 Mar 2023 14:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743134; 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=RF+Y2Eeif8s9DJ77rpG+/B+SABp/8Q7x3yD5iof+Nk0=; b=LbQvDBy3FF/5zRcUz1kBpvdmU3hXmDW+oo1LAzLme2dLm5D4VEIGSyrxx/gW1w7ANe XZFgpjBxViAkGmI+NObMKGcS+0aWYtih2a25tYS1NPs4n5lL28NJvbUHFG9ajDYWCZd2 Wq6mCEMqGlmiRRHCNVQRY3iqnz2O82CU85tybwW14uUo3JNdH0gMdyYoU5Rw2ouge0KV yx3aHUBhRQmoAVuBoVi9ZsKtMwEbPuwrT/LjfPdOtsNYM74VC8J3OaA9q1QOKZ/MoHjq fNnAXYf8B/YaaT4+41n/nb/rSFznBKe4APPn9svozmytUuledtXpm89tHsx8oasXhXQz J/5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743134; 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=RF+Y2Eeif8s9DJ77rpG+/B+SABp/8Q7x3yD5iof+Nk0=; b=3NO/VH20YPB17Q5XiP9V/adxbNoSZXt+OZNnEqsvFkAlIpfaFsD4PJmh9Qc+bwMgAI pt6GMWd4S5CX89Y58jkIYoVnhDKP6QB9Y0OvqkZ2dj92BOdMUjVBYvItqUhYscdsYTzC 3+fHwlv1nNvWBUeQ14wBtQus24vNOEjUi0q3YdKyl36o58KYqTBycGWvPcsrpMKtht/R K/xcY1uHcHk/bI7h4XaQaf2JKsw3zb1oyy91tTO4ttTe411XSgK+WunkRaFolDvQ44Lc rEGUFsTH2p0IFKYRLmaic4F4BgMXb427qjH7hyUm1BNjlZ+OQPTyBzDdJ1WkI2Ty6UbS pB+w== X-Gm-Message-State: AO0yUKV2NENPYh/0vaLZpuZIpZfXAKqQklZxSSI3TQk2SLK+qYqJO3mo dLfpxY2FEzIGjse8UDMqsY4= X-Google-Smtp-Source: AK7set97nWL2M+76tLT4jebDmGz/3NADZW3uWkRCuGgBStQWWLCQDgNX32YXaEDoH1ReGV2jDVWBEQ== X-Received: by 2002:aa7:980c:0:b0:5dc:2064:f7c4 with SMTP id e12-20020aa7980c000000b005dc2064f7c4mr33021909pfl.10.1678743133889; Mon, 13 Mar 2023 14:32:13 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:13 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Fabio Estevam Subject: [PATCH v3 19/23] wandboard: use CONFIG_IS_ENABLED(SATA) instead of ifdef CONFIG_SATA Date: Mon, 13 Mar 2023 14:31:41 -0700 Message-Id: <20230313213146.1775650-20-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Prepare for linking setup_sata only when CONFIG_SATA/CONFIG_SPL_SATA is defined. Signed-off-by: Troy Kisky --- (no changes since v2) Changes in v2: - new in series board/wandboard/wandboard.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index da995dd0f58..48914450a29 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -352,9 +352,8 @@ static void setup_display(void) int board_early_init_f(void) { setup_iomux_uart(); -#ifdef CONFIG_SATA - setup_sata(); -#endif + if (CONFIG_IS_ENABLED(SATA)) + setup_sata(); return 0; } From patchwork Mon Mar 13 21:31:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756594 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=SizC02m6; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb93k44j0z1yWr for ; Tue, 14 Mar 2023 08:37:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9408585B1B; Mon, 13 Mar 2023 22:37:18 +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="SizC02m6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCCC986147; Mon, 13 Mar 2023 22:37:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 7689986146 for ; Mon, 13 Mar 2023 22:32:15 +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-pg1-x52d.google.com with SMTP id h31so7775590pgl.6 for ; Mon, 13 Mar 2023 14:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743135; 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=dFd5vv2ZUQiX1Mf7OSTtquXAEDouJHy5OhNnkSpCzl8=; b=SizC02m6cPpXVF0/tdyiSy7nwCLHF65WUNQlhruxtUzGx5vW0Ubqizh8wfWmF7roWs 27EGnppCTi696+CJZMcwKkWdmGTNPqRgmyeUuskaY0MuktmXkIhpVlaNcl06ktlzsaL1 2QjqlEzhLJ2ab76Tk92k9z2BTpse2QxxsYXmOLG3Ot7Bo7PplBRrEnMo0phdEGDp4/5n e0wlTrroXITGh4WsAG5nTf+3JUJfxyVN0gRSZtpwQtaABadKYmfkTrsTBJZCQFCe7Xok /7d+GLd1TxVUgbBUZ74C7dU39vNvxOQhPlybHQoft4rc20o604ko+VyiVyB1R93R5Wzb MHyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743135; 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=dFd5vv2ZUQiX1Mf7OSTtquXAEDouJHy5OhNnkSpCzl8=; b=D+FHA8pUIA8iQpf4KLBda6J1vf/XYFHI1WDP+tdTlOtgQZ8jRPJoaHXhDb8ftE9jcY kyLD1plpgYtIxyrjYOvkK+2P5OQ58vDXGNu6a2WFaTCPVyjQfiC2DV4DBmUCkrPsixpA 56O/uV01NH7gD9u82kj0UpjImVWrmh9mAS+E+/8Ss+MxO9kJR2CkvAAe/he0Rm05Ofa7 GdYZ7Oz0eB1V0NV+XiTk/y2JWmN/oX7Mz668RqmQH4PgHoTNQR8cbAtx3ZCCim5Njmsc zVahaisBXrknNwqxsmK1K6PDxLoAzrHuhvP/+tuiCWCd9BfNZ7JL6X1M6MYQZx9/uIcp /Ekw== X-Gm-Message-State: AO0yUKUVeZM1VCJm+3AkKUQqqzbc7k5TUoboEJttzhql4vrSF/JB8PFr SsgNJNHbYMAmticU0+GzQcY= X-Google-Smtp-Source: AK7set8XB6uyz0tfdoYZiXYeT6D+Ey5WDO+7KQ798qObvwp+MaugT9y/otnazOu07d29AItMih/8HQ== X-Received: by 2002:a62:8441:0:b0:622:3621:b2a8 with SMTP id k62-20020a628441000000b006223621b2a8mr10149867pfd.17.1678743134993; Mon, 13 Mar 2023 14:32:14 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:14 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Fabio Estevam , "NXP i.MX U-Boot Team" , Stefano Babic Subject: [PATCH v3 20/23] arm: mach-imx: use CONFIG_$(SPL_)SATA instead of CONFIG_SATA Date: Mon, 13 Mar 2023 14:31:42 -0700 Message-Id: <20230313213146.1775650-21-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean This avoid an error with enable_sata_clock when defined(CONFIG_SATA) is changed to CONFIG_IS_ENABLED(SATA). Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) arch/arm/mach-imx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 4dfc60eedc4..50f26975eac 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -54,7 +54,7 @@ obj-$(CONFIG_IMX_RDC) += rdc-sema.o ifneq ($(CONFIG_SPL_BUILD),y) obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o endif -obj-$(CONFIG_SATA) += sata.o +obj-$(CONFIG_$(SPL_)SATA) += sata.o obj-$(CONFIG_IMX_HAB) += hab.o obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o endif From patchwork Mon Mar 13 21:31:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756592 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=AQZB6M0H; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb93G4079z1yWr for ; Tue, 14 Mar 2023 08:36:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A9E35861B0; Mon, 13 Mar 2023 22:33:16 +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="AQZB6M0H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0F7485E3E; Mon, 13 Mar 2023 22:32:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 9B25D86160 for ; Mon, 13 Mar 2023 22:32:16 +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-pj1-x102a.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so5636300pjb.0 for ; Mon, 13 Mar 2023 14:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743136; 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=+kW/8sHDO9k2GgJQV5YSUgnhQtPtA1pVFx/sg5qeqrM=; b=AQZB6M0H/XlKJEQwA9iVUBQyD5r56iKOI0eyBgsnhkFw9zdj8A8am4/1yDAd5bl7BB RGo0QL0pJM/yE3MOAbel126F6tz8UoEelB4TrbwND9d9eT+oh80Avjm3hFqETG6Bki4H AK37r9aKVHCoQfkvkayi+x8X+Tnfm0RwW0+C/86/Wa2DAd8rObcHnyZf4AyGmLysox4U Q+YFOg0pzHer0SrJTxytLDbAGbet27szz+e70fkUfo6jHPfMK12nQF2D3dLcnz0xmvkQ qI5hg+PmSXiOIkzduJcNkrh3YuwBg/WVPY61eDBrH1Fc4PaDekD12EVKuY4PzO0FCur2 ipfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743136; 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=+kW/8sHDO9k2GgJQV5YSUgnhQtPtA1pVFx/sg5qeqrM=; b=3DRTeK19TS0PwAoy5rsOtdXwvy5TcBFlCMsRD9i9H3mTau9FFWgXC918RyvipOj2fI AQaLj1Xa/RiueK6+4OFHAI+6D6HnnVuIYW4owwr0qjgTqb1uYgnIjeWnXVvr0Eb4AGYc MdlDyFZ5ew8CZIIw7G5cv9w3R4Az1ljJ6NuL30FS2Rw5yXgjWJ09Cx5EPHXDoohVTLw5 uDjRKjeX9j2UE4pzrqE7byQiBwbHFuQppOHTTQdXg2K7ZUAcQ7jgny5ahf5C98t5QcOK FgyGprIBqctRSiQyprjyDN0wAvJC1mcHgj6X7M1NG+AwQk1/vlWHrLWL5+YZicjO4btR x/Lg== X-Gm-Message-State: AO0yUKXziL/DK96EB/BJ//JL7iuDuA+19BJfJRrcNm6VDG8/+uKHj1iY 2idxMZB2PBRW+XQ+e7x4PJE= X-Google-Smtp-Source: AK7set87qVLbtbpAz0lORfxN1POzBe8Jao58uLaOVksc6dg9DMK+j2QtKgRXF2V8E80yU55vv2Zj9A== X-Received: by 2002:a05:6a20:8416:b0:b8:499d:7c9b with SMTP id c22-20020a056a20841600b000b8499d7c9bmr43755189pzd.51.1678743136168; Mon, 13 Mar 2023 14:32:16 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:15 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , AKASHI Takahiro , Bin Meng , Heinrich Schuchardt , Rasmus Villemoes , Stefan Roese Subject: [PATCH v3 21/23] x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) Date: Mon, 13 Mar 2023 14:31:43 -0700 Message-Id: <20230313213146.1775650-22-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean This avoids an error when ifdef CONFIG_PCI is changed to if CONFIG_IS_ENABLED(PCI) Signed-off-by: Troy Kisky --- (no changes since v2) Changes in v2: - use an accessor function gd_set_pci_ram_top arch/x86/cpu/i386/cpu.c | 2 +- include/asm-generic/global_data.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index c7f6c5a013e..068670dfc41 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -415,7 +415,7 @@ int cpu_phys_address_size(void) /* Don't allow PCI region 3 to use memory in the 2-4GB memory hole */ static void setup_pci_ram_top(void) { - gd->pci_ram_top = 0x80000000U; + gd_set_pci_ram_top(0x80000000U); } static void setup_mtrr(void) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 987fb66c17a..952e17b2c13 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -560,6 +560,12 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_event_state() NULL #endif +#if CONFIG_IS_ENABLED(PCI) +#define gd_set_pci_ram_top(val) gd->pci_ram_top = val +#else +#define gd_set_pci_ram_top(val) +#endif + /** * enum gd_flags - global data flags * From patchwork Mon Mar 13 21:31:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756591 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=XuhYznfi; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb9314bzgz1yWr for ; Tue, 14 Mar 2023 08:36:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C5D6861A8; Mon, 13 Mar 2023 22:33:13 +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="XuhYznfi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9281F85E71; Mon, 13 Mar 2023 22:32:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 C442485F94 for ; Mon, 13 Mar 2023 22:32:18 +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-pj1-x1030.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so13119418pjp.2 for ; Mon, 13 Mar 2023 14:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743137; 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=UlfhaA++I4RceUBFXMCNj9VKtp5LaO/vsr5NT5IBwwk=; b=XuhYznfiljgFLlHM9ul9duZS0bbKI+YFhYYP/T2hSvxqEW0g3hLhNAWAEclfekJRtt kVpuG2XLBGnjoQ/210UAMKTHJnxp39GWOPTkrBqtqPYvldUqIqRlKyqxYiPPWRxn3GkM JwRdTQqGHWO5SraKTXPtGyAjon+b/cPSyuQRsewz9IWq5yC7YDjOQSSCLBQ/hoRaOEkk SFHSBdB/vcaauHMRAz5n1UBVu34Qzs0rjVQTZA735v/5RVUd9Kgr/mmxDahonpHlz2pZ HxkPKCN6uU8ZlzgUbIxofqKJdA8RYLYeyx3/M5FW7HFYCGYyaVctGMN+zMFJr5XZEKUN bFMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743137; 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=UlfhaA++I4RceUBFXMCNj9VKtp5LaO/vsr5NT5IBwwk=; b=kaAnDJwQHO21jjqFP/zBoO54CSu/8daLqbMVBq0+RrLoADkIXn4f1vsHHIptjGeKtJ /X5HZdMW4B+O98b0IXaA4Aym6AIvyQ2z882aQqK6AH8BhcqSIcvBaUYcidriOee5DHnM nAZoCERAoL/Pj9AtCRIZj2sPzdHh43R2GMJ5kA/hGQJGdzbznqyrsLod6+h4alHBeGZ5 2N7/og5GrciLT3BcAMEOsNGPb07ollI5G7ArlbpJd1dOBD4jyorkcJKt8OZtNGqrI3b7 zU2KwsQ8lOrlyLjMUIxcVVwfAM5kX2UJrkrXwGoiwWFpBMnlS6h7/pDTx5EzJSMxhv8N 5NBA== X-Gm-Message-State: AO0yUKW7KVpx0Y6HeBDZc8i21Yr11svAf3ZCmofbkUir0LcGTrZUgRd2 qYRfdgdCPNyLRINhaGwoogc= X-Google-Smtp-Source: AK7set/MFinG4NuZgw6RbOnhh67hzDgA7a9qjUQf/TvDafvq0fcgffMraK0sZ0DJU/pD8dgElPx+0g== X-Received: by 2002:a05:6a20:258a:b0:c7:8644:a9ff with SMTP id k10-20020a056a20258a00b000c78644a9ffmr33032400pzd.57.1678743137148; Mon, 13 Mar 2023 14:32:17 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:16 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Jaehoon Chung , Lukasz Majewski Subject: [PATCH v3 22/23] power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY) Date: Mon, 13 Mar 2023 14:31:44 -0700 Message-Id: <20230313213146.1775650-23-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean This avoids an error in converting to CONFIG_IS_ENABLED(DM_PMIC). Many boards SPL code needs these definitions to compile, even if the functions are not linked. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) include/power/pmic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/power/pmic.h b/include/power/pmic.h index 70f2709bd0b..636221692d0 100644 --- a/include/power/pmic.h +++ b/include/power/pmic.h @@ -86,7 +86,7 @@ struct pmic { #endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ /* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ -#ifdef CONFIG_DM_PMIC +#if defined(CONFIG_DM_PMIC) || !CONFIG_IS_ENABLED(POWER_LEGACY) /** * U-Boot PMIC Framework * ===================== From patchwork Mon Mar 13 21:31:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1756593 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=YL6zfA+K; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb93V5y9vz1yWr for ; Tue, 14 Mar 2023 08:37:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 56830861B2; Mon, 13 Mar 2023 22:33:20 +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="YL6zfA+K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8F50485966; Mon, 13 Mar 2023 22:32:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (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 AC68785D6A for ; Mon, 13 Mar 2023 22:32:26 +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-pj1-x1032.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so13119468pjp.2 for ; Mon, 13 Mar 2023 14:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743138; 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=kmkG2iKAtwcgh5bWGb11pghWk4bPlmiop3j5MVRZs4E=; b=YL6zfA+KYEw+jXPVMjroZ3V1aXG+3Dih+Y+z6Fnz3wvL7oRAppdlw4rAjXupxrYrlj 9TRhWy8PhQyU3pnC/9j/SiFn/UOZ6nNenTqjmm45T5Sjdoby1XNqehhX4KvtwTUyEjUu NfY+Ko1JHwtGOxlPgYrQYzRbWZPRJgnApNXowAp/6T7t6ZqZVaY3r2JSIl/Iay1ufNW0 +h6tp2kruqzMF2GphZP+hM6ATR62MPrHLbbBjNzAw+WVm0tEzOZSpJ50UpL7VVW0geK0 PKboc6NejX+KX7dsWWPAr8Kpg4KiFqwLfPP90SWLj7y7YVx02cwdUHPm94/ZCz7Rym9m REeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743138; 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=kmkG2iKAtwcgh5bWGb11pghWk4bPlmiop3j5MVRZs4E=; b=iGgr+Ki1XWONLelZqg/rEQ1bAbDdaiGh/2219y9iUWjreZGYA7TkCej5WDwwj9Jfde Tot19mczcJ6WqRja9NgoGK+N81/5nPPV/n+uNdQ7KG+YvkghAs6nS8kJgYaBB70irFFP BEWCU7R4az8ZyaMzMYB2/E7+0pmIdfI88SH2cxLg66h7qzy4jWoxdkYjD/9IK2QrIwAi +ddz624c3+4q3nByz2NwtHtH/B1Ceg6vCesuW1uO18nv6QDyeS1u49cFXZRa7GUVZy0t jOjMi8UpFUj6nCowvLjhEQ84mWIuIHPoeZlf2CripWX1LA4JyiBsrcXTGHtvCvucAHmk KkNg== X-Gm-Message-State: AO0yUKWowD54WTfDYi2OU0R8uP+06LVN8xv5ljLotKCm01TqILVewb2J 8rb2yF3BI3eg3j4yDYzw4ip/9rhAlTA= X-Google-Smtp-Source: AK7set99D9XpTlJCZ2Kx6L3fvLqPf6p2sT4Grv6QY6vJLynAXafMAzIKkyOQbW3BPbaTgR1EPXrsvw== X-Received: by 2002:a05:6a20:6982:b0:cd:ed5c:513 with SMTP id t2-20020a056a20698200b000cded5c0513mr14461905pzk.31.1678743138341; Mon, 13 Mar 2023 14:32:18 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:18 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Heinrich Schuchardt , Joel Stanley , =?utf-8?q?Pali_Roh=C3=A1r?= , Rick Chen Subject: [PATCH v3 23/23] CI: add test/usage_of_is_enabled_check.sh Date: Mon, 13 Mar 2023 14:31:45 -0700 Message-Id: <20230313213146.1775650-24-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Add script usage_of_is_enabled_check to print any configs that use CONFIG_IS_ENABLED instead of IS_ENABLED and vice versa. Add usage_of_is_enabled_commit.sh to generate commits to fix the above issues. You can remove entries from test/usage_of_is_enabled_todo.txt or the entire file and then run test/usage_of_is_enabled_commit.sh to convert to suggested usage of CONFIG_IS_ENABLED/IS_ENABLED or run test/usage_of_is_enabled_check.sh to see which configs are still todo. Signed-off-by: Troy Kisky Reviewed-by: Simon Glass --- (no changes since v1) .azure-pipelines.yml | 11 ++ .gitlab-ci.yml | 5 + test/usage_of_is_enabled_check.sh | 19 +++ test/usage_of_is_enabled_commit.sh | 12 ++ test/usage_of_is_enabled_correct.sh | 50 +++++++ test/usage_of_is_enabled_exempt.txt | 9 ++ test/usage_of_is_enabled_list.sh | 86 +++++++++++ test/usage_of_is_enabled_splcfg.txt | 21 +++ test/usage_of_is_enabled_todo.txt | 213 ++++++++++++++++++++++++++++ 9 files changed, 426 insertions(+) create mode 100755 test/usage_of_is_enabled_check.sh create mode 100755 test/usage_of_is_enabled_commit.sh create mode 100755 test/usage_of_is_enabled_correct.sh create mode 100644 test/usage_of_is_enabled_exempt.txt create mode 100755 test/usage_of_is_enabled_list.sh create mode 100644 test/usage_of_is_enabled_splcfg.txt create mode 100644 test/usage_of_is_enabled_todo.txt diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 61ada4d681f..a9764006bc3 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -67,6 +67,17 @@ stages: :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0 + - job: check_usage_of_is_enabled + displayName: 'Check usage of CONFIG_IS_ENABLED vs IS_ENABLED' + pool: + vmImage: $(ubuntu_vm) + container: + image: $(ci_runner_image) + options: $(container_option) + steps: + # generate list of SPL configs + - script: test/usage_of_is_enabled_check.sh + - job: cppcheck displayName: 'Static code analysis with cppcheck' pool: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a89138701dc..b56446e6174 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,6 +137,11 @@ check for new CONFIG symbols outside Kconfig: :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0 +check usage of CONFIG_IS_ENABLED vs IS_ENABLED: + stage: testsuites + script: + - ./test/usage_of_is_enabled_check.sh + # QA jobs for code analytics # static code analysis with cppcheck (we can add --enable=all later) cppcheck: diff --git a/test/usage_of_is_enabled_check.sh b/test/usage_of_is_enabled_check.sh new file mode 100755 index 00000000000..6bd5d9c1ac7 --- /dev/null +++ b/test/usage_of_is_enabled_check.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky + +scriptdir=`dirname "$0"`; +${scriptdir}/usage_of_is_enabled_list.sh | grep -vw FOO; +if [ $? -eq 0 ] ; then + echo "The above may have incorrect usage of IS_ENABLED/"\ +"CONFIG_IS_ENABLED" + echo "Run test/usage_of_is_enabled_commit.sh and "\ +"squash with appropriate commit" + ret=1; +else + ret=0; +fi + +rm ${scriptdir}/splcfg.tmp ${scriptdir}/exclude.tmp +exit ${ret} diff --git a/test/usage_of_is_enabled_commit.sh b/test/usage_of_is_enabled_commit.sh new file mode 100755 index 00000000000..593dbd1428c --- /dev/null +++ b/test/usage_of_is_enabled_commit.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky + +scriptdir=`dirname "$0"`; +${scriptdir}/usage_of_is_enabled_list.sh | \ +xargs -I {} sh -c "${scriptdir}/usage_of_is_enabled_correct.sh {}; \ +git commit -a -m\"CONFIG_{}: correct usage of CONFIG_IS_ENABLED/IS_ENABLED\";" + + +rm ${scriptdir}/splcfg.tmp ${scriptdir}/exclude.tmp diff --git a/test/usage_of_is_enabled_correct.sh b/test/usage_of_is_enabled_correct.sh new file mode 100755 index 00000000000..8724747beed --- /dev/null +++ b/test/usage_of_is_enabled_correct.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky + +scriptdir=`dirname "$0"`; + +if [ -z "$1" ] ; then + echo missing config + exit 1; +fi +if [ ! -f "${scriptdir}/splcfg.tmp" ] ; then + echo missing splcfg.tmp + exit 1; +fi + + +grep -qw $1 ${scriptdir}/splcfg.tmp +if [ $? -ne 0 ] ; then + # not splcfg + # change CONFIG_IS_ENABLED to IS_ENABLED + git grep -l \ + -e "CONFIG_IS_ENABLED($1)" \ + | \ + xargs -IFile sh -c \ + " \ + sed -i -E \"\ +s/CONFIG_IS_ENABLED\($1\)/IS_ENABLED\(CONFIG_$1\)/g; \ +\" File"; +else + # splcfg + # change IS_ENABLED to CONFIG_IS_ENABLED + # change ifdef to CONFIG_IS_ENABLED + # change ifndef to !CONFIG_IS_ENABLED + # change defined to CONFIG_IS_ENABLED + git grep -l \ + -e "IS_ENABLED(CONFIG_$1)" \ + -e "^#ifdef[ \t]\+CONFIG_$1\>" \ + -e "^#ifndef[ \t]\+CONFIG_$1\>" \ + -e "defined(CONFIG_$1)" \ + | \ + xargs -IFile sh -c \ + " \ + sed -i -E \"\ +s/([^_])IS_ENABLED\(CONFIG_$1\)/\1CONFIG_IS_ENABLED($1)/g; \ +s/^#ifdef[ \t]+CONFIG_$1\>/#if CONFIG_IS_ENABLED\($1\)/; \ +s/^#ifndef[ \t]+CONFIG_$1\>/#if !CONFIG_IS_ENABLED\($1\)/; \ +s/defined\(CONFIG_$1\)/CONFIG_IS_ENABLED\($1\)/; \ +\" File"; +fi diff --git a/test/usage_of_is_enabled_exempt.txt b/test/usage_of_is_enabled_exempt.txt new file mode 100644 index 00000000000..d9fefd6cb6c --- /dev/null +++ b/test/usage_of_is_enabled_exempt.txt @@ -0,0 +1,9 @@ +BLOBLIST +BLOBLIST_FIXED +DM_PMIC_PFUZE100 +FOO +NAND_BOOT +OF_CONTROL +SYS_L2_PL310 +WATCHDOG +X86_64 diff --git a/test/usage_of_is_enabled_list.sh b/test/usage_of_is_enabled_list.sh new file mode 100755 index 00000000000..0f51d3602ca --- /dev/null +++ b/test/usage_of_is_enabled_list.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# +# Written by Troy Kisky + +scriptdir=`dirname "$0"`; +# generate list of excluded configs +{ +# 1. ignore configs that have a number or string for a value +git grep -h -A2 -E "^config " '*Kconfig*' | \ +sed -En '/depends on/!p' | \ +sed -En '/^config/{h;$!d} ;H;x; s/config[ \t]+(.*)\n[ \t]*/config \1 #/p' | \ +sed -E "/#bool/d; /#def_bool/d; /#tristate/d; \ +/#default y/d; /#select/d; /#prompt/d; /#imply/d" | +sed -n -r "s/^config[[:space:]]+([0-9a-zA-Z_]+)/\n\{\1\}\n/p" | \ +sed -n -r 's/^\{([0-9a-zA-Z_]+)\}/\1/p' | sort -u; +# 2. configs that are exempt for other reasons +cat ${scriptdir}/usage_of_is_enabled_exempt.txt; +# 3. configs that need converted later +[ -f ${scriptdir}/usage_of_is_enabled_todo.txt ] && \ +cat ${scriptdir}/usage_of_is_enabled_todo.txt +} | sort -u > ${scriptdir}/exclude.tmp + +# generate list of CONFIGs that should use CONFIG_IS_ENABLED +{ +# 1. all obj-$(CONFIG_$(SPL_)xxx in Makefiles +git grep -h 'obj-$(CONFIG_$(SPL_' '*Makefile' | sed -e "s/SPL_TPL_/SPL_/"| \ +sed -n -r 's/obj\-\$\(CONFIG_\$\(SPL_\)([0-9a-zA-Z_]+)\)/\n\{\1\}\n/gp'| \ +sed -n -r 's/\{([0-9a-zA-Z_]+)\}/\1/p'; + +# 2. all SPL_xxx in Kconfig files +git grep -h -E 'config [ST]PL_' '*Kconfig*' | \ +sed -n -r "s/config [ST]PL_([0-9a-zA-Z_]+)/\n\{\1\}\n/p" | \ +sed -n -r 's/\{([0-9a-zA-Z_]+)\}/\1/p'; + +# 3. all CONFIG_CMD_xxx which already use CONFIG_IS_ENABLED +# The Makefile for most if these use ifndef CONFIG_SPL_BUILD +# instead of obj-$(CONFIG_$(SPL_)xxx +git grep -h -E 'CONFIG_IS_ENABLED\(CMD_' | \ +sed -n -e "s/\(CONFIG_IS_ENABLED(CMD_[0-9a-zA-Z_]*)\)/\n\1\n/gp"| \ +sed -n -r "s/CONFIG_IS_ENABLED\((CMD_[0-9a-zA-Z_]+)\)/\1/p"; + +# 4. A list of other configs that should use CONFIG_IS_ENABLED +# This list could be reduced if obj-$(CONFIG_$(SPL_)xxx was used instead of +# ifndef CONFIG_SPL_BUILD in Makefiles +# usage_of_is_enabled_splcfg.txt mostly contains configs that should always +# be undefined in SPL/TPL +# Note: CONFIG_CLK was included to prevent a change in test_checkpatch.py +# which is checking for an error. +cat ${scriptdir}/usage_of_is_enabled_splcfg.txt; +} | sort -u | \ +comm -23 - ${scriptdir}/exclude.tmp >${scriptdir}/splcfg.tmp + +{ +# generate list of CONFIGs that incorrectly use CONFIG_IS_ENABLED +git grep -h CONFIG_IS_ENABLED | \ +sed -n -e "s/\(CONFIG_IS_ENABLED([0-9a-zA-Z_]*)\)/\n\1\n/gp"| \ +sed -n -r "s/CONFIG_IS_ENABLED\(([0-9a-zA-Z_]+)\)/\1/p" |sort -u| \ +comm -23 - ${scriptdir}/exclude.tmp | \ +comm -23 - ${scriptdir}/splcfg.tmp ; + +# generate list of CONFIGs that incorrectly use IS_ENABLED +git grep -h -w IS_ENABLED | \ +sed -n -e "s/\(IS_ENABLED(CONFIG_[0-9a-zA-Z_]*)\)/\n\1\n/gp"| \ +sed -n -r "s/IS_ENABLED\(CONFIG_([0-9a-zA-Z_]+)\)/\1/p" |sort -u| \ +join - ${scriptdir}/splcfg.tmp; + +# generate list of CONFIGs that incorrectly use ifdef +git grep -h -E "^#ifdef[ \t]+CONFIG_" | \ +sed -n -E "s/(ifdef[ \t]+CONFIG_[0-9a-zA-Z_]+)/\n\1\n/p"| \ +sed -n -E "s/ifdef[ \t]+CONFIG_([0-9a-zA-Z_]+)/\1/p" |sort -u| \ +join - ${scriptdir}/splcfg.tmp ; + +# generate list of CONFIGs that incorrectly use ifndef +git grep -h -E "^#ifndef[ \t]+CONFIG_" | \ +sed -n -E "s/(ifndef[ \t]+CONFIG_[0-9a-zA-Z_]+)/\n\1\n/p"| \ +sed -n -E "s/ifndef[ \t]+CONFIG_([0-9a-zA-Z_]+)/\1/p" |sort -u| \ +join - ${scriptdir}/splcfg.tmp ; + +# generate list of CONFIGs that incorrectly use defined +git grep -h -E "defined\(CONFIG_" | \ +sed -n -E "s/(defined\(CONFIG_[0-9a-zA-Z_]+\))/\n\1\n/gp"| \ +sed -n -E "s/defined\(CONFIG_([0-9a-zA-Z_]+)\)/\1/p" |sort -u| \ +join - ${scriptdir}/splcfg.tmp ; + +} | sort -u; diff --git a/test/usage_of_is_enabled_splcfg.txt b/test/usage_of_is_enabled_splcfg.txt new file mode 100644 index 00000000000..29d6257c5c7 --- /dev/null +++ b/test/usage_of_is_enabled_splcfg.txt @@ -0,0 +1,21 @@ +BZIP2 +CONFIG_CLK +CONSOLE_MUX +DM_EVENT +DM_HWSPINLOCK +DM_RNG +DM_STDIO +EFI_DEVICE_PATH_TO_TEXT +EFI_LOADER +ERRNO_STR +EVENT_DYNAMIC +GENERATE_SMBIOS_TABLE +IOMMU +MMC_HW_PARTITIONING +NAND_CS_INIT +OFNODE_MULTI_TREE +PINCTRL_ARMADA_38X +PRE_CONSOLE_BUFFER +RESET_MEDIATEK +RESET_ROCKCHIP +UT_DM diff --git a/test/usage_of_is_enabled_todo.txt b/test/usage_of_is_enabled_todo.txt new file mode 100644 index 00000000000..652637650dd --- /dev/null +++ b/test/usage_of_is_enabled_todo.txt @@ -0,0 +1,213 @@ +ACPIGEN +ARCH_MVEBU +ARCH_VERSAL_NET +ARM_PSCI_FW +ARMV8_SEC_FIRMWARE_SUPPORT +ATMEL_PIT_TIMER +BLK +BLOCK_CACHE +BOOTCOUNT_LIMIT +BOOTDEV_ETH +BOOTDEV_SPI_FLASH +BOOTSTAGE +BOOTSTD +BZIP2 +CLK +CLK_CCF +CLK_IMX6Q +CMD_DHCP +CMDLINE +CMD_PXE +CONSOLE_MUX +COREBOOT_SYSINFO +CPU +CRC32_VERIFY +CROS_EC_KEYB +DFU_SF_PART +DFU_VIRT +DISPLAY_AER_FULL +DM +DMA +DM_DMA +DM_ETH +DM_GPIO +DM_I2C +DM_KEYBOARD +DM_MMC +DM_PMIC +DM_PMIC_DA9063 +DM_REGULATOR +DM_RNG +DM_RTC +DM_SERIAL +DM_SPI +DM_SPI_FLASH +DM_USB +DM_USB_GADGET +DOS_PARTITION +DWC_AHSATA_AHCI +EFI_DT_FIXUP +EFI_EBBR_2_1_CONFORMANCE +EFI_LOADER +EFI_PARTITION +EFI_SCROLL_ON_CLEAR_SCREEN +EFI_TCG2_PROTOCOL_MEASURE_DTB +EFI_UNICODE_CAPITALIZATION +ENV_APPEND +ENV_IS_IN_EXT4 +ENV_IS_IN_FAT +ENV_IS_IN_FLASH +ENV_IS_IN_MMC +ENV_IS_IN_NAND +ENV_IS_IN_SPI_FLASH +ENV_IS_NOWHERE +ENV_WRITEABLE_LIST +ERRNO_STR +EVENT_DEBUG +EXPO +EXYNOS7870 +EXYNOS7880 +FASTBOOT_UUU_SUPPORT +FAT_WRITE +FIT +FIT_CIPHER +FIT_IMAGE_POST_PROCESS +FIT_SIGNATURE +FIT_VERBOSE +FPGA +FRU_SC +FSL_ISBC_KEY_EXT +FSL_LS_PPA +FS_LOADER +FSP_VERSION2 +GENERATE_ACPI_TABLE +GENERATE_SMBIOS_TABLE +GMAC_ROCKCHIP +GZIP +I2C_EEPROM +I8259_PIC +IMX_RDC +LED +LEGACY_IMAGE_FORMAT +LIB_UUID +LOG +LZ4 +LZMA +LZO +MALTA +MARY +MEMSIZE_IN_BYTES +MIPS_BOOT_CMDLINE_LEGACY +MIPS_BOOT_ENV_LEGACY +MIPS_BOOT_FDT +MMC +MMC_IO_VOLTAGE +MMC_VERBOSE +MULTI_DTB_FIT +MULTIPLEXER +MXC_OCOTP +NAND_DENALI +NET +NO_FB_CLEAR +NXP_FSPI +OF_LIBFDT +OF_LIVE +OFNODE_MULTI_TREE +OF_REAL +OF_TRANSLATE +OPTEE +OPTEE_IMAGE +PARTITIONS +PARTITION_TYPE_GUID +PARTITION_UUIDS +PCI +PCI_PNP +PG_WCOM_UBOOT_UPDATE_SUPPORTED +PHY +PHY_ATHEROS +PHY_CADENCE_SIERRA +PHY_CADENCE_TORRENT +PHY_FIXED +PINCTRL +PKCS7_MESSAGE_PARSER +PLATDATA +POWER_DOMAIN +POWER_I2C +QFW +QFW_PIO +RAM +RANDOM_UUID +RESET_MEDIATEK +RESTORE_EXCEPTION_VECTOR_BASE +RISCV_SMODE +ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON +RSA_PUBLIC_KEY_PARSER +RSA_VERIFY_WITH_PKEY +RTC_SANDBOX +SANDBOX +SATA +SEC_FIRMWARE_ARMV8_PSCI +SEMIHOSTING +SERIAL +SERIAL_PUTS +SERIAL_RX_BUFFER +SHA1 +SHA384 +SHA512 +SHA512_HW_ACCEL +SHA_HW_ACCEL +SHOW_BOOT_PROGRESS +SILENT_CONSOLE +SILENT_CONSOLE_UPDATE_ON_RELOC +SILENT_CONSOLE_UPDATE_ON_SET +SIMPLE_BUS_CORRECT_RANGE +SKIP_LOWLEVEL_INIT +SMC911X_32_BIT +SMP +SPI +SPI_BOOT +SPI_DIRMAP +SPI_FLASH_BAR +SPI_FLASH_MACRONIX +SPI_FLASH_MTD +SPI_FLASH_SFDP_SUPPORT +SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT +STM32_ETZPC +SYS_CONSOLE_IS_IN_ENV +SYS_DCACHE_OFF +SYS_DEVICE_NULLDEV +SYS_ICACHE_OFF +SYSINFO +SYSRESET +SYS_THUMB_BUILD +SYS_WHITE_ON_BLACK +TARGET_DENEB +TARGET_EVB_RK3399 +TARGET_GIEDI +TARGET_KMCOGE5NE +TARGET_KMETER1 +TARGET_ST_STM32MP15x +TEST_KCONFIG +TIMER +_UNDEFINED +UNIT_TEST +USB_CDNS3_GADGET +USB_CDNS3_HOST +USB_ETHER +USB_GADGET +USB_GADGET_OS_DESCRIPTORS +USB_HOST +USB_STORAGE +USE_ARCH_MEMSET +UT_DM +UT_UNICODE +VID +VIRTIO +WDT +X509_CERTIFICATE_PARSER +X86_16BIT_INIT +XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP +XILINX_MICROBLAZE0_USR_EXCEP +ZLIB +ZSTD +ZYNQMP_PSU_INIT_ENABLED