From patchwork Tue Jan 31 15:26:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734931 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=BCSUIom5; 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 4P5ppF7332z1yhq for ; Wed, 1 Feb 2023 02:27:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 995C585AF1; Tue, 31 Jan 2023 16:27:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BCSUIom5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E3AEA85AE9; Tue, 31 Jan 2023 16:27:43 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 B06F485AE0 for ; Tue, 31 Jan 2023 16:27:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x136.google.com with SMTP id l15so2793195ilj.5 for ; Tue, 31 Jan 2023 07:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=tNOYoWo6dC6yTRF3rOklbJNdClizhr8AnbceNQJAuD4=; b=BCSUIom5yVXYpm+r9p44G5GDOyvSp5feGCCymEDCCNVpXpJ3V2k6FaM421cxcciz30 pGApGdT+2xN6bnM8ff/6hP3m2tgpxEYxhWmeJhrTNCL0QDRbVTvp4FiE+/IFAMMM5jzy cwPO91Cc7jKDVq6qqIgdYYAYTiczPiZ+2vrTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tNOYoWo6dC6yTRF3rOklbJNdClizhr8AnbceNQJAuD4=; b=OlKlKUFCib/3Ui9typ935Z7i7urC3XUJmAnOPog+EgMgKb/w7yd7p9B8IAN4dYSm41 aGmcxX/tikwCzmJestVlclDdXkQvzM+tf/Z33sEGioa3QdpG5o71Sd2LtmyBXHQ/Y/Zo MHL61Oy3jNvxhAmp6HG6Z3Abh2oD7IaiUNsMqmqV7GCzTUlP+XehKMwJg0Rxk168rTc+ /LkBEdszBfPiO282y1na7Gb2+ngNRG3QqrrRqf5h7UzHf84nyGuFnH63F7itnHBhDCSE sC9MB0RwRGejnoshP7p2XINBfpArsDqHTb+ThiYw9Um/JutXaWfOdZnjg1iBNzL066ju pL4g== X-Gm-Message-State: AFqh2krHS7BNUYt0SGE+2ECI8zU6YMY3XDo4RIF9FeHa4weq5MCoJOV+ B+INej0TQnB7pN5Crodjx5hM/gCkLzqUYfDo X-Google-Smtp-Source: AMrXdXt2rR6AyXqsJ/SeDjGvOtpHMqbF2cQ4WroNSzXR8XAvEsD7kZ34OTh6hOPCCEgDRVLl3JNsqg== X-Received: by 2002:a05:6e02:1bc2:b0:30e:dcd5:6fda with SMTP id x2-20020a056e021bc200b0030edcd56fdamr42369847ilv.0.1675178860208; Tue, 31 Jan 2023 07:27:40 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:39 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 01/32] fixup: Bugfix for moveconfig Date: Tue, 31 Jan 2023 08:26:31 -0700 Message-Id: <20230131152702.249197-2-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add this in here. It should be added to the previous series (splb). Signed-off-by: Simon Glass --- tools/moveconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 5eef9b25862..6b8eaea2a2c 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -2054,7 +2054,7 @@ def do_scan_source(path, do_update, show_conflicts, do_commit): print(f' {item}') def write_update(spl_not_found, proper_not_found): - with open(os.path.join(path, 'scripts', 'conf_nospl'), + with open(os.path.join(path, 'scripts', 'conf_nospl'), 'w', encoding='utf-8') as out: print('# These options should not be enabled in SPL builds\n', file=out) From patchwork Tue Jan 31 15:26:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734934 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Ur8LVvcS; 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 4P5pqP4NKHz1yhq for ; Wed, 1 Feb 2023 02:28:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6093885AFF; Tue, 31 Jan 2023 16:28:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ur8LVvcS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C1C385AF6; Tue, 31 Jan 2023 16:27:47 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 8074985AE5 for ; Tue, 31 Jan 2023 16:27:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12c.google.com with SMTP id h18so3845501ilj.6 for ; Tue, 31 Jan 2023 07:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=E79UDRGMc/KkeU/oKkeEb47pc1nrwKGf8UGVQ0umEro=; b=Ur8LVvcSzPFl1dSnznm8sfx3AZhjJe0fSOH+GH9u9ZkIqeIjwlt6gvwMunAvnH2DJV +puwSWc7yaZmniHdfF1QcnSlGlHQvb5UonfHi4vve+8BVSnFS25dbkyVUC6Wp+ABYCg6 xvSixFtZUg2XLMOX2bmRq7bmyK2bSKR2e8ygU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E79UDRGMc/KkeU/oKkeEb47pc1nrwKGf8UGVQ0umEro=; b=TfZGB947V5BVwxBniNRu1eAEYH/JTEO2h11treZoXcNphcOGWcLecgTFyN1i6zx21i STso2Wbm6qROej+VabsCLnH/RxNprtvwnDDiV7/t+KrwjAbCZ4p0j1oUqcoJyYWf17uh 7q7u1SCXoQRzyFj6L2+h0X+4J3fR7o5GUJ+FaqYiRdOoHiDcAg0sJqPMZCWyiaMW73Vp AdwCSUy1KnjTuxKTua6Fqg4GLbpUbDnWJSh0ieXdTkku6NaLFjJ++ZNBG9Y5sr+itN24 xNNB92beVzhrBZo40ajqzZC54vyKscN9d4GLk0bjICfyP2AC5CEjrIM7qjA8KKLLYIAE 7hOA== X-Gm-Message-State: AO0yUKWWAqxOiGD6cGPxt3gaqDnS4+M/ipfODal+EdftVKDqPvpolP5x aS1VZFTxpKTnJDbKQXuwzuwE6WTSIreCHk5m X-Google-Smtp-Source: AK7set+s5unu+HnFlq9D96lP81ypCdqvAJploX5xtlNuJBgnuVaMhr+eKgAH+IWfLX03E0Ylk1lZ1A== X-Received: by 2002:a05:6e02:214d:b0:310:bb17:3004 with SMTP id d13-20020a056e02214d00b00310bb173004mr16591626ilv.20.1675178860958; Tue, 31 Jan 2023 07:27:40 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:40 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 02/32] event: Add Kconfig options for SPL Date: Tue, 31 Jan 2023 08:26:32 -0700 Message-Id: <20230131152702.249197-3-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add options to enable events in SPL. This is mostly so the code can be excluded from SPL builds. Signed-off-by: Simon Glass --- common/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 6d23cdde94e..44aa7d8b1cd 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -622,6 +622,22 @@ config EVENT See doc/develop/event.rst for more information. +config SPL_EVENT + bool # General-purpose event-handling mechanism in SPL + depends on EVENT && SPL + help + This adds a framework for general purpose sending and processing of + events, to allow interested parties to be alerted when something + happens. This is an attempt to stem the flow of weak functions, + hooks, functions in board_f.c and board_r.c and the Kconfig options + below. + + See doc/develop/event.rst for more information. + +config SPL_EVENT_DYNAMIC + def_bool n # Support event registration at runtime (SPL) + depends on SPL_EVENT + if EVENT config EVENT_DYNAMIC From patchwork Tue Jan 31 15:26:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734933 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fT8hUVml; 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 4P5pqB2pSDz1yhq for ; Wed, 1 Feb 2023 02:28:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B1C2485AF6; Tue, 31 Jan 2023 16:28:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fT8hUVml"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A17F85AEA; Tue, 31 Jan 2023 16:27:48 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 3700A85AEE for ; Tue, 31 Jan 2023 16:27:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id d10so6602939ilc.12 for ; Tue, 31 Jan 2023 07:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=Zow0EyElMfcCNvYBV+iFyAWYpLXfDHfXOTOA7UFzHKA=; b=fT8hUVml1Jf7tGTm1v2dPv9RVhpKGf+yRuVxhPcQ7tkb4yYUP6RYYJkGzlrqQhtjR0 PewMdHpS62UFkWjleeI37fRwLNgIGhqZ8n5so4RiBAqCofV1JnvvwWU7n94Ik9MJRqJr DfxBC5I4NMtAg8B+986VHjVmIwV65VOcK9nVQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zow0EyElMfcCNvYBV+iFyAWYpLXfDHfXOTOA7UFzHKA=; b=e6l4DoOoLe/HyO0BV4IQxJdhsQhUcnBThYRv3TIcumXq0E4zQHAU54aiG4eVzl9917 uHuIzDO28/NbwGVhu0nLIlIBNdGxg0Pym/0oUsr8XyrvmKIC6E8/ngMVSVXpaaaKXZuV JCz4Hki2TGXOneonrfAMPEkX5EHYzM/Yeuf6Bk364Uhi8UgbPSWrW22f2w9zh/98KM8S LzdkvEhWedfy9bdmIW1b76a2kunrFxS0nAPLa+VRU8gWhqggbMrYkhP23PJSwQNjmKR6 bhskngUDDuh0XwvjaS7xye5PHCko3vg63nG3YgTatHX92scS1IBV/5E20ek9Fn5tBtht mJ8g== X-Gm-Message-State: AO0yUKVKeESgTdSOVgvlgDmPN32LCjd5TxbxeiwVKy2sYMbbUKbVoKBn n58mHFWL92PuBpF9JokV79JIaVgBU8rzGKK8 X-Google-Smtp-Source: AK7set8NYrRAO138eZB+kW8hP6woDiCj8h1baUgc8L7C8i4HZ48BM6Am+sOkz3DU3KGRC+4+AWxmwg== X-Received: by 2002:a05:6e02:190d:b0:310:c833:b325 with SMTP id w13-20020a056e02190d00b00310c833b325mr14631266ilu.6.1675178861734; Tue, 31 Jan 2023 07:27:41 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:41 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 03/32] bootstd: Add Kconfig options for SPL Date: Tue, 31 Jan 2023 08:26:33 -0700 Message-Id: <20230131152702.249197-4-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Create new SPL options so that standard boot can be excluded for SPL. Signed-off-by: Simon Glass --- boot/Kconfig | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/boot/Kconfig b/boot/Kconfig index dcfbe6ae9e0..81a3dba399a 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -354,6 +354,11 @@ config PXE_UTILS help Utilities for parsing PXE file formats. +config SPL_PXE_UTILS + bool + help + Utilities for parsing PXE file formats (SPL) + config BOOTSTD bool "Standard boot support" default y @@ -445,6 +450,9 @@ config BOOTMETH_DISTRO This provides a way to try out standard boot on an existing boot flow. +config SPL_BOOTMETH_DISTRO + def_bool n # Bootdev support for distro boot (SPL) + config BOOTMETH_DISTRO_PXE bool "Bootdev support for distro boot over network" depends on CMD_PXE && CMD_NET && DM_ETH @@ -455,6 +463,9 @@ config BOOTMETH_DISTRO_PXE This provides a way to try out standard boot on an existing boot flow. +config SPL_BOOTMETH_DISTRO_PXE + def_bool n # Bootdev support for distro boot over network (SPL) + config BOOTMETH_EFILOADER bool "Bootdev support for EFI boot" depends on CMD_BOOTEFI @@ -476,6 +487,9 @@ config BOOTMETH_EFILOADER This provides a way to try out standard boot on an existing boot flow. +config SPL_BOOTMETH_EFILOADER + def_bool n # Bootdev support for EFI boot (SPL) + config BOOTMETH_VBE bool "Bootdev support for Verified Boot for Embedded" depends on FIT @@ -539,6 +553,9 @@ config BOOTMETH_VBE_SIMPLE_OS for booting into the OS. This option is only enabled for U-Boot proper, since it is the phase where device tree fixups happen. +config SPL_BOOTMETH_VBE_SIMPLE_OS + def_bool n # Bootdev support for VBE 'simple' method OS phase (SPL) + config SPL_BOOTMETH_VBE_SIMPLE bool "Bootdev support for VBE 'simple' method (SPL)" depends on SPL @@ -599,6 +616,10 @@ config BOOTMETH_SANDBOX This is a sandbox bootmeth driver used for testing. It always returns -ENOTSUPP when attempting to boot. +config SPL_BOOTMETH_SANDBOX + def_bool n + depends on SANDBOX + config BOOTMETH_SCRIPT bool "Bootdev support for U-Boot scripts" default y if BOOTSTD_FULL @@ -610,6 +631,9 @@ config BOOTMETH_SCRIPT This provides a way to try out standard boot on an existing boot flow. It is not enabled by default to save space. +config SPL_BOOTMETH_SCRIPT + def_bool n # Bootdev support for U-Boot scripts (SPL) + endif config LEGACY_IMAGE_FORMAT From patchwork Tue Jan 31 15:26:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734932 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=iKO+6VyE; 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 4P5ppz5yvhz1yhq for ; Wed, 1 Feb 2023 02:28:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2ACD785AF7; Tue, 31 Jan 2023 16:28:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="iKO+6VyE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8CBFF85AED; Tue, 31 Jan 2023 16:27:48 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 048A185AE0 for ; Tue, 31 Jan 2023 16:27:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd29.google.com with SMTP id o1so1973118ioo.10 for ; Tue, 31 Jan 2023 07:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=c9Qtd4kajQkAdDzSwyK4x0Pv6/6a8zewTpcm5zfaY2w=; b=iKO+6VyE20hJTXoIe3U1LN/tba54yYoOqgU5r5cdcEPjekfPQcF5qyu4AiO5X0Shkk 7j4vwdR6C1Z0Of+pe/UXz/rLhI8cc4Ohn55nUjZCWbETl0DrBivPb6qbYgckN2SXiNbC LE72PqIYXsVyIxBwt0tnMfuIi0oXv4xhWon3I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c9Qtd4kajQkAdDzSwyK4x0Pv6/6a8zewTpcm5zfaY2w=; b=tlNPySC7bMtrO4z2FwVeiVE9PRJ4T9C1bXCnHF1dwOsPb1QUZYjxzOmA22s/9zG1Ko eIRYKWan8vn0eWmMUUc11t+VOOi0luBW95rmAXgzSq3V8DPfJx2AJvAoCo1/0UvyXDj2 Akay9vKD9IwpbUQrefSW8WF8s/H3BQVpJ/Vo1epmxk0H0a9Mmg21LLH88nWxTnlv25N+ I0gz5QXgmqOc1XnAMNfgUXPeqD8EwWolNJolMwGculo1OaEr8OgGChqt/RB0nhQDd43o 9S1p+AQSsVe7l2OppON3bqv+75opuViDDAxpArOBfcKJ75xatip+KBq5JHRmuVuW9m6A Y8yQ== X-Gm-Message-State: AO0yUKXyLlLWufWfwKujIYwVkS8rxpzuPmcRhEk0XaTXFEJE/tFqx37K xWx+j87GNhhT6LyJrN40bI70xmsMVLFmyJ4f X-Google-Smtp-Source: AK7set+D815gtP8cNFxemkiAmc4c22qhbABFRrH0WHXi2Wca+NZZoMU9X90f86T6wS3DUHcOabz94w== X-Received: by 2002:a6b:3b13:0:b0:717:3cf4:58c with SMTP id i19-20020a6b3b13000000b007173cf4058cmr8797339ioa.0.1675178862447; Tue, 31 Jan 2023 07:27:42 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:42 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 04/32] cmd: Add an SPL Kconfig for CMDLINE and HUSH Date: Tue, 31 Jan 2023 08:26:34 -0700 Message-Id: <20230131152702.249197-5-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building various command-line features. But with the new split configs this does not work. Add separates Kconfigs instead. Signed-off-by: Simon Glass --- cmd/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 82321bd3293..f6a355422fe 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -23,6 +23,16 @@ config HUSH_PARSER If disabled, you get the old, much simpler behaviour with a somewhat smaller memory footprint. +config SPL_CMDLINE + def_bool n + help + Dummy option to ensure that the command line is not enabled in SPL. + +config SPL_HUSH_PARSER + def_bool n + help + Dummy option to ensure that the hush parser is not enabled in SPL. + config CMDLINE_EDITING bool "Enable command line editing" depends on CMDLINE From patchwork Tue Jan 31 15:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734937 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=oeN4s309; 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 4P5pr66pckz1yhq for ; Wed, 1 Feb 2023 02:29:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E75185AF3; Tue, 31 Jan 2023 16:28:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oeN4s309"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE80185AE7; Tue, 31 Jan 2023 16:27:55 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 B218885AF0 for ; Tue, 31 Jan 2023 16:27:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12e.google.com with SMTP id i6so2753294ilq.8 for ; Tue, 31 Jan 2023 07:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=1GyjzpyV7AikafeP7KOHcQk2SGiwb7D/JhvS9iuXhGU=; b=oeN4s309sKqmx1RDDQlr6aifuImOxA8rlQjVdi3CK21T9KMVlTF5I5MEXVm49T0Sjc jDv1iIfpIITvzA9YX42Uu3Ljcb6Ti59BaCh22kisc7zVk+Om34oUiAl6dtnIzEI6U6ff 3qynovT2osQMcPHWWYJ50X95akPHl/kKFyTx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1GyjzpyV7AikafeP7KOHcQk2SGiwb7D/JhvS9iuXhGU=; b=qnJiglKVD78RH1MxucmL2e57Gun127mhBbaJBlUqdWrjnt25tA8Ijpw2u43Ooc6GbU HLoEarcWeZfxFZW8xBlAu1hDbBojs6qtsl1NQ4Bed6MyjaHP1+gTFK+ErjWreH5Roqwu lrBbr2YDNoV0Mz6HrbFO1TWmfbGa1uVrCN5uXpF2vEzoSadkUTQhBaITxD7EHtXSwK4B laqE29H0nMEl1MJ2DPn8TVGnhmJe1t00AfN4CjNo7yBqLKOKNVKIVC78ccarpwF867mD W/draQUHMHOi3OTQjsxlErw6KJe8p6CogJt7F4qI9qCABTel6Bo7ns25xWzDWmHH/CxC 5T8A== X-Gm-Message-State: AO0yUKUD7ffRpECw/krnbzqpa/OB/2YKL7AitlEHQxmjTyPwl5RRglLT uoA2BL4b0sKRmiW009/UKi4eXGtT2ipm1Ja0 X-Google-Smtp-Source: AK7set8ps7MAObxKNkepJCgPOCTdZxgOP8lHNsAO1L/Z4RQm/FItNVZjRhMtCVwlt0LlAe0Q3BQ38Q== X-Received: by 2002:a05:6e02:2194:b0:310:ceb0:5b20 with SMTP id j20-20020a056e02219400b00310ceb05b20mr13070360ila.22.1675178863164; Tue, 31 Jan 2023 07:27:43 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:42 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 05/32] boot: Add a Kconfig for SPL_QCOM_PMIC_GPIO Date: Tue, 31 Jan 2023 08:26:35 -0700 Message-Id: <20230131152702.249197-6-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- drivers/gpio/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 365615a53f7..8a4787f4195 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -316,6 +316,10 @@ config QCOM_PMIC_GPIO Power and reset buttons are placed in "pwkey_qcom" bank and have gpio numbers 0 and 1 respectively. +config SPL_QCOM_PMIC_GPIO + def_bool n # Qualcomm generic PMIC GPIO/keypad driver (SPL) + depends on SPL_DM_GPIO && SPL_PMIC_QCOM + config PCF8575_GPIO bool "PCF8575 I2C GPIO Expander driver" depends on DM_GPIO && DM_I2C From patchwork Tue Jan 31 15:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734936 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=EC0ULxqv; 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 4P5pqv0HtHz1yhq for ; Wed, 1 Feb 2023 02:29:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 71D8B85AF8; Tue, 31 Jan 2023 16:28:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="EC0ULxqv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A1A1085AF6; Tue, 31 Jan 2023 16:27:54 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 B124185AE4 for ; Tue, 31 Jan 2023 16:27:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id g16so6634713ilr.1 for ; Tue, 31 Jan 2023 07:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=d0m3AtkLQip3FMbL+9ZoYIh2ssL8ObVtYpGEO5MsNXQ=; b=EC0ULxqv1IcqDzE798VaWnj8pk1nEGQMQ7FYidkQljcg9Ob1wU84ekPfNVuDXWmCC5 IDGGnBA+5mrcyTspuh5XCfSC0GaZWIg+WJAyY0IeplQWplbkFg32FK3Ed0j75eS4kUbL ZrdLKgeYhSDt4auaVtWbMNE9yq9J8CeQtjZ9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d0m3AtkLQip3FMbL+9ZoYIh2ssL8ObVtYpGEO5MsNXQ=; b=liztECFBwKNwDgnRfw5hTFpvFFAmosEYKLH9FVmLQRzwkujdfZB45TkX3uQdq7Bh7Y hBPdc9z+zVJ5ur8qqZEvkFa1XDqCSvuRY5ulZxr89B3nt8xfJwS3fRKUjxjeI7uiaYf8 YvuVWZwNYJyOgKiAhHXyl3H1nGPWjI0JitU9WNi+luRRzCBdC4TdQ/BRvskF4IZNQ2JI Xo/2Uxr0+1YATW6L1Mg8Tubzk40pibs0OYG9UqeYcCPIY7etK8x++NvEogk92hwUTCQB 18RayPbQQ76gNbXxLPfWDXTGt/+L13NKcR1pC7PNd7yIcsR4pyAdbqX+RSWNUSqj0WFR ihaQ== X-Gm-Message-State: AO0yUKWDGBAGZtuVG0k3HM7Zn0ZSdm5G7UopOdBOGaM3OLkQ0V4pvmXH X5HLBdba4oHxsdMGBtT9NSeRKbpwcMtBen7D X-Google-Smtp-Source: AK7set/5E9JCGPissVvq3eJB+6D3+O8fBeUFmJ/LOZvBG8byVtMr40G/8bc8dH9RwITma70nDJ3nkg== X-Received: by 2002:a05:6e02:1a08:b0:310:fa98:25d5 with SMTP id s8-20020a056e021a0800b00310fa9825d5mr5435234ild.11.1675178863993; Tue, 31 Jan 2023 07:27:43 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:43 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 06/32] cros_ec: Add SPL Kconfigs for cros_ec features Date: Tue, 31 Jan 2023 08:26:36 -0700 Message-Id: <20230131152702.249197-7-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building various EC features. But with the new split configs this does not work. Add separates Kconfigs instead. Signed-off-by: Simon Glass --- drivers/i2c/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 70ed69b22e1..347ba4d7822 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -97,6 +97,11 @@ config I2C_CROS_EC_TUNNEL I2C or LPC). Some Chromebooks use this when the hardware design does not allow direct access to the main PMIC from the AP. +config SPL_I2C_CROS_EC_TUNNEL + def_bool n + help + Dummy option to ensure that this feature is not enabled in SPL. + config I2C_CROS_EC_LDO bool "Provide access to LDOs on the Chrome OS EC" depends on CROS_EC @@ -111,6 +116,11 @@ config I2C_CROS_EC_LDO avoid duplicating the logic in the TPS65090 regulator driver for enabling/disabling an LDO. +config SPL_I2C_CROS_EC_LDO + def_bool n + help + Dummy option to ensure that this feature is not enabled in SPL. + config I2C_SET_DEFAULT_BUS_NUM bool "Set default I2C bus number" depends on DM_I2C From patchwork Tue Jan 31 15:26:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734935 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Y53RFACt; 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 4P5pqf1CLRz1yhq for ; Wed, 1 Feb 2023 02:29:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CAFA985AEC; Tue, 31 Jan 2023 16:28:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Y53RFACt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9EA6A85AFA; Tue, 31 Jan 2023 16:27:52 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 BBF1985AF2 for ; Tue, 31 Jan 2023 16:27:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id m15so1990881ilh.9 for ; Tue, 31 Jan 2023 07:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=NgTj7bgZoN6E+KV59Ukol/R3rJzkeAECPLTYplwRMMk=; b=Y53RFACtaYb/FVep7cDYyBzIVm3tJznaGi7aSm5GTdXZa+DmfNWbHKzrQlWYqm5sF1 628qR9PbhhZHBmbB1Dpi7FBYod++93rpmWQrUW8HG2WaD+zdfwsrfbXnzUXFMJ9508mB mdR6JOyIIgo9ZxAQOzMGbMwztTxL0NIBIxXe4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NgTj7bgZoN6E+KV59Ukol/R3rJzkeAECPLTYplwRMMk=; b=ZJsbchxsRl6AdnVYCD7kCOv2txpegs7DG/uWxkHAgIzTPZyvAqF9B14Y6RXscCkHgh GDGiOI+YTfMByE+TzO+kFTEnkRtyhi4SlWyk4/iDBdyoUQuS/VYb9U3mMdXpyoD8WmSz 4GfNfS0cRVNrmKUmjF8qI6hqKFP9Yys/yUD0blqnUrX8JoNsLCPsj21VmeHUHEHblb+7 m8WfmnLGPs3aKpH03qJ9K9xel9/G8HUn8uF+GGPLKpAinlm5+JbFWQsi+ytr/1Rwrz4q X7eWb0IrENcKJuLm2SAAxHoDxbs/bEM5AcgfeN9LU9swnHFWI4PmH051et8B15xrC9WO jGjg== X-Gm-Message-State: AO0yUKWVgHb1GxHQfmNkEchj/BSkeqA1x7ju/QVkm5uWutXlFyKJzZhb RrtUQPAV5iA9XG4a0mK7Cgib6BXxmuUmFazu X-Google-Smtp-Source: AK7set9Hyythrq/ApdjAktTePHwwx4JhXwWmWB8V1ziTIFUYiV/QJ4tXrRvFipKMonc6NnxnL/lxsQ== X-Received: by 2002:a05:6e02:12e4:b0:310:e81a:f55c with SMTP id l4-20020a056e0212e400b00310e81af55cmr8601120iln.4.1675178864802; Tue, 31 Jan 2023 07:27:44 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:44 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 07/32] boot: Add a Kconfig for SPL_UT_COMPRESSION Date: Tue, 31 Jan 2023 08:26:37 -0700 Message-Id: <20230131152702.249197-8-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- test/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Kconfig b/test/Kconfig index 465028265b2..944d4eb1560 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -75,6 +75,11 @@ config UT_COMPRESSION Enables tests for compression and decompression routines for simple sanity and for buffer overflow conditions. +config SPL_UT_COMPRESSION + def_bool n + help + Dummy option to ensure that this feature is not enabled in SPL. + config UT_LOG bool "Unit tests for logging functions" depends on UNIT_TEST From patchwork Tue Jan 31 15:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734941 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TpSQEPnd; 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 4P5psC25JMz23gV for ; Wed, 1 Feb 2023 02:30:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0BF585B08; Tue, 31 Jan 2023 16:29:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TpSQEPnd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5F5985B05; Tue, 31 Jan 2023 16:27:57 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (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 3EBB185AF4 for ; Tue, 31 Jan 2023 16:27:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x133.google.com with SMTP id i17so6456425ils.11 for ; Tue, 31 Jan 2023 07:27:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=5WCNoeuStPBGWICQi/HJBs98B+Nykbu1HWtF8k5vNSA=; b=TpSQEPndth6KmsxDS0ba2ZGjACYNksMI/RFvnV2n1wx5XNC61l1SSjmKdPhsfvNAr0 JwX5yEcVd6nQHGfs3qEWjLjfIqlxW/zmVlALP5uwfe5mspTPYl0cJb3kmZAQ89EkMusd 0Aua0oMauf/ZDRI796IFk2VqDRj8xcG/B0FpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5WCNoeuStPBGWICQi/HJBs98B+Nykbu1HWtF8k5vNSA=; b=kNW0UyGE91wJBSio5y0sROUuoi/IQdTd813NGZfcnj09CcDasD1jqRYXnKnCvpxW/b LSWYgdVf++6ExF6q6pCZ1knqCyAmKWw+EaGRs5huJvptukqgBUrn11bFyn9N90CJf6KZ 5Hem0kVWVCA8l92eUiMVx7GINw0+IM4hSG1IG3D+WDNukLTeaZEyfoFY8D6oYCbGThSE uJ2jHlo8mMRzqHFJAEy8dWvsdcAlJWIKGilmfXgwmaGp2mE17xgtZvlS9qL/xGA/cJ5L zxAlgAOhVboim4L8G9W187qZ56U0yQOViLPXbVxx+QYrrFxhxKhLTKnar7KrkbyL4rBY +lgQ== X-Gm-Message-State: AO0yUKXWq8lu8htQb52RajuV3fYeACmZ2CHCp1YL8f+2dvfdgUge32Cq K/cPjHcgKgb66GHljqPI3/zJdj0+TNv9vGkJ X-Google-Smtp-Source: AK7set9Ep4Ci0E856FHluxPYTNOi4hUM/6AlvTs6yZx8Sj04e7JN50A9igQyoxKDfnDRcn+w2YlJIA== X-Received: by 2002:a05:6e02:144c:b0:311:478:f282 with SMTP id p12-20020a056e02144c00b003110478f282mr4940623ilo.26.1675178865564; Tue, 31 Jan 2023 07:27:45 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:45 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger Subject: [PATCH 08/32] env: Avoid checking ENV_IS_IN when env disabled Date: Tue, 31 Jan 2023 08:26:38 -0700 Message-Id: <20230131152702.249197-9-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This check is not needed when the environment is not enabled, e.g. in SPL. Add a condition to handle this. Signed-off-by: Simon Glass --- cmd/nvedit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7cbc3fd573a..277293679df 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -59,11 +59,13 @@ DECLARE_GLOBAL_DATA_PTR; #endif +#if CONFIG_IS_ENABLED(ENV_SUPPORT) #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 +#endif /* ENV_SUPPORT */ /* * Maximum expected input data size for import command From patchwork Tue Jan 31 15:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734938 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IAhzG34C; 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 4P5prL66QPz1yhq for ; Wed, 1 Feb 2023 02:29:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB66085B00; Tue, 31 Jan 2023 16:29:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IAhzG34C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1CEC785AF2; Tue, 31 Jan 2023 16:27:55 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 DC90485AF3 for ; Tue, 31 Jan 2023 16:27:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd29.google.com with SMTP id o1so1973193ioo.10 for ; Tue, 31 Jan 2023 07:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=AfwLZYiCmS+3EKXsWxnEDvgN0Q+1UTwyN4PVXs7x2Wo=; b=IAhzG34CjpSSVELmb7qz84E3lwMA6zzf0FbgPg5rgoFvF2EZvIl4g6INjt01a1z4G0 QfioqZnW3hA/vpDSCPs+GjbEQhF6BzD7u26VVwAA6BDu+WH/HtNBZRi4D56MD8ga2Quv kFov182B+w3MQ82NgmHlIO9uXVXclgeW6BfqE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AfwLZYiCmS+3EKXsWxnEDvgN0Q+1UTwyN4PVXs7x2Wo=; b=NLVM1XgjVXL3YOSQLcYZ5pFE1/CpHV1E3cOZJhlHWvqr3HFEdQPuzPsxNe9FdFkIs+ KIwKs9QNtatz9/2KD6isrAhvd7EjBxEXvwAhcyp1BmmQiB2iCyBlWarLaTtuohMNHIov WVS3/TWI8Fnjd4RR9JmMo25dvot9PeuYFMUg2mWPUElA6auihseBMDlzgP/j90LTFrSS +Fdl+odxzPzRKAKDRrnSGmDwFlgHpBea2DpLoudS8CFmPWGMhpMmSJteVZi4zCUNJSl5 elABkLnuikJzsnksp9tS9NajD4J/FffXX+N5JVFh8gI6adDbKMIkJ1PhrZYtOGvuTVia P8DA== X-Gm-Message-State: AO0yUKWX5D5M/9ny/7aKq6MbySuDTq15SZBYbgw2K129oC5otsyLxl8P hbvwG3Lz0bQLL5zD9HkAfFXxcaLL59Ba2aGj X-Google-Smtp-Source: AK7set8wkHii/v8yI7O99A8pjOZnFuH3Tz8QMUFmVBhcXMr4jZa9RAcGzrARU6C0knRL/kD5LtCIFA== X-Received: by 2002:a6b:d311:0:b0:715:ba8c:3b11 with SMTP id s17-20020a6bd311000000b00715ba8c3b11mr8836529iob.14.1675178866359; Tue, 31 Jan 2023 07:27:46 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:46 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 09/32] boot: Add a Kconfig for SPL_AVB_VERIFY Date: Tue, 31 Jan 2023 08:26:39 -0700 Message-Id: <20230131152702.249197-10-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- common/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 44aa7d8b1cd..c5f2a528943 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -818,6 +818,10 @@ config AVB_VERIFY * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c. * Helpers to alloc/init/free avb ops. +config SPL_AVB_VERIFY + def_bool n # Build Android Verified Boot operations (SPL) + depends on SPL + if AVB_VERIFY config AVB_BUF_ADDR From patchwork Tue Jan 31 15:26:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734939 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZnAVF/rb; 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 4P5prZ6tTZz1yhq for ; Wed, 1 Feb 2023 02:29:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0FAF385B0A; Tue, 31 Jan 2023 16:29:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZnAVF/rb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 757F185AE2; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 619AE85AEF for ; Tue, 31 Jan 2023 16:27:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x136.google.com with SMTP id k12so1587606ilv.10 for ; Tue, 31 Jan 2023 07:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=eo2zuquPnYGZC6Cr6aI6HY/XAQj8qCsGq1cXjcq2Z+0=; b=ZnAVF/rbXFLAMk+sKNpjxEShC9prT2uYr60lBVKqX9rNXoQrgxzUzyv9GsQT7eE7t1 KMXDEWTAfADf34JYZXStMbFruneHKZjoKCWlTorYOVNybNax7YGzPRs3Gp8RhZ3sw0qs KNadpisjR/Fd+iA6+2s67P/xl5koNGcDQSJr4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eo2zuquPnYGZC6Cr6aI6HY/XAQj8qCsGq1cXjcq2Z+0=; b=bNfT0WBinOzviGibE2nSAIU8mEUjkiOYOWLmc4E3LavpuUq6yBIrjMcX92kEgbKJke iOrnHrFwA1NWLF0lJ9HUUw83dGZSNHQqYjBqHtiQ42uHR9f0y0H0mXfQPbhur+1QKowp PqI5R2/eLFdWZ7k/3CNe9YK0V/QM4i6WFRThyIpx2taCVOdidgUaJH0zxPQKmtPlqeX9 I7ZqK4kllTR185eyPwipqq8WXnRKEHiUbN7A3OocXqAPuwoTgSHoDpB/KCVTnP8/Am10 9/XmFw5rF7+9Zu/pGdZJ1cZeta6kJYD6XNYqMEzO9djnuFm1vNTCnyJTJE4DgY6ZveM4 CUbQ== X-Gm-Message-State: AO0yUKWKMOgL5uPeHuDWXqeEfxGCaLxEEK8T4zTIkXx4s+UkpAywPE6f 1El7PlT9RxOJOQXOa2saFK2yPwdgeWBLr0gm X-Google-Smtp-Source: AK7set9Pug0eqcpnJMJpe4gnZa8rLXQA+ixzm/4E0JEyHSRI5csyhS8TVVgH2xm2QfF6WQbSFc81eA== X-Received: by 2002:a05:6e02:1bc2:b0:310:d833:81dd with SMTP id x2-20020a056e021bc200b00310d83381ddmr10170282ilv.6.1675178867156; Tue, 31 Jan 2023 07:27:47 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:46 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger Subject: [PATCH 10/32] env: Allow VPL environment to be nowhere Date: Tue, 31 Jan 2023 08:26:40 -0700 Message-Id: <20230131152702.249197-11-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add an option to put the VPL environment nowhere (not in storage). Signed-off-by: Simon Glass --- env/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 9222330a676..927f9a38fa2 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -859,6 +859,16 @@ config TPL_ENV_IS_IN_FLASH endif +if VPL_ENV_SUPPORT + +config VPL_ENV_IS_NOWHERE + bool "VPL Environment is not stored" + default y if ENV_IS_NOWHERE + help + Similar to ENV_IS_NOWHERE, used for VPL environment. + +endif # VPL_ENV_SUPPORT + config USE_BOOTFILE bool "Add a 'bootfile' environment variable" help From patchwork Tue Jan 31 15:26:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734940 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=oI0Kqg9G; 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 4P5prp75Dxz1yhq for ; Wed, 1 Feb 2023 02:30:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 90D4D85B05; Tue, 31 Jan 2023 16:29:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oI0Kqg9G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6315C85AEF; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 748E085AED for ; Tue, 31 Jan 2023 16:27:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id u8so6603970ilq.13 for ; Tue, 31 Jan 2023 07:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=lNhidhWdDrO2o38iQvHQMzDi6RSwF8JOl5dtZ5ykdgE=; b=oI0Kqg9GJXvZgwsipg8zCtW4LRx6fyXsZ+slbddbGRxf4KrNf/3rA6/261wB/H7SFP 9c+zH+DoiFIIY87fGlggeCOPS7oOg9pmD8YI/6l3KyNDRFfefsZiVvPREwCZAOtiwuY7 s3wylj3W8pgaHEGcctsGo25tTuUV8rbnOmyVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lNhidhWdDrO2o38iQvHQMzDi6RSwF8JOl5dtZ5ykdgE=; b=DSn/OC+wiQV4lxYhgTgtEoPZ19Hz3BaBCLXiVCX68W9dzZVGMgh0mQdc9hBROz0T/d 6JYdQh8MYLP/QvZwh6GqMVXuu41Losib3c9M2nZDdPUo1GvMbjjn5xUgAlhbBwvRnCl/ wg9suib1gr0oGR3I0MGqDieztjSkdx6CadBr7EN+gO1MTzXfMic6G3HaqfnkjsveQirS G06eQxDwNLGts1m6L+89U9gJ/fhNe28t/rHhqdr2+HHPJ+eDa+gLozHB01umtUaHmUSs SBjROri4VinWwfB1qC/IL9VSzLTL/tvUYOZfDzZYS/BbLy98LcRL7xtNsZRR/p3LV2r2 2s0g== X-Gm-Message-State: AFqh2kppBtcs7etqGgl4zn88JnpHv+m4K4rpKUnZGF0u5muCCC5qWJMO p5XPxqhRtYn/XcLbKdca/wqhcNPtLsRYxBZS X-Google-Smtp-Source: AMrXdXvqM6MeCHJrljAspOxF4SQaSSY0cmX22r7iPv2nBF24Ib1MNZ9c+TxY9mmSvOwxwdxPECsYvg== X-Received: by 2002:a92:ad11:0:b0:30f:3b5d:69f with SMTP id w17-20020a92ad11000000b0030f3b5d069fmr31729848ilh.23.1675178867879; Tue, 31 Jan 2023 07:27:47 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:47 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 11/32] lib: Add VPL options for SHA1 and SHA256 Date: Tue, 31 Jan 2023 08:26:41 -0700 Message-Id: <20230131152702.249197-12-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add these options so these algorithms can be used in VPL. Signed-off-by: Simon Glass --- lib/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 47edd0719aa..6de50f31bc0 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -583,6 +583,26 @@ config SPL_SHA_PROG_HW_ACCEL endif +config VPL_SHA1 + bool "Enable SHA1 support in VPL" + depends on VPL + default y if SHA1 + help + This option enables support of hashing using SHA1 algorithm. + The hash is calculated in software. + The SHA1 algorithm produces a 160-bit (20-byte) hash value + (digest). + +config VPL_SHA256 + bool "Enable SHA256 support in VPL" + depends on VPL + default y if SHA256 + help + This option enables support of hashing using SHA256 algorithm. + The hash is calculated in software. + The SHA256 algorithm produces a 256-bit (32-byte) hash value + (digest). + if SHA_HW_ACCEL config SHA512_HW_ACCEL From patchwork Tue Jan 31 15:26:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734946 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZPj+kdU6; 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 4P5ptf3YMBz23gV for ; Wed, 1 Feb 2023 02:31:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A36A85B1B; Tue, 31 Jan 2023 16:29:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZPj+kdU6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D4A285AFB; Tue, 31 Jan 2023 16:28:21 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (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 04B6485AF7 for ; Tue, 31 Jan 2023 16:27:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x135.google.com with SMTP id w13so2535231ilv.3 for ; Tue, 31 Jan 2023 07:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=IH0kjIm9MVZJFXVFYpz++zKCtgHw3hvX+0xwlVpZD/0=; b=ZPj+kdU6dvZvJBmLZbrHnHlppyxRdAzoW2ccdrZdM8Kqo5W3Od8Y8VfaCD84Goz8/M Dr6Vrhz4wOoxNx7PxHVUFA7/9mTeD4uc7TuyGL9Qx3h4qM5vJfg+QC7GsI7MEpFATXLl WTxtd/eozBQXuNmaukyIbPYo8k9IRBqAZLAxc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IH0kjIm9MVZJFXVFYpz++zKCtgHw3hvX+0xwlVpZD/0=; b=A06S9nsGgw8ukgyd7l8aPofmzKiOhedz3Jq92Bl1BOkGoqU/zLxxnQwFONjs0TxpJ6 vl7pjBhhg/q1a+uVXiQ6oSVf/suPsi8BJiHh2qbkhOCz3Jqdx306cWBws1v4YTo/nuxT rxjNm47urxjaww1k9VHM5tiUxBnv3VQR/hyTiUIS60RqcHj/j44V7epDaCdarqpYPRY8 Gk7fvHDh3nk14Z/GYFP7DE6Jv7lI2jRRmQRxE6DaSE4QWq6bGMvkndZ0nq9ACVmQ0ZSZ uzKgBTAR/MdgWE5qHAD2apoOUuHAkEwTA0ecdjydcTAc3+9c9i7TFsq1M0bAlXUMnKLc L6og== X-Gm-Message-State: AO0yUKWvCDWYwxQw0i4RR6SKmqy5XhnP/1/JhoU69g9zY9uvIxN2YsDQ +SLTuDJ7uixdhk8yVQG8lGEE0pOh38A7AE1V X-Google-Smtp-Source: AK7set/wYRajiihgRGkS/VmggNWBdhZaxXayDxZP6Qy4MyR6V/tWLvCqBuWjVHj1LyXsA/+MH/XLyQ== X-Received: by 2002:a05:6e02:1c43:b0:310:fd98:1cc2 with SMTP id d3-20020a056e021c4300b00310fd981cc2mr5514546ilg.13.1675178868652; Tue, 31 Jan 2023 07:27:48 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 12/32] sandbox: Tidy up RTC options Date: Tue, 31 Jan 2023 08:26:42 -0700 Message-Id: <20230131152702.249197-13-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present we enable the sandbox RTC driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dts | 2 +- arch/sandbox/dts/sandbox.dtsi | 6 +++--- arch/sandbox/include/asm/rtc.h | 2 +- drivers/rtc/Kconfig | 18 ++++++++++++++++++ drivers/rtc/Makefile | 4 ++-- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 88b57bfb7e5..1dd880ebd58 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -76,7 +76,7 @@ clock-frequency = <400000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c0>; - u-boot,dm-pre-reloc; + u-boot,dm-spl; }; pcic: pci@0 { diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index 18bf1cb5b69..007b891a37a 100644 --- a/arch/sandbox/dts/sandbox.dtsi +++ b/arch/sandbox/dts/sandbox.dtsi @@ -111,7 +111,7 @@ reg = <0x43>; compatible = "sandbox-rtc"; sandbox,emul = <&emul0>; - u-boot,dm-pre-reloc; + u-boot,dm-spl; }; sandbox_pmic: sandbox_pmic { reg = <0x40>; @@ -122,7 +122,7 @@ }; i2c_emul: emul { - u-boot,dm-pre-reloc; + u-boot,dm-spl; reg = <0xff>; compatible = "sandbox,i2c-emul-parent"; emul_eeprom: emul-eeprom { @@ -132,7 +132,7 @@ #emul-cells = <0>; }; emul0: emul0 { - u-boot,dm-pre-reloc; + u-boot,dm-spl; compatible = "sandbox,i2c-rtc-emul"; #emul-cells = <0>; }; diff --git a/arch/sandbox/include/asm/rtc.h b/arch/sandbox/include/asm/rtc.h index 025cd6c67cf..25f9365e7de 100644 --- a/arch/sandbox/include/asm/rtc.h +++ b/arch/sandbox/include/asm/rtc.h @@ -40,7 +40,7 @@ enum { * @reg: Register values */ struct sandbox_i2c_rtc_plat_data { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) && IS_ENABLED(CONFIG_RTC_SANDBOX) struct dtd_sandbox_i2c_rtc_emul dtplat; #endif long base_time; diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 35b6ed4d7c7..fcfda2847c8 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -231,6 +231,24 @@ config RTC_M41T62 Enable driver for ST's M41T62 compatible RTC devices (like RV-4162). It is a serial (I2C) real-time clock (RTC) with alarm. +config RTC_SANDBOX + bool "Enable sandbox RTC driver" + depends on SANDBOX && DM_RTC + default y + help + Enable the sandbox RTC driver. This driver connects to the RTC + emulator and is used to test the RTC uclasses and associated code, + as well as the I2C subsystem. + +config SPL_RTC_SANDBOX + bool "Enable sandbox RTC driver (SPL)" + depends on SANDBOX && SPL_DM_RTC + default y + help + Enable the sandbox RTC driver. This driver connects to the RTC + emulator and is used to test the RTC uclasses and associated code, + as well as the I2C subsystem. + config RTC_STM32 bool "Enable STM32 RTC driver" depends on DM_RTC diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 447551e15aa..b6c9029c8f0 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -16,7 +16,7 @@ obj-$(CONFIG_RTC_DS3231) += ds3231.o obj-$(CONFIG_RTC_DS3232) += ds3232.o obj-$(CONFIG_RTC_EMULATION) += emul_rtc.o obj-$(CONFIG_RTC_HT1380) += ht1380.o -obj-$(CONFIG_SANDBOX) += i2c_rtc_emul.o +obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += i2c_rtc_emul.o obj-$(CONFIG_RTC_ISL1208) += isl1208.o obj-$(CONFIG_RTC_M41T62) += m41t62.o obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o @@ -35,6 +35,6 @@ obj-$(CONFIG_RTC_RX8025) += rx8025.o obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o obj-$(CONFIG_RTC_S35392A) += s35392a.o obj-$(CONFIG_RTC_STM32) += stm32_rtc.o -obj-$(CONFIG_SANDBOX) += sandbox_rtc.o +obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += sandbox_rtc.o obj-$(CONFIG_RTC_ABX80X) += abx80x.o obj-$(CONFIG_RTC_ZYNQMP) += zynqmp_rtc.o From patchwork Tue Jan 31 15:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734942 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Qgvxc2jb; 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 4P5psV2Scgz23gV for ; Wed, 1 Feb 2023 02:30:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D0C785B10; Tue, 31 Jan 2023 16:29:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Qgvxc2jb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C22D885AE3; Tue, 31 Jan 2023 16:28:10 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 EA55385AEE for ; Tue, 31 Jan 2023 16:27:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id g16so6634829ilr.1 for ; Tue, 31 Jan 2023 07:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=japZIgBhEDY3rayMIa6h1Y4mP1GMr5EsMIz6o5bH5A0=; b=Qgvxc2jbiYnMOpcOT1eoZIqUo/osylSzYkkbLpXalR5eFbCKLpaVtKs0Y2TD1ELftJ qO5IyqWHwCje0Umc3HIs6HYAuoSdllgSoWG/mrqq/f/idI/ghh9ieBGtfmL7q/dvjcQx LXCl/2LtT5m6han38Dh5Lk3M+oa86nqKMh8cg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=japZIgBhEDY3rayMIa6h1Y4mP1GMr5EsMIz6o5bH5A0=; b=dJiOOBxfCblE8Iqnc3gCUfZmriH3qRv6yIgQ8r0O+vw6qyikaOOCodx+s5E3+MB45I O2IY6yM1x3UV4HxZKU0X44mMKVgUW48+6d+68Kt6rYmAKflURYWNplkgl3qPKdyrDhe0 NIN4KrFuzKxev02NphFFWJ913w5MvTZsp6A96lraL1f6h5pgcmqcyr78MI4Txzn6HDdV ILLiRZMLFE/tOrup5vqIq+eF6RS5pncb1JUnbVQJBM9pwGMqqYVAnEnXunNHCbV5cf1C kBU50KQgwmgxbbqZah5fsGsF65U1kO0ltJa9TIaP197Pp5/HrYluCImEw/F0jLNrJFpC 0iFQ== X-Gm-Message-State: AO0yUKWd556rkHNWDpvBjxbyYDdGtob2AAXSoVhe/y4jz6UOyYgkSUnW wjza2LsI4L1JpqEQp3QwbmTzUzvK8iJXlFbg X-Google-Smtp-Source: AK7set90QbIx1g80+St6YBGXrT1NaPnbMb0UnvExvCUT9+oiQph/fNbkSWqu/GVCrZOg0+NqFcvvyA== X-Received: by 2002:a05:6e02:1d8c:b0:310:9d5f:35ae with SMTP id h12-20020a056e021d8c00b003109d5f35aemr26746617ila.26.1675178869440; Tue, 31 Jan 2023 07:27:49 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 13/32] sandbox: Use the generic VPL option to enable VPL Date: Tue, 31 Jan 2023 08:26:43 -0700 Message-Id: <20230131152702.249197-14-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Avoid using CONFIG_SANDBOX_VPL since we have a generic option which works just as well. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 1dd880ebd58..28c21f232a2 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -103,6 +103,6 @@ #include "cros-ec-keyboard.dtsi" #include "sandbox_pmic.dtsi" -#ifdef CONFIG_SANDBOX_VPL +#if IS_ENABLED(CONFIG_SUPPORT_VPL) #include "sandbox_vpl.dtsi" #endif From patchwork Tue Jan 31 15:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734943 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cwisAuUS; 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 4P5psk1xRCz23gV for ; Wed, 1 Feb 2023 02:30:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E2D5585B17; Tue, 31 Jan 2023 16:29:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="cwisAuUS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C4D485B06; Tue, 31 Jan 2023 16:28:19 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 6872085AF8 for ; Tue, 31 Jan 2023 16:27:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x130.google.com with SMTP id u8so6604023ilq.13 for ; Tue, 31 Jan 2023 07:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=E3aYAYDCntU5TG62qL4xulrI1QXA9v6Hn0NRJL2oZ8Y=; b=cwisAuUSo/KKt1/cP0S0Y4OS4U0+Qk5eMJnE8IF4Vin0ucL3Dmcfc2vs4i5SnINNq0 lT2kNWKtvk7e5uScGyfhwHaGa1zu5s2mpfJA1Lxr2RTCBKBDNa4as1S7Xj3+vsEnAKZ3 lbvq7DHeQq5FLcPIhsd919NwjEUMC+H8i5Fiw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E3aYAYDCntU5TG62qL4xulrI1QXA9v6Hn0NRJL2oZ8Y=; b=ZXOZ0OK34zt34y0pL7XEstyuDuFzD/k+6ZGhtuUSCkavuKNOlPM9qtEvo0hY7BOgK/ 4KSjK3ZE4Vc4ypDItWNcdKit/c/izX3caXKdnTU3eE4To5Qq4Q6wI6kd7ZXzGASJjFSV EHIldRzn1oHOD4HSmUjdElWkrEMwgkddGIk8LA8Ea+GIOBJuhmWBK2tDkIExqNLOkLTz kGoHocH33Ulrmi8THmuz7dRZc+1B5Jtnd34dpsWLPm83cfzbsOrTnmbpdkSt1m7dQV95 1RJf+a2gIgHnrbZ3k6+xPVmaY6yfS8SYXcFikGUJiqof8tCcS6I5FCbzLsC3Og+aUacd iDiA== X-Gm-Message-State: AO0yUKWoaKdVrxfzx9EGdBXLtgkcpLmJ4kDiqg0no9f9XtyxstKu7wVP gbrniAHZpG5E+5Ng06mrmxt30eEqCzSxWv+n X-Google-Smtp-Source: AK7set97jQM5LUesIdmvTrtahsQMyaemU+uTNTDs4NBtgq4R8ORie3I5IwnxTApBgLkB1PRtkGqjGQ== X-Received: by 2002:a05:6e02:15c6:b0:310:ae72:32a0 with SMTP id q6-20020a056e0215c600b00310ae7232a0mr11406151ilu.21.1675178870142; Tue, 31 Jan 2023 07:27:50 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 14/32] sandbox: Tidy up I2C options Date: Tue, 31 Jan 2023 08:26:44 -0700 Message-Id: <20230131152702.249197-15-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- drivers/i2c/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 347ba4d7822..70451e7c98b 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -47,6 +47,16 @@ config SPL_DM_I2C device (bus child) info is kept as parent platdata. The interface is defined in include/i2c.h. +config TPL_DM_I2C + bool "Enable Driver Model for I2C drivers in TPL" + depends on TPL_DM && DM_I2C + help + Enable driver model for I2C. The I2C uclass interface: probe, read, + write and speed, is implemented with the bus drivers operations, + which provide methods for bus setting and data transfer. Each chip + device (bus child) info is kept as parent platdata. The interface + is defined in include/i2c.h. + config VPL_DM_I2C bool "Enable Driver Model for I2C drivers in VPL" depends on VPL_DM && DM_I2C @@ -508,6 +518,16 @@ config SYS_I2C_ROCKCHIP config SYS_I2C_SANDBOX bool "Sandbox I2C driver" depends on SANDBOX && DM_I2C + default y + help + Enable I2C support for sandbox. This is an emulation of a real I2C + bus. Devices can be attached to the bus using the device tree + which specifies the driver to use. See sandbox.dts as an example. + +config SPL_SYS_I2C_SANDBOX + bool "Sandbox I2C driver (SPL)" + depends on SPL && SANDBOX && DM_I2C + default y help Enable I2C support for sandbox. This is an emulation of a real I2C bus. Devices can be attached to the bus using the device tree From patchwork Tue Jan 31 15:26:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734944 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XXG6sCq+; 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 4P5psy22cqz23gV for ; Wed, 1 Feb 2023 02:31:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5BF9085B16; Tue, 31 Jan 2023 16:29:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XXG6sCq+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 78EE385AF6; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (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 6CDA685AF9 for ; Tue, 31 Jan 2023 16:27:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd33.google.com with SMTP id k13so3160795iob.9 for ; Tue, 31 Jan 2023 07:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=H11JuwY7sxD++dIMwzXN/OcQyZ2awZiLZxXZGy2W9PI=; b=XXG6sCq+qOublidfbOcsM9X7t9tqyWgd6XXRpf2OjjXSTZ9v+VtsyOyX9O6utsbmMy Sa3n/m5eJl/2u4fBhpsRshKEuhNfVm2HPyxrkeg7JnvPkEFmJgYLBe0aLsviU+2eYgav b34f8OKjzE1lu2SXMIaGdLM7m6qhxg95478Zs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H11JuwY7sxD++dIMwzXN/OcQyZ2awZiLZxXZGy2W9PI=; b=ZyFSorampBOM35fdumWj8xZB0afI7OYr51eUT2rY+CJXNcl0BloWoc16Zk+sjAhLyM rF1UR+5jOImdXAaY/nUgoEBmUUjwxwL1C+WIMkOCM0CMZX2ufHClsgOJp7mjPx9BJXOP o60Y4OGN7V393tR8HyNIMQHINA8/taIp+Hogf22WYfimUhS+zpBAw4xpNgxTsu2T7yHS eAxY7Xp9Txlj4/m2r840oTmZD8CyIV6Ub0t5nZ9B7LsIO2UqWO4HcSBz4ozTB+VRFG1f iaqt77w0/UwAX//fUEGfkhKr7KHv+aMpUbHS7gr8zRmdsIdFlA4cOxQOKRhUb76yfVPB 8PJw== X-Gm-Message-State: AO0yUKUQQsY82izdTjXbBPdSe9BjuuvLHMafQV0TRd0hs4lAo2YGrqCY LQkZ2fGqmRWnIX4A60yD6RcpxgN5znkhBa/i X-Google-Smtp-Source: AK7set+OxDcse+TxK2nHfBKAPQ9Me/QLeFkyhmyYChPq2Hqy13e9n4uiGSmMQqbrtaTqmCVSLhMYTg== X-Received: by 2002:a6b:6b0f:0:b0:71e:8a65:cd4b with SMTP id g15-20020a6b6b0f000000b0071e8a65cd4bmr3863489ioc.19.1675178870865; Tue, 31 Jan 2023 07:27:50 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:50 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 15/32] fixdep: Add support for VPL Date: Tue, 31 Jan 2023 08:26:45 -0700 Message-Id: <20230131152702.249197-16-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add VPL files into the mix so that we can fix up the dependencies there. Signed-off-by: Simon Glass --- scripts/basic/fixdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 5ced0f6b069..3d40bd7ee25 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -421,6 +421,8 @@ int main(int argc, char *argv[]) strcpy(tmp_buf, "SPL_"); else if (!strncmp(target, "tpl/", 4)) strcpy(tmp_buf, "TPL_"); + else if (!strncmp(target, "vpl/", 4)) + strcpy(tmp_buf, "VPL_"); /* end U-Boot hack */ xprintf("cmd_%s := %s\n\n", target, cmdline); From patchwork Tue Jan 31 15:26:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734945 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OqutGbyF; 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 4P5ptR1gXMz23gV for ; Wed, 1 Feb 2023 02:31:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9642C85B24; Tue, 31 Jan 2023 16:29:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OqutGbyF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E7F285AF2; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 B95BD85AE4 for ; Tue, 31 Jan 2023 16:27:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id l7so4747449ilf.0 for ; Tue, 31 Jan 2023 07:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=R/tasFjjrnHtvaP6pNeXKEE5bTsnTJ0UZIa+b3buy28=; b=OqutGbyFJlbVwCnEmD7Gjdb/FYomgWwlIYDr3Tg3ULttmrWrOMd4QU1bvbPhqzpXn1 211JwknzY/HnfE0EtrXQzu+BCL5OYVRR9kEj47hDW0EXbdTpzbHKfkoWjOcKO/+yWVUa QUaaeRhWHEb8a4OMAWprsiKGIwIywuoFb5EMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R/tasFjjrnHtvaP6pNeXKEE5bTsnTJ0UZIa+b3buy28=; b=yLBDf6EmAbevOLLqewr8hnQg7VLy0HTOh7vTY3i3r3IxTX6vBHhFhAYs9nD1zv8U7c 9nM2ey+vPpD+ACPkBTFirlOMZZXP5pcPjAKQ0UllM7spVmwItWNbJ3dZFRKc+HsQovG7 GmmUl98mg3Pj1ydTyOnX2tW5mkDtjeI9HXGXoHsndcFrco0byAFV8iwEMArY9aHloe5J jNu25/nB6SRtIDy/rHJ4733pFG1i2hUC7WN1b2Ji09mNDWjAeM03pWmeILfMXDqGj186 YGbjjBUIYa/HIxNWWJUMdfg/HtNz0wXfN5X32foFp0GETD8fLaLaTINUjchq+W6OGude vkuQ== X-Gm-Message-State: AO0yUKWX6BOXV6cQ1mdT21dOpmucoPkmcS+AOZCJ3IyvY59WTOO0AD/p K6prqJDA7Htsi6TbANLzmoWhXT4F454ZMuyf X-Google-Smtp-Source: AK7set+oO6nKAE15bujq6Ubvrv1bGXbEly7kqOjQuaE3CtvLd1WtZygFWwc0vvQkcYobPqjNIYUlwQ== X-Received: by 2002:a05:6e02:12c5:b0:310:a5b8:5050 with SMTP id i5-20020a056e0212c500b00310a5b85050mr18000978ilm.22.1675178871536; Tue, 31 Jan 2023 07:27:51 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:51 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 16/32] fixdep: Refactor to make testing easier Date: Tue, 31 Jan 2023 08:26:46 -0700 Message-Id: <20230131152702.249197-17-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Move the config parsing into a separate function so that is is possible to write tests for the function. Signed-off-by: Simon Glass --- scripts/basic/fixdep.c | 87 ++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 3d40bd7ee25..a49d35ba5f6 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -236,47 +236,68 @@ static int str_ends_with(const char *s, int slen, const char *sub) return !memcmp(s + slen - sublen, sub, sublen); } -static void parse_config_file(const char *p) +static const char *parse_config_line(const char *p, const char **endp) { const char *q, *r; - const char *start = p; - while ((p = strstr(p, "CONFIG_"))) { - if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { - p += 7; - continue; - } - p += 7; + p = strstr(p, "CONFIG_"); + if (!p) { + *endp = NULL; + return NULL; + } + if ((isalnum(p[-1]) || p[-1] == '_')) { + *endp = p + 7; + return NULL; + } + p += 7; + q = p; + while (isalnum(*q) || *q == '_') + q++; + if (str_ends_with(p, q - p, "_MODULE")) + r = q - 7; + else + r = q; + /* + * U-Boot also handles + * CONFIG_IS_ENABLED(...) + * CONFIG_VAL(...) + */ + if ((q - p == 10 && !memcmp(p, "IS_ENABLED(", 11)) || + (q - p == 3 && !memcmp(p, "VAL(", 4))) { + p = q + 1; q = p; while (isalnum(*q) || *q == '_') q++; - if (str_ends_with(p, q - p, "_MODULE")) - r = q - 7; - else - r = q; - /* - * U-Boot also handles - * CONFIG_IS_ENABLED(...) - * CONFIG_VAL(...) - */ - if ((q - p == 10 && !memcmp(p, "IS_ENABLED(", 11)) || - (q - p == 3 && !memcmp(p, "VAL(", 4))) { - p = q + 1; - q = p; - while (isalnum(*q) || *q == '_') - q++; - r = q; - if (r > p && tmp_buf[0]) { - memcpy(tmp_buf + 4, p, r - p); - r = tmp_buf + 4 + (r - p); - p = tmp_buf; - } + r = q; + if (r > p && tmp_buf[0]) { + memcpy(tmp_buf + 4, p, r - p); + r = tmp_buf + 4 + (r - p); + p = tmp_buf; } - /* end U-Boot hack */ + } + /* end U-Boot hack */ + *endp = r; + + if (r > p) + return p; - if (r > p) - use_config(p, r - p); - p = q; + return NULL; +} + +static void parse_config_file(const char *base) +{ + const char *p; + + if (!*base) + return; + p = base + 1; + while (p) { + const char *out, *end; + + out = parse_config_line(p, &end); + if (out) + use_config(out, end - out); + p = end; } } From patchwork Tue Jan 31 15:26:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734949 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZIgTmN7G; 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 4P5pvL2b4Cz23gV for ; Wed, 1 Feb 2023 02:32:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 900C785B30; Tue, 31 Jan 2023 16:29:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZIgTmN7G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C7B7685ADE; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 EB34385AEB for ; Tue, 31 Jan 2023 16:27:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x136.google.com with SMTP id k12so1587727ilv.10 for ; Tue, 31 Jan 2023 07:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=nJVXVWYl1lxM2baLV8pX1S7C8KHWIhQVbdgbTuUF30U=; b=ZIgTmN7Gq0dr0WTMzvy/M9x5SpWs6lUHhiFxgyiyqytfnAOSCxsIMK3gWKYHODGqW8 /5mM2z5jtgTymSc94guanDhtq4tlNAY5u/TtXpT9qqMFN+u7CmpHy1t7b/JfY2pVKjoU mGbmGChVrg+nayAgiNeELe72dtbc/bemKySgU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nJVXVWYl1lxM2baLV8pX1S7C8KHWIhQVbdgbTuUF30U=; b=KRiDgd0OslfaWpoGp8wpTRXf2U7o+1iedtfXsVOSZKiy80V/F4AzNOOdLrcagEPZzX TaQ/lm1kvl82eGkFJqIF+5iLRdY94B0zPHYi6CiS4KwiJ/y0he+qzMLRQqOyFQMzlxp0 E71Zjh3ob7Qmu+YOTOr6TymOrvJhfXHob1FfIVY3yoI2so1W464sHm5S7ZOb/DoqT9bX b0aMgn3wktTsEdWwh/pK6ChFpCh9NGuK+TF9jbKy5IVP6Dg2I15lbMJpqMFWRDQ2u0Ax c/DUt+8cy85DUWIR25dmOGKRCCKLc8pdSvFuvwHXLy+otECycSlJ+rf6Z5k3zJPsew2e bvWw== X-Gm-Message-State: AFqh2kpAZyCrkgZQAEvlKw14fkJy5zlHnLljMueQBd7N5f6zq6OhqPyP WjkowdbG0x1ImaCEmQvk6E4vOKPhgcARPjw6 X-Google-Smtp-Source: AMrXdXu3kLpxzc9YOCOcFnvG3Pqwl76jP4afr+7G7UsUFmxqcVd4NPKhvSk7mRIP9myQTPaMvnv9Eg== X-Received: by 2002:a05:6e02:b29:b0:30f:6206:566e with SMTP id e9-20020a056e020b2900b0030f6206566emr31560462ilu.31.1675178872337; Tue, 31 Jan 2023 07:27:52 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:52 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 17/32] fixdep: Add some tests for parse_config_line() Date: Tue, 31 Jan 2023 08:26:47 -0700 Message-Id: <20230131152702.249197-18-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Add tests for this code to cover the basic cases. Signed-off-by: Simon Glass --- scripts/basic/fixdep.c | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index a49d35ba5f6..fe8180ab4e7 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -425,11 +425,84 @@ static void parse_dep_file(char *m, const char *target) xprintf("$(deps_%s):\n", target); } +#define CHECKP(expect, got) \ + if (expect != got) { \ + fprintf(stderr, "Test failed at line %d: expect %ld, got %ld\n", \ + __LINE__, expect - buf, got - buf); \ + return 1; \ + } + +#define CHECK(expect, got) \ + if (expect != got) { \ + fprintf(stderr, "Test failed at line %d: expect %p, got %p\n", \ + __LINE__, expect, got); \ + return 1; \ + } + +static int run_tests(void) +{ + const char *out, *end; + char buf_s[40], *buf = buf_s + 1; + + /* make sure the previous char doesn't look like part of the CONFIG */ + buf_s[0] = ' '; + + strcpy(buf, ""); + out = parse_config_line(buf, &end); + CHECK(NULL, out); + CHECK(NULL, end); + + strcpy(buf, "nothing"); + out = parse_config_line(buf, &end); + CHECK(NULL, out); + CHECK(NULL, end); + + strcpy(buf, "CONFIG_OPTION_MORE"); + out = parse_config_line(buf, &end); + CHECKP(buf + 7, out); + CHECKP(buf + 18, end); + + strcpy(buf, "some CONFIG_OPTION_MORE"); + out = parse_config_line(buf, &end); + CHECKP(buf + 12, out); + CHECKP(buf + 23, end); + + strcpy(buf, "some CONFIG_OPTION_MORE here"); + out = parse_config_line(buf, &end); + CHECKP(buf + 12, out); + CHECKP(buf + 23, end); + + strcpy(buf, "CONFIG_OPTION_MODULE"); + out = parse_config_line(buf, &end); + CHECKP(buf + 7, out); + CHECKP(buf + 13, end); + + strcpy(buf, "CONFIG_IS_ENABLED(FRED)"); + out = parse_config_line(buf, &end); + CHECKP(buf + 18, out); + CHECKP(buf + 22, end); + + strcpy(buf, "CONFIG_VAL(MARY)"); + out = parse_config_line(buf, &end); + CHECKP(buf + 11, out); + CHECKP(buf + 15, end); + + return 0; +} + int main(int argc, char *argv[]) { const char *depfile, *target, *cmdline; void *buf; + if (argc == 2 && !strcmp("-t", argv[1])) { + if (run_tests()) { + fprintf(stderr, "Tests failed\n"); + return 1; + } + printf("Tests passed\n"); + return 0; + } if (argc != 4) usage(); From patchwork Tue Jan 31 15:26:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734952 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TdY/gf5O; 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 4P5pw05lpdz23gV for ; Wed, 1 Feb 2023 02:32:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EA2985B3A; Tue, 31 Jan 2023 16:29:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TdY/gf5O"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 228AC85AFF; Tue, 31 Jan 2023 16:28:29 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (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 2FD9085B04 for ; Tue, 31 Jan 2023 16:27:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x132.google.com with SMTP id z2so6048680ilq.2 for ; Tue, 31 Jan 2023 07:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=Awehu8IIWMGYYmLkJSGo9mbVrQgqNsoaxm1PCZ8QwCA=; b=TdY/gf5ODNRfwxU3T5DCK4QinclAwF0hLluOXXIOK3MK6YvtkYa5KGFnfpe5MPunDS yAEmzhDvCC/LwdIEQ/Qeg8WCIj8I5ep7QbSCUGCQmczHIRn+tYWasx7ITMw2mSLRfpZ5 ce3giEiI7h3UGNjQyNUu3tERw61YdBLi3V180= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Awehu8IIWMGYYmLkJSGo9mbVrQgqNsoaxm1PCZ8QwCA=; b=DT0kwtbeSfSusFmeh5X184gA+F2jbaozAmZEBLtMGeaYq1qaWDKoB6+FP/luDyiqfB vSXPuJoDTh0cYrMjJedcDjJ2u5j6IDzqCAiCr9ytwT2YejDRLQhen/LHWvkf7ICs0k6E DAaobx5fhNwJ8Kg1brTVx7eDLOSSS8QdNAKPfe5dhXdntiDayiYpxcf86L/yjeJUPtYi W+xNyqspVKJvJpUNfnNrCwcb3Wk+0GEdRwlbf5etxcjSDSipDTNd6DPxO5Ee9neXuEoz d7EyRKyFA0nhG2UQuvhI6s91zezPTdUBjimYfRrq9pK0ha6nTCjI8M6NjM9zW3yoTEOQ jPbQ== X-Gm-Message-State: AO0yUKUGrYxBxTD2x0KtUk0m6YffawJRqwLFUDBrmbzEuapBXdkUk87R 3Cv4W8RWzCatq+tYFbGhSXKeaPP5YGSyzDo0 X-Google-Smtp-Source: AK7set8N6P/OcLFvkFMEhFJzJlTWkeeKMhD1pzDd7AVJS8bMfdDFTv68yzFMTZ8FY+mo9aLwZcOViw== X-Received: by 2002:a05:6e02:1524:b0:310:af48:ab2 with SMTP id i4-20020a056e02152400b00310af480ab2mr17565719ilu.23.1675178873192; Tue, 31 Jan 2023 07:27:53 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:52 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 18/32] test: Add SPL versions of the TEST_KCONFIG options Date: Tue, 31 Jan 2023 08:26:48 -0700 Message-Id: <20230131152702.249197-19-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean These are needed since we need a separate value in SPL and Proper. Signed-off-by: Simon Glass --- test/lib/Kconfig | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/lib/Kconfig b/test/lib/Kconfig index dbb03e4a36f..134cbb85b83 100644 --- a/test/lib/Kconfig +++ b/test/lib/Kconfig @@ -18,6 +18,24 @@ config TEST_KCONFIG_VALUE int "Value associated with the option" depends on TEST_KCONFIG_ENABLE help - This is the value whgch is present if TEST_KCONFIG_ENABLE is enabled. + This is the value which is present if TEST_KCONFIG_ENABLE is enabled. + +config SPL_TEST_KCONFIG + bool "Enable detection of Kconfig macro errors (SPL)" + help + This is used to test that the IF_ENABLED_INT() macro causes a build error + if the value is used when the CONFIG Is not enabled. + +config SPL_TEST_KCONFIG_ENABLE + bool "Option to enable (SPL)" + help + This is the option that controls whether the value is present. + +config SPL_TEST_KCONFIG_VALUE + int "Value associated with the option (SPL" + depends on SPL_TEST_KCONFIG_ENABLE + help + This is the value which is present if SPL_TEST_KCONFIG_ENABLE is + enabled. endif # SANDBOX From patchwork Tue Jan 31 15:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734950 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=bEUMKLW9; 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 4P5pvY6YRSz23gV for ; Wed, 1 Feb 2023 02:32:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4560285B37; Tue, 31 Jan 2023 16:29:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bEUMKLW9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4AE0285AF2; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,UPPERCASE_75_100 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 D59AC85AF4 for ; Tue, 31 Jan 2023 16:27:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd36.google.com with SMTP id 65so2993783iou.3 for ; Tue, 31 Jan 2023 07:27:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=ljBmh3Iz5JL03PAUHgJnRLLRkax9rzlQX2vBHFf87UA=; b=bEUMKLW9l5RqTEvJ6M7N8OlXxB4BW2afQXMWJmWZUF9roa0H1DtBHmWrOtN+U/+rB4 C2Ts3fcuoTeO3tbfeGEl+/v5bkHcznfrROahNFKywE5wy49NrERzGMeFKJQnh7jiIOz4 OKti/QaDFbHrLxuXYJV7qoutfbuPJi0/HFBoo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ljBmh3Iz5JL03PAUHgJnRLLRkax9rzlQX2vBHFf87UA=; b=UPeQGIRIs/OABLNcWEZi+pcWCTVmPx90u2/R5t46gefE+wba0Ebom2g/ucGHnbfik/ F9SLNXVdHH51lG69DlRKp01gD6bIcVHbkRcTqV8Me99SMvzeCzTlMBNK4m6DZIAfmb0D N6YC95tN9eU49HkojoHujDyAuTU/qV9imCelNpxGlwxqhl0+hxwLPG55eSeAo7bkgG/V u03Zj5zKTi39vS0B7Vo9GZolA9jPDkT3oTJRtK0QuTEw6Dw7YGE8+mvw0LQv6Ka6j86G ceO7XhbKASkuo5O0AVqCHXIvhXaE6yR+iMlx0A21LZgLkNdyvsTz9ScDDnE6GC+5E6Fx guaQ== X-Gm-Message-State: AO0yUKVWdpT9WK1B3M9fX2Np8kf9iIlWD0YRUjagqNFyXj326I9DhtSk jxHIPivDjqZTxBQi+JRx88oksy/1nqczDTjO X-Google-Smtp-Source: AK7set9uPq83mB3B+VRmAtYvFhbYx9OrSoBkDwvpNu5rZpqLJod8EExjLf5mxQcDeMQqVFnYhs9MZw== X-Received: by 2002:a6b:f913:0:b0:712:bfc7:b203 with SMTP id j19-20020a6bf913000000b00712bfc7b203mr8847491iog.3.1675178874007; Tue, 31 Jan 2023 07:27:54 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:53 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 19/32] kconfig: Add configuration files for noproper and nospl Date: Tue, 31 Jan 2023 08:26:49 -0700 Message-Id: <20230131152702.249197-20-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean These files indicate which options are not for use in U-Boot proper and which are not for use in SPL builds. This allows the kconfig tool to correctly generate its output. Signed-off-by: Simon Glass --- scripts/conf_noproper | 175 ++++++++++++++++++++++++++++++++++++++++++ scripts/conf_nospl | 79 +++++++++++++++++++ 2 files changed, 254 insertions(+) create mode 100644 scripts/conf_noproper create mode 100644 scripts/conf_nospl diff --git a/scripts/conf_noproper b/scripts/conf_noproper new file mode 100644 index 00000000000..e6066dac41b --- /dev/null +++ b/scripts/conf_noproper @@ -0,0 +1,175 @@ +# These options should not be enabled in Proper builds + +ALTERA_SDRAM +AM33XX_ENABLE_RTC32K_OSC +ARMV7_SET_CORTEX_SMPEN +AT91_MCK_BYPASS +ATF +ATF_LOAD_IMAGE_V2 +ATF_NO_PLATFORM_PARAM +BANNER_PRINT +BINMAN_SYMBOLS +BINMAN_UBOOT_SYMBOLS +BOARD_INIT +BOOTMETH_VBE_SIMPLE_FW +BOOTROM_SUPPORT +BSS_MAX_SIZE +BSS_START_ADDR +BUILD +CRYPTO +DEBUG +DFU_NO_RESET +DISPLAY_PRINT +DRIVERS_MISC +EARLY_BSS +ETH_DEVICE +FALCON_BOOT_MMCSD +FIT_GENERATOR +FIT_IMAGE_TINY +FIT_SOURCE +FLUSH_IMAGE +FOO +FRAMEWORK +FRAMEWORK_BOARD_INIT_F +FRED +FSL_PBL +FS_LOAD_ARGS_NAME +FS_LOAD_KERNEL_NAME +FS_LOAD_PAYLOAD_NAME +GD_ADDR +GENERATE_ATMEL_PMECC_HEADER +IMAGE +IMAGE_TYPE +IMX_ROMAPI_LOADADDR +INIT_MINIMAL +KERNEL_BOOT +LDSCRIPT +LEGACY_BLOCK +LEGACY_IMAGE_CRC_CHECK +LIBCOMMON_SUPPORT +LIBCRYPTO +LIBDISK_SUPPORT +LIBGENERIC_SUPPORT +LOADER_SUPPORT +LOAD_FIT +LOAD_FIT_ADDRESS +LOAD_FIT_APPLY_OVERLAY +LOAD_FIT_APPLY_OVERLAY_BUF_SZ +LOAD_FIT_FULL +LOAD_IMX_CONTAINER +MALTA +MAX_FOOTPRINT +MAX_PEB_SIZE +MAX_SIZE +MEMSIZE_IN_BYTES +MKEFICAPSULE +MMC_BOOT +MMC_TINY +MPC83XX_WAIT_FOR_NAND +MPC8XXX_INIT_DDR +MTD_SUPPORT +MUSB_NEW +MXS_PSWITCH_WAIT +NAND_AM33XX_BCH +NAND_BASE +NAND_DRIVERS +NAND_ECC +NAND_IDENT +NAND_INIT +NAND_LOAD +NAND_RAW_ONLY +NAND_SIMPLE +NAND_SOFTECC +NAND_SUPPORT +NEEDS_SEPARATE_STACK +NET_VCI_STRING +NOR_SUPPORT +NO_CPU_SUPPORT +NS16550_MIN_FUNCTIONS +OF_PLATDATA +OF_PLATDATA_DRIVER_RT +OF_PLATDATA_INST +OF_PLATDATA_NO_BIND +OF_PLATDATA_PARENT +OF_PLATDATA_RT +OMAP3_ID_NAND +ONENAND_SUPPORT +OPENSBI +OPENSBI_LOAD_ADDR +OPENSBI_SCRATCH_OPTIONS +OS_BOOT +PAD_TO +PANIC_ON_RAW_IMAGE +PAYLOAD +PLATDATA +POST_MEM_SUPPORT +POWER_TPS65910 +RAM_DEVICE +RAM_SUPPORT +RAW_IMAGE_SUPPORT +READ_ONLY +RECOVER_DATA_SECTION +RELOC_MALLOC_ADDR +RELOC_MALLOC_SIZE +RELOC_STACK +RELOC_TEXT_BASE +ROCKCHIP_BACK_TO_BROM +ROCKCHIP_EARLYRETURN_TO_BROM +RTC +RTC_DDR_SUPPORT +SATA_RAW_U_BOOT_SECTOR +SATA_RAW_U_BOOT_USE_SECTOR +SDP_USB_DEV +SEPARATE_BSS +SHOW_ERRORS +SIZE_LIMIT +SIZE_LIMIT_PROVIDE_STACK +SIZE_LIMIT_SUBTRACT_GD +SIZE_LIMIT_SUBTRACT_MALLOC +SKIP_RELOCATE +SPI_FLASH_SUPPORT +SPI_FLASH_TINY +SPI_LOAD +STACK +STACK_R +STACK_R_ADDR +STACK_R_MALLOC_SIMPLE_LEN +SYS_CCSR_DO_NOT_RELOCATE +SYS_MALLOC_SIMPLE +SYS_NO_VECTOR_TABLE +SYS_REPORT_STACK_F_USAGE +TARGET +THERMAL +TINY_MEMSET +UART2_SPIS_PINMUX +UART_CLOCK +UBI +UBI_INFO_ADDR +UBI_LEB_START +UBI_LOAD_ARGS_ID +UBI_LOAD_BY_VOLNAME +UBI_LOAD_KERNEL_ID +UBI_LOAD_MONITOR_ID +UBI_LOAD_MONITOR_VOLNAME +UBI_MAX_PEBS +UBI_MAX_PEB_SIZE +UBI_MAX_VOL_LEBS +UBI_PEB_OFFSET +UBI_VID_OFFSET +UBI_VOL_IDS +UBI_VOL_ID_MAX +UBOOT_KEY_HASH +USB_HOST_SUPPORT +USB_SDP_SUPPORT +USE_TINY_PRINTF +X86_TSC_TIMER_NATIVE +XIP_SUPPORT +YMODEM_SUPPORT +ZYNQMP_ALT_BOOTMODE +ZYNQMP_ALT_BOOTMODE_ENABLED +ZYNQMP_DRAM_BANK1_BASE +ZYNQMP_DRAM_BANK1_LEN +ZYNQMP_DRAM_BANK2_BASE +ZYNQMP_DRAM_BANK2_LEN +ZYNQMP_DRAM_ECC_INIT +ZYNQMP_RESTORE_JTAG diff --git a/scripts/conf_nospl b/scripts/conf_nospl new file mode 100644 index 00000000000..88b38c636ec --- /dev/null +++ b/scripts/conf_nospl @@ -0,0 +1,79 @@ +# These options should not be enabled in SPL builds + +ACPI_PMC_SANDBOX +BINMAN_FDT +CLK_INTEL +CMD_MMC_RPMB +CMD_MMC_SWRITE +DFU_MMC +DFU_MTD +DFU_NAND +DFU_SF +DFU_SF_PART +DFU_WRITE_ALT +DMA_LEGACY +DM_DMA +DM_EVENT +DM_REGULATOR_ANATOP +DM_REGULATOR_PBIAS +DM_REGULATOR_STM32_VREFBUF +DM_STDIO +DWC_AHSATA_AHCI +EFI_DT_FIXUP +EFI_EBBR_2_1_CONFORMANCE +EFI_SCROLL_ON_CLEAR_SCREEN +ENV_APPEND +EVENT_DEBUG +EXYNOS7870 +EXYNOS7880 +FASTBOOT_UUU_SUPPORT +FRED +FRU_SC +INTEL_GENERIC_WIFI +LOG_SYSLOG +LS2_SFP +MALTA +MEMSIZE_IN_BYTES +MIPS_BOOT_CMDLINE_LEGACY +MIPS_BOOT_ENV_LEGACY +MIPS_BOOT_FDT +MMC_HW_PARTITIONING +MMC_VERBOSE +MSCODE_PARSER +MUX_MMIO +NAND_CS_INIT +NO_FB_CLEAR +OFNODE_MULTI_TREE +PCF8575_GPIO +PHY_J721E_WIZ +PKCS7_MESSAGE_PARSER +PKCS7_VERIFY +PLATDATA +PRE_CONSOLE_BUFFER +REGULATOR_RK8XX +RESTORE_EXCEPTION_VECTOR_BASE +ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON +SERIAL_PUTS +SERIAL_RX_BUFFER +SHA512_HW_ACCEL +SILENT_CONSOLE_UPDATE_ON_RELOC +SILENT_CONSOLE_UPDATE_ON_SET +SIMPLE_BUS_CORRECT_RANGE +SMC911X_32_BIT +SPI_DIRMAP +SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT +SPL_X86_32BIT_INIT +STM32_ETZPC +SYSRESET_AT91 +SYSRESET_X86 +SYS_DEVICE_NULLDEV +SYS_WHITE_ON_BLACK +TARGET_DENEB +TARGET_EVB_RK3399 +TARGET_GIEDI +TARGET_ST_STM32MP15X +TURRIS_OMNIA_MCU +USB_GADGET_OS_DESCRIPTORS +X509_CERTIFICATE_PARSER +XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP +XILINX_MICROBLAZE0_USR_EXCEP From patchwork Tue Jan 31 15:26:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734948 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=SGsCEIs3; 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 4P5pv55RKgz23gV for ; Wed, 1 Feb 2023 02:32:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 914BC85B2B; Tue, 31 Jan 2023 16:29:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="SGsCEIs3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EA0A85AF2; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 454E185AF3 for ; Tue, 31 Jan 2023 16:27:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id u8so6604133ilq.13 for ; Tue, 31 Jan 2023 07:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=h2fiF2/CQP91SNjB3LgukxdDeDOrS7nFmT6fq+n3CwY=; b=SGsCEIs38+iYf7IaWuTQXolmUWxm4a3vf+uzXfY67d9V9VQFI7vohriRP3hn35sDC5 WVGQCzFAeLT0RYzJwcS15+V+dF9Yc4a/O/AuS0XQTEC/ITlIfVwk0WcQWFgCdxcEGf4n molVPI1cepjZbo12aqPgata8E3ZD2DWA4H3x0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h2fiF2/CQP91SNjB3LgukxdDeDOrS7nFmT6fq+n3CwY=; b=pwZEN6u9nF9zx1eGNDAQU+E2N6VfAaewBkYzdvhk8Idc932h6Chg/21MmN6gJhlBsu DmZDsM7B/QFdyUkahqtes/PNkXtROC2gjZgXZNH2xafMPVDvGi0N+REY1Z3l69DFVDW2 3ck7noVW6SluNxIhAkThtUQEDkuy6zvNx3RDDw7a/rjiLtCVmNGSmFpyfVWt038hLU20 62i+ptuJqXBx/UUM7BZIGrhgyvoKsJN0AQyKoHbmUMxKsHrqAais7h7LiFQ4w0JOkCnn K6fmJzRKxDEPINC0A4Ab1ZkiKhiWP8fFO3xA7zd5IrBr3ZA18CJ971tBLKUVUEufQ4lW ZCBA== X-Gm-Message-State: AO0yUKUc8bVa0n7p48MkZz2IdsYfeJru42MDpUF0VX6Ty79l41O1vuYp sWaAzLexDyC6T8nBrddUDpq5S4YPIyKMEt5X X-Google-Smtp-Source: AK7set+WJpI5+hSj2fZRffHC3i3DLVKYldb9J2ezkQ27VJn8AML0LSNizJpQBlbVeGAby9U8C39pRw== X-Received: by 2002:a05:6e02:144c:b0:311:478:f282 with SMTP id p12-20020a056e02144c00b003110478f282mr4941113ilo.26.1675178874731; Tue, 31 Jan 2023 07:27:54 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:54 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 20/32] kconfig: Refactor code into separate writer functions Date: Tue, 31 Jan 2023 08:26:50 -0700 Message-Id: <20230131152702.249197-21-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Separate out the code that writes the Makefile and headers so we can reuse these functions when writing out SPL files. This makes no functional change. Signed-off-by: Simon Glass --- scripts/kconfig/confdata.c | 65 ++++++++++++++++++++++---------------- scripts/kconfig/expr.h | 9 ++++++ scripts/kconfig/lkc.h | 9 ++++++ 3 files changed, 56 insertions(+), 27 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index d587b10d7f8..73bf43bcb95 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -509,27 +509,18 @@ int conf_read(const char *name) return 0; } -/* - * Kconfig configuration printer - * - * This printer is used when generating the resulting configuration after - * kconfig invocation and `defconfig' files. Unset symbol might be omitted by - * passing a non-NULL argument to the printer. - * - */ -static void -kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +/* Print a symbol for a Makefile */ +static void print_makefile_sym(FILE *fp, const char *name, + enum symbol_type type, const char *value, + bool skip_unset) { - - switch (sym->type) { + switch (type) { case S_BOOLEAN: case S_TRISTATE: if (*value == 'n') { - bool skip_unset = (arg != NULL); - if (!skip_unset) fprintf(fp, "# %s%s is not set\n", - CONFIG_, sym->name); + CONFIG_, name); return; } break; @@ -537,7 +528,21 @@ kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) break; } - fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); + fprintf(fp, "%s%s=%s\n", CONFIG_, name, value); +} + +/* + * Kconfig configuration printer + * + * This printer is used when generating the resulting configuration after + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by + * passing a non-NULL argument to the printer. + * + */ +static void +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + print_makefile_sym(fp, sym->name, sym->type, value, arg != NULL); } static void @@ -566,16 +571,12 @@ static struct conf_printer kconfig_printer_cb = .print_comment = kconfig_print_comment, }; -/* - * Header printer - * - * This printer is used when generating the `include/generated/autoconf.h' file. - */ -static void -header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +/* Print a symbol for a header file */ +static void print_header_sym(FILE *fp, const char *name, enum symbol_type type, + const char *value) { - switch (sym->type) { + switch (type) { case S_BOOLEAN: case S_TRISTATE: { const char *suffix = ""; @@ -588,7 +589,7 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) /* fall through */ default: fprintf(fp, "#define %s%s%s 1\n", - CONFIG_, sym->name, suffix); + CONFIG_, name, suffix); } break; } @@ -598,18 +599,28 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X')) prefix = "0x"; fprintf(fp, "#define %s%s %s%s\n", - CONFIG_, sym->name, prefix, value); + CONFIG_, name, prefix, value); break; } case S_STRING: case S_INT: fprintf(fp, "#define %s%s %s\n", - CONFIG_, sym->name, value); + CONFIG_, name, value); break; default: break; } +} +/* + * Header printer + * + * This printer is used when generating the `include/generated/autoconf.h' file. + */ +static void +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + print_header_sym(fp, sym->name, sym->type, value); } static void diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 7c329e17900..656c87fb4f3 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -158,6 +158,15 @@ struct symbol { /* Set symbol to y if allnoconfig; used for symbols that hide others */ #define SYMBOL_ALLNOCONFIG_Y 0x200000 +/* U-Boot: Marks an SPL symbol */ +#define SYMBOL_SPL 0x400000 + +/* U-Boot: Marks a non-SPL symbol that also has an SPL version */ +#define SYMBOL_HAS_SPL 0x800000 + +/* U-Boot: Marks an-SPL symbol that does not have a non-SPL version */ +#define SYMBOL_SPL_ONLY 0x1000000 + #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 9973 diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index 9eb7c837cd8..dec03cc927a 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -71,6 +71,15 @@ void sym_add_change_count(int count); bool conf_set_all_new_symbols(enum conf_def_mode mode); void set_all_choice_values(struct symbol *csym); +/** + * conf_mark_spl_symbols() - Mark SPL symbols + * + * Symbols which don't start with SPL_ (TPL_, etc.) but have an SPL version + * should be marked with the SYMBOL_SPL flag, so we know to avoid writing them + * in the SPL autoconf.h files. + */ +void conf_mark_spl_symbols(void); + /* confdata.c and expr.c */ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) { From patchwork Tue Jan 31 15:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734958 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=UmHH8Lxa; 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 4P5pxf3Jssz23gV for ; Wed, 1 Feb 2023 02:34:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4C17B85B4C; Tue, 31 Jan 2023 16:30:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="UmHH8Lxa"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8542885AE7; Tue, 31 Jan 2023 16:28:37 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 5726385AED for ; Tue, 31 Jan 2023 16:28:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd29.google.com with SMTP id e204so5765365iof.1 for ; Tue, 31 Jan 2023 07:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=PmsAqcBKdhO5G+2hGNFC3BqNi/T8IPZDhM1wMs99fOE=; b=UmHH8LxagEW9mm8mGKSLjb3nu2CV4cvfF3k4/9InzvubG0LnLTbEjxyuo6DcTkqXRA lQg/XhTxOwQ5Oz5UyfLSdp8APBYHhxJ5YScBy9Pkxu0i7WgkQPRuDlKkmRiukvgTCjuz GU3ylgrA829sBCWWShuvIOzQFCvZBZtJEDtr8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PmsAqcBKdhO5G+2hGNFC3BqNi/T8IPZDhM1wMs99fOE=; b=ttzrZP3WaZnUL2web5sVy/oby3Id9/WpjsEJi2yK0N12KqGcUAwQI30OElt9oCNm6m usSdcso4vCaJNoPRjkqeBTTT1yd35M9z8M78zoCYa3J1ltGNR5v7D5TF4wlG9fpXE+K5 KLSGEy4qTCyfArtA+jNTTdFwl7nKgdGIzlmopk0Mj03DRMXc2/mIR3S41OZ7cdk/od4D LT2P2RrkZFMWtqIaE6xnNq47jPyI3f202L0fU3JlIbJA1Q0rJ1F5JkSG6O0xZVsGGCGt y8K/1xKKxSpLWJeKp0r1D93+SUcBvdR3JsDnnNqr3aXQHA+Xs62LlbBqsLIrlyCRSrh3 4ong== X-Gm-Message-State: AO0yUKVgc4hyCWqYkzznX8dz6Gpyj55x3jWOazo7KNQsD8dXa9cX2e29 iLLLsFbq0mUqgpKH5nhaQSszBc0taxM4Dh0I X-Google-Smtp-Source: AK7set/qlR4CW/jRXeR1u+Z1mxMs6PXuqDiZd+089uW3uX87Rdk/2ukZbbfD34paBNCmqUnEqZKnGA== X-Received: by 2002:a6b:5113:0:b0:71c:3371:b638 with SMTP id f19-20020a6b5113000000b0071c3371b638mr5054294iob.12.1675178875482; Tue, 31 Jan 2023 07:27:55 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 21/32] kconfig: Support writing separate SPL files Date: Tue, 31 Jan 2023 08:26:51 -0700 Message-Id: <20230131152702.249197-22-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present kconfig writes out several files, including: auto.conf - CONFIG settings used by make autoconf.h - header file used by C code This works well but is a bit ugly in places, for example requiring the use of a SPL_TPL_ macro in Makefiles to distinguish between options intended for SPL and U-Boot proper. Update the kconfig tool to also output separate files for each phase: e.g. auto_spl.conf and autoconf_spl.h These are similar to the existing file, but drop the SPL_ prefix so that SPL_TPL_ is not needed. It also allows the CONFIG_IS_ENABLED() macro to be simplified, in a later patch. The output of existing files is not changed in any way, This commit just adds new ones. These changes may benefit from some reworking to send upstream, e.g. to use a struct for the 'arg' parameter. Signed-off-by: Simon Glass --- scripts/kconfig/conf.c | 6 + scripts/kconfig/confdata.c | 310 ++++++++++++++++++++++++++++++++++++- scripts/kconfig/expr.h | 13 +- scripts/kconfig/lkc.h | 10 +- 4 files changed, 330 insertions(+), 9 deletions(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 376f796f674..40a3b8a45d0 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -684,6 +684,12 @@ int main(int ac, char **av) break; } + /* U-Boot: Mark symbols according to their SPL/non-SPL nature */ + if (sync_kconfig) { + if (conf_mark_symbols()) + exit(1); + } + if (sync_kconfig) { /* syncconfig is used during the build so we shall update autoconf. * All other commands are only used to generate a config. diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 73bf43bcb95..cc1f133b0ea 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -16,6 +16,15 @@ #include "lkc.h" +/* Number of SPL prefixes we recognise */ +#define NUM_SPLS 4 + +/* + * SPL prefixes recognised. For example CONFIG_SPL_xxx is considered to be an + * SPL version of CONFIG_xxx + */ +static const char *spl_name[NUM_SPLS] = {"SPL", "TPL", "VPL", "TOOLS"}; + /* return true if 'path' exists, false otherwise */ static bool is_present(const char *path) { @@ -571,11 +580,88 @@ static struct conf_printer kconfig_printer_cb = .print_comment = kconfig_print_comment, }; +/** + * get_spl_name() - Look up an SPL symbol + * + * This is used to get the name of a Kconfig option to write in an SPL context. + * If the symbol has an SPL symbol, this means it is used for U-Boot proper, so + * should not be written at all. + * + * Otherwise, this returns the name of the option. If the option is an SPL + * option, then the prefix (SPL_ or TPL_) is removed + * + * @sym: Symbol to look up + * @arg: Argument passed to the symbol function. This is void * but is actually + * an int, indicating the SPL index / type (see spl_name[]) + * @return name to write out for this symbol xxx: + * NULL (don't write) if xxx has an associated SPL symbol + * xxx if xxx is a non-SPL symbol + * xxx if SPL_xxx is an SPL symbol + */ +static const char *get_spl_name(const struct symbol *sym, const void *arg) +{ + int spl = (long)arg; + const char *name = sym->name; + + /* + * Don't print it if this has an SPL symbol because processing of the + * SPL symbol (e.g. SPL_FOO) will output CONFIG_FOO as well as + * CONFIG_SPL_FOO + */ + if (sym->flags & SYMBOL_HAS_SPL) + return NULL; + + /* + * If it is SPL, only print it if the SPL_ prefix matches + * Drop the prefix. + */ + if (sym->flags & SYMBOL_SPL) { + int len = strlen(spl_name[spl]); + + if (!strncmp(name, spl_name[spl], len) && name[len] == '_') + name += len + 1; + } + + return name; +} + +/* + * auto.conf configuration printer for SPL + * + * This is used for creating auto.conf as well as SPL files like auto_spl.conf + * + * This printer is used when generating the resulting configuration after + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by + * passing a non-NULL argument to the printer. + */ +static void spl_kconfig_print_symbol(FILE *fp, struct symbol *sym, + const char *value, void *arg) +{ + const char *name; + + name = get_spl_name(sym, arg); + if (!name) + return; + + /* + * If this is an SPL symbol, first print the symbol without the SPL + * prefix + */ + if (name != sym->name) + print_makefile_sym(fp, name, sym->type, value, true); + if (!(sym->flags & SYMBOL_NO_SPL)) + print_makefile_sym(fp, sym->name, sym->type, value, true); +} + +static struct conf_printer spl_kconfig_printer_cb = { + .print_symbol = spl_kconfig_print_symbol, + .print_comment = kconfig_print_comment, +}; + /* Print a symbol for a header file */ static void print_header_sym(FILE *fp, const char *name, enum symbol_type type, const char *value) { - switch (type) { case S_BOOLEAN: case S_TRISTATE: { @@ -651,6 +737,32 @@ static struct conf_printer header_printer_cb = .print_comment = header_print_comment, }; +/* + * SPL header printer + * + * This printer is used when generating SPL files such as + * `include/generated/autoconf_spl.h' + */ +static void spl_header_print_symbol(FILE *fp, struct symbol *sym, + const char *value, void *arg) +{ + const char *name; + + name = get_spl_name(sym, arg); + if (!name) + return; + + if (name != sym->name) + print_header_sym(fp, name, sym->type, value); + if (!(sym->flags & SYMBOL_NO_SPL)) + print_header_sym(fp, sym->name, sym->type, value); +} + +static struct conf_printer spl_header_printer_cb = { + .print_symbol = spl_header_print_symbol, + .print_comment = header_print_comment, +}; + /* * Tristate printer * @@ -1027,7 +1139,9 @@ int conf_write_autoconf(void) struct symbol *sym; const char *name; FILE *out, *tristate, *out_h; - int i; + FILE *out_spl[NUM_SPLS]; + FILE *out_h_spl[NUM_SPLS]; + int i, spl; sym_clear_all_valid(); @@ -1053,12 +1167,51 @@ int conf_write_autoconf(void) return 1; } + for (spl = 0; spl < NUM_SPLS; spl++) { + char fname[80]; + + snprintf(fname, sizeof(fname), ".tmpconfig_%s", + spl_name[spl]); + + out_spl[spl] = fopen(fname, "w"); + if (!out_spl[spl]) { + while (spl--) { + fclose(out_spl[spl]); + fclose(out_h_spl[spl]); + } + fclose(out_h); + fclose(out); + fclose(tristate); + return 1; + } + + snprintf(fname, sizeof(fname), ".tmpconfig_%s.h", + spl_name[spl]); + + out_h_spl[spl] = fopen(fname, "w"); + if (!out_h_spl[spl]) { + fclose(out_spl[spl]); + while (spl--) { + fclose(out_spl[spl]); + fclose(out_h_spl[spl]); + } + fclose(out_h); + fclose(out); + fclose(tristate); + return 1; + } + } + conf_write_heading(out, &kconfig_printer_cb, NULL); conf_write_heading(tristate, &tristate_printer_cb, NULL); conf_write_heading(out_h, &header_printer_cb, NULL); + for (spl = 0; spl < NUM_SPLS; spl++) + conf_write_heading(out_h_spl[spl], &spl_header_printer_cb, + (void *)(long)spl); + for_all_symbols(i, sym) { sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE) || !sym->name) @@ -1070,10 +1223,24 @@ int conf_write_autoconf(void) conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); conf_write_symbol(out_h, sym, &header_printer_cb, NULL); + + for (spl = 0; spl < NUM_SPLS; spl++) { + /* write make variables to auto_.conf */ + conf_write_symbol(out_spl[spl], sym, + &spl_kconfig_printer_cb, + (void *)(long)spl); + + /* write #defines to autoconf_.h */ + conf_write_symbol(out_h_spl[spl], sym, + &spl_header_printer_cb, + (void *)(long)spl); + } } fclose(out); fclose(tristate); fclose(out_h); + for (spl = 0; spl < NUM_SPLS; spl++) + fclose(out_h_spl[spl]); name = getenv("KCONFIG_AUTOHEADER"); if (!name) @@ -1083,6 +1250,29 @@ int conf_write_autoconf(void) if (rename(".tmpconfig.h", name)) return 1; + for (spl = 0; spl < NUM_SPLS; spl++) { + char tmpname[80], fname[80]; + char *s; + + snprintf(tmpname, sizeof(tmpname), ".tmpconfig_%s.h", + spl_name[spl]); + snprintf(fname, sizeof(fname), + "include/generated/autoconf_%s.h", spl_name[spl]); + for (s = fname; *s; s++) + *s = tolower(*s); + if (rename(tmpname, fname)) + return 1; + + snprintf(tmpname, sizeof(tmpname), ".tmpconfig_%s", + spl_name[spl]); + snprintf(fname, sizeof(fname), + "include/config/auto_%s.conf", spl_name[spl]); + for (s = fname; *s; s++) + *s = tolower(*s); + if (rename(tmpname, fname)) + return 1; + } + name = getenv("KCONFIG_TRISTATE"); if (!name) name = "include/config/tristate.conf"; @@ -1326,3 +1516,119 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode) return has_changed; } + +static bool is_spl(const char *name, int *lenp) +{ + const char *uscore; + int len; + int i; + + uscore = strchr(name, '_'); + if (!uscore) + return false; + + len = uscore - name; + for (i = 0; i < NUM_SPLS; i++) { + if (len == strlen(spl_name[i]) && + !strncmp(name, spl_name[i], len)) { + *lenp = len; + return true; + } + } + + return false; +} + +void conf_mark_spl_symbols(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) if (sym->name) { + int len; + bool spl = is_spl(sym->name, &len); + + if (spl) { + struct symbol *non_spl; + + sym->flags |= SYMBOL_SPL; + non_spl = sym_find(sym->name + len + 1); + if (non_spl) + non_spl->flags |= SYMBOL_HAS_SPL; + } + } +} + +static int process_file(const char *fname, bool search_spl) +{ + static char fullname[PATH_MAX+1]; + const char *env; + char buf[256]; + FILE *f; + char *s; + + env = getenv(SRCTREE); + if (!env) { + fprintf(stderr, "No %s environment variable\n", SRCTREE); + return 1; + } + snprintf(fullname, sizeof(fullname), "%s/scripts/%s", env, fname); + f = fopen(fullname, "r"); + if (!f) { + fprintf(stderr, "Cannot open '%s'\n", fullname); + return 1; + } + while (s = fgets(buf, sizeof(buf), f), s) { + struct symbol *sym; + int len; + + len = strlen(s); + if (len) + s[len - 1] = '\0'; + if (*s == '#' || !*s) + continue; + + if (search_spl) { + int spl; + + for (spl = 0; spl < NUM_SPLS; spl++) { + int slen; + + slen = strlen(spl_name[spl]); + if (!strncmp(s, spl_name[spl], slen)) { + sym = sym_find(s + slen); + if (sym) + sym->flags |= SYMBOL_NO_PROPER; + } + } + } else { + sym = sym_find(s); + if (!sym) { + /* + * perhaps we could drop these in config_nospl + * + * fprintf(stderr, "Unknown symbol from '%s': %s\n", + * fullname, s); + */ + continue; + } + sym->flags |= SYMBOL_NO_SPL; + } + } + fclose(f); + + return 0; +} + +int conf_mark_symbols(void) +{ + conf_mark_spl_symbols(); + if (process_file("conf_nospl", false)) + return 1; + if (process_file("conf_noproper", true)) + return 1; + + return 0; +} + +// diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 656c87fb4f3..165685ff4e8 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -164,8 +164,17 @@ struct symbol { /* U-Boot: Marks a non-SPL symbol that also has an SPL version */ #define SYMBOL_HAS_SPL 0x800000 -/* U-Boot: Marks an-SPL symbol that does not have a non-SPL version */ -#define SYMBOL_SPL_ONLY 0x1000000 +/* + * U-Boot: Marks a symbol with no SPL version. This is in the conf_nospl file + * and should not be enabled in any SPL build + */ +#define SYMBOL_NO_SPL 0x1000000 + +/* + * U-Boot: Marks an SPL symbol that does not have a non-SPL version. This is in + * conf_noproper so should not be enabled in U-Boot proper + */ +#define SYMBOL_NO_PROPER 0x2000000 #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 9973 diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index dec03cc927a..592610483f0 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -72,13 +72,13 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode); void set_all_choice_values(struct symbol *csym); /** - * conf_mark_spl_symbols() - Mark SPL symbols + * conf_mark_symbols() - Mark symbols with U-Boot flags * - * Symbols which don't start with SPL_ (TPL_, etc.) but have an SPL version - * should be marked with the SYMBOL_SPL flag, so we know to avoid writing them - * in the SPL autoconf.h files. + * Symbols which don't have an SPL symbol are marked with SYMBOL_PROPER_ONLY and + * those with only SPL symbols are marked withSYMBOL_SPL_ONLY, so we know to + * avoid writing them to the wrong autoconf.h files. */ -void conf_mark_spl_symbols(void); +int conf_mark_symbols(void); /* confdata.c and expr.c */ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) From patchwork Tue Jan 31 15:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734951 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=c6VF7FQJ; 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 4P5pvn15myz23gV for ; Wed, 1 Feb 2023 02:32:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 11AC785B2E; Tue, 31 Jan 2023 16:29:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="c6VF7FQJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D8F585AFC; Tue, 31 Jan 2023 16:28:29 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 E137B85AFA for ; Tue, 31 Jan 2023 16:27:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x130.google.com with SMTP id u8so6604163ilq.13 for ; Tue, 31 Jan 2023 07:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=C1Ka0i/kQP38tmYU4vYgJxaql4m5+4aangQFjwbCGw8=; b=c6VF7FQJ6afPe1wZUVbr2Eb6V389M/6poS1593gLXK/jrf9974TdqPIdh0GoOIPkGX TrPIkRdj+AajGtdjBQMrkA2kVpdS+rPSfo4Y4gZeVE0mpFI0yT9pJmsQ1AN+ulwejZeH EYbnkiwdqABbmQaEYCPUWR6fFe274AZca2q/0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C1Ka0i/kQP38tmYU4vYgJxaql4m5+4aangQFjwbCGw8=; b=oxjp7yRs9FQ+vo0xS+CbfemVV8k24ToMchxvmI/fiGqhry/Vy4RK0dOSvqF6LzIHuk rs4rkN+2xCn97miCT7GT3KW+YjRywZ8CiNw2OX38kx86s7iO1OhmIO+HUFK8XG0HxUTM liorm/mEkJK+gsvlu3siFTQTT7DkfCXm37AsdDMudRM1Yz9UlohITg7IY+jPj0tY5pll 2EGYWEbdZlklu9RFq+bPaoFcTCYZdE55wJnciNIcYkf7qjzcF60ZKBvZKvGQ5YGWmKnv phg5xbvshw4SKeYi3B1krYs8lEjHtbyFUpW+EtLsJKmGXZsSKcqfAZhGJke3UYu2Caei BHDw== X-Gm-Message-State: AO0yUKUtae2P2KHBzl2PmzDeDZ84f/jd0VUi7kZXyyQ6/RWM8ECzUneT 8hFUM/HHOBQlPrm/VfC2Wqybl/2Yy51rp8s7 X-Google-Smtp-Source: AK7set+eF4O/DucIGDBzJR0LINKQLMznM1AZhNWzSL2ekrF4AGiiwX8CR7/ihM+GnHJ0foM3l2wb5A== X-Received: by 2002:a05:6e02:b49:b0:310:f694:a882 with SMTP id f9-20020a056e020b4900b00310f694a882mr6735141ilu.13.1675178876394; Tue, 31 Jan 2023 07:27:56 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:56 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 22/32] Makefile: Include the config for the phase being built Date: Tue, 31 Jan 2023 08:26:52 -0700 Message-Id: <20230131152702.249197-23-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean At present there is only a single auto.conf file used within the makefiles. Update them to use the correct one for each phase. Signed-off-by: Simon Glass --- Makefile | 11 ++++++++++- scripts/Makefile.build | 12 +++++++++++- scripts/Makefile.spl | 10 +++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8150ca69e82..be5b2f4fe40 100644 --- a/Makefile +++ b/Makefile @@ -587,8 +587,17 @@ scripts: scripts_basic scripts_dtc include/config/auto.conf $(Q)$(MAKE) $(build)=$(@) ifeq ($(dot-config),1) -# Read in config + +# Read in the config for this phase +ifdef CONFIG_TPL_BUILD +-include include/config/auto_tpl.conf +else ifdef CONFIG_VPL_BUILD +-include include/config/auto_vpl.conf +else ifdef CONFIG_SPL_BUILD +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif # Read in dependencies to all Kconfig* files, make sure to run # oldconfig if changes are detected. diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 97dd4a64f6e..093392b430f 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -44,9 +44,19 @@ ldflags-y := subdir-asflags-y := subdir-ccflags-y := -# Read auto.conf if it exists, otherwise ignore +# Read appropriate auto.conf if it exists, otherwise ignore # Modified for U-Boot + +ifeq ($(SPL_NAME),tpl) +-include include/config/auto_tpl.conf +else ifeq ($(SPL_NAME),vpl) +-include include/config/auto_vpl.conf +else ifeq ($(SPL_NAME),spl) +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif + -include $(prefix)/include/autoconf.mk include scripts/Kbuild.include diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 15ac87286d5..41528f32307 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -19,9 +19,17 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) include $(srctree)/scripts/Kbuild.include --include include/config/auto.conf -include $(obj)/include/autoconf.mk +# Read in the config for this SPL phase +ifdef CONFIG_TPL_BUILD +-include include/config/auto_tpl.conf +else ifdef CONFIG_VPL_BUILD +-include include/config/auto_vpl.conf +else +-include include/config/auto_spl.conf +endif + UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD From patchwork Tue Jan 31 15:26:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734961 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=kUHt1KYv; 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 4P5pzt0mGNz23gY for ; Wed, 1 Feb 2023 02:36:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68D4685AB6; Tue, 31 Jan 2023 16:36:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="kUHt1KYv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACE2185ADB; Tue, 31 Jan 2023 16:35:59 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 B15AE85B03 for ; Tue, 31 Jan 2023 16:27:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x136.google.com with SMTP id k12so1587833ilv.10 for ; Tue, 31 Jan 2023 07:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=Isni2PnU57K8yWlnp6PHTSkQXG/o4mw6zXbHgzEo0AY=; b=kUHt1KYvh6qP0xp9f+GxYqGOyDzbOl5XPTc3lSKwON5KsY6hROlSwmbTbzdCbaRHi8 hPMR+9TB1jnT8CKq1wCWj5cTHGoVwYD8nsFspkIJ4X/ko4qs3NypOOjaTx7yz4IuEFP3 4jR+Z6c1EkRD+ynOvOMdJV/9DVwib9Ty539Ok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Isni2PnU57K8yWlnp6PHTSkQXG/o4mw6zXbHgzEo0AY=; b=G32M82fXsbg1un+b1FMS+A41+7qnJxo+NJybWllr9r6IBqYJNhlC/xAZDcBSoNpRUl T0Q0QUsrp/73muslVPIiArW7Ix3IQaFwUa5cn8b9VeoofMyFHb6yWgo5luedrO6fDj3h 3bFHgkdEbRmWiNnjHUy0h/7OUSY0h8+WWLo5vMST5AqZjApp9AklWey+zFE5uOcC+zoD rpwXpy6yIKUbQykm7L4JFJ9RtjPaPC4/bcLmTsPN2kTzR5zMKcFzyyaLlitBCrj2kFxL s457qeC0giQPfFXQweEg/b8S4vJfp+6y2Gp4/YRBCtyOfZrsk1bYZOTUHoVEwNTEIkbX b9iQ== X-Gm-Message-State: AO0yUKW8Al2/ZDA0DDCE/PwyHRxFKL/rZiWh9BNNobMa+o/VimEC4cl5 o1P9mRw4roAwJS+OvGYQ6Hn7b7MaEUhMqARU X-Google-Smtp-Source: AK7set8eaI/3uBgo+BFwXZG9Vrb+crl00aJjdlITqtOYeGzWmzVHSy8mGwrNvmUYsuATd54I2W2LqQ== X-Received: by 2002:a05:6e02:178e:b0:310:e24b:a5a6 with SMTP id y14-20020a056e02178e00b00310e24ba5a6mr9241334ilu.9.1675178877109; Tue, 31 Jan 2023 07:27:57 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:56 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 23/32] kconfig: Update CONFIG_IS_ENABLED() for split files Date: Tue, 31 Jan 2023 08:26:53 -0700 Message-Id: <20230131152702.249197-24-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Update this file to include the correct autoconf.h or autoconf_spl.h file for each phase. This allows the macros to be simplified. With this, CONFIG_IS_ENABLED() is the same as IS_ENABLED() apart from a migration detail. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 74 +++++++++----------------- tools/binman/test/generated/autoconf.h | 4 +- 2 files changed, 28 insertions(+), 50 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 2bc704e1104..f00686eb3e1 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -1,7 +1,17 @@ #ifndef __LINUX_KCONFIG_H #define __LINUX_KCONFIG_H +#ifdef USE_HOSTCC +#include +#elif defined(CONFIG_TPL_BUILD) +#include +#elif defined(CONFIG_VPL_BUILD) +#include +#elif defined(CONFIG_SPL_BUILD) +#include +#else #include +#endif /* * Helper macros to use CONFIG_ options in C/CPP expressions. Note that @@ -28,37 +38,9 @@ */ #define IS_ENABLED(option) config_enabled(option, 0) -/* - * U-Boot add-on: Helper macros to reference to different macros (prefixed by - * CONFIG_, CONFIG_SPL_, CONFIG_TPL_ or CONFIG_TOOLS_), depending on the build - * context. - */ +#define __config_val(cfg) CONFIG_ ## cfg -#ifdef USE_HOSTCC -#define _CONFIG_PREFIX TOOLS_ -#elif defined(CONFIG_TPL_BUILD) -#define _CONFIG_PREFIX TPL_ -#elif defined(CONFIG_VPL_BUILD) -#define _CONFIG_PREFIX VPL_ -#elif defined(CONFIG_SPL_BUILD) -#define _CONFIG_PREFIX SPL_ -#else -#define _CONFIG_PREFIX -#endif - -#define config_val(cfg) _config_val(_CONFIG_PREFIX, cfg) -#define _config_val(pfx, cfg) __config_val(pfx, cfg) -#define __config_val(pfx, cfg) CONFIG_ ## pfx ## cfg - -/* - * CONFIG_VAL(FOO) evaluates to the value of - * CONFIG_TOOLS_FOO if USE_HOSTCC is defined, - * CONFIG_FOO if CONFIG_SPL_BUILD is undefined, - * CONFIG_SPL_FOO if CONFIG_SPL_BUILD is defined. - * CONFIG_TPL_FOO if CONFIG_TPL_BUILD is defined. - * CONFIG_VPL_FOO if CONFIG_VPL_BUILD is defined. - */ -#define CONFIG_VAL(option) config_val(option) +#define CONFIG_VAL(option) __config_val(option) /* * This uses a similar mechanism to config_enabled() above. If cfg is enabled, @@ -104,26 +86,17 @@ long invalid_use_of_IF_ENABLED_INT(void); __concat(__unwrap, config_enabled(CONFIG_VAL(option), 0)) (case1, case0) /* - * CONFIG_IS_ENABLED(FOO) expands to - * 1 if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', - * 1 if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', - * 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', - * 1 if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', - * 0 otherwise. + * CONFIG_IS_ENABLED(FOO) returns 1 if CONFIG_FOO is enabled for the phase being + * built, else 0. Note that CONFIG_FOO corresponds to CONFIG_SPL_FOO (in + * Kconfig) for the SPL phase, CONFIG_TPL_FOO for the TPL phase, etc. * - * CONFIG_IS_ENABLED(FOO, (abc)) expands to - * abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', - * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', - * abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', - * abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', - * nothing otherwise. + * The _nospl version of a CONFIG is emitted by kconfig when an option has no + * SPL equivalent. So in that case there is a CONFIG_xxx for example, but not a + * CONFIG_SPL_xxx * - * CONFIG_IS_ENABLED(FOO, (abc), (def)) expands to - * abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y', - * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y', - * abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y', - * abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y', - * def otherwise. + * This is needed as a transition measure while CONFIG_IS_ENABLED() is used on + * options without SPL equivalent, since in that case it should always return + * zero. Once we add SPL equivalents, this clause can be dropped. * * The optional second and third arguments must be parenthesized; that * allows one to include a trailing comma, e.g. for use in @@ -135,7 +108,7 @@ long invalid_use_of_IF_ENABLED_INT(void); * set, and nothing otherwise. */ -#define CONFIG_IS_ENABLED(option, ...) \ +#define CONFIG_IS_ENABLED(option, ...) \ __concat(__CONFIG_IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) #ifndef __ASSEMBLY__ @@ -155,4 +128,7 @@ long invalid_use_of_CONFIG_IF_ENABLED_INT(void); CONFIG_IS_ENABLED(option, (CONFIG_VAL(int_option)), \ (invalid_use_of_CONFIG_IF_ENABLED_INT())) +#define CONFIG_IF_INT(option, int_option) \ + CONFIG_IF_ENABLED_INT(option, int_option) + #endif /* __LINUX_KCONFIG_H */ diff --git a/tools/binman/test/generated/autoconf.h b/tools/binman/test/generated/autoconf.h index 6a23039f469..88dc762c423 100644 --- a/tools/binman/test/generated/autoconf.h +++ b/tools/binman/test/generated/autoconf.h @@ -1,3 +1,5 @@ #define CONFIG_BINMAN 1 #define CONFIG_SPL_BUILD 1 -#define CONFIG_SPL_BINMAN_SYMBOLS 1 + +/* Don't include the SPL_ here since we are using separate autoconf files */ +#define CONFIG_BINMAN_SYMBOLS 1 From patchwork Tue Jan 31 15:26:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734947 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=T912EjXL; 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 4P5ptt046Wz23gV for ; Wed, 1 Feb 2023 02:31:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E2C7585B27; Tue, 31 Jan 2023 16:29:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="T912EjXL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B026685AF2; Tue, 31 Jan 2023 16:28:23 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 7B75285AE6 for ; Tue, 31 Jan 2023 16:27:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12e.google.com with SMTP id i6so2753639ilq.8 for ; Tue, 31 Jan 2023 07:27:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=9YEOh+weubu4PugQMTmVQR+jK3CN+XiFXBwsbmo89+M=; b=T912EjXL+t+A+Xuzv6bYn9ZhTyUjhp0Go2kjP6CMeu9FOUHkl57Lkwjlpsqr28zxBI /q9nQ+GmXA2Y/9hYgGyyNXAmlpo9h39aB7NlnrirXA8TbomvoniYS0L7YroayETcOCiU cqcZabRkk0JpBJkq2j/B1GCrBRvDOZrNct++s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9YEOh+weubu4PugQMTmVQR+jK3CN+XiFXBwsbmo89+M=; b=sLSiROLS0lEsb4fqhr/rcCxBI93zzKEG1IAVc7JVoJMIVwn1XAxzEHhogd4gJcZpTu jBTYm1LPPm3R4B81kKO7awM9L4ZdPB17/jrZ7bvzQ1xc/sySzP3eG/F5vlxLkV2b6eIq K7Cq2WGJA/YcyB67/7ZOrx6H56t+DyXcQgjBCum1/qqb7D9LvXxCiq02v6zFlsyC5Rod zkGORkchSy94aPIn9zVp3N71Uyvd002eFP28+8qx/zNUuicBApE+tdUJwlPqma73XuAP Bk/8/qhUPqYlwTFgf66Z9jhorz02IiBS234lnjvmSKIolJbvynh0Jj/jN3vxQqjrQ2G5 Uy2A== X-Gm-Message-State: AO0yUKXJinFsqCejXTqHU8rSPf5e6Xr2t9xUnEm3zuwDQQ50+uhtY/G2 vTy+oxMoFvMDMRNAksFQwvGSsBw2jH965QP2 X-Google-Smtp-Source: AK7set/e7UcBn3Lr+xnla/ktjpNQWD8xdBz6Oq5VH+wRZJxXZew7BwiVoFV7FoMxvFKPSsX7zrpBlA== X-Received: by 2002:a05:6e02:1a42:b0:310:e798:aa2d with SMTP id u2-20020a056e021a4200b00310e798aa2dmr8444399ilv.13.1675178877940; Tue, 31 Jan 2023 07:27:57 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:57 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 24/32] Makefile: Use empty SPL_ and SPL_TPL_ vars Date: Tue, 31 Jan 2023 08:26:54 -0700 Message-Id: <20230131152702.249197-25-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Now that we include an auto.conf file specific to the phase being built we can make these variables empty. With this done, we can also remove them from U-Boot entirely, dropping them from all Makefiles. That is left for a future clean-up since we cannot apply this series until CONFIG migration is complete. Signed-off-by: Simon Glass --- scripts/Kbuild.include | 15 ++------------- scripts/Makefile.spl | 19 +++---------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 62e0207f91b..b7668694101 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -320,18 +320,7 @@ endif # do not delete intermediate files automatically .SECONDARY: -ifdef CONFIG_SPL_BUILD -SPL_ := SPL_ -ifeq ($(CONFIG_VPL_BUILD),y) -SPL_TPL_ := VPL_ -else -ifeq ($(CONFIG_TPL_BUILD),y) -SPL_TPL_ := TPL_ -else -SPL_TPL_ := SPL_ -endif -endif -else +# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in +# Makefiles SPL_ := SPL_TPL_ := -endif diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 41528f32307..3009a8b0d4b 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -35,11 +35,9 @@ UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD ifeq ($(CONFIG_TPL_BUILD),y) KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD -else -ifeq ($(CONFIG_VPL_BUILD),y) +else ifeq ($(CONFIG_VPL_BUILD),y) KBUILD_CPPFLAGS += -DCONFIG_VPL_BUILD endif -endif ifeq ($(CONFIG_VPL_BUILD),y) SPL_BIN := u-boot-vpl @@ -56,21 +54,10 @@ endif export SPL_NAME -ifdef CONFIG_SPL_BUILD -SPL_ := SPL_ -ifeq ($(CONFIG_VPL_BUILD),y) -SPL_TPL_ := VPL_ -else -ifeq ($(CONFIG_TPL_BUILD),y) -SPL_TPL_ := TPL_ -else -SPL_TPL_ := SPL_ -endif -endif -else +# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in +# Makefiles SPL_ := SPL_TPL_ := -endif ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl) $(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL) From patchwork Tue Jan 31 15:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734964 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=QOIcAPYw; 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 4P5qCV5Z9Tz23gV for ; Wed, 1 Feb 2023 02:46:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 880A1856D2; Tue, 31 Jan 2023 16:45:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="QOIcAPYw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5190985AEF; Tue, 31 Jan 2023 16:28:30 +0100 (CET) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 584AA85AFE for ; Tue, 31 Jan 2023 16:28:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd35.google.com with SMTP id w24so2453929iow.13 for ; Tue, 31 Jan 2023 07:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=ZJG39FfKZdnh1m1LpcjXltEmqF48Siy4ZVDS5MSi8ok=; b=QOIcAPYwHoOjL8iPVzpVY1oeT+Zc46O6jBENAd5Yof/oslTsuSBB5f6888LrN/p+PW w2/BNZdIUwN9BwLRRNN/0G5LWq8eA9YVba9EHLB9/LSglQxSGE3OBn1jNMAzD1yAGBvZ XgHUdldn1r70awVfbziozQaL1XdeG+ZqnBZss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZJG39FfKZdnh1m1LpcjXltEmqF48Siy4ZVDS5MSi8ok=; b=XAHfr32BGDtvUMJwHr7l0pJCYkNSxwWAy6kPaKAUVB9zZLbZqANBtVI4GC5kOiXSWv Z6njivabzphCZXP+zYC+Ftg78oVSQq4AV35hu9MarHTqUK8FGD1hWfNKcdYzCr3H1yYk lvoEJv4Tpk9zt/M0wQrafcUWtzJu407U6ox6ua8bfaLs7Fk/9EVZELycjv0W5UxP3FMG WPt/XkETF6w+gGg44zI6ZFbuZ7dAbdt/iBxzISB0qoQvIw6gnyA/vDSFRcEAl/QvdNEb plIjYixnDspzR3Y7dsSIqY7rGJ58sKNiVK7HVdGnZN2T9OZJXW29tpGfjg3h2RVn0PZE 4XlA== X-Gm-Message-State: AO0yUKVOCeQHNtg+2FN+4wXNwBTe/wv47+ymYIDbiXQwhBEgd5npFJdC LHbFK72FKsmnJwILAWlTUW5uPW5RDzKSJaPL X-Google-Smtp-Source: AK7set9FeS8b66IMade6i3oYyOCK/y6Ybpu9knaiijIR0BvsaHpNyGv7jYI0sNFeZka6Yp+i3bnr+A== X-Received: by 2002:a5e:8c18:0:b0:723:fa7:fb6a with SMTP id n24-20020a5e8c18000000b007230fa7fb6amr24459ioj.2.1675178879924; Tue, 31 Jan 2023 07:27:59 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:58 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 25/32] Drop use of CONFIG_IS_ENABLED() Date: Tue, 31 Jan 2023 08:26:55 -0700 Message-Id: <20230131152702.249197-26-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 31 Jan 2023 16:45:24 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean We can now use IS_ENABLED() to have the same effect. Signed-off-by: Simon Glass --- arch/arc/lib/bootm.c | 2 +- arch/arc/lib/start.S | 4 +- arch/arm/cpu/arm11/cpu.c | 12 +- arch/arm/cpu/arm1136/start.S | 8 +- arch/arm/cpu/arm720t/start.S | 10 +- arch/arm/cpu/arm920t/start.S | 8 +- arch/arm/cpu/arm926ejs/cache.c | 14 +- arch/arm/cpu/arm926ejs/cpu.c | 2 +- arch/arm/cpu/arm926ejs/start.S | 10 +- arch/arm/cpu/arm946es/start.S | 6 +- arch/arm/cpu/armv7/cache_v7.c | 8 +- arch/arm/cpu/armv7/cache_v7_asm.S | 2 +- .../cpu/armv7/iproc-common/hwinit-common.c | 2 +- arch/arm/cpu/armv7/ls102xa/cpu.c | 4 +- arch/arm/cpu/armv7/start.S | 16 +- arch/arm/cpu/armv7/vf610/generic.c | 2 +- arch/arm/cpu/armv7m/cache.c | 8 +- arch/arm/cpu/armv8/cache_v8.c | 12 +- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 8 +- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 10 +- arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 2 +- arch/arm/cpu/armv8/fsl-layerscape/soc.c | 2 +- arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 +- arch/arm/include/asm/arch-am33xx/chilisom.h | 2 +- .../asm/arch-fsl-layerscape/fsl_icid.h | 2 +- arch/arm/include/asm/arch-lpc32xx/i2c.h | 2 +- arch/arm/include/asm/arch-rockchip/boot0.h | 2 +- .../include/asm/arch-rockchip/sdram_rk322x.h | 2 +- .../include/asm/arch-rockchip/sdram_rk3288.h | 2 +- arch/arm/include/asm/assembler.h | 2 +- arch/arm/include/asm/cache.h | 2 +- arch/arm/include/asm/global_data.h | 2 +- arch/arm/include/asm/mach-imx/mxc_i2c.h | 6 +- arch/arm/include/asm/omap_gpio.h | 2 +- arch/arm/include/asm/omap_i2c.h | 2 +- arch/arm/include/asm/proc-armv/ptrace.h | 2 +- arch/arm/include/asm/string.h | 6 +- arch/arm/lib/bdinfo.c | 2 +- arch/arm/lib/bootm.c | 4 +- arch/arm/lib/cache-cp15.c | 6 +- arch/arm/lib/cache.c | 6 +- arch/arm/lib/crt0.S | 8 +- arch/arm/lib/crt0_64.S | 4 +- arch/arm/lib/interrupts_64.c | 2 +- arch/arm/lib/lib1funcs.S | 2 +- arch/arm/lib/memcpy.S | 2 +- arch/arm/lib/memset.S | 2 +- arch/arm/lib/psci-dt.c | 6 +- arch/arm/lib/spl.c | 4 +- arch/arm/lib/vectors.S | 6 +- arch/arm/mach-at91/arm920t/lowlevel_init.S | 4 +- arch/arm/mach-at91/include/mach/at91sam9260.h | 2 +- arch/arm/mach-at91/spl_at91.c | 2 +- arch/arm/mach-davinci/da850_lowlevel.c | 2 +- arch/arm/mach-davinci/include/mach/gpio.h | 2 +- arch/arm/mach-exynos/mmu-arm64.c | 4 +- arch/arm/mach-exynos/pinmux.c | 2 +- arch/arm/mach-exynos/soc.c | 2 +- arch/arm/mach-imx/cache.c | 2 +- arch/arm/mach-imx/hab.c | 4 +- arch/arm/mach-imx/i2c-mxv7.c | 2 +- arch/arm/mach-imx/imx8/cpu.c | 2 +- arch/arm/mach-imx/imx8m/soc.c | 6 +- arch/arm/mach-imx/mx5/soc.c | 2 +- arch/arm/mach-imx/mx7/soc.c | 2 +- arch/arm/mach-imx/syscounter.c | 2 +- arch/arm/mach-k3/am642_init.c | 4 +- arch/arm/mach-k3/am654_init.c | 4 +- arch/arm/mach-k3/common.c | 4 +- arch/arm/mach-k3/sysfw-loader.c | 20 +-- arch/arm/mach-keystone/init.c | 2 +- arch/arm/mach-lpc32xx/devices.c | 2 +- arch/arm/mach-omap2/am33xx/board.c | 18 +-- arch/arm/mach-omap2/am33xx/chilisom.c | 4 +- arch/arm/mach-omap2/am33xx/clk_synthesizer.c | 6 +- arch/arm/mach-omap2/boot-common.c | 2 +- arch/arm/mach-omap2/clocks-common.c | 2 +- arch/arm/mach-omap2/omap3/board.c | 8 +- arch/arm/mach-omap2/omap3/lowlevel_init.S | 4 +- arch/arm/mach-omap2/omap5/hwinit.c | 2 +- arch/arm/mach-omap2/omap5/sec_entry_cpu1.S | 6 +- arch/arm/mach-omap2/sec-common.c | 4 +- arch/arm/mach-rmobile/cpu_info.c | 2 +- arch/arm/mach-rockchip/bootrom.c | 4 +- arch/arm/mach-rockchip/px30/syscon_px30.c | 2 +- arch/arm/mach-rockchip/rk3036/rk3036.c | 2 +- arch/arm/mach-rockchip/rk3066/syscon_rk3066.c | 2 +- arch/arm/mach-rockchip/rk3188/syscon_rk3188.c | 2 +- arch/arm/mach-rockchip/rk3288/syscon_rk3288.c | 2 +- arch/arm/mach-rockchip/rk3368/syscon_rk3368.c | 2 +- arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 4 +- arch/arm/mach-rockchip/rk3568/syscon_rk3568.c | 2 +- arch/arm/mach-rockchip/rv1126/syscon_rv1126.c | 2 +- arch/arm/mach-rockchip/spl-boot-order.c | 4 +- arch/arm/mach-rockchip/spl.c | 2 +- arch/arm/mach-rockchip/tpl.c | 2 +- arch/arm/mach-s5pc1xx/cache.c | 2 +- arch/arm/mach-socfpga/misc.c | 4 +- arch/arm/mach-socfpga/spl_agilex.c | 2 +- arch/arm/mach-socfpga/spl_n5x.c | 2 +- arch/arm/mach-socfpga/spl_s10.c | 2 +- .../mach-stm32mp/cmd_stm32prog/stm32prog.c | 12 +- arch/arm/mach-stm32mp/cpu.c | 4 +- arch/arm/mach-stm32mp/fdt.c | 2 +- arch/arm/mach-stm32mp/spl.c | 2 +- arch/arm/mach-sunxi/board.c | 6 +- arch/arm/mach-sunxi/pmic_bus.c | 8 +- arch/arm/mach-tegra/board.c | 4 +- arch/arm/mach-tegra/clock.c | 4 +- arch/arm/mach-tegra/tegra114/clock.c | 4 +- arch/arm/mach-tegra/tegra124/clock.c | 4 +- arch/arm/mach-tegra/tegra20/clock.c | 4 +- arch/arm/mach-tegra/tegra30/clock.c | 4 +- arch/arm/mach-u8500/cache.c | 2 +- arch/arm/mach-zynq/cpu.c | 6 +- arch/microblaze/cpu/cache.c | 4 +- arch/microblaze/cpu/exception.c | 4 +- arch/microblaze/cpu/start.S | 2 +- arch/microblaze/lib/bootm.c | 2 +- arch/mips/cpu/cpu.c | 2 +- arch/mips/cpu/start.S | 8 +- arch/mips/lib/bootm.c | 22 +-- arch/mips/mach-mtmips/mt7621/spl/start.S | 6 +- arch/mips/mach-mtmips/mt7628/lowlevel_init.S | 6 +- arch/powerpc/cpu/mpc83xx/start.S | 2 +- arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 2 +- arch/powerpc/cpu/mpc85xx/start.S | 2 +- arch/powerpc/cpu/mpc85xx/tlb.c | 2 +- arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 6 +- arch/powerpc/cpu/mpc85xx/u-boot.lds | 4 +- arch/powerpc/cpu/mpc8xxx/law.c | 4 +- arch/powerpc/include/asm/fsl_i2c.h | 2 +- arch/riscv/cpu/ax25/cache.c | 26 +-- arch/riscv/cpu/ax25/cpu.c | 2 +- arch/riscv/cpu/cpu.c | 14 +- arch/riscv/cpu/fu740/spl.c | 2 +- arch/riscv/cpu/start.S | 28 ++-- arch/riscv/include/asm/encoding.h | 2 +- arch/riscv/include/asm/global_data.h | 6 +- arch/riscv/include/asm/string.h | 6 +- arch/riscv/lib/asm-offsets.c | 2 +- arch/riscv/lib/bootm.c | 4 +- arch/riscv/lib/interrupts.c | 2 +- arch/riscv/lib/smp.c | 2 +- arch/riscv/lib/spl.c | 2 +- arch/sandbox/cpu/start.c | 2 +- arch/sandbox/include/asm/clk.h | 2 +- arch/sandbox/include/asm/serial.h | 2 +- arch/x86/cpu/acpi_gpe.c | 4 +- arch/x86/cpu/apollolake/cpu_spl.c | 2 +- arch/x86/cpu/apollolake/hostbridge.c | 10 +- arch/x86/cpu/apollolake/lpc.c | 2 +- arch/x86/cpu/apollolake/pch.c | 2 +- arch/x86/cpu/apollolake/pmc.c | 4 +- arch/x86/cpu/apollolake/spl.c | 4 +- arch/x86/cpu/apollolake/uart.c | 6 +- arch/x86/cpu/broadwell/pch.c | 2 +- arch/x86/cpu/cpu.c | 2 +- arch/x86/cpu/i386/interrupt.c | 2 +- arch/x86/cpu/intel_common/car2.S | 2 +- arch/x86/cpu/intel_common/cpu_from_spl.c | 2 +- arch/x86/cpu/intel_common/itss.c | 8 +- arch/x86/cpu/intel_common/p2sb.c | 8 +- arch/x86/cpu/qemu/qemu.c | 2 +- arch/x86/cpu/u-boot-spl.lds | 2 +- arch/x86/include/asm/arch-apollolake/gpio.h | 2 +- .../include/asm/arch-apollolake/hostbridge.h | 2 +- arch/x86/include/asm/arch-apollolake/pmc.h | 2 +- arch/x86/include/asm/arch-apollolake/uart.h | 2 +- arch/x86/include/asm/byteorder.h | 2 +- arch/x86/include/asm/cpu.h | 2 +- arch/x86/include/asm/global_data.h | 4 +- arch/x86/include/asm/itss.h | 2 +- arch/x86/include/asm/mp.h | 2 +- arch/x86/include/asm/p2sb.h | 2 +- arch/x86/include/asm/sysreset.h | 2 +- arch/x86/include/asm/types.h | 2 +- arch/x86/lib/acpi_table.c | 2 +- arch/x86/lib/bootm.c | 6 +- arch/x86/lib/e820.c | 4 +- arch/x86/lib/fsp/fsp_common.c | 2 +- arch/x86/lib/fsp/fsp_dram.c | 2 +- arch/x86/lib/fsp2/fsp_dram.c | 4 +- arch/x86/lib/init_helpers.c | 2 +- arch/x86/lib/interrupts.c | 4 +- arch/x86/lib/lpc-uclass.c | 2 +- arch/x86/lib/relocate.c | 4 +- arch/x86/lib/spl.c | 2 +- arch/x86/lib/tpl.c | 4 +- arch/xtensa/cpu/start.S | 8 +- board/Marvell/octeontx2_cn913x/board.c | 2 +- board/Seagate/dockstar/dockstar.c | 2 +- board/Seagate/goflexhome/goflexhome.c | 2 +- board/alliedtelesis/x530/x530.c | 2 +- board/bosch/acc/acc.c | 2 +- board/bosch/guardian/board.c | 2 +- board/bosch/shc/board.c | 2 +- board/buffalo/lsxl/lsxl.c | 2 +- board/cavium/thunderx/thunderx.c | 2 +- board/cloudengines/pogo_v4/pogo_v4.c | 2 +- board/compulab/cl-som-imx7/cl-som-imx7.c | 4 +- board/compulab/common/eeprom.h | 2 +- board/davinci/da8xxevm/omapl138_lcdk.c | 2 +- board/eets/pdu001/board.c | 4 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/engicam/imx8mp/spl.c | 2 +- board/engicam/stm32mp1/spl.c | 2 +- board/engicam/stm32mp1/stm32mp1.c | 6 +- board/freescale/common/emc2305.c | 4 +- board/freescale/common/i2c_common.c | 2 +- board/freescale/common/i2c_common.h | 2 +- board/freescale/common/qixis.c | 4 +- board/freescale/common/sys_eeprom.c | 20 +-- board/freescale/imx8mn_evk/spl.c | 2 +- board/freescale/imx8mp_evk/imx8mp_evk.c | 2 +- board/freescale/imx8mp_evk/spl.c | 2 +- board/freescale/imx8mq_evk/spl.c | 2 +- board/freescale/imx8qm_mek/imx8qm_mek.c | 2 +- board/freescale/imx8qxp_mek/imx8qxp_mek.c | 2 +- board/freescale/imx8ulp_evk/imx8ulp_evk.c | 2 +- board/freescale/imx93_evk/spl.c | 2 +- board/freescale/ls1012aqds/ls1012aqds.c | 2 +- board/freescale/ls1012ardb/eth.c | 2 +- board/freescale/ls1012ardb/ls1012ardb.c | 12 +- board/freescale/ls1021atwr/ls1021atwr.c | 2 +- board/freescale/ls1028a/ls1028a.c | 2 +- board/freescale/ls1043aqds/ls1043aqds.c | 2 +- board/freescale/ls1088a/eth_ls1088aqds.c | 16 +- board/freescale/ls1088a/ls1088a.c | 58 +++---- board/freescale/ls2080aqds/eth.c | 14 +- board/freescale/ls2080aqds/ls2080aqds.c | 2 +- board/freescale/mpc837xerdb/mpc837xerdb.c | 2 +- board/freescale/p1010rdb/p1010rdb.c | 8 +- board/freescale/p1010rdb/tlb.c | 2 +- board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +- board/freescale/p1_p2_rdb_pc/spl.c | 2 +- board/freescale/p1_p2_rdb_pc/tlb.c | 2 +- board/freescale/t102xrdb/t102xrdb.c | 2 +- board/friendlyarm/nanopi2/lcds.c | 2 +- board/friendlyarm/nanopi2/onewire.c | 6 +- board/gateworks/gw_ventana/eeprom.c | 10 +- board/google/chromebook_coral/coral.c | 4 +- board/google/veyron/veyron.c | 4 +- board/grinn/chiliboard/board.c | 4 +- board/hisilicon/hikey/hikey.c | 2 +- board/hisilicon/hikey960/hikey960.c | 2 +- board/hisilicon/poplar/poplar.c | 2 +- board/k+p/kp_imx53/kp_imx53.c | 2 +- board/keymile/common/ivm.c | 2 +- board/kontron/pitx_imx8m/spl.c | 6 +- board/kontron/sl-mx6ul/sl-mx6ul.c | 4 +- board/kontron/sl-mx8mm/sl-mx8mm.c | 4 +- board/kontron/sl28/sl28.c | 2 +- board/l+g/vinco/vinco.c | 4 +- board/mediatek/mt8183/mt8183_pumpkin.c | 4 +- board/mediatek/mt8516/mt8516_pumpkin.c | 4 +- board/qca/ap152/ap152.c | 2 +- board/renesas/draak/draak.c | 2 +- board/renesas/salvator-x/salvator-x.c | 4 +- board/renesas/ulcb/ulcb.c | 2 +- board/rockchip/evb_rk3399/evb-rk3399.c | 4 +- board/samsung/common/board.c | 2 +- board/samsung/trats/trats.c | 10 +- board/samsung/trats2/trats2.c | 6 +- board/sandbox/sandbox.c | 2 +- board/siemens/common/board.c | 2 +- board/siemens/common/factoryset.c | 14 +- board/siemens/common/factoryset.h | 2 +- board/siemens/draco/board.c | 2 +- board/siemens/iot2050/board.c | 2 +- board/somlabs/visionsom-6ull/visionsom-6ull.c | 2 +- board/st/common/stm32mp_dfu.c | 2 +- board/st/stih410-b2260/board.c | 2 +- board/st/stm32mp1/spl.c | 4 +- board/st/stm32mp1/stm32mp1.c | 14 +- board/st/stv0991/stv0991.c | 2 +- board/sunxi/board.c | 2 +- board/synopsys/hsdk/hsdk.c | 2 +- board/tcl/sl50/board.c | 2 +- board/technexion/pico-imx7d/pico-imx7d.c | 2 +- board/ti/am335x/board.c | 6 +- board/ti/am43xx/board.c | 10 +- board/ti/am57xx/board.c | 6 +- board/ti/am64x/evm.c | 4 +- board/ti/common/board_detect.c | 4 +- board/ti/dra7xx/evm.c | 6 +- board/ti/j721e/evm.c | 2 +- board/ti/ks2_evm/board_k2g.c | 2 +- board/toradex/apalis-imx8/apalis-imx8.c | 2 +- board/toradex/verdin-imx8mp/spl.c | 2 +- board/tplink/wdr4300/wdr4300.c | 2 +- board/tq/tqma6/tqma6.c | 6 +- board/udoo/neo/neo.c | 2 +- board/wandboard/wandboard.c | 4 +- board/xilinx/common/board.c | 4 +- board/xilinx/common/fru_ops.c | 2 +- board/xilinx/versal/board.c | 2 +- board/xilinx/zynq/board.c | 2 +- board/xilinx/zynqmp/zynqmp.c | 12 +- boot/bootm.c | 22 +-- boot/bootm_os.c | 2 +- boot/bootstd-uclass.c | 2 +- boot/image-board.c | 26 +-- boot/image-fdt.c | 12 +- boot/image-fit.c | 10 +- boot/image-pre-load.c | 2 +- boot/image.c | 14 +- boot/vbe_simple.c | 2 +- cmd/bdinfo.c | 2 +- cmd/bootefi.c | 6 +- cmd/clk.c | 4 +- cmd/date.c | 4 +- cmd/disk.c | 6 +- cmd/dm.c | 4 +- cmd/eeprom.c | 10 +- cmd/i2c.c | 106 ++++++------- cmd/mmc.c | 28 ++-- cmd/mvebu/bubt.c | 2 +- cmd/nvedit.c | 2 +- cmd/reiser.c | 2 +- cmd/sb.c | 2 +- cmd/sf.c | 4 +- cmd/spi.c | 6 +- cmd/zfs.c | 2 +- common/bloblist.c | 2 +- common/board_f.c | 16 +- common/board_r.c | 12 +- common/cli.c | 4 +- common/console.c | 30 ++-- common/dlmalloc.c | 4 +- common/event.c | 8 +- common/hash.c | 34 ++-- common/hwconfig.c | 2 +- common/init/board_init.c | 10 +- common/iomux.c | 2 +- common/log.c | 2 +- common/malloc_simple.c | 2 +- common/spl/spl.c | 76 ++++----- common/spl/spl_atf.c | 4 +- common/spl/spl_ext.c | 2 +- common/spl/spl_fat.c | 2 +- common/spl/spl_fit.c | 16 +- common/spl/spl_mmc.c | 8 +- common/spl/spl_nand.c | 2 +- common/spl/spl_net.c | 2 +- common/spl/spl_nor.c | 2 +- common/spl/spl_ram.c | 10 +- common/spl/spl_sata.c | 2 +- common/spl/spl_spi.c | 6 +- common/spl/spl_ubi.c | 2 +- common/spl/spl_usb.c | 2 +- common/spl/spl_xip.c | 2 +- common/stdio.c | 4 +- common/usb.c | 14 +- common/usb_hub.c | 18 +-- common/usb_kbd.c | 12 +- common/usb_storage.c | 34 ++-- common/xyzModem.c | 4 +- disk/disk-uclass.c | 2 +- disk/part.c | 14 +- disk/part_amiga.h | 2 +- disk/part_dos.c | 6 +- disk/part_efi.c | 10 +- disk/part_mac.h | 2 +- doc/develop/driver-model/i2c-howto.rst | 2 +- doc/develop/driver-model/livetree.rst | 2 +- doc/develop/driver-model/of-plat.rst | 10 +- doc/develop/spl.rst | 6 +- drivers/adc/meson-saradc.c | 6 +- drivers/ata/dwc_ahsata.c | 2 +- drivers/block/blk-uclass.c | 2 +- drivers/block/host-uclass.c | 2 +- drivers/block/host_dev.c | 2 +- drivers/clk/clk-uclass.c | 14 +- drivers/clk/clk_fixed_factor.c | 2 +- drivers/clk/clk_fixed_rate.c | 4 +- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/clk_scmi.c | 2 +- drivers/clk/imx/clk-imx8mm.c | 4 +- drivers/clk/imx/clk-imx8mn.c | 4 +- drivers/clk/mediatek/clk-mt7622.c | 2 +- drivers/clk/mediatek/clk-mt7623.c | 2 +- drivers/clk/mediatek/clk-mt7629.c | 2 +- drivers/clk/mediatek/clk-mt7981.c | 2 +- drivers/clk/mediatek/clk-mt7986.c | 2 +- drivers/clk/rockchip/clk_px30.c | 6 +- drivers/clk/rockchip/clk_rk3036.c | 2 +- drivers/clk/rockchip/clk_rk3066.c | 8 +- drivers/clk/rockchip/clk_rk3188.c | 8 +- drivers/clk/rockchip/clk_rk322x.c | 2 +- drivers/clk/rockchip/clk_rk3288.c | 10 +- drivers/clk/rockchip/clk_rk3308.c | 6 +- drivers/clk/rockchip/clk_rk3328.c | 2 +- drivers/clk/rockchip/clk_rk3368.c | 18 +-- drivers/clk/rockchip/clk_rk3399.c | 24 +-- drivers/clk/rockchip/clk_rk3568.c | 10 +- drivers/clk/rockchip/clk_rv1108.c | 2 +- drivers/clk/rockchip/clk_rv1126.c | 8 +- drivers/core/device.c | 46 +++--- drivers/core/dump.c | 2 +- drivers/core/fdtaddr.c | 14 +- drivers/core/lists.c | 8 +- drivers/core/ofnode.c | 16 +- drivers/core/read.c | 2 +- drivers/core/regmap.c | 2 +- drivers/core/root.c | 24 +-- drivers/core/simple-bus.c | 6 +- drivers/core/syscon-uclass.c | 4 +- drivers/core/uclass.c | 12 +- drivers/core/util.c | 2 +- drivers/crypto/aspeed/aspeed_hace.c | 2 +- drivers/crypto/fsl/jr.c | 24 +-- drivers/crypto/hash/hash_sw.c | 2 +- drivers/ddr/fsl/main.c | 8 +- drivers/ddr/fsl/options.c | 4 +- drivers/dfu/dfu_sf.c | 8 +- drivers/dma/apbh_dma.c | 2 +- drivers/dma/dma-uclass.c | 2 +- drivers/fastboot/fb_mmc.c | 4 +- drivers/firmware/firmware-uclass.c | 2 +- drivers/firmware/psci.c | 2 +- drivers/fpga/fpga.c | 4 +- drivers/fpga/xilinx.c | 2 +- drivers/fpga/zynqmppl.c | 12 +- drivers/gpio/at91_gpio.c | 12 +- drivers/gpio/atmel_pio4.c | 2 +- drivers/gpio/bcm2835_gpio.c | 2 +- drivers/gpio/da8xx_gpio.c | 4 +- drivers/gpio/da8xx_gpio.h | 2 +- drivers/gpio/gpio-uclass.c | 16 +- drivers/gpio/imx_rgpio2p.c | 2 +- drivers/gpio/intel_gpio.c | 6 +- drivers/gpio/mpc83xx_spisel_boot.c | 4 +- drivers/gpio/mpc8xxx_gpio.c | 4 +- drivers/gpio/mvebu_gpio.c | 2 +- drivers/gpio/mxc_gpio.c | 12 +- drivers/gpio/mxs_gpio.c | 10 +- drivers/gpio/omap_gpio.c | 14 +- drivers/gpio/sandbox.c | 12 +- drivers/gpio/sunxi_gpio.c | 4 +- drivers/i2c/designware_i2c.c | 12 +- drivers/i2c/designware_i2c.h | 2 +- drivers/i2c/fsl_i2c.c | 6 +- drivers/i2c/i2c-emul-uclass.c | 4 +- drivers/i2c/i2c-uclass.c | 18 +-- drivers/i2c/lpc32xx_i2c.c | 4 +- drivers/i2c/muxes/pca954x.c | 4 +- drivers/i2c/mv_i2c.c | 2 +- drivers/i2c/mvtwsi.c | 16 +- drivers/i2c/mxc_i2c.c | 8 +- drivers/i2c/omap24xx_i2c.c | 8 +- drivers/i2c/sun6i_p2wi.c | 4 +- drivers/i2c/sun8i_rsb.c | 4 +- drivers/input/input.c | 2 +- drivers/iommu/iommu-uclass.c | 6 +- drivers/misc/cros_ec.c | 2 +- drivers/misc/fs_loader.c | 2 +- drivers/misc/gsc.c | 2 +- drivers/misc/irq-uclass.c | 4 +- drivers/misc/irq_sandbox.c | 2 +- drivers/misc/misc-uclass.c | 2 +- drivers/misc/p2sb-uclass.c | 6 +- drivers/misc/test_drv.c | 2 +- drivers/mmc/davinci_mmc.c | 26 +-- drivers/mmc/dw_mmc.c | 2 +- drivers/mmc/fsl_esdhc.c | 6 +- drivers/mmc/fsl_esdhc_imx.c | 52 +++--- drivers/mmc/ftsdc010_mci.c | 8 +- drivers/mmc/jz_mmc.c | 4 +- drivers/mmc/mmc-uclass.c | 24 +-- drivers/mmc/mmc.c | 148 +++++++++--------- drivers/mmc/mmc_legacy.c | 6 +- drivers/mmc/mmc_private.h | 8 +- drivers/mmc/mmc_write.c | 8 +- drivers/mmc/mtk-sd.c | 8 +- drivers/mmc/mxsmmc.c | 32 ++-- drivers/mmc/octeontx_hsmmc.c | 2 +- drivers/mmc/omap_hsmmc.c | 60 +++---- drivers/mmc/pci_mmc.c | 2 +- drivers/mmc/renesas-sdhi.c | 40 ++--- drivers/mmc/rockchip_dw_mmc.c | 6 +- drivers/mmc/rockchip_sdhci.c | 2 +- drivers/mmc/sandbox_mmc.c | 2 +- drivers/mmc/sdhci.c | 24 +-- drivers/mmc/socfpga_dw_mmc.c | 2 +- drivers/mmc/stm32_sdmmc2.c | 4 +- drivers/mmc/sunxi_mmc.c | 2 +- drivers/mmc/tmio-common.h | 2 +- drivers/mmc/uniphier-sd.c | 2 +- drivers/mtd/mtdcore.c | 2 +- drivers/mtd/mtdpart.c | 4 +- drivers/mtd/nand/raw/davinci_nand.c | 2 +- drivers/mtd/nand/raw/fsl_elbc_nand.c | 2 +- drivers/mtd/nand/raw/mxs_nand.c | 2 +- drivers/mtd/nand/raw/nand.c | 6 +- drivers/mtd/nand/raw/nand_base.c | 4 +- drivers/mtd/nand/raw/omap_elm.c | 2 +- drivers/mtd/nand/raw/omap_gpmc.c | 2 +- drivers/mtd/spi/sf-uclass.c | 4 +- drivers/mtd/spi/sf_internal.h | 4 +- drivers/mtd/spi/sf_mtd.c | 6 +- drivers/mtd/spi/sf_probe.c | 14 +- drivers/mtd/spi/spi-nor-core.c | 12 +- drivers/mtd/spi/spi-nor-ids.c | 2 +- drivers/mtd/spi/spi-nor-tiny.c | 2 +- drivers/net/designware.c | 14 +- drivers/net/designware.h | 4 +- drivers/net/eth-phy-uclass.c | 4 +- drivers/net/fec_mxc.c | 10 +- drivers/net/fec_mxc.h | 2 +- drivers/net/fm/fm.c | 6 +- drivers/net/mvneta.c | 6 +- drivers/net/mvpp2.c | 8 +- drivers/net/rtl8169.c | 2 +- drivers/net/sh_eth.c | 10 +- drivers/net/smc911x.c | 2 +- drivers/net/sun8i_emac.c | 10 +- drivers/net/ti/cpsw.c | 4 +- drivers/pch/pch-uclass.c | 2 +- drivers/pci/pci_rom.c | 2 +- drivers/pci/pcie_dw_mvebu.c | 2 +- drivers/pci/pcie_imx.c | 4 +- drivers/phy/meson-axg-mipi-dphy.c | 4 +- drivers/phy/meson-g12a-usb2.c | 12 +- drivers/phy/meson-g12a-usb3-pcie.c | 4 +- drivers/phy/meson-gxbb-usb2.c | 8 +- drivers/phy/meson-gxl-usb2.c | 12 +- drivers/phy/nop-phy.c | 16 +- drivers/phy/phy-imx8mq-usb.c | 8 +- drivers/pinctrl/intel/pinctrl_apl.c | 6 +- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 12 +- drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 4 +- drivers/pinctrl/mtmips/pinctrl-mt7620.c | 12 +- drivers/pinctrl/mtmips/pinctrl-mt7621.c | 18 +-- drivers/pinctrl/mtmips/pinctrl-mt7628.c | 18 +-- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 4 +- drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 4 +- drivers/pinctrl/nxp/pinctrl-mxs.c | 2 +- drivers/pinctrl/pinctrl-generic.c | 4 +- drivers/pinctrl/pinctrl-qe-io.c | 2 +- drivers/pinctrl/pinctrl-stmfx.c | 4 +- drivers/pinctrl/pinctrl-uclass.c | 10 +- drivers/pinctrl/pinctrl_stm32.c | 4 +- drivers/pinctrl/renesas/pfc.c | 4 +- drivers/pinctrl/rockchip/pinctrl-px30.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3036.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3066.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3128.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk322x.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3308.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rk3399.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rv1108.c | 2 +- drivers/pinctrl/rockchip/pinctrl-rv1126.c | 2 +- .../pinctrl/uniphier/pinctrl-uniphier-core.c | 6 +- .../pinctrl/uniphier/pinctrl-uniphier-pro4.c | 2 +- .../pinctrl/uniphier/pinctrl-uniphier-pro5.c | 2 +- drivers/power/axp305.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/exynos-tmu.c | 2 +- drivers/power/palmas.c | 2 +- drivers/power/pmic/as3722.c | 4 +- drivers/power/pmic/axp.c | 4 +- drivers/power/pmic/bd71837.c | 2 +- drivers/power/pmic/pca9450.c | 2 +- drivers/power/pmic/pmic-uclass.c | 2 +- drivers/power/pmic/pmic_tps62362.c | 6 +- drivers/power/pmic/pmic_tps65217.c | 18 +-- drivers/power/pmic/pmic_tps65218.c | 4 +- drivers/power/pmic/pmic_tps65910.c | 6 +- drivers/power/pmic/rk8xx.c | 8 +- drivers/power/pmic/stpmic1.c | 6 +- drivers/power/power_i2c.c | 8 +- drivers/power/twl4030.c | 2 +- drivers/power/twl6030.c | 2 +- drivers/ram/k3-am654-ddrss.c | 2 +- drivers/ram/rockchip/dmc-rk3368.c | 8 +- drivers/ram/rockchip/sdram_rk3066.c | 4 +- drivers/ram/rockchip/sdram_rk3188.c | 8 +- drivers/ram/rockchip/sdram_rk322x.c | 8 +- drivers/ram/rockchip/sdram_rk3288.c | 8 +- drivers/ram/rockchip/sdram_rk3328.c | 8 +- drivers/ram/rockchip/sdram_rk3399.c | 10 +- drivers/reboot-mode/reboot-mode-gpio.c | 8 +- drivers/reboot-mode/reboot-mode-rtc.c | 4 +- drivers/reboot-mode/reboot-mode-uclass.c | 2 +- drivers/remoteproc/rproc-uclass.c | 2 +- drivers/reset/reset-at91.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/rtc/ds1337.c | 2 +- drivers/rtc/ds3231.c | 2 +- drivers/rtc/pcf8563.c | 2 +- drivers/rtc/pt7c4338.c | 2 +- drivers/rtc/rtc-uclass.c | 2 +- drivers/rtc/sandbox_rtc.c | 4 +- drivers/serial/atmel_usart.c | 12 +- drivers/serial/ns16550.c | 26 +-- drivers/serial/sandbox.c | 6 +- drivers/serial/serial-uclass.c | 32 ++-- drivers/serial/serial_bcm283x_mu.c | 4 +- drivers/serial/serial_bcm283x_pl011.c | 2 +- drivers/serial/serial_lpuart.c | 10 +- drivers/serial/serial_mt7620.c | 10 +- drivers/serial/serial_mtk.c | 2 +- drivers/serial/serial_mxc.c | 8 +- drivers/serial/serial_ns16550.c | 4 +- drivers/serial/serial_omap.c | 10 +- drivers/serial/serial_pl01x.c | 6 +- drivers/serial/serial_pl01x_internal.h | 2 +- drivers/serial/serial_rockchip.c | 6 +- drivers/serial/serial_sbi.c | 2 +- drivers/serial/serial_semihosting.c | 2 +- drivers/serial/serial_sh.c | 6 +- drivers/serial/serial_stm32.c | 2 +- drivers/serial/serial_xen.c | 6 +- drivers/spi/atmel_spi.c | 10 +- drivers/spi/cf_spi.c | 4 +- drivers/spi/davinci_spi.c | 4 +- drivers/spi/designware_spi.c | 6 +- drivers/spi/fsl_espi.c | 6 +- drivers/spi/ich.c | 8 +- drivers/spi/ich.h | 2 +- drivers/spi/mvebu_a3700_spi.c | 6 +- drivers/spi/mxc_spi.c | 8 +- drivers/spi/mxs_spi.c | 8 +- drivers/spi/nxp_fspi.c | 10 +- drivers/spi/omap3_spi.c | 4 +- drivers/spi/pl022_spi.c | 4 +- drivers/spi/renesas_rpc_spi.c | 4 +- drivers/spi/rk_spi.c | 8 +- drivers/spi/rockchip_sfc.c | 8 +- drivers/spi/sh_qspi.c | 4 +- drivers/spi/spi-uclass.c | 12 +- drivers/spi/ti_qspi.c | 2 +- drivers/sysreset/sysreset_sandbox.c | 2 +- drivers/timer/andes_plmt_timer.c | 2 +- drivers/timer/cadence-ttc.c | 2 +- drivers/timer/dw-apb-timer.c | 8 +- drivers/timer/omap-timer.c | 2 +- drivers/timer/ostm_timer.c | 2 +- drivers/timer/riscv_timer.c | 2 +- drivers/timer/rockchip_timer.c | 12 +- drivers/timer/sandbox_timer.c | 2 +- drivers/timer/sifive_clint_timer.c | 2 +- drivers/timer/timer-uclass.c | 6 +- drivers/timer/tsc_timer.c | 6 +- drivers/tpm/tpm-uclass.c | 2 +- drivers/tpm/tpm2_tis_spi.c | 2 +- drivers/usb/cdns3/core.c | 6 +- drivers/usb/common/common.c | 2 +- drivers/usb/common/usb_urb.c | 2 +- drivers/usb/dwc3/core.c | 4 +- drivers/usb/dwc3/core.h | 2 +- drivers/usb/dwc3/dwc3-generic.c | 12 +- drivers/usb/dwc3/dwc3-layerscape.c | 6 +- drivers/usb/dwc3/dwc3-meson-g12a.c | 8 +- drivers/usb/dwc3/dwc3-meson-gxl.c | 8 +- drivers/usb/gadget/ci_udc.c | 4 +- drivers/usb/gadget/composite.c | 2 +- drivers/usb/gadget/dwc2_udc_otg.c | 16 +- drivers/usb/gadget/f_fastboot.c | 2 +- drivers/usb/gadget/udc/udc-uclass.c | 4 +- drivers/usb/host/dwc2.c | 14 +- drivers/usb/host/dwc3-of-simple.c | 2 +- drivers/usb/host/ehci-atmel.c | 2 +- drivers/usb/host/ehci-hcd.c | 12 +- drivers/usb/host/ehci-marvell.c | 4 +- drivers/usb/host/ehci-mx6.c | 18 +-- drivers/usb/host/ehci-mxs.c | 4 +- drivers/usb/host/ehci-pci.c | 8 +- drivers/usb/host/ehci-vf.c | 2 +- drivers/usb/host/ohci-da8xx.c | 2 +- drivers/usb/host/ohci-hcd.c | 10 +- drivers/usb/host/ohci-lpc32xx.c | 8 +- drivers/usb/host/ohci.h | 4 +- drivers/usb/host/r8a66597-hcd.c | 4 +- drivers/usb/host/xhci-dwc3.c | 2 +- drivers/usb/host/xhci-mem.c | 6 +- drivers/usb/mtu3/mtu3_plat.c | 4 +- drivers/usb/musb-new/musb_uboot.c | 16 +- drivers/usb/musb-new/omap2430.c | 6 +- drivers/usb/musb-new/ti-musb.c | 20 +-- drivers/video/dw_hdmi.c | 2 +- drivers/video/meson/meson_dw_hdmi.c | 4 +- drivers/video/mxsfb.c | 2 +- drivers/video/nexell_display.c | 4 +- drivers/video/video-uclass.c | 6 +- drivers/w1-eeprom/w1-eeprom-uclass.c | 2 +- drivers/w1/w1-uclass.c | 2 +- drivers/watchdog/designware_wdt.c | 8 +- drivers/watchdog/imx_watchdog.c | 4 +- drivers/watchdog/omap_wdt.c | 4 +- drivers/watchdog/wdt-uclass.c | 2 +- env/env.c | 2 +- env/mmc.c | 4 +- env/sf.c | 2 +- fs/fat/fat.c | 6 +- fs/fs.c | 8 +- include/_exports.h | 4 +- include/asm-generic/global_data.h | 28 ++-- include/asm-generic/gpio.h | 2 +- include/atf_common.h | 2 +- include/binman_sym.h | 6 +- include/blk.h | 8 +- include/bootdev.h | 2 +- include/bootstage.h | 4 +- include/cli.h | 2 +- include/clk.h | 10 +- include/configs/MPC8548CDS.h | 2 +- include/configs/kmcent2.h | 2 +- include/configs/mv-common.h | 2 +- include/configs/p1_p2_rdb_pc.h | 2 +- include/configs/sunxi-common.h | 2 +- include/configs/ti_omap4_common.h | 2 +- include/configs/x530.h | 2 +- include/ctype.h | 61 +++++++- include/dfu.h | 12 +- include/dm/acpi.h | 2 +- include/dm/device-internal.h | 14 +- include/dm/device.h | 30 ++-- include/dm/device_compat.h | 2 +- include/dm/devres.h | 2 +- include/dm/ofnode.h | 6 +- include/dm/pinctrl.h | 4 +- include/dm/platdata.h | 6 +- include/dm/read.h | 8 +- include/dm/root.h | 2 +- include/dm/uclass-internal.h | 4 +- include/dm/util.h | 4 +- include/dma.h | 4 +- include/dt-structs.h | 2 +- include/dwc3-uboot.h | 2 +- include/efi_loader.h | 6 +- include/env_internal.h | 2 +- include/errno.h | 2 +- include/event.h | 10 +- include/exports.h | 4 +- include/generic-phy.h | 2 +- include/handoff.h | 2 +- include/hash.h | 2 +- include/hwspinlock.h | 2 +- include/i2c.h | 6 +- include/i2c_eeprom.h | 2 +- include/image.h | 6 +- include/init.h | 2 +- include/iommu.h | 4 +- include/irq.h | 2 +- include/linux/compiler_types.h | 2 +- include/linux/mtd/mtd.h | 4 +- include/linux/mtd/spi-nor.h | 2 +- include/linux/usb/gadget.h | 2 +- include/linux/usb/phy.h | 2 +- include/log.h | 10 +- include/malloc.h | 2 +- include/mmc.h | 36 ++--- include/mpc85xx.h | 2 +- include/nand.h | 2 +- include/net.h | 2 +- include/ns16550.h | 4 +- include/nvmem.h | 2 +- include/palmas.h | 2 +- include/part.h | 10 +- include/phys2bus.h | 2 +- include/power-domain.h | 16 +- include/power/max77686_pmic.h | 2 +- include/power/pmic.h | 14 +- include/power/regulator.h | 2 +- include/reboot-mode/reboot-mode-gpio.h | 4 +- include/remoteproc.h | 2 +- include/reset.h | 2 +- include/rtc.h | 2 +- include/sdhci.h | 2 +- include/semihosting.h | 4 +- include/serial.h | 2 +- include/spi.h | 4 +- include/spi_flash.h | 2 +- include/spl.h | 2 +- include/syscon.h | 2 +- include/sysinfo.h | 2 +- include/tlv_eeprom.h | 6 +- include/twl4030.h | 2 +- include/twl6030.h | 2 +- include/usb.h | 12 +- include/usb/xhci.h | 8 +- include/xilinx.h | 2 +- include/zynqmppl.h | 2 +- lib/display_options.c | 2 +- lib/efi_loader/efi_conformance.c | 2 +- lib/efi_loader/efi_console.c | 4 +- lib/efi_loader/efi_device_path.c | 2 +- lib/efi_loader/efi_disk.c | 2 +- lib/efi_loader/efi_root_node.c | 4 +- lib/efi_selftest/efi_selftest_ecpt.c | 2 +- lib/fdtdec.c | 24 +-- lib/hang.c | 4 +- lib/hashtable.c | 2 +- lib/hexdump.c | 2 +- lib/image-sparse.c | 2 +- lib/lmb.c | 4 +- lib/panic.c | 2 +- lib/rsa/rsa-sign.c | 2 +- lib/rsa/rsa-verify.c | 10 +- lib/semihosting.c | 2 +- lib/string.c | 2 +- lib/time.c | 2 +- lib/tiny-printf.c | 6 +- lib/vsprintf.c | 8 +- net/bootp.c | 2 +- net/eth-uclass.c | 4 +- net/eth_common.c | 2 +- scripts/basic/fixdep.c | 2 +- test/cmd_ut.c | 2 +- test/dm/clk_ccf.c | 4 +- test/dm/core.c | 2 +- test/dm/fastboot.c | 2 +- test/dm/of_platdata.c | 4 +- test/dm/part.c | 2 +- test/dm/spi.c | 2 +- test/lib/kconfig.c | 8 +- test/lib/kconfig_spl.c | 8 +- test/print_ut.c | 4 +- test/test-main.c | 18 +-- test/unicode_ut.c | 4 +- 826 files changed, 2457 insertions(+), 2398 deletions(-) mode change 120000 => 100644 include/ctype.h diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 2dd003445f8..926815b2a36 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -65,7 +65,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag) "(fake run for tracing)" : ""); bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel"); - if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { r0 = 2; r2 = (unsigned int)images->ft_addr; } else { diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S index 9f5547e552d..711d39684de 100644 --- a/arch/arc/lib/start.S +++ b/arch/arc/lib/start.S @@ -17,7 +17,7 @@ ENTRY(_start) lr r5, [ARC_BCR_IC_BUILD] breq r5, 0, 1f ; I$ doesn't exist lr r5, [ARC_AUX_IC_CTRL] -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) bclr r5, r5, 0 ; 0 - Enable, 1 is Disable #else bset r5, r5, 0 ; I$ exists, but is not used @@ -38,7 +38,7 @@ ENTRY(_start) breq r5, 0, 1f ; D$ doesn't exist lr r5, [ARC_AUX_DC_CTRL] bclr r5, r5, 6 ; Invalidate (discard w/o wback) -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) bclr r5, r5, 0 ; Enable (+Inv) #else bset r5, r5, 0 ; Disable (+Inv) diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index ffe35111d58..7badab0c9c1 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -54,7 +54,7 @@ static void cache_flush(void) asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (i)); } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void invalidate_dcache_all(void) { asm volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0)); @@ -90,7 +90,7 @@ void flush_dcache_range(unsigned long start, unsigned long stop) asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0)); } -#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ void invalidate_dcache_all(void) { } @@ -98,15 +98,15 @@ void invalidate_dcache_all(void) void flush_dcache_all(void) { } -#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) void enable_caches(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) icache_enable(); #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) dcache_enable(); #endif } diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index 4bc27f63736..27cef699516 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -39,7 +39,7 @@ reset: msr cpsr,r0 /* the mask ROM code should have PLL and others stable */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) bl cpu_init_crit #endif @@ -62,7 +62,7 @@ c_runtime_cpu_setup: * ************************************************************************* */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) cpu_init_crit: /* * flush v4 I/D caches @@ -81,7 +81,7 @@ cpu_init_crit: orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache mcr p15, 0, r0, c1, c0, 0 -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /* * Jump to board specific initialization... The Mask ROM will have already initialized * basic memory. Go here to bump up clock rate and handle wake up conditions. @@ -91,4 +91,4 @@ cpu_init_crit: mov lr, ip /* restore link */ #endif mov pc, lr /* back to my caller */ -#endif /* !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S index 9ad1f031429..357ec9480ff 100644 --- a/arch/arm/cpu/arm720t/start.S +++ b/arch/arm/cpu/arm720t/start.S @@ -37,8 +37,8 @@ reset: * we do sys-critical inits only at reboot, * not when booting from ram! */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \ - !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) bl cpu_init_crit #endif @@ -62,8 +62,8 @@ c_runtime_cpu_setup: ************************************************************************* */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \ - !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) cpu_init_crit: mov ip, lr @@ -76,4 +76,4 @@ cpu_init_crit: mov lr, ip mov pc, lr -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S index cba4a1f0358..dd90bb51270 100644 --- a/arch/arm/cpu/arm920t/start.S +++ b/arch/arm/cpu/arm920t/start.S @@ -39,7 +39,7 @@ reset: * we do sys-critical inits only at reboot, * not when booting from ram! */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) bl cpu_init_crit #endif @@ -64,7 +64,7 @@ c_runtime_cpu_setup: */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) cpu_init_crit: /* * flush v4 I/D caches @@ -83,7 +83,7 @@ cpu_init_crit: orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache mcr p15, 0, r0, c1, c0, 0 -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will @@ -95,4 +95,4 @@ cpu_init_crit: mov lr, ip #endif mov pc, lr -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c index 95963d2665f..a3b8ba48ab5 100644 --- a/arch/arm/cpu/arm926ejs/cache.c +++ b/arch/arm/cpu/arm926ejs/cache.c @@ -8,7 +8,7 @@ #include #include -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void invalidate_dcache_all(void) { asm volatile("mcr p15, 0, %0, c7, c6, 0\n" : : "r"(0)); @@ -48,7 +48,7 @@ void flush_dcache_range(unsigned long start, unsigned long stop) asm volatile("mcr p15, 0, %0, c7, c10, 4\n" : : "r"(0)); } -#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ void invalidate_dcache_all(void) { } @@ -56,7 +56,7 @@ void invalidate_dcache_all(void) void flush_dcache_all(void) { } -#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ /* * Stub implementations for l2 cache operations @@ -64,11 +64,11 @@ void flush_dcache_all(void) __weak void l2_cache_disable(void) {} -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) __weak void invalidate_l2_cache(void) {} #endif -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) /* Invalidate entire I-cache and branch predictor array */ void invalidate_icache_all(void) { @@ -82,10 +82,10 @@ void invalidate_icache_all(void) {} void enable_caches(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) icache_enable(); #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) dcache_enable(); #endif } diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index 2ce413a7f86..b9e7f51b6e6 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -60,7 +60,7 @@ int cleanup_before_linux (void) /* flush I/D-cache */ static void cache_flush (void) { -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) unsigned long i = 0; asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i)); diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index c882bd39eab..239b2e7a179 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -52,7 +52,7 @@ save_boot_params_ret: * we do sys-critical inits only at reboot, * not when booting from ram! */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) bl cpu_init_crit #endif @@ -75,7 +75,7 @@ c_runtime_cpu_setup: * ************************************************************************* */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) cpu_init_crit: /* * flush D cache before disabling it @@ -101,12 +101,12 @@ flush_dcache: bic r0, r0, #0x00002000 /* clear bit 13 (--V- ----) */ #endif orr r0, r0, #0x00000002 /* set bit 1 (A) Align */ -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */ #endif mcr p15, 0, r0, c1, c0, 0 -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /* * Go setup Memory and board specific bits prior to relocation. */ @@ -115,7 +115,7 @@ flush_dcache: mov lr, r4 /* restore link */ #endif mov pc, lr /* back to my caller */ -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ /************************************************************************* * diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S index 2d5186774a7..e7c50168c7f 100644 --- a/arch/arm/cpu/arm946es/start.S +++ b/arch/arm/cpu/arm946es/start.S @@ -45,7 +45,7 @@ reset: * we do sys-critical inits only at reboot, * not when booting from ram! */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) bl cpu_init_crit #endif @@ -70,7 +70,7 @@ c_runtime_cpu_setup: */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) cpu_init_crit: /* * flush v4 I/D caches @@ -89,7 +89,7 @@ cpu_init_crit: orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */ mcr p15, 0, r0, c1, c0, 0 -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /* * Go setup Memory and board specific bits prior to relocation. */ diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index 19ff4323528..44a5e0946d7 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -14,7 +14,7 @@ #define ARMV7_DCACHE_INVAL_RANGE 1 #define ARMV7_DCACHE_CLEAN_INVAL_RANGE 2 -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) /* Asm functions from cache_v7_asm.S */ void v7_flush_dcache_all(void); @@ -151,7 +151,7 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop) flush_dcache_range(start, stop); v7_inval_tlb(); } -#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#else /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ void invalidate_dcache_all(void) { } @@ -176,9 +176,9 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop) { } -#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) /* Invalidate entire I-cache and branch predictor array */ void invalidate_icache_all(void) { diff --git a/arch/arm/cpu/armv7/cache_v7_asm.S b/arch/arm/cpu/armv7/cache_v7_asm.S index e38d72f87fc..cd63ef0e7c8 100644 --- a/arch/arm/cpu/armv7/cache_v7_asm.S +++ b/arch/arm/cpu/armv7/cache_v7_asm.S @@ -5,7 +5,7 @@ #include #include -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) #define ARM(x...) #define THUMB(x...) x #else diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c index 896d2f95694..99cd9f71d67 100644 --- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c @@ -7,7 +7,7 @@ #include #include -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index c455969609f..c4d51cd5ae3 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) /* * Bit[1] of the descriptor indicates the descriptor type, @@ -223,7 +223,7 @@ void enable_caches(void) invalidate_dcache_all(); set_cr(get_cr() | CR_C); } -#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* #if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ uint get_svr(void) diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index 7d7aac021e2..86fd7d38816 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -98,7 +98,7 @@ switch_to_hypervisor_ret: orr r0, r0, #0xc0 @ disable FIQ and IRQ msr cpsr,r0 -#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE) +#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE) /* * Setup vector: */ @@ -115,11 +115,11 @@ switch_to_hypervisor_ret: #endif /* the mask ROM code should have PLL and others stable */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) #ifdef CONFIG_CPU_V7A bl cpu_init_cp15 #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) bl cpu_init_crit #endif #endif @@ -132,7 +132,7 @@ ENTRY(c_runtime_cpu_setup) /* * If I-cache is enabled invalidate it */ -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) mcr p15, 0, r0, c7, c5, 0 @ invalidate icache mcr p15, 0, r0, c7, c10, 4 @ DSB mcr p15, 0, r0, c7, c5, 4 @ ISB @@ -171,7 +171,7 @@ ENDPROC(switch_to_hypervisor) *************************************************************************/ ENTRY(cpu_init_cp15) -#if CONFIG_IS_ENABLED(ARMV7_SET_CORTEX_SMPEN) +#if IS_ENABLED(CONFIG_ARMV7_SET_CORTEX_SMPEN) /* * The Arm Cortex-A7 TRM says this bit must be enabled before * "any cache or TLB maintenance operations are performed". @@ -199,7 +199,7 @@ ENTRY(cpu_init_cp15) bic r0, r0, #0x00000007 @ clear bits 2:0 (-CAM) orr r0, r0, #0x00000002 @ set bit 1 (--A-) Align orr r0, r0, #0x00000800 @ set bit 11 (Z---) BTB -#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if IS_ENABLED(CONFIG_SYS_ICACHE_OFF) bic r0, r0, #0x00001000 @ clear bit 12 (I) I-cache #else orr r0, r0, #0x00001000 @ set bit 12 (I) I-cache @@ -364,8 +364,8 @@ skip_errata_801819: mov pc, r5 @ back to my caller ENDPROC(cpu_init_cp15) -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \ - !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /************************************************************************* * * CPU_init_critical registers diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index c23ddc12b45..e3591100dde 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -368,7 +368,7 @@ int get_clocks(void) return 0; } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c index d1aecf6a85c..cb8497b7a2b 100644 --- a/arch/arm/cpu/armv7m/cache.c +++ b/arch/arm/cpu/armv7m/cache.c @@ -58,7 +58,7 @@ enum cache_action { FLUSH_INVAL_SET_WAY, /* d-cache clean & invalidate by set/ways */ }; -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) struct dcache_config { u32 ways; u32 sets; @@ -302,7 +302,7 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, #endif -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) void invalidate_icache_all(void) { @@ -364,10 +364,10 @@ int icache_status(void) void enable_caches(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) icache_enable(); #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) dcache_enable(); #endif } diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index 2a226fd0633..6c6363c62f1 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) /* * With 4k page granule, a virtual address is split into 4 lookup parts @@ -686,7 +686,7 @@ void mmu_change_region_attr(phys_addr_t addr, size_t siz, u64 attrs) __asm_invalidate_tlb_all(); } -#else /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#else /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ /* * For SPL builds, we may want to not have dcache enabled. Any real U-Boot @@ -723,9 +723,9 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, { } -#endif /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) void icache_enable(void) { @@ -754,7 +754,7 @@ void invalidate_icache_all(void) __asm_invalidate_l3_icache(); } -#else /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */ +#else /* !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) */ void icache_enable(void) { @@ -778,7 +778,7 @@ void invalidate_icache_all(void) { } -#endif /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */ +#endif /* !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) */ /* * Enable dCache & iCache, whether cache is actually enabled diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 12d31184ad9..b765d4f35da 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -427,7 +427,7 @@ void cpu_name(char *name) strcpy(name, "unknown"); } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) /* * To start MMU before DDR is available, we create MMU table in SRAM. * The base address of SRAM is CFG_SYS_FSL_OCRAM_BASE. We use three @@ -654,7 +654,7 @@ void enable_caches(void) icache_enable(); dcache_enable(); } -#endif /* !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */ +#endif /* !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) */ #ifdef CONFIG_TFABOOT enum boot_src __get_boot_src(u32 porsr1) @@ -1226,7 +1226,7 @@ int timer_init(void) return 0; } -#if !CONFIG_IS_ENABLED(SYSRESET) +#if !IS_ENABLED(CONFIG_SYSRESET) __efi_runtime_data u32 __iomem *rstcr = (u32 *)CFG_SYS_FSL_RST_ADDR; void __efi_runtime reset_cpu(void) @@ -1525,7 +1525,7 @@ int dram_init_banksize(void) return 0; } -#if CONFIG_IS_ENABLED(EFI_LOADER) +#if IS_ENABLED(CONFIG_EFI_LOADER) void efi_add_known_memory(void) { int i; diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index 4f91db49eeb..8fd07157a7f 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -26,7 +26,7 @@ #endif #include #include -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) #include #endif #include @@ -81,7 +81,7 @@ void ft_fixup_cpu(void *blob) "device_type", "cpu", 4); } -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) && \ +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \ defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI) int node; u32 psci_ver; @@ -146,7 +146,7 @@ remove_psci_node: fdt_add_mem_rsv(blob, (uintptr_t)secondary_boot_code_start, secondary_boot_code_size); -#if CONFIG_IS_ENABLED(EFI_LOADER) +#if IS_ENABLED(CONFIG_EFI_LOADER) efi_add_memory_map((uintptr_t)secondary_boot_code_start, secondary_boot_code_size, EFI_RESERVED_MEMORY_TYPE); #endif @@ -378,7 +378,7 @@ static void fdt_fixup_msi(void *blob) } #endif -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) /* Remove JR node used by SEC firmware */ void fdt_fixup_remove_jr(void *blob) { @@ -630,7 +630,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd) else { ccsr_sec_t __iomem *sec; -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) fdt_fixup_remove_jr(blob); fdt_fixup_kaslr(blob); #endif diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c index 117b7a053c5..9bbde4fae3d 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c @@ -17,7 +17,7 @@ #elif defined(CONFIG_FSL_LSCH2) #include #endif -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) #include #endif #ifdef CONFIG_CHAIN_OF_TRUST diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 359cbc04309..b7280cf8139 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -342,7 +342,7 @@ static void erratum_rcw_src(void) #ifdef CONFIG_SYS_FSL_ERRATUM_A009203 static void erratum_a009203(void) { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) u8 __iomem *ptr; #ifdef I2C1_BASE_ADDR ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG); diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 61fced451eb..a589b916b55 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -104,7 +104,7 @@ void board_init_f(ulong dummy) preloader_console_init(); spl_set_bd(); -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) #ifdef CONFIG_SPL_I2C i2c_init_all(); #endif diff --git a/arch/arm/include/asm/arch-am33xx/chilisom.h b/arch/arm/include/asm/arch-am33xx/chilisom.h index e423c9d071f..ede1a3f95f0 100644 --- a/arch/arm/include/asm/arch-am33xx/chilisom.h +++ b/arch/arm/include/asm/arch-am33xx/chilisom.h @@ -6,7 +6,7 @@ #ifndef __ARCH_ARM_MACH_CHILISOM_SOM_H__ #define __ARCH_ARM_MACH_CHILISOM_SOM_H__ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) void chilisom_enable_pin_mux(void); void chilisom_spl_board_init(void); #endif diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h index d5f63f4a7ed..b5462fe36cb 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h @@ -178,7 +178,7 @@ extern int fman_icid_tbl_sz; #define SET_SEC_JR_ICID_ENTRY(jr_num, streamid) \ SET_ICID_ENTRY( \ - (CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) && \ + (IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \ (FSL_SEC_JR##jr_num##_OFFSET == \ SEC_JR3_OFFSET + CFG_SYS_FSL_SEC_OFFSET) \ ? NULL \ diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h index 3918178d3a3..0aa9463d5ba 100644 --- a/arch/arm/include/asm/arch-lpc32xx/i2c.h +++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h @@ -22,7 +22,7 @@ struct lpc32xx_i2c_base { u32 stxfl; }; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) enum { I2C_0, I2C_1, I2C_2, }; diff --git a/arch/arm/include/asm/arch-rockchip/boot0.h b/arch/arm/include/asm/arch-rockchip/boot0.h index 0c375e543a5..bbb6846b79c 100644 --- a/arch/arm/include/asm/arch-rockchip/boot0.h +++ b/arch/arm/include/asm/arch-rockchip/boot0.h @@ -26,7 +26,7 @@ b 1f /* if overwritten, entry-address is at the next word */ 1: #endif -#if CONFIG_IS_ENABLED(ROCKCHIP_EARLYRETURN_TO_BROM) +#if IS_ENABLED(CONFIG_ROCKCHIP_EARLYRETURN_TO_BROM) adr r3, entry_counter ldr r0, [r3] cmp r0, #1 /* check if entry_counter == 1 */ diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h index 0d29aefb646..ec0720f741b 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h @@ -23,7 +23,7 @@ struct rk322x_sdram_channel { u8 row_3_4; u8 cs0_row; u8 cs1_row; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* * For of-platdata, which would otherwise convert this into two * byte-swapped integers. With a size of 9 bytes, this struct will diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h index 9220763fa7f..ebc3243cecc 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3288.h @@ -22,7 +22,7 @@ struct rk3288_sdram_channel { u8 row_3_4; u8 cs0_row; u8 cs1_row; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* * For of-platdata, which would otherwise convert this into two * byte-swapped integers. With a size of 9 bytes, this struct will diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 8d42ef4823e..212940c293e 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -83,7 +83,7 @@ * We disable it especially for Thumb builds since those instructions * are not made in a Thumb ready way... */ -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) #define CALGN(code...) #else #define CALGN(code...) code diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index b10edf805b9..688719e6022 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h @@ -15,7 +15,7 @@ /* * Invalidate L2 Cache using co-proc instruction */ -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) void invalidate_l2_cache(void); #else static inline void invalidate_l2_cache(void) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 9e746e380a2..0df4e0ae8b3 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -46,7 +46,7 @@ struct arch_global_data { unsigned int tbl; unsigned long lastinc; unsigned long long timer_reset_value; -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) unsigned long tlb_addr; unsigned long tlb_size; #if defined(CONFIG_ARM64) diff --git a/arch/arm/include/asm/mach-imx/mxc_i2c.h b/arch/arm/include/asm/mach-imx/mxc_i2c.h index e8b330f33d1..c8c7db077f3 100644 --- a/arch/arm/include/asm/mach-imx/mxc_i2c.h +++ b/arch/arm/include/asm/mach-imx/mxc_i2c.h @@ -6,7 +6,7 @@ #define __ASM_ARCH_MXC_MXC_I2C_H__ #include #include -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) #include #endif @@ -50,10 +50,10 @@ struct mxc_i2c_bus { ulong driver_data; int speed; struct i2c_pads_info *pads_info; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk per_clk; #endif -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int (*idle_bus_fn)(void *p); void *idle_bus_data; #else diff --git a/arch/arm/include/asm/omap_gpio.h b/arch/arm/include/asm/omap_gpio.h index 590a93761cf..9b00f03a069 100644 --- a/arch/arm/include/asm/omap_gpio.h +++ b/arch/arm/include/asm/omap_gpio.h @@ -22,7 +22,7 @@ #include -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* Information about a GPIO bank */ struct omap_gpio_plat { diff --git a/arch/arm/include/asm/omap_i2c.h b/arch/arm/include/asm/omap_i2c.h index 9f0f2722343..1a1cffb38b1 100644 --- a/arch/arm/include/asm/omap_i2c.h +++ b/arch/arm/include/asm/omap_i2c.h @@ -3,7 +3,7 @@ #ifndef _OMAP_I2C_H #define _OMAP_I2C_H -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) /* Information about a GPIO bank */ struct omap_i2c_plat { diff --git a/arch/arm/include/asm/proc-armv/ptrace.h b/arch/arm/include/asm/proc-armv/ptrace.h index 2db60d552d4..c015544cd03 100644 --- a/arch/arm/include/asm/proc-armv/ptrace.h +++ b/arch/arm/include/asm/proc-armv/ptrace.h @@ -161,7 +161,7 @@ struct pt_regs { #define user_mode(regs) \ (((regs)->ARM_cpsr & 0xf) == 0) -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) #define thumb_mode(regs) \ (((regs)->ARM_cpsr & T_BIT)) #else diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index ead3f2c3564..a464944e339 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h @@ -14,12 +14,12 @@ extern char * strrchr(const char * s, int c); #undef __HAVE_ARCH_STRCHR extern char * strchr(const char * s, int c); -#if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMCPY) #define __HAVE_ARCH_MEMCPY #endif extern void * memcpy(void *, const void *, __kernel_size_t); -#if CONFIG_IS_ENABLED(USE_ARCH_MEMMOVE) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMMOVE) #define __HAVE_ARCH_MEMMOVE #else #undef __HAVE_ARCH_MEMMOVE @@ -30,7 +30,7 @@ extern void * memmove(void *, const void *, __kernel_size_t); extern void * memchr(const void *, int, __kernel_size_t); #undef __HAVE_ARCH_MEMZERO -#if CONFIG_IS_ENABLED(USE_ARCH_MEMSET) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMSET) #define __HAVE_ARCH_MEMSET #endif extern void * memset(void *, int, __kernel_size_t); diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index 5e6eaad968d..e62a13a3b96 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -40,7 +40,7 @@ void arch_print_bdinfo(void) if (gd->arch.resv_ram) bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram); #endif -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr); #endif bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */ diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index c56285738a2..d2384b04ea1 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -199,7 +199,7 @@ static void boot_prep_linux(struct bootm_headers *images) { char *commandline = env_get("bootargs"); - if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { debug("using: FDT\n"); if (image_setup_linux(images)) { panic("FDT creation failed!"); @@ -354,7 +354,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag) bootstage_mark(BOOTSTAGE_ID_RUN_OS); announce_and_cleanup(fake); - if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) r2 = (unsigned long)images->ft_addr; else r2 = gd->bd->bi_boot_params; diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 0893915b300..b4330c24613 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -13,7 +13,7 @@ #include #include -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) DECLARE_GLOBAL_DATA_PTR; @@ -258,7 +258,7 @@ static void cache_disable(uint32_t cache_bit) } #endif -#if CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if IS_ENABLED(CONFIG_SYS_ICACHE_OFF) void icache_enable(void) { return; @@ -290,7 +290,7 @@ int icache_status(void) } #endif -#if CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void dcache_enable(void) { return; diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 1a589c7e2a0..d6194a2ed1a 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -80,7 +80,7 @@ static unsigned long noncached_next; void noncached_set_region(void) { -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) mmu_set_region_dcache_behaviour(noncached_start, noncached_end - noncached_start, DCACHE_OFF); @@ -122,7 +122,7 @@ phys_addr_t noncached_alloc(size_t size, size_t align) } #endif /* CONFIG_SYS_NONCACHED_MEMORY */ -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) void invalidate_l2_cache(void) { unsigned int val = 0; @@ -140,7 +140,7 @@ int arch_reserve_mmu(void) __weak int arm_reserve_mmu(void) { -#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) +#if !(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) /* reserve TLB table */ gd->arch.tlb_size = PGTABLE_SIZE; gd->relocaddr -= gd->arch.tlb_size; diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index a0311438b45..547c3f997f3 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -92,7 +92,7 @@ clbss_l:cmp r0, r1 /* while not at end of BSS */ ENTRY(_main) /* Call arch_very_early_init before initializing C runtime environment. */ -#if CONFIG_IS_ENABLED(ARCH_VERY_EARLY_INIT) +#if IS_ENABLED(CONFIG_ARCH_VERY_EARLY_INIT) bl arch_very_early_init #endif @@ -115,7 +115,7 @@ ENTRY(_main) mov r9, r0 bl board_init_f_init_reserve -#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL) +#if defined(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_SERIAL) bl debug_uart_init #endif @@ -171,7 +171,7 @@ here: bl c_runtime_cpu_setup /* we still call old routine here */ #endif -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK) +#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_FRAMEWORK) #if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_EARLY_BSS) CLEAR_BSS @@ -193,7 +193,7 @@ here: mov r0, r9 /* gd_t */ ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */ /* call board_init_r */ -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) ldr lr, =board_init_r /* this is auto-relocated! */ bx lr #else diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index dcc924dd2f4..e9dd9f22ab9 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -92,7 +92,7 @@ ENTRY(_main) mov x18, x0 bl board_init_f_init_reserve -#if defined(CONFIG_DEBUG_UART) && CONFIG_IS_ENABLED(SERIAL) +#if defined(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_SERIAL) bl debug_uart_init #endif @@ -140,7 +140,7 @@ relocation_return: */ bl c_runtime_cpu_setup /* still call old routine */ #endif /* !CONFIG_SPL_BUILD */ -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK) +#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_FRAMEWORK) #if defined(CONFIG_SPL_BUILD) bl spl_relocate_stack_gd /* may return NULL */ /* set up gd here, outside any C code, if new stack is returned */ diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c index 2e091415a46..e635375e18b 100644 --- a/arch/arm/lib/interrupts_64.c +++ b/arch/arm/lib/interrupts_64.c @@ -161,7 +161,7 @@ void do_bad_error(struct pt_regs *pt_regs) */ void do_sync(struct pt_regs *pt_regs) { - if (CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK) && + if (IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK) && smh_emulate_trap(pt_regs)) return; efi_restore_gd(); diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S index de15d09e360..dae83ee6bf0 100644 --- a/arch/arm/lib/lib1funcs.S +++ b/arch/arm/lib/lib1funcs.S @@ -361,7 +361,7 @@ ENDPROC(Ldiv0) .popsection /* Thumb-1 specialities */ -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2) .pushsection .text.__gnu_thumb1_case_sqi, "ax" ENTRY(__gnu_thumb1_case_sqi) push {r1} diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S index a1c996f94ef..ceb36f5d628 100644 --- a/arch/arm/lib/memcpy.S +++ b/arch/arm/lib/memcpy.S @@ -53,7 +53,7 @@ /* Prototype: void *memcpy(void *dest, const void *src, size_t n); */ .syntax unified -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD) .thumb .thumb_func #endif diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 2277d120267..789586d4fab 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -13,7 +13,7 @@ .align 5 .syntax unified -#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD) +#if IS_ENABLED(CONFIG_SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD) .thumb .thumb_func #endif diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c index 903b3357048..5421a89be08 100644 --- a/arch/arm/lib/psci-dt.c +++ b/arch/arm/lib/psci-dt.c @@ -10,7 +10,7 @@ #include #include #include -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) #include #endif @@ -64,7 +64,7 @@ int fdt_psci(void *fdt) return nodeoff; init_psci_node: -#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) psci_ver = sec_firmware_support_psci_version(); #elif defined(CONFIG_ARMV7_PSCI_1_0) || defined(CONFIG_ARMV8_PSCI) psci_ver = ARM_PSCI_VER_1_0; @@ -85,7 +85,7 @@ init_psci_node: return tmp; } -#if !CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) +#if !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) /* * The Secure firmware framework isn't able to support PSCI version 0.1. */ diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c index b13897495da..ed7497e2052 100644 --- a/arch/arm/lib/spl.c +++ b/arch/arm/lib/spl.c @@ -50,7 +50,7 @@ void __weak board_init_f(ulong dummy) * This function jumps to an image with argument. Normally an FDT or ATAGS * image. */ -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) #ifdef CONFIG_ARM64 void __noreturn jump_to_image_linux(struct spl_image_info *spl_image) { @@ -78,7 +78,7 @@ void __noreturn jump_to_image_linux(struct spl_image_info *spl_image) #endif /* CONFIG_ARM64 */ #endif -#if CONFIG_IS_ENABLED(OPTEE_IMAGE) +#if IS_ENABLED(CONFIG_OPTEE_IMAGE) void __noreturn jump_to_image_optee(struct spl_image_info *spl_image) { /* flush and turn off caches before jumping to OPTEE */ diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 7cf7d1636f5..4de37e7292f 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -24,7 +24,7 @@ #else b reset #endif -#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE) +#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE) ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort @@ -89,7 +89,7 @@ _start: ARM_VECTORS #endif /* !defined(CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK) */ -#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE) +#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE) /* ************************************************************************* * @@ -135,7 +135,7 @@ _fiq: .word fiq #ifdef CONFIG_SPL_BUILD -#if !CONFIG_IS_ENABLED(SYS_NO_VECTOR_TABLE) +#if !IS_ENABLED(CONFIG_SYS_NO_VECTOR_TABLE) .align 5 undefined_instruction: software_interrupt: diff --git a/arch/arm/mach-at91/arm920t/lowlevel_init.S b/arch/arm/mach-at91/arm920t/lowlevel_init.S index 6b7d3cbc710..90fbbc33172 100644 --- a/arch/arm/mach-at91/arm920t/lowlevel_init.S +++ b/arch/arm/mach-at91/arm920t/lowlevel_init.S @@ -10,7 +10,7 @@ #include -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) #include #include @@ -148,4 +148,4 @@ SMRDATA1: .word CFG_SYS_SDRAM_VAL SMRDATA1E: /* SMRDATA1 is 176 bytes long */ -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h index 103db269533..45c6c19eaf4 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9260.h +++ b/arch/arm/mach-at91/include/mach/at91sam9260.h @@ -133,7 +133,7 @@ /* * Other misc defines */ -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) #define ATMEL_PIO_PORTS 3 /* these SoCs have 3 PIO */ #define ATMEL_BASE_PIO ATMEL_BASE_PIOA #endif diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index dfba9f730c1..ae5e506c8ea 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -79,7 +79,7 @@ void __weak spl_board_init(void) void board_init_f(ulong dummy) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int ret; ret = spl_early_init(); diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c index 08c8f592524..47870401c77 100644 --- a/arch/arm/mach-davinci/da850_lowlevel.c +++ b/arch/arm/mach-davinci/da850_lowlevel.c @@ -289,7 +289,7 @@ int arch_cpu_init(void) /* GPIO setup */ board_gpio_init(); -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) ns16550_init((struct ns16550 *)(CFG_SYS_NS16550_COM1), CFG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); #endif diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index e5a40534141..fd6cc86b63b 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -18,7 +18,7 @@ #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) #define davinci_gpio_bank8 ((struct davinci_gpio *)DAVINCI_GPIO_BANK8) -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) #define gpio_status() gpio_info() #endif #define GPIO_NAME_SIZE 20 diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c index 8d8c64e8f8f..e811a2217f3 100644 --- a/arch/arm/mach-exynos/mmu-arm64.c +++ b/arch/arm/mach-exynos/mmu-arm64.c @@ -30,7 +30,7 @@ static struct mm_region exynos7420_mem_map[] = { struct mm_region *mem_map = exynos7420_mem_map; -#elif CONFIG_IS_ENABLED(EXYNOS7870) +#elif IS_ENABLED(CONFIG_EXYNOS7870) static struct mm_region exynos7870_mem_map[] = { { @@ -63,7 +63,7 @@ static struct mm_region exynos7870_mem_map[] = { struct mm_region *mem_map = exynos7870_mem_map; -#elif CONFIG_IS_ENABLED(EXYNOS7880) +#elif IS_ENABLED(CONFIG_EXYNOS7880) static struct mm_region exynos7880_mem_map[] = { { diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c index ad3fbf2da7a..6ecb8892cbe 100644 --- a/arch/arm/mach-exynos/pinmux.c +++ b/arch/arm/mach-exynos/pinmux.c @@ -897,7 +897,7 @@ int exynos_pinmux_config(int peripheral, int flags) return -1; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int exynos4_pinmux_decode_periph_id(const void *blob, int node) { int err; diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c index a07c87a2c8e..a7989ae41a6 100644 --- a/arch/arm/mach-exynos/soc.c +++ b/arch/arm/mach-exynos/soc.c @@ -27,7 +27,7 @@ void reset_cpu(void) #endif } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c index ab9b621a2a6..f9a84007fe1 100644 --- a/arch/arm/mach-imx/cache.c +++ b/arch/arm/mach-imx/cache.c @@ -39,7 +39,7 @@ void enable_ca7_smp(void) } } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { #if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH) diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index c6747b257c4..b4a322ff77e 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -587,12 +587,12 @@ static ulong get_image_ivt_offset(ulong img_addr) buf = map_sysmem(img_addr, 0); switch (genimg_get_format(buf)) { -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) case IMAGE_FORMAT_LEGACY: return (image_get_image_size((struct legacy_img_hdr *)img_addr) + 0x1000 - 1) & ~(0x1000 - 1); #endif -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) case IMAGE_FORMAT_FIT: return (fit_get_size(buf) + 0x1000 - 1) & ~(0x1000 - 1); #endif diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c index a5866cf9f70..4992700d170 100644 --- a/arch/arm/mach-imx/i2c-mxv7.c +++ b/arch/arm/mach-imx/i2c-mxv7.c @@ -108,7 +108,7 @@ int setup_i2c(unsigned i2c_index, int speed, int slave_addr, if (ret) goto err_idle; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) bus_i2c_init(i2c_index, speed, slave_addr, force_idle_bus, p); #endif diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index be1f4edded1..6036d7c95f2 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -546,7 +546,7 @@ void enable_caches(void) dcache_enable(); } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) u64 get_page_table_size(void) { u64 one_pt = MAX_PTE_ENTRIES * sizeof(u64); diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 8050406613d..5cbc8997683 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -530,7 +530,7 @@ static int imx8m_check_clock(void *ctx, struct event *event) struct udevice *dev; int ret; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = uclass_get_device_by_name(UCLASS_CLK, "clock-controller@30380000", &dev); @@ -558,7 +558,7 @@ int arch_cpu_init(void) { struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) icache_enable(); #endif @@ -1397,7 +1397,7 @@ set_status: #endif #endif -#if !CONFIG_IS_ENABLED(SYSRESET) +#if !IS_ENABLED(CONFIG_SYSRESET) void reset_cpu(void) { struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c index 47f531dc856..95a230ac537 100644 --- a/arch/arm/mach-imx/mx5/soc.c +++ b/arch/arm/mach-imx/mx5/soc.c @@ -64,7 +64,7 @@ u32 __weak get_board_rev(void) } #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 550e392550e..8d61de5ec45 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -226,7 +226,7 @@ const struct rproc_att hostmap[] = { }; #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) /* enable all periherial can be accessed in nosec mode */ static void init_csu(void) { diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 129efac6fa6..1cbfc1d7570 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -59,7 +59,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec) return usec; } -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) int timer_init(void) { struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 96f292ea75c..16c5dda8e07 100644 --- a/arch/arm/mach-k3/am642_init.c +++ b/arch/arm/mach-k3/am642_init.c @@ -65,7 +65,7 @@ static void store_boot_info_from_rom(void) sizeof(struct rom_extended_boot_data)); } -#if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC) +#if defined(CONFIG_K3_LOAD_SYSFW) && IS_ENABLED(CONFIG_DM_MMC) void k3_mmc_stop_clock(void) { if (spl_boot_device() == BOOT_DEVICE_MMC1) { @@ -118,7 +118,7 @@ void do_dt_magic(void) } #endif -#if CONFIG_IS_ENABLED(USB_STORAGE) +#if IS_ENABLED(CONFIG_USB_STORAGE) static int fixup_usb_boot(const void *fdt_blob) { int ret = 0; diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index 768fdd69602..cc645289ae3 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -81,7 +81,7 @@ static void store_boot_index_from_rom(void) bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX); } -#if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC) +#if defined(CONFIG_K3_LOAD_SYSFW) && IS_ENABLED(CONFIG_DM_MMC) void k3_mmc_stop_clock(void) { if (spl_boot_device() == BOOT_DEVICE_MMC1) { @@ -110,7 +110,7 @@ void k3_mmc_restart_clock(void) void k3_mmc_stop_clock(void) {} void k3_mmc_restart_clock(void) {} #endif -#if CONFIG_IS_ENABLED(DFU) || CONFIG_IS_ENABLED(USB_STORAGE) +#if IS_ENABLED(CONFIG_DFU) || IS_ENABLED(CONFIG_USB_STORAGE) #define CTRLMMR_SERDES0_CTRL 0x00104080 #define PCIE_LANE0 0x1 static int fixup_usb_boot(void) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index a2adb791f6c..069a771a871 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -37,7 +37,7 @@ enum { IMAGE_AMT, }; -#if CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS) +#if IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS) static const char *image_os_match[IMAGE_AMT] = { "arm-trusted-firmware", "tee", @@ -264,7 +264,7 @@ start_arm64: } #endif -#if CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS) +#if IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS) void board_fit_image_post_process(const void *fit, int node, void **p_image, size_t *p_size) { diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c index c4c5c371100..cd470567f29 100644 --- a/arch/arm/mach-k3/sysfw-loader.c +++ b/arch/arm/mach-k3/sysfw-loader.c @@ -297,7 +297,7 @@ static void k3_sysfw_configure_using_fit(void *fit, ret); } -#if CONFIG_IS_ENABLED(DFU) +#if IS_ENABLED(CONFIG_DFU) static int k3_sysfw_dfu_download(void *addr) { char dfu_str[50]; @@ -318,7 +318,7 @@ exit: } #endif -#if CONFIG_IS_ENABLED(SPI_LOAD) +#if IS_ENABLED(CONFIG_SPI_LOAD) static void *k3_sysfw_get_spi_addr(void) { struct udevice *dev; @@ -346,7 +346,7 @@ static void k3_sysfw_spi_copy(u32 *dst, u32 *src, size_t len) } #endif -#if CONFIG_IS_ENABLED(NOR_SUPPORT) +#if IS_ENABLED(CONFIG_NOR_SUPPORT) static void *get_sysfw_hf_addr(void) { struct udevice *dev; @@ -372,7 +372,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, struct spl_image_info spl_image = { 0 }; struct spl_boot_device bootdev = { 0 }; struct ti_sci_handle *ti_sci; -#if CONFIG_IS_ENABLED(SPI_LOAD) +#if IS_ENABLED(CONFIG_SPI_LOAD) void *sysfw_spi_base; #endif int ret = 0; @@ -401,7 +401,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, /* Load combined System Controller firmware and config data image */ switch (bootdev.boot_device) { -#if CONFIG_IS_ENABLED(MMC) +#if IS_ENABLED(CONFIG_MMC) case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: case BOOT_DEVICE_MMC2_2: @@ -423,7 +423,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, #endif break; #endif -#if CONFIG_IS_ENABLED(SPI_LOAD) +#if IS_ENABLED(CONFIG_SPI_LOAD) case BOOT_DEVICE_SPI: sysfw_spi_base = k3_sysfw_get_spi_addr(); if (!sysfw_spi_base) @@ -432,7 +432,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, CONFIG_K3_SYSFW_IMAGE_SIZE_MAX); break; #endif -#if CONFIG_IS_ENABLED(NOR_SUPPORT) +#if IS_ENABLED(CONFIG_NOR_SUPPORT) case BOOT_DEVICE_HYPERFLASH: sysfw_spi_base = get_sysfw_hf_addr(); if (!sysfw_spi_base) @@ -441,7 +441,7 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, CONFIG_K3_SYSFW_IMAGE_SIZE_MAX); break; #endif -#if CONFIG_IS_ENABLED(YMODEM_SUPPORT) +#if IS_ENABLED(CONFIG_YMODEM_SUPPORT) case BOOT_DEVICE_UART: #ifdef CONFIG_K3_EARLY_CONS /* @@ -459,12 +459,12 @@ void k3_sysfw_loader(bool rom_loaded_sysfw, ret = spl_ymodem_load_image(&spl_image, &bootdev); break; #endif -#if CONFIG_IS_ENABLED(DFU) +#if IS_ENABLED(CONFIG_DFU) case BOOT_DEVICE_DFU: ret = k3_sysfw_dfu_download(sysfw_load_address); break; #endif -#if CONFIG_IS_ENABLED(USB_STORAGE) +#if IS_ENABLED(CONFIG_USB_STORAGE) case BOOT_DEVICE_USB: ret = spl_usb_load(&spl_image, &bootdev, CONFIG_SYS_USB_FAT_BOOT_PARTITION, diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c index 1954e69e9f0..e5730844317 100644 --- a/arch/arm/mach-keystone/init.c +++ b/arch/arm/mach-keystone/init.c @@ -208,7 +208,7 @@ void reset_cpu(void) void enable_caches(void) { -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) /* Enable D-cache. I-cache is already enabled in start.S */ dcache_enable(); #endif diff --git a/arch/arm/mach-lpc32xx/devices.c b/arch/arm/mach-lpc32xx/devices.c index 6a67a3591aa..66b954ed00e 100644 --- a/arch/arm/mach-lpc32xx/devices.c +++ b/arch/arm/mach-lpc32xx/devices.c @@ -40,7 +40,7 @@ void lpc32xx_uart_init(unsigned int uart_id) &clk->u3clk + (uart_id - 3)); } -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct ns16550_plat lpc32xx_uart[] = { { .base = UART3_BASE, .reg_shift = 2, .clock = CFG_SYS_NS16550_CLK, .fcr = UART_FCR_DEFVAL, }, diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index a52d04d85c8..c553758d3ae 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -57,7 +57,7 @@ #define AM43XX_RDWRLVLFULL_START 0x80000000 /* SPI flash. */ -#if CONFIG_IS_ENABLED(DM_SPI) && !CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_SPI) && !IS_ENABLED(CONFIG_OF_CONTROL) #define AM33XX_SPI0_BASE 0x48030000 #define AM33XX_SPI0_OFFSET (AM33XX_SPI0_BASE + OMAP4_MCSPI_REG_OFFSET) #endif @@ -66,7 +66,7 @@ DECLARE_GLOBAL_DATA_PTR; int dram_init(void) { -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) sdram_init(); #endif @@ -85,7 +85,7 @@ int dram_init_banksize(void) return 0; } -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct ns16550_plat am33xx_serial[] = { { .base = CFG_SYS_NS16550_COM1, .reg_shift = 2, .clock = CFG_SYS_NS16550_CLK, .fcr = UART_FCR_DEFVAL, }, @@ -118,7 +118,7 @@ U_BOOT_DRVINFOS(am33xx_uarts) = { # endif }; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static const struct omap_i2c_plat am33xx_i2c[] = { { I2C_BASE1, 100000, OMAP_I2C_REV_V2}, { I2C_BASE2, 100000, OMAP_I2C_REV_V2}, @@ -132,7 +132,7 @@ U_BOOT_DRVINFOS(am33xx_i2c) = { }; #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static const struct omap_gpio_plat am33xx_gpio[] = { { 0, AM33XX_GPIO0_BASE }, { 1, AM33XX_GPIO1_BASE }, @@ -155,7 +155,7 @@ U_BOOT_DRVINFOS(am33xx_gpios) = { #endif }; #endif -#if CONFIG_IS_ENABLED(DM_SPI) && !CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_SPI) && !IS_ENABLED(CONFIG_OF_CONTROL) static const struct omap3_spi_plat omap3_spi_pdata = { .regs = (struct mcspi *)AM33XX_SPI0_OFFSET, .pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT, @@ -168,7 +168,7 @@ U_BOOT_DRVINFO(am33xx_spi) = { #endif #endif -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) static const struct gpio_bank gpio_bank_am33xx[] = { { (void *)AM33XX_GPIO0_BASE }, { (void *)AM33XX_GPIO1_BASE }, @@ -282,7 +282,7 @@ int arch_misc_init(void) #endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */ -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC) || \ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT)) @@ -530,7 +530,7 @@ void board_init_f(ulong dummy) static int am33xx_dm_post_init(void *ctx, struct event *event) { hw_data_init(); -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) early_system_init(); #endif return 0; diff --git a/arch/arm/mach-omap2/am33xx/chilisom.c b/arch/arm/mach-omap2/am33xx/chilisom.c index 459bac13e05..a7c483e6adb 100644 --- a/arch/arm/mach-omap2/am33xx/chilisom.c +++ b/arch/arm/mach-omap2/am33xx/chilisom.c @@ -22,7 +22,7 @@ #include #include -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; @@ -182,4 +182,4 @@ void sdram_init(void) &ddr3_chilisom_emif_reg_data, 0); } -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ diff --git a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c index c9b9502aef6..ae1ba9442bf 100644 --- a/arch/arm/mach-omap2/am33xx/clk_synthesizer.c +++ b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c @@ -29,7 +29,7 @@ static int clk_synthesizer_reg_read(struct udevice *dev, int addr, u8 *buf) /* Enable Bye read */ addr = addr | CLK_SYNTHESIZER_BYTE_MODE; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* Send the command byte */ rc = i2c_write(CONFIG_CLK_SYNTHESIZER_I2C_ADDR, addr, 1, buf, 1); if (rc) @@ -72,7 +72,7 @@ static int clk_synthesizer_reg_write(struct udevice *dev, int addr, u8 val) cmd[0] = addr | CLK_SYNTHESIZER_BYTE_MODE; cmd[1] = val; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) rc = i2c_write(CONFIG_CLK_SYNTHESIZER_I2C_ADDR, addr, 1, cmd, 2); #else rc = dm_i2c_write(dev, addr, cmd, 2); @@ -96,7 +96,7 @@ int setup_clock_synthesizer(struct clk_synth *data) int rc; u8 val = 0; struct udevice *dev = NULL; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) rc = i2c_probe(CONFIG_CLK_SYNTHESIZER_I2C_ADDR); if (rc) { printf("i2c probe failed at address 0x%x\n", diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 9a342a1bf95..6d72fccfa8c 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -296,7 +296,7 @@ void spl_board_init(void) #if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT) gpmc_init(); #endif -#if defined(CONFIG_SPL_I2C) && !CONFIG_IS_ENABLED(DM_I2C) +#if defined(CONFIG_SPL_I2C) && !IS_ENABLED(CONFIG_DM_I2C) i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #endif #if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW) diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c index 390d1f2a649..2bee7c29ab1 100644 --- a/arch/arm/mach-omap2/clocks-common.c +++ b/arch/arm/mach-omap2/clocks-common.c @@ -945,7 +945,7 @@ void prcm_init(void) enable_basic_uboot_clocks(); } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) void gpi2c_init(void) { static int gpi2c = 1; diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c index 8b70251457e..77dd1abee75 100644 --- a/arch/arm/mach-omap2/omap3/board.c +++ b/arch/arm/mach-omap2/omap3/board.c @@ -35,8 +35,8 @@ extern omap3_sysinfo sysinfo; static void omap3_invalidate_l2_cache_secure(void); #endif -#if CONFIG_IS_ENABLED(DM_GPIO) -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_GPIO) +#if !IS_ENABLED(CONFIG_OF_CONTROL) /* Manually initialize GPIO banks when OF_CONTROL doesn't */ static const struct omap_gpio_plat omap34xx_gpio[] = { { 0, OMAP34XX_GPIO1_BASE }, @@ -76,8 +76,8 @@ void early_system_init(void) hw_data_init(); } -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \ - !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /****************************************************************************** * Routine: secure_unlock diff --git a/arch/arm/mach-omap2/omap3/lowlevel_init.S b/arch/arm/mach-omap2/omap3/lowlevel_init.S index ab7cdcf3d42..142ed59d49e 100644 --- a/arch/arm/mach-omap2/omap3/lowlevel_init.S +++ b/arch/arm/mach-omap2/omap3/lowlevel_init.S @@ -170,8 +170,8 @@ pll_div_val5: go_to_speed_end: #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) && \ - !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT_ONLY) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */ diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c index edab9a92982..f2a7ce77e4c 100644 --- a/arch/arm/mach-omap2/omap5/hwinit.c +++ b/arch/arm/mach-omap2/omap5/hwinit.c @@ -27,7 +27,7 @@ u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV; -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) static struct gpio_bank gpio_bank_54xx[8] = { { (void *)OMAP54XX_GPIO1_BASE }, { (void *)OMAP54XX_GPIO2_BASE }, diff --git a/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S b/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S index 32de9d3d4fd..0ad3793f84a 100644 --- a/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S +++ b/arch/arm/mach-omap2/omap5/sec_entry_cpu1.S @@ -16,7 +16,7 @@ .arch_extension sec -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) .global flush_dcache_range #endif @@ -79,7 +79,7 @@ ENTRY(omap_smc_sec_cpu1) push {r4, r5, lr} ldr r4, =omap_smc_sec_cpu1_args stm r4, {r0,r1,r2,r3} @ Save args to memory -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) mov r0, r4 mov r1, #CONFIG_SYS_CACHELINE_SIZE add r1, r0, r1 @ dcache is not enabled on CPU1, so @@ -109,7 +109,7 @@ ENDPROC(omap_smc_sec_cpu1) */ .section .data omap_smc_sec_cpu1_args: -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) .balign CONFIG_SYS_CACHELINE_SIZE .rept CONFIG_SYS_CACHELINE_SIZE/4 .word 0 diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index 64560b21e3f..cc0e40d1be2 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -338,7 +338,7 @@ int secure_tee_install(u32 addr) debug("tee_info.tee_arg0 = %08X\n", tee_info.tee_arg0); debug("tee_file_size = %d\n", tee_file_size); -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) flush_dcache_range( rounddown((u32)loadptr, ARCH_DMA_MINALIGN), roundup((u32)loadptr + tee_file_size, ARCH_DMA_MINALIGN)); @@ -361,7 +361,7 @@ int secure_tee_install(u32 addr) /* Reuse the tee_info buffer for SMC params */ smc_cpu1_params = (u32 *)&tee_info; smc_cpu1_params[0] = 0; -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) flush_dcache_range((u32)smc_cpu1_params, (u32)smc_cpu1_params + roundup(sizeof(u32), ARCH_DMA_MINALIGN)); #endif diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 246029ac294..34f683a9bb2 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -21,7 +21,7 @@ int arch_cpu_init(void) /* R-Car Gen3 D-cache is enabled in memmap-gen3.c */ #ifndef CONFIG_RCAR_GEN3 -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { dcache_enable(); diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c index b36e559e871..30170dbb90b 100644 --- a/arch/arm/mach-rockchip/bootrom.c +++ b/arch/arm/mach-rockchip/bootrom.c @@ -25,7 +25,7 @@ static void _back_to_bootrom(enum rockchip_bootrom_cmd brom_cmd) void back_to_bootrom(enum rockchip_bootrom_cmd brom_cmd) { -#if CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) +#if IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT) puts("Returning to boot ROM...\n"); #endif _back_to_bootrom(brom_cmd); @@ -100,7 +100,7 @@ int save_boot_params(void) ret = 1; break; default: -#if CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) +#if IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT) puts("FATAL: unexpected command to back_to_bootrom()\n"); #endif hang(); diff --git a/arch/arm/mach-rockchip/px30/syscon_px30.c b/arch/arm/mach-rockchip/px30/syscon_px30.c index 37e88f5ccb9..9ca80c3e088 100644 --- a/arch/arm/mach-rockchip/px30/syscon_px30.c +++ b/arch/arm/mach-rockchip/px30/syscon_px30.c @@ -22,7 +22,7 @@ U_BOOT_DRIVER(syscon_px30) = { .of_match = px30_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int px30_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c index 0a072cf03a8..7a40ec6f72e 100644 --- a/arch/arm/mach-rockchip/rk3036/rk3036.c +++ b/arch/arm/mach-rockchip/rk3036/rk3036.c @@ -44,7 +44,7 @@ void board_debug_uart_init(void) } #endif -#if !CONFIG_IS_ENABLED(RAM) +#if !IS_ENABLED(CONFIG_RAM) /* * When CONFIG_RAM is enabled, the dram_init() function is implemented * in sdram.c. diff --git a/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c b/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c index a598f6400de..816222a0861 100644 --- a/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c +++ b/arch/arm/mach-rockchip/rk3066/syscon_rk3066.c @@ -23,7 +23,7 @@ U_BOOT_DRIVER(syscon_rk3066) = { .of_match = rk3066_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rk3066_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c index 917ff37c0fc..f1b8d541988 100644 --- a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c +++ b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c @@ -23,7 +23,7 @@ U_BOOT_DRIVER(syscon_rk3188) = { .of_match = rk3188_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rk3188_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c index 9c1ae880c74..521e63e1036 100644 --- a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c @@ -24,7 +24,7 @@ U_BOOT_DRIVER(syscon_rk3288) = { .of_match = rk3288_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rk3288_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c index dc2d831dd84..83e55b222a1 100644 --- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c +++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c @@ -29,7 +29,7 @@ U_BOOT_DRIVER(syscon_rk3368) = { .of_match = rk3368_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rk3368_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c index 2b5746cb31b..c03992ab89b 100644 --- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c @@ -21,13 +21,13 @@ static const struct udevice_id rk3399_syscon_ids[] = { U_BOOT_DRIVER(syscon_rk3399) = { .name = "rk3399_syscon", .id = UCLASS_SYSCON, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .of_match = rk3399_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rk3399_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c b/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c index 5407e7827f5..872aa1e2e11 100644 --- a/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c +++ b/arch/arm/mach-rockchip/rk3568/syscon_rk3568.c @@ -18,7 +18,7 @@ U_BOOT_DRIVER(syscon_rk3568) = { .name = "rk3568_syscon", .id = UCLASS_SYSCON, .of_match = rk3568_syscon_ids, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif }; diff --git a/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c b/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c index 599ea66e3d6..5b66945c9f7 100644 --- a/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c +++ b/arch/arm/mach-rockchip/rv1126/syscon_rv1126.c @@ -22,7 +22,7 @@ U_BOOT_DRIVER(syscon_rv1126) = { .of_match = rv1126_syscon_ids, }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int rv1126_syscon_bind_of_plat(struct udevice *dev) { dev->driver_data = dev->driver->of_match->data; diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c index 93b8e7de4d0..89a3fa95caf 100644 --- a/arch/arm/mach-rockchip/spl-boot-order.c +++ b/arch/arm/mach-rockchip/spl-boot-order.c @@ -10,7 +10,7 @@ #include #include -#if CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_OF_LIBFDT) /** * spl_node_to_boot_device() - maps from a DT-node to a SPL boot device * @node: of_offset of the node @@ -101,7 +101,7 @@ __weak const char *board_spl_was_booted_from(void) void board_boot_order(u32 *spl_boot_list) { /* In case of no fdt (or only plat), use spl_boot_device() */ - if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (!IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_PLATDATA)) { spl_boot_list[0] = spl_boot_device(); return; } diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 30be6404252..56a5dc7b74a 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -60,7 +60,7 @@ u32 spl_boot_device(void) defined(CONFIG_TARGET_CHROMEBOOK_KEVIN) return BOOT_DEVICE_SPI; #endif - if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)) + if (IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM)) return BOOT_DEVICE_BOOTROM; return boot_device; diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index fdd0c592b3e..0254add4e7e 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -18,7 +18,7 @@ #include #include -#if CONFIG_IS_ENABLED(BANNER_PRINT) +#if IS_ENABLED(CONFIG_BANNER_PRINT) #include #endif diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c index b390bdf8278..abb2cbd206d 100644 --- a/arch/arm/mach-s5pc1xx/cache.c +++ b/arch/arm/mach-s5pc1xx/cache.c @@ -11,7 +11,7 @@ #include #include -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { dcache_enable(); diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index 5b5a81a255d..c7ac56b470a 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -58,10 +58,10 @@ int dram_init(void) void enable_caches(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) icache_enable(); #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) dcache_enable(); #endif } diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c index ee5a9dc1e2f..577031e6ad8 100644 --- a/arch/arm/mach-socfpga/spl_agilex.c +++ b/arch/arm/mach-socfpga/spl_agilex.c @@ -71,7 +71,7 @@ void board_init_f(ulong dummy) hang(); } -#if CONFIG_IS_ENABLED(ALTERA_SDRAM) +#if IS_ENABLED(CONFIG_ALTERA_SDRAM) ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { debug("DRAM init failed: %d\n", ret); diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c index d056871d292..f0352db854a 100644 --- a/arch/arm/mach-socfpga/spl_n5x.c +++ b/arch/arm/mach-socfpga/spl_n5x.c @@ -78,7 +78,7 @@ void board_init_f(ulong dummy) hang(); } -#if CONFIG_IS_ENABLED(ALTERA_SDRAM) +#if IS_ENABLED(CONFIG_ALTERA_SDRAM) ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { printf("DRAM init failed: %d\n", ret); diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c index c20e87cdbef..00fe32e77ef 100644 --- a/arch/arm/mach-socfpga/spl_s10.c +++ b/arch/arm/mach-socfpga/spl_s10.c @@ -76,7 +76,7 @@ void board_init_f(ulong dummy) clrbits_le32(CCU_REG_ADDR(CCU_IOM_MPRT_ADMASK_MEM_RAM0), CCU_ADMASK_P_MASK | CCU_ADMASK_NS_MASK); -#if CONFIG_IS_ENABLED(ALTERA_SDRAM) +#if IS_ENABLED(CONFIG_ALTERA_SDRAM) struct udevice *dev; ret = uclass_get_device(UCLASS_RAM, 0, &dev); diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c index baa156acf9e..b7558e911fa 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c @@ -1358,7 +1358,7 @@ static int dfu_init_entities(struct stm32prog_data *data) alt_nb++; /* OTP*/ } - if (CONFIG_IS_ENABLED(DM_PMIC)) + if (IS_ENABLED(CONFIG_DM_PMIC)) alt_nb++; /* PMIC NVMEM*/ if (data->part_nb == 0) @@ -1412,7 +1412,7 @@ static int dfu_init_entities(struct stm32prog_data *data) if (!ret && IS_ENABLED(CONFIG_CMD_STM32PROG_OTP) && otp_size) ret = stm32prog_alt_add_virt(dfu, "OTP", PHASE_OTP, otp_size); - if (!ret && CONFIG_IS_ENABLED(DM_PMIC)) + if (!ret && IS_ENABLED(CONFIG_DM_PMIC)) ret = stm32prog_alt_add_virt(dfu, "PMIC", PHASE_PMIC, PMIC_SIZE); if (ret) @@ -1483,7 +1483,7 @@ int stm32prog_otp_read(struct stm32prog_data *data, u32 offset, u8 *buffer, /* call the service */ result = -EOPNOTSUPP; - if (data->tee && CONFIG_IS_ENABLED(OPTEE)) + if (data->tee && IS_ENABLED(CONFIG_OPTEE)) result = optee_ta_invoke(data, TA_NVMEM_READ, NVMEM_OTP, data->otp_part, OTP_SIZE_TA); else if (IS_ENABLED(CONFIG_ARM_SMCCC)) @@ -1525,7 +1525,7 @@ int stm32prog_otp_start(struct stm32prog_data *data) } result = -EOPNOTSUPP; - if (data->tee && CONFIG_IS_ENABLED(OPTEE)) { + if (data->tee && IS_ENABLED(CONFIG_OPTEE)) { result = optee_ta_invoke(data, TA_NVMEM_WRITE, NVMEM_OTP, data->otp_part, OTP_SIZE_TA); } else if (IS_ENABLED(CONFIG_ARM_SMCCC)) { @@ -1735,7 +1735,7 @@ static void stm32prog_end_phase(struct stm32prog_data *data, u64 offset) } } - if (CONFIG_IS_ENABLED(MMC) && + if (IS_ENABLED(CONFIG_MMC) && data->cur_part->part_id < 0) { char cmdbuf[60]; @@ -1977,7 +1977,7 @@ void stm32prog_clean(struct stm32prog_data *data) free(data->otp_part); free(data->buffer); - if (CONFIG_IS_ENABLED(OPTEE) && data->tee) { + if (IS_ENABLED(CONFIG_OPTEE) && data->tee) { tee_close_session(data->tee, data->tee_session); data->tee = NULL; data->tee_session = 0x0; diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index dc4112d5e6c..c293526a392 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -87,10 +87,10 @@ static void early_enable_caches(void) { /* I-cache is already enabled in start.S: cpu_init_cp15 */ - if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) + if (IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) return; - if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) { + if (!(IS_ENABLED(CONFIG_SYS_ICACHE_OFF) && IS_ENABLED(CONFIG_SYS_DCACHE_OFF))) { gd->arch.tlb_size = PGTABLE_SIZE; gd->arch.tlb_addr = (unsigned long)&early_tlb; } diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c index c21c5c42fe1..70ac26442be 100644 --- a/arch/arm/mach-stm32mp/fdt.c +++ b/arch/arm/mach-stm32mp/fdt.c @@ -481,7 +481,7 @@ int ft_system_setup(void *blob, struct bd_info *bd) if (soc < 0) return soc; - if (CONFIG_IS_ENABLED(STM32_ETZPC)) { + if (IS_ENABLED(CONFIG_STM32_ETZPC)) { ret = stm32_fdt_fixup_etzpc(blob, soc); if (ret) return ret; diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index 19d9fe04e08..030011e8de8 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -235,7 +235,7 @@ void board_init_f(ulong dummy) * activate cache on DDR only when DDR is fully initialized * to avoid speculative access and issue in get_ram_size() */ - if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) + if (!IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) mmu_set_region_dcache_behaviour(STM32_DDR_BASE, CONFIG_DDR_CACHEABLE_SIZE, DCACHE_DEFAULT_OPTION); diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 391a65a5495..6267d25436b 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -456,7 +456,7 @@ void board_init_f(ulong dummy) spl_init(); preloader_console_init(); -#if CONFIG_IS_ENABLED(I2C) && CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_I2C) && IS_ENABLED(CONFIG_SYS_I2C_LEGACY) /* Needed early by sunxi_board_init if PMU is enabled */ i2c_init_board(); i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); @@ -465,7 +465,7 @@ void board_init_f(ulong dummy) } #endif /* CONFIG_SPL_BUILD */ -#if !CONFIG_IS_ENABLED(SYSRESET) +#if !IS_ENABLED(CONFIG_SYSRESET) void reset_cpu(void) { #if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40) @@ -498,7 +498,7 @@ void reset_cpu(void) } #endif /* CONFIG_SYSRESET */ -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c index c0908406370..b08091c9e60 100644 --- a/arch/arm/mach-sunxi/pmic_bus.c +++ b/arch/arm/mach-sunxi/pmic_bus.c @@ -25,7 +25,7 @@ #define AXP221_CHIP_ADDR 0x68 -#if CONFIG_IS_ENABLED(PMIC_AXP) +#if IS_ENABLED(CONFIG_PMIC_AXP) static struct udevice *pmic; #else static int pmic_i2c_address(void) @@ -49,7 +49,7 @@ int pmic_bus_init(void) if (!needs_init) return 0; -#if CONFIG_IS_ENABLED(PMIC_AXP) +#if IS_ENABLED(CONFIG_PMIC_AXP) ret = uclass_get_device_by_driver(UCLASS_PMIC, DM_DRIVER_GET(axp_pmic), &pmic); #else @@ -75,7 +75,7 @@ int pmic_bus_init(void) int pmic_bus_read(u8 reg, u8 *data) { -#if CONFIG_IS_ENABLED(PMIC_AXP) +#if IS_ENABLED(CONFIG_PMIC_AXP) return pmic_read(pmic, reg, data, 1); #else if (IS_ENABLED(CONFIG_SYS_I2C_SUN6I_P2WI)) @@ -89,7 +89,7 @@ int pmic_bus_read(u8 reg, u8 *data) int pmic_bus_write(u8 reg, u8 data) { -#if CONFIG_IS_ENABLED(PMIC_AXP) +#if IS_ENABLED(CONFIG_PMIC_AXP) return pmic_write(pmic, reg, &data, 1); #else if (IS_ENABLED(CONFIG_SYS_I2C_SUN6I_P2WI)) diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index f8b61a2b3e3..c4c155e1dfe 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -257,7 +257,7 @@ void board_init_uart_f(void) #endif } -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static struct ns16550_plat ns16550_com1_pdata = { .base = CFG_SYS_NS16550_COM1, .reg_shift = 2, @@ -270,7 +270,7 @@ U_BOOT_DRVINFO(ns16550_com1) = { }; #endif -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index 77c8ad978e5..238b149c65f 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c @@ -657,7 +657,7 @@ void clock_ll_start_uart(enum periph_id periph_id) reset_set_enable(periph_id, 0); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int clock_decode_periph_id(struct udevice *dev) { enum periph_id id; @@ -671,7 +671,7 @@ int clock_decode_periph_id(struct udevice *dev) assert(clock_periph_id_isvalid(id)); return id; } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ int clock_verify(void) { diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c index 703a2314e70..cbffc1e308f 100644 --- a/arch/arm/mach-tegra/tegra114/clock.c +++ b/arch/arm/mach-tegra/tegra114/clock.c @@ -616,7 +616,7 @@ void reset_set_enable(enum periph_id periph_id, int enable) writel(reg, reset); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /* * Convert a device tree clock ID to our peripheral ID. They are mostly * the same but we are very cautious so we check that a valid clock ID is @@ -652,7 +652,7 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ void clock_early_init(void) { diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c index bbfe1846526..e6dda2a1526 100644 --- a/arch/arm/mach-tegra/tegra124/clock.c +++ b/arch/arm/mach-tegra/tegra124/clock.c @@ -766,7 +766,7 @@ void reset_set_enable(enum periph_id periph_id, int enable) writel(reg, reset); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /* * Convert a device tree clock ID to our peripheral ID. They are mostly * the same but we are very cautious so we check that a valid clock ID is @@ -832,7 +832,7 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ void clock_early_init(void) { diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c index 3b50a811942..5e244759f10 100644 --- a/arch/arm/mach-tegra/tegra20/clock.c +++ b/arch/arm/mach-tegra/tegra20/clock.c @@ -541,7 +541,7 @@ void reset_set_enable(enum periph_id periph_id, int enable) writel(reg, reset); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /* * Convert a device tree clock ID to our peripheral ID. They are mostly * the same but we are very cautious so we check that a valid clock ID is @@ -576,7 +576,7 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ void clock_early_init(void) { diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c index c835cd0d47b..14e83a8c79e 100644 --- a/arch/arm/mach-tegra/tegra30/clock.c +++ b/arch/arm/mach-tegra/tegra30/clock.c @@ -596,7 +596,7 @@ void reset_set_enable(enum periph_id periph_id, int enable) writel(reg, reset); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /* * Convert a device tree clock ID to our peripheral ID. They are mostly * the same but we are very cautious so we check that a valid clock ID is @@ -634,7 +634,7 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ void clock_early_init(void) { diff --git a/arch/arm/mach-u8500/cache.c b/arch/arm/mach-u8500/cache.c index 05a91346a89..91ed974ad0d 100644 --- a/arch/arm/mach-u8500/cache.c +++ b/arch/arm/mach-u8500/cache.c @@ -11,7 +11,7 @@ #define PL310_WAY_MASK 0xff -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c index 3b6518c71c9..f6e09aa9fb6 100644 --- a/arch/arm/mach-zynq/cpu.c +++ b/arch/arm/mach-zynq/cpu.c @@ -17,7 +17,7 @@ #define ZYNQ_SILICON_VER_MASK 0xF0000000 #define ZYNQ_SILICON_VER_SHIFT 28 -#if CONFIG_IS_ENABLED(FPGA) +#if IS_ENABLED(CONFIG_FPGA) xilinx_desc fpga = { .family = xilinx_zynq, .iface = devcfg, @@ -86,7 +86,7 @@ void reset_cpu(void) ; } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ @@ -111,7 +111,7 @@ static int __maybe_unused cpu_desc_id(void) #if defined(CONFIG_ARCH_EARLY_INIT_R) int arch_early_init_r(void) { -#if CONFIG_IS_ENABLED(FPGA) +#if IS_ENABLED(CONFIG_FPGA) int cpu_id = cpu_desc_id(); if (cpu_id < 0) diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index 829e6c7ae60..6ed87878304 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -16,7 +16,7 @@ DECLARE_GLOBAL_DATA_PTR; static void __invalidate_icache(ulong addr, ulong size) { - if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WIC)) { + if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USE_WIC)) { for (int i = 0; i < size; i += gd_cpuinfo()->icache_line_length) { asm volatile ( @@ -36,7 +36,7 @@ void invalidate_icache_all(void) static void __flush_dcache(ulong addr, ulong size) { - if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) { + if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USE_WDC)) { for (int i = 0; i < size; i += gd_cpuinfo()->dcache_line_length) { asm volatile ( diff --git a/arch/microblaze/cpu/exception.c b/arch/microblaze/cpu/exception.c index 9414776afa7..ff642ea1eb0 100644 --- a/arch/microblaze/cpu/exception.c +++ b/arch/microblaze/cpu/exception.c @@ -21,7 +21,7 @@ void _hw_exception_handler (void) printf("Hardware exception at 0x%x address\n", address); R17(address); - if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP) && + if (IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_DELAY_SLOT_EXCEP) && (state & 0x1000)) { /* * For exceptions in delay slots, the return address is stored @@ -64,7 +64,7 @@ void _hw_exception_handler (void) hang(); } -#if CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USR_EXCEP) +#if IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USR_EXCEP) void _exception_handler (void) { puts("User vector_exception\n"); diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 7079d9e1704..6f3138fa0e8 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -201,7 +201,7 @@ __setup_exceptions: rsubi r8, r10, 0x6 sh r6, r4, r8 -#if CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USR_EXCEP) +#if IS_ENABLED(CONFIG_XILINX_MICROBLAZE0_USR_EXCEP) /* user_vector_exception */ swi r2, r4, 0x8 /* user vector exception - imm opcode */ swi r3, r4, 0xC /* user vector exception - brai opcode */ diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 930384f4015..3157d423a0f 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -73,7 +73,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag) static void boot_prep_linux(struct bootm_headers *images) { - if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { debug("using: FDT\n"); if (image_setup_linux(images)) { printf("FDT creation failed! hanging..."); diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c index b304026a67c..59b52cc5590 100644 --- a/arch/mips/cpu/cpu.c +++ b/arch/mips/cpu/cpu.c @@ -12,7 +12,7 @@ #include #include -#if !CONFIG_IS_ENABLED(SYSRESET) +#if !IS_ENABLED(CONFIG_SYSRESET) void __weak _machine_restart(void) { fprintf(stderr, "*** reset failed ***\n"); diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index 2acc21d5871..c89118c24e3 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -47,7 +47,7 @@ and sp, sp, t0 # force 16 byte alignment move k0, sp # save gd pointer #if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ - !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) + !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) li t2, CONFIG_VAL(SYS_MALLOC_F_LEN) PTR_SUBU \ sp, sp, t2 # reserve space for early malloc @@ -64,7 +64,7 @@ nop #if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ - !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) + !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset #endif .endm @@ -229,7 +229,7 @@ wr_done: # endif #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) # ifdef CONFIG_SYS_MIPS_CACHE_INIT_RAM_LOAD /* Initialize any external memory */ PTR_LA t9, lowlevel_init @@ -250,7 +250,7 @@ wr_done: nop #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) # ifndef CONFIG_SYS_MIPS_CACHE_INIT_RAM_LOAD /* Initialize any external memory */ PTR_LA t9, lowlevel_init diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index ab92bd06b0e..dab2aaa55f5 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -149,7 +149,7 @@ static void linux_env_set(const char *env_name, const char *env_val) strcpy(linux_env_p, env_name); linux_env_p += strlen(env_name); - if (CONFIG_IS_ENABLED(MALTA)) { + if (IS_ENABLED(CONFIG_MALTA)) { linux_env_p++; linux_env[++linux_env_idx] = linux_env_p; } else { @@ -170,7 +170,7 @@ static void linux_env_legacy(struct bootm_headers *images) const char *cp; ulong rd_start, rd_size; - if (CONFIG_IS_ENABLED(MEMSIZE_IN_BYTES)) { + if (IS_ENABLED(CONFIG_MEMSIZE_IN_BYTES)) { sprintf(env_buf, "%lu", (ulong)gd->ram_size); debug("## Giving linux memsize in bytes, %lu\n", (ulong)gd->ram_size); @@ -207,7 +207,7 @@ static void linux_env_legacy(struct bootm_headers *images) if (cp) linux_env_set("eth1addr", cp); - if (CONFIG_IS_ENABLED(MALTA)) { + if (IS_ENABLED(CONFIG_MALTA)) { sprintf(env_buf, "%un8r", gd->baudrate); linux_env_set("modetty0", env_buf); } @@ -224,7 +224,7 @@ static int boot_reloc_fdt(struct bootm_headers *images) return 0; } -#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && IS_ENABLED(CONFIG_OF_LIBFDT) boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr); return boot_relocate_fdt(&images->lmb, &images->ft_addr, &images->ft_len); @@ -233,7 +233,7 @@ static int boot_reloc_fdt(struct bootm_headers *images) #endif } -#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && IS_ENABLED(CONFIG_OF_LIBFDT) int arch_fixup_fdt(void *blob) { u64 mem_start = virt_to_phys((void *)gd->ram_base); @@ -253,20 +253,20 @@ static int boot_setup_fdt(struct bootm_headers *images) static void boot_prep_linux(struct bootm_headers *images) { - if (CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && images->ft_len) { + if (IS_ENABLED(CONFIG_MIPS_BOOT_FDT) && images->ft_len) { boot_reloc_fdt(images); boot_setup_fdt(images); } else { - if (CONFIG_IS_ENABLED(MIPS_BOOT_CMDLINE_LEGACY)) { + if (IS_ENABLED(CONFIG_MIPS_BOOT_CMDLINE_LEGACY)) { linux_cmdline_legacy(images); - if (!CONFIG_IS_ENABLED(MIPS_BOOT_ENV_LEGACY)) + if (!IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY)) linux_cmdline_append(images); linux_cmdline_dump(); } - if (CONFIG_IS_ENABLED(MIPS_BOOT_ENV_LEGACY)) + if (IS_ENABLED(CONFIG_MIPS_BOOT_ENV_LEGACY)) linux_env_legacy(images); } } @@ -281,7 +281,7 @@ static void boot_jump_linux(struct bootm_headers *images) bootstage_mark(BOOTSTAGE_ID_RUN_OS); - if (CONFIG_IS_ENABLED(MALTA)) + if (IS_ENABLED(CONFIG_MALTA)) linux_extra = gd->ram_size; #if IS_ENABLED(CONFIG_BOOTSTAGE_FDT) @@ -291,7 +291,7 @@ static void boot_jump_linux(struct bootm_headers *images) bootstage_report(); #endif - if (CONFIG_IS_ENABLED(RESTORE_EXCEPTION_VECTOR_BASE)) + if (IS_ENABLED(CONFIG_RESTORE_EXCEPTION_VECTOR_BASE)) trap_restore(); if (images->ft_len) diff --git a/arch/mips/mach-mtmips/mt7621/spl/start.S b/arch/mips/mach-mtmips/mt7621/spl/start.S index d2f9c031cba..3bd6a989115 100644 --- a/arch/mips/mach-mtmips/mt7621/spl/start.S +++ b/arch/mips/mach-mtmips/mt7621/spl/start.S @@ -38,7 +38,7 @@ and sp, sp, t0 # force 16 byte alignment move k0, sp # save gd pointer #if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ - !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) + !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) li t2, CONFIG_VAL(SYS_MALLOC_F_LEN) PTR_SUBU \ sp, sp, t2 # reserve space for early malloc @@ -55,7 +55,7 @@ nop #if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ - !CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) + !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset #endif .endm @@ -199,7 +199,7 @@ ENTRY(_start) /* Set up initial stack and global data */ setup_stack_gd -#if CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) +#if IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) /* Set malloc base */ li t0, (CFG_SYS_INIT_SP_ADDR + 15) & (~15) PTR_S t0, GD_MALLOC_BASE(k0) # gd->malloc_base offset diff --git a/arch/mips/mach-mtmips/mt7628/lowlevel_init.S b/arch/mips/mach-mtmips/mt7628/lowlevel_init.S index cb369fbc275..b620e14f714 100644 --- a/arch/mips/mach-mtmips/mt7628/lowlevel_init.S +++ b/arch/mips/mach-mtmips/mt7628/lowlevel_init.S @@ -23,7 +23,7 @@ .set noreorder LEAF(mips_sram_init) -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) /* Setup CPU PLL */ li t0, DELAY_USEC(1000000) li t1, KSEG1ADDR(SYSCTL_BASE + SYSCTL_ROM_STATUS_REG) @@ -111,7 +111,7 @@ _cpu_pll_done: sub a1, CONFIG_SYS_DCACHE_LINE_SIZE bnez a1, 3b nop -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ jr ra nop @@ -127,7 +127,7 @@ NESTED(lowlevel_init, 0, ra) move ra, s0 -#if CONFIG_IS_ENABLED(INIT_STACK_WITHOUT_MALLOC_F) +#if IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) /* Set malloc base */ li t0, (SYS_INIT_SP_ADDR + 15) & (~15) PTR_S t0, GD_MALLOC_BASE(k0) # gd->malloc_base offset diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index 032871313d1..361b975c661 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -40,7 +40,7 @@ #endif #if defined(CONFIG_NAND_SPL) || \ - (defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL)) + (defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_INIT_MINIMAL)) #define MINIMAL_SPL #endif diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c index de9dc2e77ea..ac0b58bed00 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c @@ -178,7 +178,7 @@ void cpu_init_early_f(void *fdt) invalidate_tlb(1); #if defined(CONFIG_SYS_PPC_E500_DEBUG_TLB) && \ - !(CONFIG_IS_ENABLED(INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \ + !(IS_ENABLED(CONFIG_INIT_MINIMAL) && defined(CONFIG_SPL_BUILD)) && \ !defined(CONFIG_NAND_SPL) disable_tlb(CONFIG_SYS_PPC_E500_DEBUG_TLB); #endif diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 21ad14aef35..62afacd1ccf 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -28,7 +28,7 @@ #define LAW_EN 0x80000000 #if defined(CONFIG_NAND_SPL) || \ - (defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(INIT_MINIMAL)) + (defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_INIT_MINIMAL)) #define MINIMAL_SPL #endif diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 2a78f0fe502..a897609c5c6 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -45,7 +45,7 @@ __weak void init_tlbs(void) } #if !defined(CONFIG_NAND_SPL) && \ - (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL)) + (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL)) void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn, phys_addr_t *rpn) { diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds index d918b4395bf..a86a289edb4 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds @@ -23,7 +23,7 @@ SECTIONS . = IMAGE_TEXT_BASE; .text : { /* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */ -#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC) +#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC) KEEP(*(.bootpg)) #endif *(.text*) @@ -63,7 +63,7 @@ SECTIONS __init_end = .; _end = .; -#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC) +#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC) #if defined(CONFIG_SDCARD) && !defined(CFG_SYS_MMC_U_BOOT_OFFS) mmc_u_boot_offs = .; #endif @@ -81,7 +81,7 @@ SECTIONS #endif /* For nor and nand is needed the SPL with section .resetvec */ -#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC) +#if !IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC) #if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */ #ifndef BOOT_PAGE_OFFSET #define BOOT_PAGE_OFFSET 0x1000 diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds index 3af0dfdf336..5d467ffaed5 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds @@ -27,7 +27,7 @@ SECTIONS /* Read-only sections, merged into text segment: */ .text : { -#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC) +#if IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC) KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg)) #endif *(.text*) @@ -82,7 +82,7 @@ SECTIONS __init_end = .; _end = .; -#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC) +#if !IS_ENABLED(CONFIG_SYS_MPC85XX_NO_RESETVEC) .bootpg RESET_VECTOR_ADDRESS - 0xffc : { arch/powerpc/cpu/mpc85xx/start.o (.bootpg) diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c index b0183edb064..16765c6d612 100644 --- a/arch/powerpc/cpu/mpc8xxx/law.c +++ b/arch/powerpc/cpu/mpc8xxx/law.c @@ -80,7 +80,7 @@ void disable_law(u8 idx) } #if !defined(CONFIG_NAND_SPL) && \ - (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL)) + (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL)) static int get_law_entry(u8 i, struct law_entry *e) { u32 lawar; @@ -111,7 +111,7 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id) } #if !defined(CONFIG_NAND_SPL) && \ - (!defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(INIT_MINIMAL)) + (!defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_INIT_MINIMAL)) int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id) { u32 idx; diff --git a/arch/powerpc/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h index 1b1766180a7..545c6961d0f 100644 --- a/arch/powerpc/include/asm/fsl_i2c.h +++ b/arch/powerpc/include/asm/fsl_i2c.h @@ -68,7 +68,7 @@ typedef struct fsl_i2c_base { u8 res6[0xE8]; } fsl_i2c_t; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct fsl_i2c_dev { struct fsl_i2c_base __iomem *base; /* register base */ u32 i2c_clk; diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c index 35f23c748d1..b0f56ecae8a 100644 --- a/arch/riscv/cpu/ax25/cache.c +++ b/arch/riscv/cpu/ax25/cache.c @@ -13,7 +13,7 @@ #include #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) /* mcctlcommand */ #define CCTL_REG_MCCTLCOMMAND_NUM 0x7cc @@ -46,9 +46,9 @@ static void _cache_disable(void) void flush_dcache_all(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL); #endif #endif @@ -67,9 +67,9 @@ void invalidate_dcache_range(unsigned long start, unsigned long end) void icache_enable(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) asm volatile ( "csrr t1, mcache_ctl\n\t" "ori t0, t1, 0x1\n\t" @@ -82,9 +82,9 @@ void icache_enable(void) void icache_disable(void) { -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) asm volatile ( "fence.i\n\t" "csrr t1, mcache_ctl\n\t" @@ -98,9 +98,9 @@ void icache_disable(void) void dcache_enable(void) { -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) asm volatile ( "csrr t1, mcache_ctl\n\t" "ori t0, t1, 0x2\n\t" @@ -116,9 +116,9 @@ void dcache_enable(void) void dcache_disable(void) { -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL); asm volatile ( "csrr t1, mcache_ctl\n\t" @@ -138,7 +138,7 @@ int icache_status(void) int ret = 0; #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) asm volatile ( "csrr t1, mcache_ctl\n\t" "andi %0, t1, 0x01\n\t" @@ -157,7 +157,7 @@ int dcache_status(void) int ret = 0; #ifdef CONFIG_RISCV_NDS_CACHE -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) asm volatile ( "csrr t1, mcache_ctl\n\t" "andi %0, t1, 0x02\n\t" diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c index c4c2de2ef05..1a703679054 100644 --- a/arch/riscv/cpu/ax25/cpu.c +++ b/arch/riscv/cpu/ax25/cpu.c @@ -46,7 +46,7 @@ int cleanup_before_linux(void) void harts_early_init(void) { - if (CONFIG_IS_ENABLED(RISCV_MMODE)) { + if (IS_ENABLED(CONFIG_RISCV_MMODE)) { unsigned long long mcache_ctl_val = csr_read(CSR_MCACHE_CTL); if (!(mcache_ctl_val & V5_MCACHE_CTL_DC_COHEN_EN)) diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c index d34c8efce09..f6f20085bb4 100644 --- a/arch/riscv/cpu/cpu.c +++ b/arch/riscv/cpu/cpu.c @@ -19,7 +19,7 @@ * The variables here must be stored in the data section since they are used * before the bss section is available. */ -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) u32 hart_lottery __section(".data") = 0; #ifdef CONFIG_AVAILABLE_HARTS @@ -58,13 +58,13 @@ static inline bool supports_extension(char ext) return false; #else /* !CONFIG_CPU */ -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) return csr_read(CSR_MISA) & (1 << (ext - 'a')); -#else /* !CONFIG_IS_ENABLED(RISCV_MMODE) */ +#else /* !IS_ENABLED(CONFIG_RISCV_MMODE) */ #warning "There is no way to determine the available extensions in S-mode." #warning "Please convert your board to use the RISC-V CPU driver." return false; -#endif /* CONFIG_IS_ENABLED(RISCV_MMODE) */ +#endif /* IS_ENABLED(CONFIG_RISCV_MMODE) */ #endif /* CONFIG_CPU */ } @@ -87,7 +87,7 @@ static int riscv_cpu_probe(void) * there's nothing to do, since we just need to clear any existing IPIs, and * that is handled by the sending of an ipi itself. */ -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1) { } @@ -107,7 +107,7 @@ int riscv_cpu_setup(void *ctx, struct event *event) csr_write(CSR_FCSR, 0); } - if (CONFIG_IS_ENABLED(RISCV_MMODE)) { + if (IS_ENABLED(CONFIG_RISCV_MMODE)) { /* * Enable perf counters for cycle, time, * and instret counters only @@ -128,7 +128,7 @@ int riscv_cpu_setup(void *ctx, struct event *event) #endif } -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) ret = riscv_init_ipi(); if (ret) return ret; diff --git a/arch/riscv/cpu/fu740/spl.c b/arch/riscv/cpu/fu740/spl.c index c6816e9ed4c..e7e6dab62e1 100644 --- a/arch/riscv/cpu/fu740/spl.c +++ b/arch/riscv/cpu/fu740/spl.c @@ -33,6 +33,6 @@ void harts_early_init(void) * Clear feature disable CSR to '0' to turn on all features for * each core. This operation must be in M-mode. */ - if (CONFIG_IS_ENABLED(RISCV_MMODE)) + if (IS_ENABLED(CONFIG_RISCV_MMODE)) csr_write(CSR_U74_FEATURE_DISABLE, 0); } diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 4687bca3c99..67a843b4119 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -40,7 +40,7 @@ secondary_harts_relocation_error: .section .text .globl _start _start: -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) csrr a0, CSR_MHARTID #endif @@ -72,14 +72,14 @@ _start: */ csrw MODE_PREFIX(ie), zero -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* check if hart is within range */ /* tp: hart id */ li t0, CONFIG_NR_CPUS bge tp, t0, hart_out_of_bounds_loop /* set xSIE bit to receive IPIs */ -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) li t0, MIE_MSIE #else li t0, SIE_SSIE @@ -110,7 +110,7 @@ call_board_init_f_0: mv s0, a0 /* setup stack */ -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* tp: hart id */ slli t0, tp, CONFIG_STACK_SIZE_SHIFT sub sp, a0, t0 @@ -122,7 +122,7 @@ call_board_init_f_0: call_harts_early_init: jal harts_early_init -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) /* * Pick hart to initialize global data and run U-Boot. The other harts * wait for initialization to complete. @@ -140,7 +140,7 @@ call_harts_early_init: * accesses gd). */ mv gp, s0 -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) bnez tp, secondary_hart_loop #endif #endif @@ -152,7 +152,7 @@ call_harts_early_init: /* save the boot hart id to global_data */ SREG tp, GD_BOOT_HART(gp) -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) #ifdef CONFIG_AVAILABLE_HARTS la t0, available_harts_lock amoswap.w.rl zero, zero, 0(t0) @@ -219,7 +219,7 @@ spl_stack_gd_setup: mv s0, a0 /* setup stack on main hart */ -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* tp: hart id */ slli t0, tp, CONFIG_STACK_SIZE_SHIFT sub sp, s0, t0 @@ -227,7 +227,7 @@ spl_stack_gd_setup: mv sp, s0 #endif -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* set new stack and global data pointer on secondary harts */ spl_secondary_hart_stack_gd_setup: la a0, secondary_hart_relocate @@ -270,7 +270,7 @@ relocate_code: *Set up the stack */ stack_setup: -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* tp: hart id */ slli t0, tp, CONFIG_STACK_SIZE_SHIFT sub sp, s2, t0 @@ -365,7 +365,7 @@ clbss_l: blt t0, t1, clbss_l relocate_secondary_harts: -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) /* send relocation IPI */ la t0, secondary_hart_relocate add a0, t0, t6 @@ -409,7 +409,7 @@ call_board_init_r: */ jr t4 /* jump to board_init_r() */ -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) hart_out_of_bounds_loop: /* Harts in this loop are out of bounds, increase CONFIG_NR_CPUS. */ wfi @@ -436,9 +436,9 @@ secondary_hart_relocate: secondary_hart_loop: wfi -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) csrr t0, MODE_PREFIX(ip) -#if CONFIG_IS_ENABLED(RISCV_MMODE) +#if IS_ENABLED(CONFIG_RISCV_MMODE) andi t0, t0, MIE_MSIE #else andi t0, t0, SIE_SSIE diff --git a/arch/riscv/include/asm/encoding.h b/arch/riscv/include/asm/encoding.h index 56c5da86e86..b48b6d9c263 100644 --- a/arch/riscv/include/asm/encoding.h +++ b/arch/riscv/include/asm/encoding.h @@ -12,7 +12,7 @@ #include #endif -#if CONFIG_IS_ENABLED(RISCV_SMODE) +#if IS_ENABLED(CONFIG_RISCV_SMODE) #define MODE_PREFIX(__suffix) s##__suffix #else #define MODE_PREFIX(__suffix) m##__suffix diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h index 6fdc86dd8b1..803a24b0705 100644 --- a/arch/riscv/include/asm/global_data.h +++ b/arch/riscv/include/asm/global_data.h @@ -18,16 +18,16 @@ struct arch_global_data { long boot_hart; /* boot hart id */ phys_addr_t firmware_fdt_addr; -#if CONFIG_IS_ENABLED(SIFIVE_CLINT) +#if IS_ENABLED(CONFIG_SIFIVE_CLINT) void __iomem *clint; /* clint base address */ #endif #ifdef CONFIG_ANDES_PLICSW void __iomem *plicsw; /* plic base address */ #endif -#if CONFIG_IS_ENABLED(SMP) +#if IS_ENABLED(CONFIG_SMP) struct ipi_data ipi[CONFIG_NR_CPUS]; #endif -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) #ifdef CONFIG_AVAILABLE_HARTS ulong available_harts; #endif diff --git a/arch/riscv/include/asm/string.h b/arch/riscv/include/asm/string.h index 7dee3e4c9f6..b49c37655d1 100644 --- a/arch/riscv/include/asm/string.h +++ b/arch/riscv/include/asm/string.h @@ -23,19 +23,19 @@ #undef __HAVE_ARCH_MEMZERO #undef __HAVE_ARCH_MEMCPY -#if CONFIG_IS_ENABLED(USE_ARCH_MEMCPY) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMCPY) #define __HAVE_ARCH_MEMCPY #endif extern void *memcpy(void *, const void *, __kernel_size_t); #undef __HAVE_ARCH_MEMMOVE -#if CONFIG_IS_ENABLED(USE_ARCH_MEMMOVE) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMMOVE) #define __HAVE_ARCH_MEMMOVE #endif extern void *memmove(void *, const void *, __kernel_size_t); #undef __HAVE_ARCH_MEMZERO -#if CONFIG_IS_ENABLED(USE_ARCH_MEMSET) +#if IS_ENABLED(CONFIG_USE_ARCH_MEMSET) #define __HAVE_ARCH_MEMSET #endif extern void *memset(void *, int, __kernel_size_t); diff --git a/arch/riscv/lib/asm-offsets.c b/arch/riscv/lib/asm-offsets.c index 452dfcea97f..f046223e55b 100644 --- a/arch/riscv/lib/asm-offsets.c +++ b/arch/riscv/lib/asm-offsets.c @@ -16,7 +16,7 @@ int main(void) { DEFINE(GD_BOOT_HART, offsetof(gd_t, arch.boot_hart)); DEFINE(GD_FIRMWARE_FDT_ADDR, offsetof(gd_t, arch.firmware_fdt_addr)); -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) #ifdef CONFIG_AVAILABLE_HARTS DEFINE(GD_AVAILABLE_HARTS, offsetof(gd_t, arch.available_harts)); #endif diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 276677a5e2f..bf3c556ee65 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -64,7 +64,7 @@ static void announce_and_cleanup(int fake) static void boot_prep_linux(struct bootm_headers *images) { - if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { debug("using: FDT\n"); if (image_setup_linux(images)) { printf("FDT creation failed! hanging..."); @@ -94,7 +94,7 @@ static void boot_jump_linux(struct bootm_headers *images, int flag) announce_and_cleanup(fake); if (!fake) { - if (CONFIG_IS_ENABLED(OF_LIBFDT) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && images->ft_len) { #ifdef CONFIG_SMP ret = smp_call_function(images->ep, (ulong)images->ft_addr, 0, 0); diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index e966afa7e3e..5ace1264099 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -152,7 +152,7 @@ ulong handle_trap(ulong cause, ulong epc, ulong tval, struct pt_regs *regs) efi_restore_gd(); if (cause == CAUSE_BREAKPOINT && - CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK)) { + IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK)) { ulong pre_addr = epc - 4, post_addr = epc + 4; /* Check for prior and post addresses to be in same page. */ diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c index 4f073a016ff..3887390d94e 100644 --- a/arch/riscv/lib/smp.c +++ b/arch/riscv/lib/smp.c @@ -45,7 +45,7 @@ static int send_ipi_many(struct ipi_data *ipi, int wait) continue; } -#if !CONFIG_IS_ENABLED(XIP) +#if !IS_ENABLED(CONFIG_XIP) #ifdef CONFIG_AVAILABLE_HARTS /* skip if hart is not available */ if (!(gd->arch.available_harts & (1 << reg))) diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index f4d3b67e5dd..1823cf242c0 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -43,7 +43,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) void *fdt_blob; __maybe_unused int ret; -#if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL) +#if IS_ENABLED(CONFIG_LOAD_FIT) || IS_ENABLED(CONFIG_LOAD_FIT_FULL) fdt_blob = spl_image->fdt_addr; #else fdt_blob = (void *)gd->fdt_blob; diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 234652872ec..e0c5db2a522 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -537,7 +537,7 @@ int sandbox_main(int argc, char *argv[]) #if CONFIG_VAL(SYS_MALLOC_F_LEN) gd->malloc_base = CFG_MALLOC_F_ADDR; #endif -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) gd->default_log_level = state->default_log_level; #endif setup_ram_buf(state); diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h index df7156fe317..b6ad4f44fa3 100644 --- a/arch/sandbox/include/asm/clk.h +++ b/arch/sandbox/include/asm/clk.h @@ -63,7 +63,7 @@ struct sandbox_clk_test { /* Platform data for the sandbox fixed-rate clock driver */ struct sandbox_clk_fixed_rate_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_sandbox_fixed_clock dtplat; #endif struct clk_fixed_rate fixed; diff --git a/arch/sandbox/include/asm/serial.h b/arch/sandbox/include/asm/serial.h index 16589a1b219..ac35b276502 100644 --- a/arch/sandbox/include/asm/serial.h +++ b/arch/sandbox/include/asm/serial.h @@ -10,7 +10,7 @@ #include struct sandbox_serial_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_sandbox_serial dtplat; #endif int colour; /* Text colour to use for output, -1 for none */ diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c index da01e71335f..2fa01c2e56c 100644 --- a/arch/x86/cpu/acpi_gpe.c +++ b/arch/x86/cpu/acpi_gpe.c @@ -72,7 +72,7 @@ static int acpi_gpe_of_xlate(struct irq *irq, struct ofnode_phandle_args *args) return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) static int acpi_gpe_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq) { memset(acpi_irq, '\0', sizeof(*acpi_irq)); @@ -94,7 +94,7 @@ static int acpi_gpe_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq) static const struct irq_ops acpi_gpe_ops = { .read_and_clear = acpi_gpe_read_and_clear, .of_xlate = acpi_gpe_of_xlate, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) .get_acpi = acpi_gpe_get_acpi, #endif }; diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c index 8f48457ee22..1f8dd5888f5 100644 --- a/arch/x86/cpu/apollolake/cpu_spl.c +++ b/arch/x86/cpu/apollolake/cpu_spl.c @@ -118,7 +118,7 @@ static int arch_cpu_init_tpl(void) ret = uclass_first_device_err(UCLASS_SERIAL, &serial); if (ret) return log_msg_ret("serial", ret); - if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)) { + if (IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT)) { ret = uclass_first_device_err(UCLASS_SPI, &spi); if (ret) return log_msg_ret("SPI", ret); diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c index 2405dec8525..cb26a6e2e82 100644 --- a/arch/x86/cpu/apollolake/hostbridge.c +++ b/arch/x86/cpu/apollolake/hostbridge.c @@ -42,7 +42,7 @@ enum { TOLUD = 0xbc, }; -#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) +#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) static const struct nhlt_format_config dmic_1ch_formats[] = { /* 48 KHz 16-bits per sample. */ { @@ -220,7 +220,7 @@ static int apl_hostbridge_of_to_plat(struct udevice *dev) ret = uclass_first_device_err(UCLASS_PINCTRL, &pinctrl); if (ret) return log_msg_ret("no hostbridge PINCTRL", ret); -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int root; /* Get length of PCI Express Region */ @@ -267,7 +267,7 @@ static int apl_acpi_hb_get_name(const struct udevice *dev, char *out_name) return acpi_copy_name(out_name, "RHUB"); } -#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) +#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) static int apl_acpi_hb_write_tables(const struct udevice *dev, struct acpi_ctx *ctx) { @@ -369,13 +369,13 @@ ulong sa_get_tseg_base(struct udevice *dev) struct acpi_ops apl_hostbridge_acpi_ops = { .get_name = apl_acpi_hb_get_name, -#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) +#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) .write_tables = apl_acpi_hb_write_tables, .setup_nhlt = apl_acpi_setup_nhlt, #endif }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_hostbridge_ids[] = { { .compatible = "intel,apl-hostbridge" }, { } diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c index 4be6366f043..e9cc66ca898 100644 --- a/arch/x86/cpu/apollolake/lpc.c +++ b/arch/x86/cpu/apollolake/lpc.c @@ -128,7 +128,7 @@ struct acpi_ops apl_lpc_acpi_ops = { .inject_dsdt = southbridge_inject_dsdt, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_lpc_ids[] = { { .compatible = "intel,apl-lpc" }, { } diff --git a/arch/x86/cpu/apollolake/pch.c b/arch/x86/cpu/apollolake/pch.c index a0f9b031dea..127e0405f69 100644 --- a/arch/x86/cpu/apollolake/pch.c +++ b/arch/x86/cpu/apollolake/pch.c @@ -23,7 +23,7 @@ static const struct pch_ops apl_pch_ops = { .set_spi_protect = apl_set_spi_protect, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_pch_ids[] = { { .compatible = "intel,apl-pch" }, { } diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c index 163119e2e9e..1200c55e5ac 100644 --- a/arch/x86/cpu/apollolake/pmc.c +++ b/arch/x86/cpu/apollolake/pmc.c @@ -107,7 +107,7 @@ int apl_pmc_ofdata_to_uc_plat(struct udevice *dev) struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev); struct apl_pmc_plat *plat = dev_get_plat(dev); -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) u32 base[6]; int size; int ret; @@ -206,7 +206,7 @@ static const struct acpi_pmc_ops apl_pmc_ops = { .global_reset_set_enable = apl_global_reset_set_enable, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_pmc_ids[] = { { .compatible = "intel,apl-pmc" }, { } diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c index 6078d5a200e..a9a49f9555c 100644 --- a/arch/x86/cpu/apollolake/spl.c +++ b/arch/x86/cpu/apollolake/spl.c @@ -41,7 +41,7 @@ static int rom_load_image(struct spl_image_info *spl_image, spl_image->name = "U-Boot"; log_debug("Reading from mapped SPI %lx, size %lx\n", spl_pos, spl_size); - if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT)) { + if (IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT)) { ret = uclass_find_first_device(UCLASS_SPI_FLASH, &dev); if (ret) return log_msg_ret("spi_flash", ret); @@ -68,7 +68,7 @@ static int rom_load_image(struct spl_image_info *spl_image, } SPL_LOAD_IMAGE_METHOD("Mapped SPI", 2, BOOT_DEVICE_SPI_MMAP, rom_load_image); -#if CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT) +#if IS_ENABLED(CONFIG_SPI_FLASH_SUPPORT) static int apl_flash_std_read(struct udevice *dev, u32 offset, size_t len, void *buf) diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c index a9362436000..4d045e7a6f8 100644 --- a/arch/x86/cpu/apollolake/uart.c +++ b/arch/x86/cpu/apollolake/uart.c @@ -81,7 +81,7 @@ static int apl_ns16550_probe(struct udevice *dev) { struct apl_ns16550_plat *plat = dev_get_plat(dev); - if (!CONFIG_IS_ENABLED(PCI)) + if (!IS_ENABLED(CONFIG_PCI)) apl_uart_init(plat->ns16550.bdf, plat->ns16550.base); return ns16550_serial_probe(dev); @@ -89,7 +89,7 @@ static int apl_ns16550_probe(struct udevice *dev) static int apl_ns16550_of_to_plat(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_apl_ns16550 *dtplat; struct apl_ns16550_plat *plat = dev_get_plat(dev); struct ns16550_plat ns; @@ -123,7 +123,7 @@ static int apl_ns16550_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_ns16550_serial_ids[] = { { .compatible = "intel,apl-ns16550" }, { }, diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c index 37fcddbb9b0..66bcac7b2bf 100644 --- a/arch/x86/cpu/broadwell/pch.c +++ b/arch/x86/cpu/broadwell/pch.c @@ -602,7 +602,7 @@ static int broadwell_pch_init(struct udevice *dev) static int broadwell_pch_probe(struct udevice *dev) { - if (CONFIG_IS_ENABLED(X86_32BIT_INIT)) { + if (IS_ENABLED(CONFIG_X86_32BIT_INIT)) { if (!(gd->flags & GD_FLG_RELOC)) return broadwell_pch_early_init(dev); else diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 6fe6eaf6c84..5f4306dd35e 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -178,7 +178,7 @@ int default_print_cpuinfo(void) return 0; } -#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) void show_boot_progress(int val) { outb(val, POST_PORT); diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index fae2544c456..40cfd48c141 100644 --- a/arch/x86/cpu/i386/interrupt.c +++ b/arch/x86/cpu/i386/interrupt.c @@ -253,7 +253,7 @@ int disable_interrupts(void) { long flags; -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) asm volatile ("pushfq ; popq %0 ; cli\n" : "=g" (flags) : ); #else asm volatile ("pushfl ; popl %0 ; cli\n" : "=g" (flags) : ); diff --git a/arch/x86/cpu/intel_common/car2.S b/arch/x86/cpu/intel_common/car2.S index f8cf78586d0..33f88f37f04 100644 --- a/arch/x86/cpu/intel_common/car2.S +++ b/arch/x86/cpu/intel_common/car2.S @@ -434,7 +434,7 @@ find_llc_subleaf: jmp car_init_ret #endif -#if CONFIG_IS_ENABLED(X86_16BIT_INIT) +#if IS_ENABLED(CONFIG_X86_16BIT_INIT) _dt_ucode_base_size: /* These next two fields are filled in by binman */ .globl ucode_base diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c index 1c0dcedb582..c9382365d3f 100644 --- a/arch/x86/cpu/intel_common/cpu_from_spl.c +++ b/arch/x86/cpu/intel_common/cpu_from_spl.c @@ -24,7 +24,7 @@ int arch_cpu_init(void) { int ret; -#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) +#if IS_ENABLED(CONFIG_HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) struct spl_handoff *ho = gd->spl_handoff; gd->arch.hob_list = ho->arch.hob_list; diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c index ec73b3d8931..a76e68e1b78 100644 --- a/arch/x86/cpu/intel_common/itss.c +++ b/arch/x86/cpu/intel_common/itss.c @@ -154,8 +154,8 @@ static int route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num) static int itss_bind(struct udevice *dev) { /* This is not set with basic of-platdata, so set it manually */ - if (CONFIG_IS_ENABLED(OF_PLATDATA) && - !CONFIG_IS_ENABLED(OF_PLATDATA_INST)) + if (IS_ENABLED(CONFIG_OF_PLATDATA) && + !IS_ENABLED(CONFIG_OF_PLATDATA_INST)) dev->driver_data = X86_IRQT_ITSS; return 0; @@ -166,7 +166,7 @@ static int itss_of_to_plat(struct udevice *dev) struct itss_priv *priv = dev_get_priv(dev); int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct itss_plat *plat = dev_get_plat(dev); struct dtd_intel_itss *dtplat = &plat->dtplat; @@ -213,7 +213,7 @@ static const struct irq_ops itss_ops = { #endif }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id itss_ids[] = { { .compatible = "intel,itss", .data = X86_IRQT_ITSS }, { } diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c index e4e53f73c08..c5bd7b15d1a 100644 --- a/arch/x86/cpu/intel_common/p2sb.c +++ b/arch/x86/cpu/intel_common/p2sb.c @@ -88,7 +88,7 @@ int p2sb_of_to_plat(struct udevice *dev) struct p2sb_uc_priv *upriv = dev_get_uclass_priv(dev); struct p2sb_plat *plat = dev_get_plat(dev); -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int ret; u32 base[2]; @@ -133,7 +133,7 @@ static int intel_p2sb_set_hide(struct udevice *dev, bool hide) { u16 vendor; - if (!CONFIG_IS_ENABLED(PCI)) + if (!IS_ENABLED(CONFIG_PCI)) return -EPERM; p2sb_set_hide_bit(dev, hide); @@ -159,7 +159,7 @@ static int p2sb_remove(struct udevice *dev) static int p2sb_child_post_bind(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct p2sb_child_plat *pplat = dev_get_parent_plat(dev); int ret; u32 pid; @@ -177,7 +177,7 @@ static const struct p2sb_ops p2sb_ops = { .set_hide = intel_p2sb_set_hide, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id p2sb_ids[] = { { .compatible = "intel,p2sb" }, { } diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 4f28dc75b70..7e84cd7eb62 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 !IS_ENABLED(CONFIG_SPL_X86_32BIT_INIT) int arch_cpu_init(void) { post_code(POST_CPU_INIT); diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.lds index a0a2a06a18c..8812e51a7cb 100644 --- a/arch/x86/cpu/u-boot-spl.lds +++ b/arch/x86/cpu/u-boot-spl.lds @@ -65,7 +65,7 @@ SECTIONS _image_binary_end = .; -#if CONFIG_IS_ENABLED(SEPARATE_BSS) +#if IS_ENABLED(CONFIG_SEPARATE_BSS) . = 0x120000; #endif .bss (OVERLAY) : { diff --git a/arch/x86/include/asm/arch-apollolake/gpio.h b/arch/x86/include/asm/arch-apollolake/gpio.h index 762160da882..d235ab590dd 100644 --- a/arch/x86/include/asm/arch-apollolake/gpio.h +++ b/arch/x86/include/asm/arch-apollolake/gpio.h @@ -495,7 +495,7 @@ * @dtplat: of-platdata data from C struct */ struct apl_gpio_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* Put this first since driver model will copy the data here */ struct dtd_intel_apl_pinctrl dtplat; #endif diff --git a/arch/x86/include/asm/arch-apollolake/hostbridge.h b/arch/x86/include/asm/arch-apollolake/hostbridge.h index f4dce0d5224..c79b0a658ed 100644 --- a/arch/x86/include/asm/arch-apollolake/hostbridge.h +++ b/arch/x86/include/asm/arch-apollolake/hostbridge.h @@ -16,7 +16,7 @@ * @bdf: Bus/device/function of hostbridge */ struct apl_hostbridge_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_apl_hostbridge dtplat; #endif u32 *early_pads; diff --git a/arch/x86/include/asm/arch-apollolake/pmc.h b/arch/x86/include/asm/arch-apollolake/pmc.h index 23ac8fe7e20..a4e7130707a 100644 --- a/arch/x86/include/asm/arch-apollolake/pmc.h +++ b/arch/x86/include/asm/arch-apollolake/pmc.h @@ -7,7 +7,7 @@ #define ASM_ARCH_PMC_H struct apl_pmc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_apl_pmc dtplat; #endif pci_dev_t bdf; diff --git a/arch/x86/include/asm/arch-apollolake/uart.h b/arch/x86/include/asm/arch-apollolake/uart.h index c3ca171b83b..bce55c501f8 100644 --- a/arch/x86/include/asm/arch-apollolake/uart.h +++ b/arch/x86/include/asm/arch-apollolake/uart.h @@ -18,7 +18,7 @@ * dev_get_plat() without any offsets or adjustments. */ struct apl_ns16550_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_apl_ns16550 dtplat; #endif struct ns16550_plat ns16550; diff --git a/arch/x86/include/asm/byteorder.h b/arch/x86/include/asm/byteorder.h index a2d1fd8703b..554cc9d0a97 100644 --- a/arch/x86/include/asm/byteorder.h +++ b/arch/x86/include/asm/byteorder.h @@ -19,7 +19,7 @@ static __inline__ __u32 ___arch__swab32(__u32 x) static __inline__ __u16 ___arch__swab16(__u16 x) { -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) return _constant_swab16(x); #else __asm__("xchgb %b0,%h0" /* swap bytes */ \ diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index 3346012d335..b94623237a7 100644 --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h @@ -161,7 +161,7 @@ static inline unsigned int cpuid_edx(unsigned int op) return edx; } -#if !CONFIG_IS_ENABLED(X86_64) +#if !IS_ENABLED(CONFIG_X86_64) /* Standard macro to see if a specific flag is changeable */ static inline int flag_is_changeable_p(uint32_t flag) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 22d103df4ee..7be1e29df8a 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -130,7 +130,7 @@ struct arch_global_data { #include #ifndef __ASSEMBLY__ -# if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64) +# if defined(CONFIG_EFI_APP) || IS_ENABLED(CONFIG_X86_64) /* TODO(sjg@chromium.org): Consider using a fixed register for gd on x86_64 */ #define gd global_data_ptr @@ -141,7 +141,7 @@ static inline notrace gd_t *get_fs_gd_ptr(void) { gd_t *gd_ptr; -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) asm volatile("fs mov 0, %0\n" : "=r" (gd_ptr)); #else asm volatile("fs movl 0, %0\n" : "=r" (gd_ptr)); diff --git a/arch/x86/include/asm/itss.h b/arch/x86/include/asm/itss.h index 6d4793277e6..0a627daeb58 100644 --- a/arch/x86/include/asm/itss.h +++ b/arch/x86/include/asm/itss.h @@ -45,7 +45,7 @@ #define PCR_ITSS_ITSSPRC 0x3300 struct itss_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* Put this first since driver model will copy the data here */ struct dtd_intel_itss dtplat; #endif diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h index f4c4d6c257c..004e736efb9 100644 --- a/arch/x86/include/asm/mp.h +++ b/arch/x86/include/asm/mp.h @@ -111,7 +111,7 @@ int x86_mp_init(void); */ typedef void (*mp_run_func)(void *arg); -#if CONFIG_IS_ENABLED(SMP) && !CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_SMP) && !IS_ENABLED(CONFIG_X86_64) /** * mp_run_on_cpus() - Run a function on one or all CPUs * diff --git a/arch/x86/include/asm/p2sb.h b/arch/x86/include/asm/p2sb.h index 6f63eae8e27..1ec0c4285f7 100644 --- a/arch/x86/include/asm/p2sb.h +++ b/arch/x86/include/asm/p2sb.h @@ -8,7 +8,7 @@ /* Platform data for the P2SB */ struct p2sb_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_p2sb dtplat; #endif ulong mmio_base; diff --git a/arch/x86/include/asm/sysreset.h b/arch/x86/include/asm/sysreset.h index 5e586f51c00..5d43b860c27 100644 --- a/arch/x86/include/asm/sysreset.h +++ b/arch/x86/include/asm/sysreset.h @@ -8,7 +8,7 @@ #include struct x86_sysreset_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_x86_reset dtplat; #endif diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index ba500015603..856c26d9cd2 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h @@ -10,7 +10,7 @@ typedef unsigned short umode_t; */ #ifdef __KERNEL__ -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) #define BITS_PER_LONG 64 #else #define BITS_PER_LONG 32 diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index e3b7e9a4bbe..0032a2fd965 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -179,7 +179,7 @@ int acpi_write_tcpa(struct acpi_ctx *ctx, const struct acpi_writer *entry) if (!IS_ENABLED(CONFIG_TPM_V1)) return -ENOENT; - if (!CONFIG_IS_ENABLED(BLOBLIST)) + if (!IS_ENABLED(CONFIG_BLOBLIST)) return -ENXIO; tcpa = ctx->current; diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 873e2bc176f..776628f3211 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -78,7 +78,7 @@ static int boot_prep_linux(struct bootm_headers *images) size_t len; int ret; - if (CONFIG_IS_ENABLED(OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_LMB) && images->ft_len) { debug("using: FDT\n"); if (image_setup_linux(images)) { puts("FDT creation failed! hanging..."); @@ -166,7 +166,7 @@ int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) * TODO(sjg@chromium.org): Support booting both 32-bit and * 64-bit kernels from 64-bit U-Boot. */ -#if !CONFIG_IS_ENABLED(X86_64) +#if !IS_ENABLED(CONFIG_X86_64) return cpu_jump_to_64bit(setup_base, load_address); #endif } else { @@ -230,7 +230,7 @@ static ulong get_sp(void) { ulong ret; -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) ret = gd->start_addr_sp; #else asm("mov %%esp, %0" : "=r"(ret) : ); diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c index 12fcff12380..91443f78a77 100644 --- a/arch/x86/lib/e820.c +++ b/arch/x86/lib/e820.c @@ -37,7 +37,7 @@ __weak unsigned int install_e820_map(unsigned int max_entries, return 4; } -#if CONFIG_IS_ENABLED(EFI_LOADER) +#if IS_ENABLED(CONFIG_EFI_LOADER) void efi_add_known_memory(void) { struct e820_entry e820[E820MAX]; @@ -82,4 +82,4 @@ void efi_add_known_memory(void) } } } -#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */ +#endif /* IS_ENABLED(CONFIG_EFI_LOADER) */ diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 8f2977a8070..54ed2c2c8b4 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -61,7 +61,7 @@ void board_final_init(void) debug("OK\n"); } -#if CONFIG_IS_ENABLED(DM_RTC) +#if IS_ENABLED(CONFIG_DM_RTC) int fsp_save_s3_stack(void) { struct udevice *dev; diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 3805a011dda..db4e3ff5fa2 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -182,7 +182,7 @@ unsigned int install_e820_map(unsigned int max_entries, return num_entries; } -#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) +#if IS_ENABLED(CONFIG_HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) int handoff_arch_save(struct spl_handoff *ho) { ho->arch.usable_ram_top = gd->bd->bi_dram[0].size; diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c index f9ea1ab3baa..7b31d4ce0c4 100644 --- a/arch/x86/lib/fsp2/fsp_dram.c +++ b/arch/x86/lib/fsp2/fsp_dram.c @@ -59,7 +59,7 @@ int dram_init(void) gd->arch.mrc[MRC_TYPE_VAR].len); #endif } else { -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) struct spl_handoff *ho = gd->spl_handoff; if (!ho) { @@ -82,7 +82,7 @@ phys_size_t board_get_usable_ram_top(phys_size_t total_size) if (!ll_boot_init()) return gd->ram_size; -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) struct spl_handoff *ho = gd->spl_handoff; log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top); diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index f33194045f9..a5773f49b52 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -14,7 +14,7 @@ DECLARE_GLOBAL_DATA_PTR; int init_cache_f_r(void) { - bool do_mtrr = CONFIG_IS_ENABLED(X86_32BIT_INIT) || + bool do_mtrr = IS_ENABLED(CONFIG_X86_32BIT_INIT) || IS_ENABLED(CONFIG_FSP_VERSION2); int ret; diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index 33d6eb49d75..da6f5b414d0 100644 --- a/arch/x86/lib/interrupts.c +++ b/arch/x86/lib/interrupts.c @@ -34,7 +34,7 @@ #include #include -#if !CONFIG_IS_ENABLED(X86_64) +#if !IS_ENABLED(CONFIG_X86_64) struct irq_action { interrupt_handler_t *handler; @@ -130,7 +130,7 @@ void do_irq(int hw_irq) #if defined(CONFIG_CMD_IRQ) int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { -#if !CONFIG_IS_ENABLED(X86_64) +#if !IS_ENABLED(CONFIG_X86_64) struct idt_ptr ptr; int irq; diff --git a/arch/x86/lib/lpc-uclass.c b/arch/x86/lib/lpc-uclass.c index 67b931d3b28..ef63ddc7373 100644 --- a/arch/x86/lib/lpc-uclass.c +++ b/arch/x86/lib/lpc-uclass.c @@ -10,7 +10,7 @@ UCLASS_DRIVER(lpc) = { .id = UCLASS_LPC, .name = "lpc", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index 5b1b420a643..4a16a70e608 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -49,7 +49,7 @@ int clear_bss(void) } #endif -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) static void do_elf_reloc_fixups64(unsigned int text_base, uintptr_t size, Elf64_Rela *re_src, Elf64_Rela *re_end) { @@ -167,7 +167,7 @@ int do_elf_reloc_fixups(void) #else panic("No CONFIG_TEXT_BASE"); #endif -#if CONFIG_IS_ENABLED(X86_64) +#if IS_ENABLED(CONFIG_X86_64) do_elf_reloc_fixups64(text_base, size, re_src, re_end); #else do_elf_reloc_fixups32(text_base, size, re_src, re_end); diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index bdf57ef7b5b..1952d0beaf6 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -97,7 +97,7 @@ static int x86_spl_init(void) } #endif preloader_console_init(); -#if !defined(CONFIG_TPL) && !CONFIG_IS_ENABLED(CPU) +#if !defined(CONFIG_TPL) && !IS_ENABLED(CONFIG_CPU) ret = print_cpuinfo(); if (ret) { debug("%s: print_cpuinfo() failed\n", __func__); diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c index 18b05b2f672..f85380fa7c9 100644 --- a/arch/x86/lib/tpl.c +++ b/arch/x86/lib/tpl.c @@ -117,7 +117,7 @@ void spl_board_init(void) preloader_console_init(); } -#if !CONFIG_IS_ENABLED(PCI) +#if !IS_ENABLED(CONFIG_PCI) /* * This is a fake PCI bus for TPL when it doesn't have proper PCI. It is enough * to bind the devices on the PCI bus, some of which have early-regs properties @@ -129,7 +129,7 @@ void spl_board_init(void) * for devices, so the TPL BARs continue to be used. Once U-Boot starts it does * the auto allocation (after relocation). */ -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id tpl_fake_pci_ids[] = { { .compatible = "pci-x86" }, { } diff --git a/arch/xtensa/cpu/start.S b/arch/xtensa/cpu/start.S index 580df65ea78..136471825a4 100644 --- a/arch/xtensa/cpu/start.S +++ b/arch/xtensa/cpu/start.S @@ -164,19 +164,19 @@ _start: * enable data/instruction cache for relocated image. */ #if XCHAL_HAVE_SPANNING_WAY && \ - !(CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && \ - CONFIG_IS_ENABLED(SYS_ICACHE_OFF)) + !(IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && \ + IS_ENABLED(CONFIG_SYS_ICACHE_OFF)) srli a7, a4, 29 slli a7, a7, 29 addi a7, a7, XCHAL_SPANNING_WAY -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) rdtlb1 a8, a7 srli a8, a8, 4 slli a8, a8, 4 addi a8, a8, CA_WRITEBACK wdtlb a8, a7 #endif -#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_ICACHE_OFF) ritlb1 a8, a7 srli a8, a8, 4 slli a8, a8, 4 diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeontx2_cn913x/board.c index 3d20cfb2fab..b5e0eeca2ff 100644 --- a/board/Marvell/octeontx2_cn913x/board.c +++ b/board/Marvell/octeontx2_cn913x/board.c @@ -23,7 +23,7 @@ int board_early_init_f(void) int board_early_init_r(void) { - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { + if (IS_ENABLED(CONFIG_DM_REGULATOR)) { /* Check if any existing regulator should be turned down */ regulators_enable_boot_off(false); } diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c index d72e3ef24ee..f68acd98091 100644 --- a/board/Seagate/dockstar/dockstar.c +++ b/board/Seagate/dockstar/dockstar.c @@ -115,7 +115,7 @@ int board_init(void) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) #define GREEN_LED BIT(14) #define ORANGE_LED BIT(15) #define BOTH_LEDS (GREEN_LED | ORANGE_LED) diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c index caea89c10e0..9e40fa2cbdf 100644 --- a/board/Seagate/goflexhome/goflexhome.c +++ b/board/Seagate/goflexhome/goflexhome.c @@ -113,7 +113,7 @@ int board_init(void) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) #define GREEN_LED BIT(14) #define ORANGE_LED BIT(15) #define BOTH_LEDS (GREEN_LED | ORANGE_LED) diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c index 80ad62c2c66..73fbd58d2b9 100644 --- a/board/alliedtelesis/x530/x530.c +++ b/board/alliedtelesis/x530/x530.c @@ -122,7 +122,7 @@ int board_init(void) void arch_preboot_os(void) { - if (CONFIG_IS_ENABLED(WDT)) + if (IS_ENABLED(CONFIG_WDT)) wdt_stop_all(); } diff --git a/board/bosch/acc/acc.c b/board/bosch/acc/acc.c index 770ca8b711b..fbc6be39d1b 100644 --- a/board/bosch/acc/acc.c +++ b/board/bosch/acc/acc.c @@ -726,7 +726,7 @@ void reset_cpu(ulong addr) hang(); } -#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) void show_boot_progress(int val) { u32 fuseval; diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index c31e2c86a2d..23961b66584 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -40,7 +40,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; static const struct ddr_data ddr3_data = { diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index e3a9c00e809..94e3098164c 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -480,7 +480,7 @@ int board_eth_init(struct bd_info *bis) } #endif -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) static void bosch_check_reset_pin(void) { if (readl(GPIO1_BASE + OMAP_GPIO_IRQSTATUS_SET_0) & RESET_MASK) { diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 6a866b5470d..d03caa699a8 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -301,7 +301,7 @@ int misc_init_r(void) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) void show_boot_progress(int progress) { if (progress > 0) diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index ab20825ed36..44d7ebd4558 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -16,7 +16,7 @@ #include #include -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) #include static const struct pl01x_serial_plat serial0 = { diff --git a/board/cloudengines/pogo_v4/pogo_v4.c b/board/cloudengines/pogo_v4/pogo_v4.c index 61ce0d59c77..c2c80fea943 100644 --- a/board/cloudengines/pogo_v4/pogo_v4.c +++ b/board/cloudengines/pogo_v4/pogo_v4.c @@ -111,7 +111,7 @@ int board_init(void) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) #define GREEN_LED BIT(22) #define RED_LED BIT(24) #define BOTH_LEDS (GREEN_LED | RED_LED) diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 1b08a2c5abf..d000f2f32e8 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -267,7 +267,7 @@ int board_init(void) return 0; } -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { @@ -293,7 +293,7 @@ int power_init_board(void) return 0; } -#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ +#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */ /* * cl_som_imx7_setup_wdog() - watchdog configuration. diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h index 9bd7604a999..d08d8a1fd01 100644 --- a/board/compulab/common/eeprom.h +++ b/board/compulab/common/eeprom.h @@ -10,7 +10,7 @@ #define _EEPROM_ #include -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus); u32 cl_eeprom_get_board_rev(uint eeprom_bus); int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 5ffd420fff3..17cd0620736 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -295,7 +295,7 @@ int misc_init_r(void) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) #ifdef CONFIG_MMC_DAVINCI static struct davinci_mmc mmc_sd0 = { .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE, diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index de224d4d283..15ee65b5354 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -162,7 +162,7 @@ static void set_mpu_and_core_voltage(void) } } -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static const struct ddr_data ddr2_data = { .datardsratio0 = MT47H128M16RT25E_RD_DQS, .datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE, @@ -265,7 +265,7 @@ void sdram_init(void) config_ddr(266, &ioregs, &ddr2_data, &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data, 0); } -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ #ifdef CONFIG_DEBUG_UART void board_debug_uart_init(void) diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c index 500080c7cff..a82acec336d 100644 --- a/board/engicam/imx8mp/icore_mx8mp.c +++ b/board/engicam/imx8mp/icore_mx8mp.c @@ -47,7 +47,7 @@ static int setup_eqos(void) return set_clk_eqos(ENET_125MHZ); } -#if CONFIG_IS_ENABLED(NET) +#if IS_ENABLED(CONFIG_NET) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/engicam/imx8mp/spl.c b/board/engicam/imx8mp/spl.c index 6a16d58ae5a..8680eac6df8 100644 --- a/board/engicam/imx8mp/spl.c +++ b/board/engicam/imx8mp/spl.c @@ -52,7 +52,7 @@ struct i2c_pads_info i2c_pad_info1 = { }, }; -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/engicam/stm32mp1/spl.c b/board/engicam/stm32mp1/spl.c index 2b7779cc01d..3c2587778b1 100644 --- a/board/engicam/stm32mp1/spl.c +++ b/board/engicam/stm32mp1/spl.c @@ -12,7 +12,7 @@ static u32 opp_voltage_mv __section(".data"); void board_vddcore_init(u32 voltage_mv) { - if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER)) + if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER)) opp_voltage_mv = voltage_mv; } diff --git a/board/engicam/stm32mp1/stm32mp1.c b/board/engicam/stm32mp1/stm32mp1.c index 5223e9bae8d..3f84db8bd0b 100644 --- a/board/engicam/stm32mp1/stm32mp1.c +++ b/board/engicam/stm32mp1/stm32mp1.c @@ -59,9 +59,9 @@ enum env_location env_get_location(enum env_operation op, int prio) switch (bootmode & TAMP_BOOT_DEVICE_MASK) { case BOOT_FLASH_SD: case BOOT_FLASH_EMMC: - if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) + if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC)) return ENVL_MMC; - else if (CONFIG_IS_ENABLED(ENV_IS_IN_EXT4)) + else if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4)) return ENVL_EXT4; else return ENVL_NOWHERE; @@ -74,7 +74,7 @@ enum env_location env_get_location(enum env_operation op, int prio) return ENVL_NOWHERE; case BOOT_FLASH_NOR: - if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_SPI_FLASH; else return ENVL_NOWHERE; diff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c index 9a75c5a09dd..376bd2401ca 100644 --- a/board/freescale/common/emc2305.c +++ b/board/freescale/common/emc2305.c @@ -24,7 +24,7 @@ void set_fan_speed(u8 data, int chip_addr) I2C_EMC2305_FAN5}; for (index = 0; index < NUM_OF_FANS; index++) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) if (i2c_write(chip_addr, Fan[index], 1, &data, 1) != 0) { printf("Error: failed to change fan speed @%x\n", Fan[index]); @@ -48,7 +48,7 @@ void emc2305_init(int chip_addr) u8 data; data = I2C_EMC2305_CMD; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) if (i2c_write(chip_addr, I2C_EMC2305_CONF, 1, &data, 1) != 0) printf("Error: failed to configure EMC2305\n"); #else diff --git a/board/freescale/common/i2c_common.c b/board/freescale/common/i2c_common.c index 119ed3c6171..758a98a9d30 100644 --- a/board/freescale/common/i2c_common.c +++ b/board/freescale/common/i2c_common.c @@ -9,7 +9,7 @@ #include #include "i2c_common.h" -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) /* If DM is in use, retrieve the chip for the specified bus number */ int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev) diff --git a/board/freescale/common/i2c_common.h b/board/freescale/common/i2c_common.h index 77a7b6aedd7..b2600a9ff73 100644 --- a/board/freescale/common/i2c_common.h +++ b/board/freescale/common/i2c_common.h @@ -9,7 +9,7 @@ #define __NXP_I2C_COMMON_H__ /* Common functionality shared by the I2C drivers for VID and the mux. */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) #define DEVICE_HANDLE_T struct udevice * #define I2C_READ(dev, register, data, length) \ diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c index da2c1de078b..f54c03a32f0 100644 --- a/board/freescale/common/qixis.c +++ b/board/freescale/common/qixis.c @@ -32,7 +32,7 @@ #ifdef CFG_SYS_I2C_FPGA_ADDR u8 qixis_read_i2c(unsigned int reg) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_reg_read(CFG_SYS_I2C_FPGA_ADDR, reg); #else struct udevice *dev; @@ -47,7 +47,7 @@ u8 qixis_read_i2c(unsigned int reg) void qixis_write_i2c(unsigned int reg, u8 value) { u8 val = value; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_reg_write(CFG_SYS_I2C_FPGA_ADDR, reg, val); #else struct udevice *dev; diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 431f8caeb03..0a7f661b14b 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -152,7 +152,7 @@ static int read_eeprom(void) { int ret; #ifdef CONFIG_SYS_EEPROM_BUS_NUM -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) unsigned int bus; #endif #endif @@ -161,13 +161,13 @@ static int read_eeprom(void) return 0; #ifdef CONFIG_SYS_EEPROM_BUS_NUM -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) bus = i2c_get_bus_num(); i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM); #endif #endif -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (void *)&e, sizeof(e)); @@ -186,7 +186,7 @@ static int read_eeprom(void) #endif #ifdef CONFIG_SYS_EEPROM_BUS_NUM -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_set_bus_num(bus); #endif #endif @@ -223,7 +223,7 @@ static int prog_eeprom(void) int i; void *p; #ifdef CONFIG_SYS_EEPROM_BUS_NUM -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) unsigned int bus; #endif #endif @@ -237,7 +237,7 @@ static int prog_eeprom(void) #endif update_crc(); -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) #ifdef CONFIG_SYS_EEPROM_BUS_NUM bus = i2c_get_bus_num(); i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM); @@ -250,7 +250,7 @@ static int prog_eeprom(void) * complete a given write. */ for (i = 0, p = &e; i < sizeof(e); i += 8, p += 8) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, i, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, p, min((int)(sizeof(e) - i), 8)); @@ -279,7 +279,7 @@ static int prog_eeprom(void) /* Verify the write by reading back the EEPROM and comparing */ struct eeprom e2; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (void *)&e2, sizeof(e2)); @@ -302,7 +302,7 @@ static int prog_eeprom(void) ret = -1; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) #ifdef CONFIG_SYS_EEPROM_BUS_NUM i2c_set_bus_num(bus); #endif @@ -594,7 +594,7 @@ unsigned int get_cpu_board_revision(void) u8 minor; /* 0x05 Board revision, minor */ } be; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (void *)&be, sizeof(be)); #else diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index 380abecd746..08bf99c8af1 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -60,7 +60,7 @@ void spl_board_init(void) printf("Failed to find clock node. Check device tree\n"); } -#if CONFIG_IS_ENABLED(DM_PMIC_PCA9450) +#if IS_ENABLED(CONFIG_DM_PMIC_PCA9450) int power_init_board(void) { struct udevice *dev; diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c index ce211d486ab..2ad4a6646e9 100644 --- a/board/freescale/imx8mp_evk/imx8mp_evk.c +++ b/board/freescale/imx8mp_evk/imx8mp_evk.c @@ -42,7 +42,7 @@ static int setup_eqos(void) return set_clk_eqos(ENET_125MHZ); } -#if CONFIG_IS_ENABLED(NET) +#if IS_ENABLED(CONFIG_NET) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index f1b285417d0..f5ee5b47e2b 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -67,7 +67,7 @@ struct i2c_pads_info i2c_pad_info1 = { }, }; -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index bea9ddc9960..718d825e44e 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis) return 0; } -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 682099ad9cf..ae4a6322170 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -53,7 +53,7 @@ int board_early_init_f(void) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static void board_gpio_init(void) { /* TODO */ diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 21cfa142f3b..75615c4f0f5 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -59,7 +59,7 @@ int board_early_init_f(void) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static void board_gpio_init(void) { struct gpio_desc desc; diff --git a/board/freescale/imx8ulp_evk/imx8ulp_evk.c b/board/freescale/imx8ulp_evk/imx8ulp_evk.c index 5aad1074a86..ee65a8070a7 100644 --- a/board/freescale/imx8ulp_evk/imx8ulp_evk.c +++ b/board/freescale/imx8ulp_evk/imx8ulp_evk.c @@ -127,7 +127,7 @@ int board_early_init_f(void) int board_late_init(void) { -#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) +#if IS_ENABLED(CONFIG_ENV_IS_IN_MMC) board_late_mmc_env_init(); #endif return 0; diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index 38cfbac6ea6..7f406f54bdf 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -50,7 +50,7 @@ void spl_dram_init(void) ddr_init(&dram_timing); } -#if CONFIG_IS_ENABLED(DM_PMIC_PCA9450) +#if IS_ENABLED(CONFIG_DM_PMIC_PCA9450) int power_init_board(void) { struct udevice *dev; diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c index 194b5d27295..b34ad6aa170 100644 --- a/board/freescale/ls1012aqds/ls1012aqds.c +++ b/board/freescale/ls1012aqds/ls1012aqds.c @@ -113,7 +113,7 @@ int misc_init_r(void) u8 mux_sdhc_cd = 0x80; int bus_num = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c index 5c661274987..5ba7ef6daa3 100644 --- a/board/freescale/ls1012ardb/eth.c +++ b/board/freescale/ls1012ardb/eth.c @@ -29,7 +29,7 @@ static inline void ls1012ardb_reset_phy(void) { #ifdef CONFIG_TARGET_LS1012ARDB /* Through reset IO expander reset both RGMII and SGMII PHYs */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 62c935e4d3e..a661e8ff6ee 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -44,7 +44,7 @@ int checkboard(void) puts("Board: LS1012ARDB "); /* Initialize i2c early for Serial flash bank information */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR, @@ -195,7 +195,7 @@ int esdhc_status_fixup(void *blob, const char *compat) u8 io = 0; int ret, bus_num = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR, @@ -234,7 +234,7 @@ int esdhc_status_fixup(void *blob, const char *compat) * 10 - eMMC Memory * 11 - SPI */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, I2C_MUX_IO_0, &io, 1); #else ret = i2c_read(I2C_MUX_IO_ADDR, I2C_MUX_IO_0, 1, &io, 1); @@ -273,7 +273,7 @@ static int switch_to_bank1(void) u8 data = 0xf4, chip_addr = 0x24, offset_addr = 0x03; int ret, bus_num = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(bus_num, chip_addr, @@ -338,7 +338,7 @@ static int switch_to_bank2(void) u8 chip_addr = 0x24; int ret, i, bus_num = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(bus_num, chip_addr, @@ -361,7 +361,7 @@ static int switch_to_bank2(void) * CS routed to SPI memory bank2 */ for (i = 0; i < sizeof(data); i++) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_write(dev, offset_addr[i], &data[i], 1); #else /* Non DM I2C support - will be removed */ ret = i2c_write(chip_addr, offset_addr[i], 1, &data[i], 1); diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index 4f5834347db..f74aeaf5771 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -457,7 +457,7 @@ void ls1twr_program_regulator(void) #define MC34VR500_ADDR 0x8 #define MC34VR500_DEVICEID 0x4 #define MC34VR500_DEVICEID_MASK 0x0f -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c index faecb609924..2a33fbc327d 100644 --- a/board/freescale/ls1028a/ls1028a.c +++ b/board/freescale/ls1028a/ls1028a.c @@ -85,7 +85,7 @@ int board_init(void) #if defined(CONFIG_TARGET_LS1028ARDB) u8 val = I2C_MUX_CH_DEFAULT; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_MUX_PCA_ADDR_PRI, 0x0b, 1, &val, 1); #else struct udevice *dev; diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c index 841d8b59bb4..f2f0db74923 100644 --- a/board/freescale/ls1043aqds/ls1043aqds.c +++ b/board/freescale/ls1043aqds/ls1043aqds.c @@ -310,7 +310,7 @@ void board_retimer_init(void) /* Retimer is connected to I2C1_CH7_CH5 */ select_i2c_ch_pca9547(I2C_MUX_CH7, bus_num); reg = I2C_MUX_CH5; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index 8fe643f70b9..844361097a0 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -114,12 +114,12 @@ static void sgmii_configure_repeater(int dpmac) {0x18, NULL}, {0x23, ®_val[3]}, {0x2d, ®_val[4]}, {4, ®_val[5]}, }; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *udev; #endif /* Set I2c to Slot 1 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(0x77, 0, 0, &a, 1); #else ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev); @@ -173,7 +173,7 @@ static void sgmii_configure_repeater(int dpmac) return; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev); #endif @@ -184,7 +184,7 @@ static void sgmii_configure_repeater(int dpmac) reg_pair[5].val = &ch_b_eq[i]; reg_pair[6].val = &ch_b_ctl2[j]; for (k = 0; k < 10; k++) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(i2c_phy_addr, reg_pair[k].addr, 1, reg_pair[k].val, 1); @@ -257,12 +257,12 @@ static void qsgmii_configure_repeater(int dpmac) const char *dev = mdio_names[EMI1_SLOT1]; int ret = 0; unsigned short value; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *udev; #endif /* Set I2c to Slot 1 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(0x77, 0, 0, &a, 1); #else ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev); @@ -304,7 +304,7 @@ static void qsgmii_configure_repeater(int dpmac) return; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev); #endif @@ -316,7 +316,7 @@ static void qsgmii_configure_repeater(int dpmac) reg_pair[6].val = &ch_b_ctl2[j]; for (k = 0; k < 10; k++) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(i2c_phy_addr, reg_pair[k].addr, 1, reg_pair[k].val, 1); diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 0d3f22ce2bb..a3299e11361 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -431,7 +431,7 @@ void board_retimer_init(void) /* Access to Control/Shared register */ reg = 0x0; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1); #else struct udevice *dev; @@ -441,7 +441,7 @@ void board_retimer_init(void) #endif /* Read device revision and ID */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR, 1, 1, ®, 1); #else dm_i2c_read(dev, 1, ®, 1); @@ -450,20 +450,20 @@ void board_retimer_init(void) /* Enable Broadcast. All writes target all channel register sets */ reg = 0x0c; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1); #else dm_i2c_write(dev, 0xff, ®, 1); #endif /* Reset Channel Registers */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR, 0, 1, ®, 1); #else dm_i2c_read(dev, 0, ®, 1); #endif reg |= 0x4; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0, 1, ®, 1); #else dm_i2c_write(dev, 0, ®, 1); @@ -471,45 +471,45 @@ void board_retimer_init(void) /* Set data rate as 10.3125 Gbps */ reg = 0x90; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x60, 1, ®, 1); #else dm_i2c_write(dev, 0x60, ®, 1); #endif reg = 0xb3; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x61, 1, ®, 1); #else dm_i2c_write(dev, 0x61, ®, 1); #endif reg = 0x90; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x62, 1, ®, 1); #else dm_i2c_write(dev, 0x62, ®, 1); #endif reg = 0xb3; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x63, 1, ®, 1); #else dm_i2c_write(dev, 0x63, ®, 1); #endif reg = 0xcd; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x64, 1, ®, 1); #else dm_i2c_write(dev, 0x64, ®, 1); #endif /* Select VCO Divider to full rate (000) */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1); #else dm_i2c_read(dev, 0x2F, ®, 1); #endif reg &= 0x0f; reg |= 0x70; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1); #else dm_i2c_write(dev, 0x2F, ®, 1); @@ -521,7 +521,7 @@ void board_retimer_init(void) /* Access to Control/Shared register */ reg = 0x0; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1); #else i2c_get_chip_for_busnum(0, I2C_RETIMER_ADDR2, 1, &dev); @@ -529,7 +529,7 @@ void board_retimer_init(void) #endif /* Read device revision and ID */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 1, 1, ®, 1); #else dm_i2c_read(dev, 1, ®, 1); @@ -538,20 +538,20 @@ void board_retimer_init(void) /* Enable Broadcast. All writes target all channel register sets */ reg = 0x0c; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1); #else dm_i2c_write(dev, 0xff, ®, 1); #endif /* Reset Channel Registers */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 0, 1, ®, 1); #else dm_i2c_read(dev, 0, ®, 1); #endif reg |= 0x4; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0, 1, ®, 1); #else dm_i2c_write(dev, 0, ®, 1); @@ -559,45 +559,45 @@ void board_retimer_init(void) /* Set data rate as 10.3125 Gbps */ reg = 0x90; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x60, 1, ®, 1); #else dm_i2c_write(dev, 0x60, ®, 1); #endif reg = 0xb3; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x61, 1, ®, 1); #else dm_i2c_write(dev, 0x61, ®, 1); #endif reg = 0x90; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x62, 1, ®, 1); #else dm_i2c_write(dev, 0x62, ®, 1); #endif reg = 0xb3; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x63, 1, ®, 1); #else dm_i2c_write(dev, 0x63, ®, 1); #endif reg = 0xcd; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x64, 1, ®, 1); #else dm_i2c_write(dev, 0x64, ®, 1); #endif /* Select VCO Divider to full rate (000) */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_read(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1); #else dm_i2c_read(dev, 0x2F, ®, 1); #endif reg &= 0x0f; reg |= 0x70; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_write(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1); #else dm_i2c_write(dev, 0x2F, ®, 1); @@ -665,7 +665,7 @@ int get_serdes_volt(void) u8 chan = PWM_CHANNEL0; /* Select the PAGE 0 using PMBus commands PAGE for VDD */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_PAGE, 1, &chan, 1); #else @@ -683,7 +683,7 @@ int get_serdes_volt(void) } /* Read the output voltage using PMBus command READ_VOUT */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_read(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2); #else @@ -704,7 +704,7 @@ int set_serdes_volt(int svdd) svdd & 0xFF, (svdd & 0xFF00) >> 8}; /* Write the desired voltage code to the SVDD regulator */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(I2C_SVDD_MONITOR_ADDR, PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5); #else @@ -745,7 +745,7 @@ int set_serdes_volt(int svdd) printf("SVDD changing of RDB\n"); /* Read the BRDCFG54 via CLPD */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_read(CFG_SYS_I2C_FPGA_ADDR, QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1); #else @@ -765,7 +765,7 @@ int set_serdes_volt(int svdd) brdcfg4 = brdcfg4 | 0x08; /* Write to the BRDCFG4 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(CFG_SYS_I2C_FPGA_ADDR, QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1); #else diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c index 6da6e5c8415..6fd7fe01678 100644 --- a/board/freescale/ls2080aqds/eth.c +++ b/board/freescale/ls2080aqds/eth.c @@ -125,12 +125,12 @@ static void sgmii_configure_repeater(int serdes_port) }; int *riser_phy_addr = &xqsgii_riser_phy_addr[0]; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *udev; #endif /* Set I2c to Slot 1 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(0x77, 0, 0, &a, 1); #else ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev); @@ -151,7 +151,7 @@ static void sgmii_configure_repeater(int serdes_port) mii_bus = 1; dpmac_id = dpmac + 9; a = 0xb; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(0x76, 0, 0, &a, 1); #else ret = i2c_get_chip_for_busnum(0, 0x76, 1, &udev); @@ -198,7 +198,7 @@ static void sgmii_configure_repeater(int serdes_port) reg_pair[6].val = &ch_b_ctl2[j]; for (k = 0; k < 10; k++) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(i2c_addr[dpmac], reg_pair[k].addr, 1, reg_pair[k].val, 1); @@ -277,12 +277,12 @@ static void qsgmii_configure_repeater(int dpmac) const char *dev = "LS2080A_QDS_MDIO0"; int ret = 0; unsigned short value; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *udev; #endif /* Set I2c to Slot 1 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(0x77, 0, 0, &a, 1); #else ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev); @@ -347,7 +347,7 @@ static void qsgmii_configure_repeater(int dpmac) reg_pair[6].val = &ch_b_ctl2[j]; for (k = 0; k < 10; k++) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(i2c_phy_addr, reg_pair[k].addr, 1, reg_pair[k].val, 1); diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index 91db618227d..6eae758ce44 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -216,7 +216,7 @@ int board_init(void) select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0); #ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) rtc_enable_32khz_output(0, CFG_SYS_I2C_RTC_ADDR); #else rtc_enable_32khz_output(); diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 97884a39796..6abfe507419 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -176,7 +176,7 @@ int board_early_init_f(void) } #ifdef CONFIG_FSL_ESDHC -#if !(CONFIG_IS_ENABLED(DM_MMC) || CONFIG_IS_ENABLED(DM_USB)) +#if !(IS_ENABLED(CONFIG_DM_MMC) || IS_ENABLED(CONFIG_DM_USB)) int board_mmc_init(struct bd_info *bd) { struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR; diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index c6ad33018fb..ed50cb87d91 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -134,7 +134,7 @@ int config_board_mux(int ctrl_type) ccsr_gur_t __iomem *gur = (void *)(CFG_SYS_MPC85XX_GUTS_ADDR); u8 tmp; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; #if defined(CONFIG_TARGET_P1010RDB_PA) @@ -370,7 +370,7 @@ int i2c_pca9557_read(int type) u8 val; int bus_num = I2C_PCA9557_BUS_NUM; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; @@ -412,7 +412,7 @@ int checkboard(void) printf("Board: %sRDB-PA, ", cpu->name); #elif defined(CONFIG_TARGET_P1010RDB_PB) printf("Board: %sRDB-PB, ", cpu->name); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; @@ -455,7 +455,7 @@ int checkboard(void) case 0xe: puts("SDHC\n"); val = 0x60; /* set pca9557 pin input/output */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) dm_i2c_write(dev, 3, &val, 1); #else i2c_write(I2C_PCA9557_ADDR2, 3, 1, &val, 1); diff --git a/board/freescale/p1010rdb/tlb.c b/board/freescale/p1010rdb/tlb.c index 265cde81a3c..e967ff6b741 100644 --- a/board/freescale/p1010rdb/tlb.c +++ b/board/freescale/p1010rdb/tlb.c @@ -72,7 +72,7 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 7, BOOKE_PAGESZ_1M, 1), -#if defined(CONFIG_SYS_RAMBOOT) || !CONFIG_IS_ENABLED(COMMON_INIT_DDR) +#if defined(CONFIG_SYS_RAMBOOT) || !IS_ENABLED(CONFIG_COMMON_INIT_DDR) SET_TLB_ENTRY(1, CFG_SYS_DDR_SDRAM_BASE, CFG_SYS_DDR_SDRAM_BASE, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M, 0, 8, BOOKE_PAGESZ_1G, 1), diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index c3bd2837aa2..a85ff1e7b41 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -242,7 +242,7 @@ int checkboard(void) in_8(&cpld_data->pcba_rev) & 0x0F); /* Initialize i2c early for rom_loc and flash bank information */ - #if CONFIG_IS_ENABLED(DM_I2C) + #if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index e107ddefb0f..940cf6d7e4d 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -109,7 +109,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #endif #endif -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) i2c_init_all(); #else i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); diff --git a/board/freescale/p1_p2_rdb_pc/tlb.c b/board/freescale/p1_p2_rdb_pc/tlb.c index 94773969e9d..fc758e9d224 100644 --- a/board/freescale/p1_p2_rdb_pc/tlb.c +++ b/board/freescale/p1_p2_rdb_pc/tlb.c @@ -74,7 +74,7 @@ struct fsl_e_tlb_entry tlb_table[] = { 0, 7, BOOKE_PAGESZ_1M, 1), #endif -#if defined(CONFIG_SYS_RAMBOOT) || !CONFIG_IS_ENABLED(COMMON_INIT_DDR) +#if defined(CONFIG_SYS_RAMBOOT) || !IS_ENABLED(CONFIG_COMMON_INIT_DDR) /* **M** - 1G DDR for eSDHC/eSPI/NAND boot */ SET_TLB_ENTRY(1, CFG_SYS_DDR_SDRAM_BASE, CFG_SYS_DDR_SDRAM_BASE, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_M, diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 2303aa8fb93..e75b608e10e 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -249,7 +249,7 @@ static u32 t1023rdb_ctrl(u32 ctrl_type) u8 tmp; int bus_num = I2C_PCA6408_BUS_NUM; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/board/friendlyarm/nanopi2/lcds.c b/board/friendlyarm/nanopi2/lcds.c index 7303e53af92..05d097b00ec 100644 --- a/board/friendlyarm/nanopi2/lcds.c +++ b/board/friendlyarm/nanopi2/lcds.c @@ -689,7 +689,7 @@ int bd_get_lcd_density(void) return bd_lcd_config[lcd_idx].dpi; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int bd_fixup_lcd_fdt(void *blob, struct nxp_lcd *lcd) { return 0; diff --git a/board/friendlyarm/nanopi2/onewire.c b/board/friendlyarm/nanopi2/onewire.c index 56f0f2dfceb..dc841f36fed 100644 --- a/board/friendlyarm/nanopi2/onewire.c +++ b/board/friendlyarm/nanopi2/onewire.c @@ -35,7 +35,7 @@ static int bus_type = -1; static int lcd_id = -1; static unsigned short lcd_fwrev; static int current_brightness = -1; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static struct udevice *i2c_dev; #endif @@ -182,7 +182,7 @@ static int onewire_i2c_do_request(unsigned char req, unsigned char *buf) tx[0] = req; tx[1] = crc8_ow(req << 24, 8); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) if (dm_i2c_write(i2c_dev, 0, tx, 2)) return -EIO; @@ -214,7 +214,7 @@ static void onewire_i2c_init(void) unsigned char buf[4]; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_chip_for_busnum(ONEWIRE_I2C_BUS, ONEWIRE_I2C_ADDR, 0, &i2c_dev); #else diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c index e622a9ba9e4..6bb8d9ecb23 100644 --- a/board/gateworks/gw_ventana/eeprom.c +++ b/board/gateworks/gw_ventana/eeprom.c @@ -24,7 +24,7 @@ struct ventana_board_info ventana_info; int board_type; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *i2c_get_dev(int busno, int slave) { struct udevice *dev, *bus; @@ -53,7 +53,7 @@ int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) int retry = 3; int n = 0; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; dev = i2c_get_dev(BOARD_EEPROM_BUSNO, chip); @@ -69,7 +69,7 @@ int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) #endif while (n++ < retry) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, addr, buf, len); #else ret = i2c_read(chip, addr, alen, buf, len); @@ -90,7 +90,7 @@ int gsc_i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) int retry = 3; int n = 0; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; dev = i2c_get_dev(BOARD_EEPROM_BUSNO, chip); @@ -104,7 +104,7 @@ int gsc_i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) #endif while (n++ < retry) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_write(dev, addr, buf, len); #else ret = i2c_write(chip, addr, alen, buf, len); diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c index 9e23f5cd31e..10ccdd7f151 100644 --- a/board/google/chromebook_coral/coral.c +++ b/board/google/chromebook_coral/coral.c @@ -37,7 +37,7 @@ static int coral_check_ll_boot(void *ctx, struct event *event) { if (!ll_boot_init()) { printf("Running as secondary loader"); - if (CONFIG_IS_ENABLED(COREBOOT_SYSINFO) && + if (IS_ENABLED(CONFIG_COREBOOT_SYSINFO) && gd->arch.coreboot_table) { int ret; @@ -303,7 +303,7 @@ struct sysinfo_ops coral_sysinfo_ops = { .get_str = coral_get_str, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id coral_ids[] = { { .compatible = "google,coral" }, { } diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c index 32dbcdc4d10..73d76e879cb 100644 --- a/board/google/veyron/veyron.c +++ b/board/google/veyron/veyron.c @@ -21,7 +21,7 @@ * 'voltage-table' property. */ #ifndef CONFIG_SPL_BUILD -#if !CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) +#if !IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM) static int veyron_init(void) { struct udevice *dev; @@ -77,7 +77,7 @@ int board_early_init_r(void) struct udevice *dev; int ret; -#if !CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) +#if !IS_ENABLED(CONFIG_ROCKCHIP_BACK_TO_BROM) if (!fdt_node_check_compatible(gd->fdt_blob, 0, "google,veyron")) { ret = veyron_init(); if (ret) diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index b472ca5b94a..d71c8508636 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR; static __maybe_unused struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static struct module_pin_mux uart0_pin_mux[] = { {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */ {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */ @@ -84,7 +84,7 @@ void am33xx_spl_board_init(void) { chilisom_spl_board_init(); } -#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ +#endif /* IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) */ /* * Basic board specific setup. Pinmux has been handled already. diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index c9a2d60ee56..4ae224eba6a 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -76,7 +76,7 @@ U_BOOT_DRVINFOS(hi6220_gpios) = { DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct pl01x_serial_plat serial_plat = { #if CONFIG_CONS_INDEX == 1 diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c index f41fabbad09..73afae26e07 100644 --- a/board/hisilicon/hikey960/hikey960.c +++ b/board/hisilicon/hikey960/hikey960.c @@ -24,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) #include static const struct pl01x_serial_plat serial_plat = { diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index b89e7e86976..b53be6e9e5a 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -40,7 +40,7 @@ static struct mm_region poplar_mem_map[] = { struct mm_region *mem_map = poplar_mem_map; -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct pl01x_serial_plat serial_plat = { .base = REG_BASE_UART0, .type = TYPE_PL010, diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index 7c3a695cb25..eb460c3077f 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -155,7 +155,7 @@ int board_late_init(void) return ret; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) #define GPIO_DR 0x0 #define GPIO_GDIR 0x4 #define GPIO_ALT1 0x1 diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index 67db0c50f47..7ab16cd4cde 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -342,7 +342,7 @@ static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset) int ivm_read_eeprom(unsigned char *buf, int len, int mac_address_offset) { int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *eedev = NULL; ret = i2c_get_chip_for_busnum(CONFIG_KM_IVM_BUS, diff --git a/board/kontron/pitx_imx8m/spl.c b/board/kontron/pitx_imx8m/spl.c index f6fd17048d0..be60e96f046 100644 --- a/board/kontron/pitx_imx8m/spl.c +++ b/board/kontron/pitx_imx8m/spl.c @@ -68,7 +68,7 @@ static struct i2c_pads_info i2c_pad_info1 = { }, }; -#if CONFIG_IS_ENABLED(MMC) +#if IS_ENABLED(CONFIG_MMC) #define USDHC2_CD_GPIO IMX_GPIO_NR(2, 12) #define USDHC1_PWR_GPIO IMX_GPIO_NR(2, 10) #define USDHC2_PWR_GPIO IMX_GPIO_NR(2, 19) @@ -181,7 +181,7 @@ const char *spl_board_loader_name(u32 boot_device) } #endif -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 static int pfuze_mode_init(struct pmic *p, u32 mode) @@ -288,7 +288,7 @@ void board_init_f(ulong dummy) setup_i2c(0, 100000, 0x7f, &i2c_pad_info1); -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) power_init_board(); #endif diff --git a/board/kontron/sl-mx6ul/sl-mx6ul.c b/board/kontron/sl-mx6ul/sl-mx6ul.c index 0f45ea84fc7..bfa22aae5e7 100644 --- a/board/kontron/sl-mx6ul/sl-mx6ul.c +++ b/board/kontron/sl-mx6ul/sl-mx6ul.c @@ -91,9 +91,9 @@ enum env_location env_get_location(enum env_operation op, int prio) if (prio) return ENVL_UNKNOWN; - if (sl_mx6ul_is_spi_nor_boot() && CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + if (sl_mx6ul_is_spi_nor_boot() && IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_SPI_FLASH; - else if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) + else if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC)) return ENVL_MMC; return ENVL_NOWHERE; diff --git a/board/kontron/sl-mx8mm/sl-mx8mm.c b/board/kontron/sl-mx8mm/sl-mx8mm.c index 250195694ba..54ed8ec3ba6 100644 --- a/board/kontron/sl-mx8mm/sl-mx8mm.c +++ b/board/kontron/sl-mx8mm/sl-mx8mm.c @@ -146,11 +146,11 @@ enum env_location env_get_location(enum env_operation op, int prio) * Make sure that the environment is loaded from * the MMC if we are running from SD card or eMMC. */ - if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC) && + if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC) && (boot_dev == SD1_BOOT || boot_dev == SD2_BOOT)) return ENVL_MMC; - if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_SPI_FLASH; return ENVL_NOWHERE; diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c index 89948e087f1..9954b47487b 100644 --- a/board/kontron/sl28/sl28.c +++ b/board/kontron/sl28/sl28.c @@ -69,7 +69,7 @@ enum env_location env_get_location(enum env_operation op, int prio) if (prio) return ENVL_UNKNOWN; - if (!CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + if (!IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_NOWHERE; /* write and erase always operate on the environment */ diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c index b3c176dd59a..b8a2a2c1790 100644 --- a/board/l+g/vinco/vinco.c +++ b/board/l+g/vinco/vinco.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; /* FIXME gpio code here need to handle through DM_GPIO */ -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs == 0; @@ -166,7 +166,7 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100; -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) vinco_spi0_hw_init(); #endif diff --git a/board/mediatek/mt8183/mt8183_pumpkin.c b/board/mediatek/mt8183/mt8183_pumpkin.c index db613ebdc4f..4ffc5538dba 100644 --- a/board/mediatek/mt8183/mt8183_pumpkin.c +++ b/board/mediatek/mt8183/mt8183_pumpkin.c @@ -13,7 +13,7 @@ int board_init(void) struct udevice *dev; int ret; - if (CONFIG_IS_ENABLED(USB_GADGET)) { + if (IS_ENABLED(CONFIG_USB_GADGET)) { ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev); if (ret) { pr_err("%s: Cannot find USB device\n", __func__); @@ -21,7 +21,7 @@ int board_init(void) } } - if (CONFIG_IS_ENABLED(USB_ETHER)) + if (IS_ENABLED(CONFIG_USB_ETHER)) usb_ether_init(); return 0; diff --git a/board/mediatek/mt8516/mt8516_pumpkin.c b/board/mediatek/mt8516/mt8516_pumpkin.c index 42f3863b92c..d9827fe8ae7 100644 --- a/board/mediatek/mt8516/mt8516_pumpkin.c +++ b/board/mediatek/mt8516/mt8516_pumpkin.c @@ -17,7 +17,7 @@ int board_late_init(void) struct udevice *dev; int ret; - if (CONFIG_IS_ENABLED(USB_GADGET)) { + if (IS_ENABLED(CONFIG_USB_GADGET)) { ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &dev); if (ret) { pr_err("%s: Cannot find USB device\n", __func__); @@ -25,7 +25,7 @@ int board_late_init(void) } } - if (CONFIG_IS_ENABLED(USB_ETHER)) + if (IS_ENABLED(CONFIG_USB_ETHER)) usb_ether_init(); return 0; diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c index 82458c3af42..c1a3160b9e2 100644 --- a/board/qca/ap152/ap152.c +++ b/board/qca/ap152/ap152.c @@ -66,7 +66,7 @@ int board_early_init_f(void) void __iomem *rst_regs = map_physmem(AR71XX_RESET_BASE, AR71XX_RESET_SIZE, MAP_NOCACHE); -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) /* CPU:775, DDR:650, AHB:258 */ qca956x_pll_init(); qca956x_ddr_init(); diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 71efeaf3131..511beedf0df 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; int board_early_init_f(void) { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) /* DVFS for reset */ mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926); #endif diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index c27eb3f17d9..425f8b68f5a 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -37,7 +37,7 @@ DECLARE_GLOBAL_DATA_PTR; int board_early_init_f(void) { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) /* DVFS for reset */ mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926); #endif @@ -75,7 +75,7 @@ int board_init(void) void reset_cpu(void) { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) i2c_reg_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x20, 0x80); #else /* only CA57 ? */ diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c index 1477750f921..1a216f30a4e 100644 --- a/board/renesas/ulcb/ulcb.c +++ b/board/renesas/ulcb/ulcb.c @@ -35,7 +35,7 @@ DECLARE_GLOBAL_DATA_PTR; int board_early_init_f(void) { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) && defined(CONFIG_SYS_I2C_SH) /* DVFS for reset */ mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, DVFS_MSTP926); #endif diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index c99ffdd75e8..099c99fd5f6 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -47,13 +47,13 @@ out: #if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) static bool board_is_rockpi_4b(void) { - return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) && + return IS_ENABLED(CONFIG_TARGET_EVB_RK3399) && of_machine_is_compatible("radxa,rockpi4b"); } static bool board_is_rockpi_4c(void) { - return CONFIG_IS_ENABLED(TARGET_EVB_RK3399) && + return IS_ENABLED(CONFIG_TARGET_EVB_RK3399) && of_machine_is_compatible("radxa,rockpi4c"); } diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 16ce5cb8925..07ec059437b 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -180,7 +180,7 @@ int board_early_init_f(void) } #endif -#if CONFIG_IS_ENABLED(POWER_LEGACY) || CONFIG_IS_ENABLED(DM_PMIC) +#if IS_ENABLED(CONFIG_POWER_LEGACY) || IS_ENABLED(CONFIG_DM_PMIC) int power_init_board(void) { set_ps_hold_ctrl(); diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 1608d60dd8d..04e7a053c7b 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -51,7 +51,7 @@ int exynos_init(void) return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ static void trats_low_power_mode(void) { struct exynos4_clock *clk = @@ -113,7 +113,7 @@ static void trats_low_power_mode(void) int exynos_power_init(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ int chrg, ret; struct power_battery *pb; struct pmic *p_fg, *p_chrg, *p_muic, *p_bat; @@ -292,7 +292,7 @@ int board_usb_init(int index, enum usb_init_type init) int g_dnl_board_usb_cable_connected(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ struct pmic *muic = pmic_get("MAX8997_MUIC"); if (!muic) return 0; @@ -404,7 +404,7 @@ int exynos_early_init_f(void) int lcd_power(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ int ret = 0; struct pmic *p = pmic_get("MAX8997_PMIC"); if (!p) @@ -428,7 +428,7 @@ int lcd_power(void) int mipi_power(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ int ret = 0; struct pmic *p = pmic_get("MAX8997_PMIC"); if (!p) diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c index 93c9714d33f..384ed44eecf 100644 --- a/board/samsung/trats2/trats2.c +++ b/board/samsung/trats2/trats2.c @@ -130,7 +130,7 @@ int exynos_init(void) int exynos_power_init(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ int chrg; struct power_battery *pb; struct pmic *p_chrg, *p_muic, *p_fg, *p_bat; @@ -193,7 +193,7 @@ int exynos_power_init(void) #ifdef CONFIG_USB_GADGET static int s5pc210_phy_control(int on) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ int ret = 0; unsigned int val; struct pmic *p, *p_pmic, *p_muic; @@ -270,7 +270,7 @@ int board_usb_init(int index, enum usb_init_type init) int g_dnl_board_usb_cable_connected(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */ +#if !IS_ENABLED(CONFIG_DM_I2C) /* TODO(maintainer): Convert to driver model */ struct pmic *muic = pmic_get("MAX77693_MUIC"); if (!muic) return 0; diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 2e44bdf0df3..bd878e0b0e6 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -73,7 +73,7 @@ struct efi_capsule_update_info update_info = { u8 num_image_type_guids = ARRAY_SIZE(fw_images); #endif /* EFI_HAVE_CAPSULE_SUPPORT */ -#if !CONFIG_IS_ENABLED(OF_PLATDATA) +#if !IS_ENABLED(CONFIG_OF_PLATDATA) /* * Add a simple GPIO device (don't use with of-platdata as it interferes with * the auto-generated devices) diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index 8fa9197a6df..77d569f02d2 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -93,7 +93,7 @@ int board_init(void) gpmc_init(); -#if CONFIG_IS_ENABLED(NAND_CS_INIT) +#if IS_ENABLED(CONFIG_NAND_CS_INIT) board_nand_cs_init(); #endif diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index 4e36a6f3199..779791b5f53 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -14,7 +14,7 @@ #include #include #include -#if !CONFIG_IS_ENABLED(TARGET_GIEDI) && !CONFIG_IS_ENABLED(TARGET_DENEB) +#if !IS_ENABLED(CONFIG_TARGET_GIEDI) && !IS_ENABLED(CONFIG_TARGET_DENEB) #include #endif #include @@ -148,7 +148,7 @@ int factoryset_read_eeprom(int i2c_addr) int i, pages = 0, size = 0; unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH]; unsigned char *cp, *cp1; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus, *dev; int ret; #endif @@ -158,7 +158,7 @@ int factoryset_read_eeprom(int i2c_addr) factory_dat.usb_product_id = CONFIG_USB_GADGET_PRODUCT_NUM; #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = uclass_get_device_by_seq(UCLASS_I2C, EEPROM_I2C_BUS, &bus); if (ret) goto err; @@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr) */ debug("Read eeprom page :\n"); for (i = 0; i < pages; i++) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, (OFF_PG + i) * EEPR_PG_SZ, eeprom_buf + (i * EEPR_PG_SZ), EEPR_PG_SZ); if (ret) @@ -215,7 +215,7 @@ int factoryset_read_eeprom(int i2c_addr) } if (size % EEPR_PG_SZ) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, (OFF_PG + pages) * EEPR_PG_SZ, eeprom_buf + (pages * EEPR_PG_SZ), size % EEPR_PG_SZ); @@ -247,7 +247,7 @@ int factoryset_read_eeprom(int i2c_addr) cp1 += 3; } -#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB) +#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB) /* get mac address for WLAN */ ret = get_factory_record_val(cp, size, (uchar *)"WLAN1", (uchar *)"mac", buf, MAX_STRING_LENGTH); @@ -355,7 +355,7 @@ static int factoryset_mac_env_set(void) eth_env_set_enetaddr("ethaddr", mac_addr); -#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB) +#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB) eth_env_set_enetaddr("eth1addr", mac_addr); /* wlan mac */ diff --git a/board/siemens/common/factoryset.h b/board/siemens/common/factoryset.h index 8fa6c3b3d3b..0870aa6f712 100644 --- a/board/siemens/common/factoryset.h +++ b/board/siemens/common/factoryset.h @@ -11,7 +11,7 @@ struct factorysetcontainer { uchar mac[6]; -#if CONFIG_IS_ENABLED(TARGET_GIEDI) || CONFIG_IS_ENABLED(TARGET_DENEB) +#if IS_ENABLED(CONFIG_TARGET_GIEDI) || IS_ENABLED(CONFIG_TARGET_DENEB) uchar mac_wlan[6]; #endif int usb_vendor_id; diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index 8874659013f..19469229971 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -370,7 +370,7 @@ U_BOOT_CMD( #endif /* #if defined(CONFIG_DRIVER_TI_CPSW) */ #endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */ -#if CONFIG_IS_ENABLED(NAND_CS_INIT) +#if IS_ENABLED(CONFIG_NAND_CS_INIT) #define ETAMIN_NAND_GPMC_CONFIG1 0x00000800 #define ETAMIN_NAND_GPMC_CONFIG2 0x001e1e00 #define ETAMIN_NAND_GPMC_CONFIG3 0x001e1e00 diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 8f4b0eae495..2eef1e328f2 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -250,7 +250,7 @@ void spl_board_init(void) { } -#if CONFIG_IS_ENABLED(LED) && CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if IS_ENABLED(CONFIG_LED) && IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) /* * Indicate any error or (accidental?) entering of CLI via the red status LED. */ diff --git a/board/somlabs/visionsom-6ull/visionsom-6ull.c b/board/somlabs/visionsom-6ull/visionsom-6ull.c index 38d14f6bc26..0b5cfce85ba 100644 --- a/board/somlabs/visionsom-6ull/visionsom-6ull.c +++ b/board/somlabs/visionsom-6ull/visionsom-6ull.c @@ -104,7 +104,7 @@ int board_init(void) /* Address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); #endif diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c index 079ba15ddb1..ab3c6b8f236 100644 --- a/board/st/common/stm32mp_dfu.c +++ b/board/st/common/stm32mp_dfu.c @@ -115,7 +115,7 @@ void set_dfu_alt_info(char *interface, char *devstr) snprintf(buf, DFU_ALT_BUF_LEN, "ram 0=%s", CONFIG_DFU_ALT_RAM0); - if (CONFIG_IS_ENABLED(MMC)) { + if (IS_ENABLED(CONFIG_MMC)) { if (!uclass_get_device(UCLASS_MMC, 0, &dev)) board_get_alt_info_mmc(dev, buf); diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c index cd3a7dc51a2..d8b07b669e3 100644 --- a/board/st/stih410-b2260/board.c +++ b/board/st/stih410-b2260/board.c @@ -30,7 +30,7 @@ int dram_init_banksize(void) return 0; } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void enable_caches(void) { /* Enable D-cache. I-cache is already enabled in start.S */ diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c index 747ec7e445a..7c6d1a1716f 100644 --- a/board/st/stm32mp1/spl.c +++ b/board/st/stm32mp1/spl.c @@ -13,13 +13,13 @@ static u32 opp_voltage_mv __section(".data"); void board_vddcore_init(u32 voltage_mv) { - if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER)) + if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER)) opp_voltage_mv = voltage_mv; } int board_early_init_f(void) { - if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && CONFIG_IS_ENABLED(POWER)) + if (IS_ENABLED(CONFIG_PMIC_STPMIC1) && IS_ENABLED(CONFIG_POWER)) stpmic1_init(opp_voltage_mv); return 0; diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 5e89192ec03..0ffcca419f2 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -272,7 +272,7 @@ static int setup_led(enum led_state_t cmd) struct udevice *dev; int ret; - if (!CONFIG_IS_ENABLED(LED)) + if (!IS_ENABLED(CONFIG_LED)) return 0; ret = get_led(&dev, "u-boot,boot-led"); @@ -292,7 +292,7 @@ static void __maybe_unused led_error_blink(u32 nb_blink) if (!nb_blink) return; - if (CONFIG_IS_ENABLED(LED)) { + if (IS_ENABLED(CONFIG_LED)) { ret = get_led(&led, "u-boot,error-led"); if (!ret) { /* make u-boot,error-led blinking */ @@ -616,7 +616,7 @@ error: static bool board_is_stm32mp15x_dk2(void) { - if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15X) && + if (IS_ENABLED(CONFIG_TARGET_ST_STM32MP15X) && of_machine_is_compatible("st,stm32mp157c-dk2")) return true; @@ -625,7 +625,7 @@ static bool board_is_stm32mp15x_dk2(void) static bool board_is_stm32mp15x_ev1(void) { - if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15X) && + if (IS_ENABLED(CONFIG_TARGET_ST_STM32MP15X) && (of_machine_is_compatible("st,stm32mp157a-ev1") || of_machine_is_compatible("st,stm32mp157c-ev1") || of_machine_is_compatible("st,stm32mp157d-ev1") || @@ -822,9 +822,9 @@ enum env_location env_get_location(enum env_operation op, int prio) switch (bootmode & TAMP_BOOT_DEVICE_MASK) { case BOOT_FLASH_SD: case BOOT_FLASH_EMMC: - if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) + if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC)) return ENVL_MMC; - else if (CONFIG_IS_ENABLED(ENV_IS_IN_EXT4)) + else if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4)) return ENVL_EXT4; else return ENVL_NOWHERE; @@ -837,7 +837,7 @@ enum env_location env_get_location(enum env_operation op, int prio) return ENVL_NOWHERE; case BOOT_FLASH_NOR: - if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH)) return ENVL_SPI_FLASH; else return ENVL_NOWHERE; diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c index 57ca9f659c1..50ded2c76c2 100644 --- a/board/st/stv0991/stv0991.c +++ b/board/st/stv0991/stv0991.c @@ -37,7 +37,7 @@ U_BOOT_DRVINFO(stv09911_serials) = { }; #endif -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) void show_boot_progress(int progress) { printf("%i\n", progress); diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 827e545032e..b919908d6e8 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -247,7 +247,7 @@ int board_init(void) } } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) /* * Temporary workaround for enabling I2C clocks until proper sunxi DM * clk, reset and pinctrl drivers land. diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 4308c7e440a..1f83721625a 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -871,7 +871,7 @@ int board_prep_linux(struct bootm_headers *images) if (env_common.core_mask.val == ALL_CPU_MASK) return 0; - if (!CONFIG_IS_ENABLED(OF_LIBFDT) || !images->ft_len) { + if (!IS_ENABLED(CONFIG_OF_LIBFDT) || !images->ft_len) { pr_err("WARN: core_mask setup will work properly only with external DTB!\n"); return 0; } diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index 839a692ce85..1d612a059a8 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -40,7 +40,7 @@ DECLARE_GLOBAL_DATA_PTR; static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static const struct ddr_data ddr3_sl50_data = { .datardsratio0 = MT41K256M16HA125E_RD_DQS, diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 7db34abcb1e..9b5ed89f0cc 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -60,7 +60,7 @@ int dram_init(void) return 0; } -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 3 int power_init_board(void) { diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index ecb9fa02de5..ca7037a735b 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -96,7 +96,7 @@ struct serial_device *default_serial_console(void) } #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) static const struct ddr_data ddr2_data = { .datardsratio0 = MT47H128M16RT25E_RD_DQS, .datafwsratio0 = MT47H128M16RT25E_PHY_FIFO_WE, @@ -901,7 +901,7 @@ int board_late_init(void) #endif /* CPSW plat */ -#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_NET) && !IS_ENABLED(CONFIG_OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET, @@ -982,7 +982,7 @@ int board_fit_config_name_match(const char *name) } #endif -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct omap_hsmmc_plat am335x_mmc0_plat = { .base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE, .cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT, diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 87e552a4701..454cbb8988d 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -54,7 +54,7 @@ void do_board_detect(void) } #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) const struct dpll_params dpll_mpu[NUM_CRYSTAL_FREQ][NUM_OPPS] = { { /* 19.2 MHz */ @@ -681,7 +681,7 @@ int board_init(void) } #ifdef CONFIG_BOARD_LATE_INIT -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) static int device_okay(const char *path) { int node; @@ -708,7 +708,7 @@ int board_late_init(void) env_set("boot_fit", "1"); #endif -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) if (device_okay("/ocp/omap_dwc3@48380000")) enable_usb_clocks(0); if (device_okay("/ocp/omap_dwc3@483c0000")) @@ -722,7 +722,7 @@ int board_late_init(void) } #endif -#if !CONFIG_IS_ENABLED(DM_USB_GADGET) +#if !IS_ENABLED(CONFIG_DM_USB_GADGET) #ifdef CONFIG_USB_DWC3 static struct dwc3_device usb_otg_ss1 = { .maximum_speed = USB_SPEED_HIGH, @@ -825,7 +825,7 @@ int board_usb_cleanup(int index, enum usb_init_type init) return 0; } #endif /* defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_XHCI_OMAP) */ -#endif /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */ #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 9ea507a8e96..4d9f0882ff9 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -729,7 +729,7 @@ out: return; } -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) static int device_okay(const char *path) { int node; @@ -788,7 +788,7 @@ int board_late_init(void) board_ti_set_ethaddr(2); #endif -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) if (device_okay("/ocp/omap_dwc3_1@48880000")) enable_usb_clocks(0); if (device_okay("/ocp/omap_dwc3_2@488c0000")) @@ -1172,7 +1172,7 @@ int board_fit_config_name_match(const char *name) } #endif -#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +#if IS_ENABLED(CONFIG_FASTBOOT) && !IS_ENABLED(CONFIG_ENV_IS_NOWHERE) int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index c88139ac7ac..e282ad80ca0 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -69,7 +69,7 @@ int board_fit_config_name_match(const char *name) #endif #if defined(CONFIG_SPL_BUILD) -#if CONFIG_IS_ENABLED(USB_STORAGE) +#if IS_ENABLED(CONFIG_USB_STORAGE) static int fixup_usb_boot(const void *fdt_blob) { int ret = 0; @@ -142,7 +142,7 @@ void spl_perform_fixups(struct spl_image_info *spl_image) fixup_memory_node(spl_image); #endif -#if CONFIG_IS_ENABLED(USB_STORAGE) +#if IS_ENABLED(CONFIG_USB_STORAGE) fixup_usb_boot(spl_image->fdt_addr); #endif } diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 9a53884c98e..e3822a9b3d4 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -22,7 +22,7 @@ #include "board_detect.h" -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /** * ti_i2c_eeprom_init - Initialize an i2c bus and probe for a device * @i2c_bus: i2c bus number to initialize @@ -90,7 +90,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, uint8_t offset_test; bool one_byte_addressing = true; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; struct udevice *bus; diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index a8a216d034a..b5053734198 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -652,7 +652,7 @@ int dram_init_banksize(void) return 0; } -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) static int device_okay(const char *path) { int node; @@ -704,7 +704,7 @@ int board_late_init(void) if (board_is_dra71x_evm()) palmas_i2c_write_u8(LP873X_I2C_SLAVE_ADDR, 0x9, 0x7); #endif -#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM_USB) && IS_ENABLED(CONFIG_OF_CONTROL) if (device_okay("/ocp/omap_dwc3_1@48880000")) enable_usb_clocks(0); if (device_okay("/ocp/omap_dwc3_2@488c0000")) @@ -1049,7 +1049,7 @@ int board_fit_config_name_match(const char *name) } #endif -#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +#if IS_ENABLED(CONFIG_FASTBOOT) && !IS_ENABLED(CONFIG_ENV_IS_NOWHERE) int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index d4e672a7acd..7cf38ec3f78 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -104,7 +104,7 @@ int board_fit_config_name_match(const char *name) } #endif -#if CONFIG_IS_ENABLED(DM_GPIO) && CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_DM_GPIO) && IS_ENABLED(CONFIG_OF_LIBFDT) /* Returns 1, if onboard mux is set to hyperflash */ static void __maybe_unused detect_enable_hyperflash(void *blob) { diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 5229afad63b..2e9940d2184 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -259,7 +259,7 @@ int board_fit_config_name_match(const char *name) #if defined(CONFIG_DTB_RESELECT) static int k2g_alt_board_detect(void) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int rc; rc = i2c_set_bus_num(1); diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 408198843fd..efd1781c1fd 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -149,7 +149,7 @@ int board_early_init_f(void) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static void board_gpio_init(void) { /* TODO */ diff --git a/board/toradex/verdin-imx8mp/spl.c b/board/toradex/verdin-imx8mp/spl.c index 1838b464a0d..fc2a67f7f1e 100644 --- a/board/toradex/verdin-imx8mp/spl.c +++ b/board/toradex/verdin-imx8mp/spl.c @@ -82,7 +82,7 @@ struct i2c_pads_info i2c_pad_info1 = { }, }; -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) #define I2C_PMIC 0 int power_init_board(void) { diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c index f2de039b6b4..95e700fa925 100644 --- a/board/tplink/wdr4300/wdr4300.c +++ b/board/tplink/wdr4300/wdr4300.c @@ -71,7 +71,7 @@ int board_early_init_f(void) wdr4300_pinmux_config(); #endif -#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) +#if !IS_ENABLED(CONFIG_SKIP_LOWLEVEL_INIT) ar934x_pll_init(560, 480, 240); ar934x_ddr_init(560, 480, 240); #endif diff --git a/board/tq/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c index 1c2228c77ad..3b1185a3ce3 100644 --- a/board/tq/tqma6/tqma6.c +++ b/board/tq/tqma6/tqma6.c @@ -171,7 +171,7 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs) #endif #endif -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) static struct i2c_pads_info tqma6_i2c3_pads = { /* I2C3: on board LM75, M24C64, */ .scl = { @@ -216,7 +216,7 @@ int board_init(void) #ifndef CONFIG_DM_SPI tqma6_iomuxc_spi(); #endif -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) tqma6_setup_i2c(); #endif @@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void) }; } -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) /* setup board specific PMIC */ int power_init_board(void) { diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 5e40583ab43..681d0a4b227 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -100,7 +100,7 @@ static struct i2c_pads_info i2c_pad_info1 = { }; #endif -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) int power_init_board(void) { struct pmic *p; diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index da995dd0f58..03703a895ea 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -54,7 +54,7 @@ DECLARE_GLOBAL_DATA_PTR; #define REV_DETECTION IMX_GPIO_NR(2, 28) /* Speed defined in Kconfig is only applicable when not using DM_I2C. */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) #define I2C1_SPEED_NON_DM 0 #define I2C2_SPEED_NON_DM 0 #else @@ -259,7 +259,7 @@ static void do_enable_hdmi(struct display_info_t const *dev) static int detect_i2c(struct display_info_t const *dev) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus, *udev; int rc; diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index d071ebfb9cc..2b7eb355fb9 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -456,7 +456,7 @@ int board_late_init_xilinx(void) ret |= env_set_by_index("uuid", id, uuid); } - if (!CONFIG_IS_ENABLED(NET)) + if (!IS_ENABLED(CONFIG_NET)) continue; for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) { @@ -571,7 +571,7 @@ error: bool __maybe_unused __weak board_detection(void) { - if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM)) { + if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM)) { int ret; ret = xilinx_read_eeprom(); diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c index 167252c240c..46794f32375 100644 --- a/board/xilinx/common/fru_ops.c +++ b/board/xilinx/common/fru_ops.c @@ -257,7 +257,7 @@ static int fru_parse_multirec(unsigned long addr) struct fru_multirec_mac *mac = (void *)addr + hdr_len; u32 type = FRU_DUT_MACID; - if (CONFIG_IS_ENABLED(FRU_SC)) + if (IS_ENABLED(CONFIG_FRU_SC)) type = FRU_SC_MACID; if (mac->ver == type) { diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 81e1b69905e..cd62188eddd 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -42,7 +42,7 @@ int board_init(void) fpga_add(fpga_xilinx, &versalpl); #endif - if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM)) + if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM)) xilinx_read_eeprom(); return 0; diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 9a59445b442..067da76eb18 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -37,7 +37,7 @@ int board_init(void) if (IS_ENABLED(CONFIG_SPL_BUILD)) printf("Silicon version:\t%d\n", zynq_get_silicon_version()); - if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM)) + if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM)) xilinx_read_eeprom(); return 0; diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 39da96bcfb0..dee0b21b00f 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -45,7 +45,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) +#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) static xilinx_desc zynqmppl = { xilinx_zynqmp, csu_dma, 1, &zynqmp_op, 0, &zynqmp_op, NULL, ZYNQMP_FPGA_FLAGS @@ -140,7 +140,7 @@ static void print_secure_boot(void) int board_init(void) { -#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) +#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) struct udevice *soc; char name[SOC_MAX_STR_SIZE]; int ret; @@ -165,16 +165,16 @@ int board_init(void) printf("Silicon version:\t%d\n", zynqmp_get_silicon_version()); /* the CSU disables the JTAG interface when secure boot is enabled */ - if (CONFIG_IS_ENABLED(ZYNQMP_RESTORE_JTAG)) + if (IS_ENABLED(CONFIG_ZYNQMP_RESTORE_JTAG)) restore_jtag(); #else - if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM)) + if (IS_ENABLED(CONFIG_DM_I2C) && IS_ENABLED(CONFIG_I2C_EEPROM)) xilinx_read_eeprom(); #endif printf("EL Level:\tEL%d\n", current_el()); -#if CONFIG_IS_ENABLED(FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) +#if IS_ENABLED(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) ret = soc_get(&soc); if (!ret) { ret = soc_get_machine(soc, name, sizeof(name)); @@ -278,7 +278,7 @@ int dram_init(void) } #endif -#if !CONFIG_IS_ENABLED(SYSRESET) +#if !IS_ENABLED(CONFIG_SYSRESET) void reset_cpu(void) { } diff --git a/boot/bootm.c b/boot/bootm.c index 2eec60ec7b5..9c397bcfeee 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -126,7 +126,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc, /* get image parameters */ switch (genimg_get_format(os_hdr)) { -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) case IMAGE_FORMAT_LEGACY: images.os.type = image_get_type(os_hdr); images.os.comp = image_get_comp(os_hdr); @@ -137,7 +137,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc, images.os.arch = image_get_arch(os_hdr); break; #endif -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) case IMAGE_FORMAT_FIT: if (fit_image_get_type(images.fit_hdr_os, images.fit_noffset_os, @@ -209,7 +209,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc, /* Kernel entry point is the setup.bin */ } else if (images.legacy_hdr_valid) { images.ep = image_get_ep(&images.legacy_hdr_os_copy); -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) } else if (images.fit_uname_os) { int ret; @@ -293,7 +293,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start, return 1; } -#if CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_OF_LIBFDT) /* find flattened device tree */ ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images, &images.ft_addr, &images.ft_len); @@ -317,7 +317,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start, set_working_fdt_addr(map_to_sysmem(images.ft_addr)); #endif -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) if (IS_ENABLED(CONFIG_FPGA)) { /* find bitstreams */ ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, @@ -733,7 +733,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc, } } #endif -#if CONFIG_IS_ENABLED(OF_LIBFDT) && defined(CONFIG_LMB) +#if IS_ENABLED(CONFIG_OF_LIBFDT) && defined(CONFIG_LMB) if (!ret && (states & BOOTM_STATE_FDT)) { boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr); ret = boot_relocate_fdt(&images->lmb, &images->ft_addr, @@ -809,7 +809,7 @@ err: return ret; } -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) /** * image_get_kernel - verify legacy format kernel image * @img_addr: in RAM address of the legacy format image to be verified @@ -878,14 +878,14 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], struct bootm_headers *images, ulong *os_data, ulong *os_len) { -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) struct legacy_img_hdr *hdr; #endif ulong img_addr; const void *buf; const char *fit_uname_config = NULL; const char *fit_uname_kernel = NULL; -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) int os_noffset; #endif @@ -902,7 +902,7 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc, *os_data = *os_len = 0; buf = map_sysmem(img_addr, 0); switch (genimg_get_format(buf)) { -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) case IMAGE_FORMAT_LEGACY: printf("## Booting kernel from Legacy Image at %08lx ...\n", img_addr); @@ -946,7 +946,7 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc, bootstage_mark(BOOTSTAGE_ID_DECOMP_IMAGE); break; #endif -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) case IMAGE_FORMAT_FIT: os_noffset = fit_image_load(images, img_addr, &fit_uname_kernel, &fit_uname_config, diff --git a/boot/bootm_os.c b/boot/bootm_os.c index 99ff0e6c02d..aac2c2ef09a 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -57,7 +57,7 @@ static void copy_args(char *dest, int argc, char *const argv[], char delim) static void __maybe_unused fit_unsupported_reset(const char *msg) { - if (CONFIG_IS_ENABLED(FIT_VERBOSE)) { + if (IS_ENABLED(CONFIG_FIT_VERBOSE)) { printf("! FIT images not supported for '%s' - must reset board to recover!\n", msg); } diff --git a/boot/bootstd-uclass.c b/boot/bootstd-uclass.c index 81555d341e3..8eab75ca7e1 100644 --- a/boot/bootstd-uclass.c +++ b/boot/bootstd-uclass.c @@ -183,7 +183,7 @@ U_BOOT_DRIVER(bootstd_drv) = { UCLASS_DRIVER(bootstd) = { .id = UCLASS_BOOTSTD, .name = "bootstd", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/boot/image-board.c b/boot/image-board.c index 25b60ec30b3..97bc39e539f 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -224,12 +224,12 @@ ulong genimg_get_kernel_addr_fit(char * const img_addr, kernel_addr = image_load_addr; debug("* kernel: default image load address = 0x%08lx\n", image_load_addr); - } else if (CONFIG_IS_ENABLED(FIT) && + } else if (IS_ENABLED(CONFIG_FIT) && fit_parse_conf(img_addr, image_load_addr, &kernel_addr, fit_uname_config)) { debug("* kernel: config '%s' from image at 0x%08lx\n", *fit_uname_config, kernel_addr); - } else if (CONFIG_IS_ENABLED(FIT) && + } else if (IS_ENABLED(CONFIG_FIT) && fit_parse_subimage(img_addr, image_load_addr, &kernel_addr, fit_uname_kernel)) { debug("* kernel: subimage '%s' from image at 0x%08lx\n", @@ -272,14 +272,14 @@ ulong genimg_get_kernel_addr(char * const img_addr) */ int genimg_get_format(const void *img_addr) { - if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) { + if (IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)) { const struct legacy_img_hdr *hdr; hdr = (const struct legacy_img_hdr *)img_addr; if (image_check_magic(hdr)) return IMAGE_FORMAT_LEGACY; } - if (CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)) { + if (IS_ENABLED(CONFIG_FIT) || IS_ENABLED(CONFIG_OF_LIBFDT)) { if (!fdt_check_header(img_addr)) return IMAGE_FORMAT_FIT; } @@ -303,7 +303,7 @@ int genimg_get_format(const void *img_addr) */ int genimg_has_config(struct bootm_headers *images) { - if (CONFIG_IS_ENABLED(FIT) && images->fit_uname_cfg) + if (IS_ENABLED(CONFIG_FIT) && images->fit_uname_cfg) return 1; return 0; @@ -331,7 +331,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a ulong rd_addr; char *buf; - if (CONFIG_IS_ENABLED(FIT)) { + if (IS_ENABLED(CONFIG_FIT)) { fit_uname_config = images->fit_uname_cfg; fit_uname_ramdisk = NULL; @@ -366,7 +366,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a rd_addr = hextoul(select, NULL); debug("* ramdisk: cmdline image address = 0x%08lx\n", rd_addr); } - if (CONFIG_IS_ENABLED(FIT) && !select) { + if (IS_ENABLED(CONFIG_FIT) && !select) { /* use FIT configuration provided in first bootm * command argument. If the property is not defined, * quit silently (with -ENOPKG) @@ -388,7 +388,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a buf = map_sysmem(rd_addr, 0); switch (genimg_get_format(buf)) { case IMAGE_FORMAT_LEGACY: - if (CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)) { + if (IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT)) { const struct legacy_img_hdr *rd_hdr; printf("## Loading init Ramdisk from Legacy Image at %08lx ...\n", @@ -407,7 +407,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a } break; case IMAGE_FORMAT_FIT: - if (CONFIG_IS_ENABLED(FIT)) { + if (IS_ENABLED(CONFIG_FIT)) { rd_noffset = fit_image_load(images, rd_addr, &fit_uname_ramdisk, &fit_uname_config, @@ -649,7 +649,7 @@ error: int boot_get_setup(struct bootm_headers *images, u8 arch, ulong *setup_start, ulong *setup_len) { - if (!CONFIG_IS_ENABLED(FIT)) + if (!IS_ENABLED(CONFIG_FIT)) return -ENOENT; return boot_get_setup_fit(images, arch, setup_start, setup_len); @@ -929,7 +929,7 @@ int image_setup_linux(struct bootm_headers *images) /* This function cannot be called without lmb support */ if (!IS_ENABLED(CONFIG_LMB)) return -EFAULT; - if (CONFIG_IS_ENABLED(OF_LIBFDT)) + if (IS_ENABLED(CONFIG_OF_LIBFDT)) boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree); if (IS_ENABLED(CONFIG_SYS_BOOT_GET_CMDLINE)) { @@ -941,13 +941,13 @@ int image_setup_linux(struct bootm_headers *images) } } - if (CONFIG_IS_ENABLED(OF_LIBFDT)) { + if (IS_ENABLED(CONFIG_OF_LIBFDT)) { ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size); if (ret) return ret; } - if (CONFIG_IS_ENABLED(OF_LIBFDT) && of_size) { + if (IS_ENABLED(CONFIG_OF_LIBFDT) && of_size) { ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb); if (ret) return ret; diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 714d05d1a53..9d4e4a142b5 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -36,7 +36,7 @@ static void fdt_error(const char *msg) puts(" - must RESET the board to recover.\n"); } -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) static const struct legacy_img_hdr *image_get_fdt(ulong fdt_addr) { const struct legacy_img_hdr *fdt_hdr = map_sysmem(fdt_addr, 0); @@ -297,7 +297,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch, const char *buf; ulong fdt_addr; -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) const char *fit_uname_config = images->fit_uname_cfg; const char *fit_uname_fdt = NULL; ulong default_addr; @@ -332,7 +332,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch, debug("* fdt: cmdline image address = 0x%08lx\n", fdt_addr); } -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) } else { /* use FIT configuration provided in first bootm * command argument @@ -356,7 +356,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch, */ buf = map_sysmem(fdt_addr, 0); switch (genimg_get_format(buf)) { -#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT) +#if IS_ENABLED(CONFIG_LEGACY_IMAGE_FORMAT) case IMAGE_FORMAT_LEGACY: { const struct legacy_img_hdr *fdt_hdr; ulong load, load_end; @@ -408,7 +408,7 @@ static int select_fdt(struct bootm_headers *images, const char *select, u8 arch, * (libfdt based) and raw FDT blob (also libfdt * based). */ -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) /* check FDT blob vs FIT blob */ if (!fit_check_format(buf, IMAGE_SIZE_INVAL)) { ulong load, len; @@ -665,7 +665,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, goto err; } } - if (!of_live_active() && CONFIG_IS_ENABLED(EVENT)) { + if (!of_live_active() && IS_ENABLED(CONFIG_EVENT)) { struct event_ft_fixup fixup; fixup.tree = oftree_from_fdt(blob); diff --git a/boot/image-fit.c b/boot/image-fit.c index 3cc556b727f..07046340efa 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -380,7 +380,7 @@ void fit_print_contents(const void *fit) const char *p; time_t timestamp; - if (!CONFIG_IS_ENABLED(FIT_PRINT)) + if (!IS_ENABLED(CONFIG_FIT_PRINT)) return; /* Indent string is defined in header image.h */ @@ -485,7 +485,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p) int ndepth; int ret; - if (!CONFIG_IS_ENABLED(FIT_PRINT)) + if (!IS_ENABLED(CONFIG_FIT_PRINT)) return; /* Mandatory properties */ @@ -1664,7 +1664,7 @@ int fit_check_format(const void *fit, ulong size) return -ENOEXEC; } - if (CONFIG_IS_ENABLED(FIT_FULL_CHECK)) { + if (IS_ENABLED(CONFIG_FIT_FULL_CHECK)) { /* * If we are not given the size, make do wtih calculating it. * This is not as secure, so we should consider a flag to @@ -1683,7 +1683,7 @@ int fit_check_format(const void *fit, ulong size) * the same name as a valid node but with a unit address * attached. Protect against this by disallowing unit addresses. */ - if (!ret && CONFIG_IS_ENABLED(FIT_SIGNATURE)) { + if (!ret && IS_ENABLED(CONFIG_FIT_SIGNATURE)) { ret = fdt_check_no_at(fit, 0); if (ret) { @@ -2082,7 +2082,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr, ret = fit_check_format(fit, IMAGE_SIZE_INVAL); if (ret) { printf("Bad FIT %s image format! (err=%d)\n", prop_name, ret); - if (CONFIG_IS_ENABLED(FIT_SIGNATURE) && ret == -EADDRNOTAVAIL) + if (IS_ENABLED(CONFIG_FIT_SIGNATURE) && ret == -EADDRNOTAVAIL) printf("Signature checking prevents use of unit addresses (@) in nodes\n"); bootstage_error(bootstage_id + BOOTSTAGE_SUB_FORMAT); return ret; diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c index b504ab42a54..0ff6e1d2fc8 100644 --- a/boot/image-pre-load.c +++ b/boot/image-pre-load.c @@ -366,7 +366,7 @@ int image_pre_load(ulong addr) image_load_offset = 0; - if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD_SIG)) + if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD_SIG)) ret = image_pre_load_sig(addr); return ret; diff --git a/boot/image.c b/boot/image.c index 958dbf85347..cf4e51daac5 100644 --- a/boot/image.c +++ b/boot/image.c @@ -20,7 +20,7 @@ #include #endif -#if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_FIT) || IS_ENABLED(CONFIG_OF_LIBFDT) #include #include #endif @@ -464,11 +464,11 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, ret = -ENOSPC; break; case IH_COMP_GZIP: - if (!tools_build() && CONFIG_IS_ENABLED(GZIP)) + if (!tools_build() && IS_ENABLED(CONFIG_GZIP)) ret = gunzip(load_buf, unc_len, image_buf, &image_len); break; case IH_COMP_BZIP2: - if (!tools_build() && CONFIG_IS_ENABLED(BZIP2)) { + if (!tools_build() && IS_ENABLED(CONFIG_BZIP2)) { uint size = unc_len; /* @@ -482,7 +482,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, } break; case IH_COMP_LZMA: - if (!tools_build() && CONFIG_IS_ENABLED(LZMA)) { + if (!tools_build() && IS_ENABLED(CONFIG_LZMA)) { SizeT lzma_len = unc_len; ret = lzmaBuffToBuffDecompress(load_buf, &lzma_len, @@ -491,7 +491,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, } break; case IH_COMP_LZO: - if (!tools_build() && CONFIG_IS_ENABLED(LZO)) { + if (!tools_build() && IS_ENABLED(CONFIG_LZO)) { size_t size = unc_len; ret = lzop_decompress(image_buf, image_len, load_buf, &size); @@ -499,7 +499,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, } break; case IH_COMP_LZ4: - if (!tools_build() && CONFIG_IS_ENABLED(LZ4)) { + if (!tools_build() && IS_ENABLED(CONFIG_LZ4)) { size_t size = unc_len; ret = ulz4fn(image_buf, image_len, load_buf, &size); @@ -507,7 +507,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type, } break; case IH_COMP_ZSTD: - if (!tools_build() && CONFIG_IS_ENABLED(ZSTD)) { + if (!tools_build() && IS_ENABLED(CONFIG_ZSTD)) { struct abuf in, out; abuf_init_set(&in, image_buf, image_len); diff --git a/boot/vbe_simple.c b/boot/vbe_simple.c index 59676d8613f..43123fcabc8 100644 --- a/boot/vbe_simple.c +++ b/boot/vbe_simple.c @@ -211,7 +211,7 @@ static int bootmeth_vbe_simple_bind(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id generic_simple_vbe_simple_ids[] = { { .compatible = "fwupd,vbe-simple" }, { } diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index bf002f84475..1d230bb26a6 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -124,7 +124,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) bdinfo_print_num_l("fdt_size", (ulong)gd->fdt_size); if (IS_ENABLED(CONFIG_VIDEO)) show_video_info(); -#if CONFIG_IS_ENABLED(MULTI_DTB_FIT) +#if IS_ENABLED(CONFIG_MULTI_DTB_FIT) bdinfo_print_num_l("multi_dtb_fit", (ulong)gd->multi_dtb_fit); #endif if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) { diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 2a7d42925d6..dd9eafb00de 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -162,7 +162,7 @@ static efi_status_t efi_env_set_load_options(efi_handle_t handle, return ret; } -#if !CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) +#if !IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) /** * copy_fdt() - Copy the device tree to a new location available to EFI @@ -250,7 +250,7 @@ static void *get_config_table(const efi_guid_t *guid) return NULL; } -#endif /* !CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) */ +#endif /* !IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) */ /** * efi_install_fdt() - install device tree @@ -275,7 +275,7 @@ efi_status_t efi_install_fdt(void *fdt) * The EBBR spec requires that we have either an FDT or an ACPI table * but not both. */ -#if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) +#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE) if (fdt) { log_warning("WARNING: Can't have ACPI table and device tree - ignoring DT.\n"); return EFI_SUCCESS; diff --git a/cmd/clk.c b/cmd/clk.c index a483fd89812..b0658693a99 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -98,7 +98,7 @@ static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, return ret; } -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_CLK) static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -132,7 +132,7 @@ static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, static struct cmd_tbl cmd_clk_sub[] = { U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""), -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_CLK) U_BOOT_CMD_MKENT(setfreq, 3, 1, do_clk_setfreq, "", ""), #endif }; diff --git a/cmd/date.c b/cmd/date.c index 58505e6e1d3..305b15bfd7d 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -49,7 +49,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } } -#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY) old_bus = i2c_get_bus_num(); i2c_set_bus_num(CFG_SYS_RTC_BUS_NUM); #else @@ -122,7 +122,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, } /* switch back to original I2C bus */ -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) i2c_set_bus_num(old_bus); #elif !defined(CONFIG_DM_RTC) I2C_SET_BUS(old_bus); diff --git a/cmd/disk.c b/cmd/disk.c index 3d7bc2f6018..4498f2afe34 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -24,7 +24,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, #endif struct blk_desc *dev_desc; -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) const void *fit_hdr = NULL; #endif @@ -84,7 +84,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, cnt = image_get_image_size(hdr); break; #endif -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *) addr; puts("Fit image detected...\n"); @@ -110,7 +110,7 @@ int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, } bootstage_mark(BOOTSTAGE_ID_IDE_READ); -#if CONFIG_IS_ENABLED(FIT) +#if IS_ENABLED(CONFIG_FIT) /* This cannot be done earlier, * we need complete FIT image in RAM first */ if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) { diff --git a/cmd/dm.c b/cmd/dm.c index 3263547cbec..507e4767a51 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -35,7 +35,7 @@ static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc, return 0; } -#if CONFIG_IS_ENABLED(DM_STATS) +#if IS_ENABLED(CONFIG_DM_STATS) static int do_dm_dump_mem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -76,7 +76,7 @@ static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc, return 0; } -#if CONFIG_IS_ENABLED(DM_STATS) +#if IS_ENABLED(CONFIG_DM_STATS) #define DM_MEM_HELP "dm mem Provide a summary of memory usage\n" #define DM_MEM U_BOOT_SUBCMD_MKENT(mem, 1, 1, do_dm_dump_mem), #else diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 0b6ca8c505f..dc5e84d767e 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -34,7 +34,7 @@ #define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS) #define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1)) -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static int eeprom_i2c_bus; #endif @@ -46,9 +46,9 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state) void eeprom_init(int bus) { /* I2C EEPROM */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) eeprom_i2c_bus = bus; -#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY) if (bus >= 0) i2c_set_bus_num(bus); i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); @@ -112,7 +112,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen, { int ret = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(eeprom_i2c_bus, addr[0], @@ -149,7 +149,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer, int rcode = 0; uchar addr[3]; -#if !CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS) +#if !IS_ENABLED(CONFIG_DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS) eeprom_init(CONFIG_SYS_I2C_EEPROM_BUS); #endif diff --git a/cmd/i2c.c b/cmd/i2c.c index dd803ee2271..dcca7d8f162 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -98,7 +98,7 @@ static uint i2c_mm_last_alen; * pairs. The following macros take care of this */ #if defined(CFG_SYS_I2C_NOPROBES) -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) static struct { uchar bus; @@ -114,7 +114,7 @@ static uchar i2c_no_probes[] = CFG_SYS_I2C_NOPROBES; #define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */ #define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a)) #define NO_PROBE_ADDR(i) i2c_no_probes[(i)] -#endif /* CONFIG_IS_ENABLED(SYS_I2C_LEGACY) */ +#endif /* IS_ENABLED(CONFIG_SYS_I2C_LEGACY) */ #endif #define DISP_LINE_LEN 16 @@ -124,13 +124,13 @@ static uchar i2c_no_probes[] = CFG_SYS_I2C_NOPROBES; * For legacy code, this is not stored, so we need to use a suitable * default. */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) #define DEFAULT_ADDR_LEN (-1) #else #define DEFAULT_ADDR_LEN 1 #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static struct udevice *i2c_cur_bus; static int cmd_i2c_set_bus_num(unsigned int busnum) @@ -250,7 +250,7 @@ static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc, int alen; u_char *memaddr; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -281,7 +281,7 @@ static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc, */ memaddr = (u_char *)hextoul(argv[4], NULL); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -304,7 +304,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, int alen; u_char *memaddr; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; struct dm_i2c_chip *i2c_chip; #endif @@ -336,7 +336,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, */ length = hextoul(argv[4], NULL); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -354,7 +354,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, * a page boundary. No write delay upon completion, take this * into account if linking commands. */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) i2c_chip->flags &= ~DM_I2C_CHIP_WR_ADDRESS; ret = dm_i2c_write(dev, devaddr, memaddr, length); #else @@ -368,7 +368,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, * write transactions of one byte each */ while (length-- > 0) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) i2c_chip->flags |= DM_I2C_CHIP_WR_ADDRESS; ret = dm_i2c_write(dev, devaddr++, memaddr++, 1); #else @@ -387,7 +387,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, return 0; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static int do_i2c_flags(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -473,7 +473,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc, int j; uint nbytes, linebytes; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -515,7 +515,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc, length = hextoul(argv[3], NULL); } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -536,7 +536,7 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc, linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, addr, linebuf, linebytes); #else ret = i2c_read(chip, addr, alen, linebuf, linebytes); @@ -594,7 +594,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc, uchar byte; int count; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -614,7 +614,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc, if (alen > 3) return CMD_RET_USAGE; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -635,7 +635,7 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc, count = 1; while (count-- > 0) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_write(dev, addr++, &byte, 1); #else ret = i2c_write(chip, addr++, alen, &byte, 1); @@ -683,7 +683,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc, ulong crc; ulong err; int ret = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -703,7 +703,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc, if (alen > 3) return CMD_RET_USAGE; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -723,7 +723,7 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc, crc = 0; err = 0; while (count-- > 0) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, addr, &byte, 1); #else ret = i2c_read(chip, addr, alen, &byte, 1); @@ -767,7 +767,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, int size = 1; int nbytes; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -804,7 +804,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, return CMD_RET_USAGE; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -818,7 +818,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, */ do { printf("%08lx:", addr); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, addr, (uchar *)&data, size); #else ret = i2c_read(chip, addr, alen, (uchar *)&data, size); @@ -865,7 +865,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, * good enough to not time out */ bootretry_reset_cmd_timeout(); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_write(dev, addr, (uchar *)&data, size); #else @@ -917,7 +917,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc, unsigned int bus = GET_BUS_NUM; #endif /* NOPROBES */ int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus, *dev; if (i2c_get_cur_bus(&bus)) @@ -943,7 +943,7 @@ static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc, if (skip) continue; #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_probe(bus, j, 0, &dev); #else ret = i2c_probe(j); @@ -992,7 +992,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc, u_char bytes[16]; int delay; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -1011,7 +1011,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc, alen = get_alen(argv[2], DEFAULT_ADDR_LEN); if (alen > 3) return CMD_RET_USAGE; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret && alen != -1) ret = i2c_set_chip_offset_len(dev, alen); @@ -1037,7 +1037,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc, * Run the loop... */ while (1) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, addr, bytes, length); #else ret = i2c_read(chip, addr, alen, bytes, length); @@ -1118,7 +1118,7 @@ static int do_sdram(struct cmd_tbl *cmdtp, int flag, int argc, u_char data[128]; u_char cksum; int j, ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -1174,7 +1174,7 @@ static int do_sdram(struct cmd_tbl *cmdtp, int flag, int argc, */ chip = hextoul(argv[1], NULL); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret) ret = dm_i2c_read(dev, 0, data, sizeof(data)); @@ -1617,7 +1617,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) uint chip; struct edid1_info edid; int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; #endif @@ -1627,7 +1627,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } chip = hextoul(argv[1], NULL); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_cur_bus_chip(chip, &dev); if (!ret) ret = dm_i2c_read(dev, 0, (uchar *)&edid, sizeof(edid)); @@ -1648,7 +1648,7 @@ int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } #endif /* CONFIG_I2C_EDID */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) static void show_bus(struct udevice *bus) { struct udevice *dev; @@ -1678,13 +1678,13 @@ static void show_bus(struct udevice *bus) * * Returns zero always. */ -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc == 1) { /* show all busses */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus; struct uclass *uc; int ret; @@ -1719,7 +1719,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, /* show specific bus */ i = dectoul(argv[1], NULL); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus; int ret; @@ -1764,7 +1764,7 @@ static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, * Returns zero on success, CMD_RET_USAGE in case of misuse and negative * on error. */ -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -1773,7 +1773,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, if (argc == 1) { /* querying current setting */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus; if (!i2c_get_cur_bus(&bus)) @@ -1786,14 +1786,14 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, printf("Current bus is %d\n", bus_no); } else { bus_no = dectoul(argv[1], NULL); -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) if (bus_no >= CFG_SYS_NUM_I2C_BUSES) { printf("Invalid bus %d\n", bus_no); return -1; } #endif printf("Setting bus to %d\n", bus_no); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = cmd_i2c_set_bus_num(bus_no); #else ret = i2c_set_bus_num(bus_no); @@ -1804,7 +1804,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, return ret ? CMD_RET_FAILURE : 0; } -#endif /* CONFIG_IS_ENABLED(SYS_I2C_LEGACY) */ +#endif /* IS_ENABLED(CONFIG_SYS_I2C_LEGACY) */ /** * do_i2c_bus_speed() - Handle the "i2c speed" command-line command @@ -1821,14 +1821,14 @@ static int do_i2c_bus_speed(struct cmd_tbl *cmdtp, int flag, int argc, { int speed, ret=0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus; if (i2c_get_cur_bus(&bus)) return 1; #endif if (argc == 1) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) speed = dm_i2c_get_bus_speed(bus); #else speed = i2c_get_bus_speed(); @@ -1838,7 +1838,7 @@ static int do_i2c_bus_speed(struct cmd_tbl *cmdtp, int flag, int argc, } else { speed = dectoul(argv[1], NULL); printf("Setting bus speed to %d Hz\n", speed); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_set_bus_speed(bus, speed); #else ret = i2c_set_bus_speed(speed); @@ -1894,7 +1894,7 @@ static int do_i2c_nm(struct cmd_tbl *cmdtp, int flag, int argc, static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *bus; if (i2c_get_cur_bus(&bus)) @@ -1903,18 +1903,18 @@ static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc, printf("Error: Not supported by the driver\n"); return CMD_RET_FAILURE; } -#elif CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#elif IS_ENABLED(CONFIG_SYS_I2C_LEGACY) i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr); #endif return 0; } static struct cmd_tbl cmd_i2c_sub[] = { -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_show_bus, "", ""), #endif U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""), -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""), #endif #if defined(CONFIG_I2C_EDID) @@ -1928,7 +1928,7 @@ static struct cmd_tbl cmd_i2c_sub[] = { U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""), U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, "", ""), U_BOOT_CMD_MKENT(write, 6, 0, do_i2c_write, "", ""), -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) U_BOOT_CMD_MKENT(flags, 2, 1, do_i2c_flags, "", ""), U_BOOT_CMD_MKENT(olen, 2, 1, do_i2c_olen, "", ""), #endif @@ -1985,12 +1985,12 @@ static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /***************************************************/ #ifdef CONFIG_SYS_LONGHELP static char i2c_help_text[] = -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) "bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n" "i2c " /* That's the prefix for the crc32 command below. */ #endif "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n" -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || IS_ENABLED(CONFIG_DM_I2C) "i2c dev [dev] - show or set current I2C bus\n" #endif #if defined(CONFIG_I2C_EDID) @@ -2005,7 +2005,7 @@ static char i2c_help_text[] = "i2c read chip address[.0, .1, .2] length memaddress - read to memory\n" "i2c write memaddress chip address[.0, .1, .2] length [-s] - write memory\n" " to I2C; the -s option selects bulk write in a single transaction\n" -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) "i2c flags chip [flags] - set or get chip flags\n" "i2c olen chip [offset_length] - set or get chip offset length\n" #endif diff --git a/cmd/mmc.c b/cmd/mmc.c index c79d9407986..0f5bcebca16 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -37,7 +37,7 @@ static void print_mmcinfo(struct mmc *mmc) } printf("Bus Speed: %d\n", mmc->clock); -#if CONFIG_IS_ENABLED(MMC_VERBOSE) +#if IS_ENABLED(CONFIG_MMC_VERBOSE) printf("Mode: %s\n", mmc_mode_name(mmc->selected_mode)); mmc_dump_capabilities("card capabilities", mmc->card_caps); mmc_dump_capabilities("host capabilities", mmc->host_caps); @@ -58,7 +58,7 @@ static void print_mmcinfo(struct mmc *mmc) printf("Bus Width: %d-bit%s\n", mmc->bus_width, mmc->ddr_mode ? " DDR" : ""); -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) puts("Erase Group Size: "); print_size(((u64)mmc->erase_grp_size) << 9, "\n"); #endif @@ -70,7 +70,7 @@ static void print_mmcinfo(struct mmc *mmc) u8 wp; int ret; -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) puts("HC WP Group Size: "); print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n"); #endif @@ -187,7 +187,7 @@ static int do_mmcinfo(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_SUCCESS; } -#if CONFIG_IS_ENABLED(CMD_MMC_RPMB) +#if IS_ENABLED(CONFIG_CMD_MMC_RPMB) static int confirm_key_prog(void) { puts("Warning: Programming authentication key can be done only once !\n" @@ -371,7 +371,7 @@ static int do_mmc_read(struct cmd_tbl *cmdtp, int flag, return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE; } -#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE) +#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE) static lbaint_t mmc_sparse_write(struct sparse_storage *info, lbaint_t blk, lbaint_t blkcnt, const void *buffer) { @@ -436,7 +436,7 @@ static int do_mmc_sparse_write(struct cmd_tbl *cmdtp, int flag, } #endif -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) static int do_mmc_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -603,7 +603,7 @@ static int do_mmc_list(struct cmd_tbl *cmdtp, int flag, return CMD_RET_SUCCESS; } -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) static void parse_hwpart_user_enh_size(struct mmc *mmc, struct mmc_hwpart_conf *pconf, char *argv) @@ -1076,18 +1076,18 @@ static struct cmd_tbl cmd_mmc[] = { U_BOOT_CMD_MKENT(info, 1, 0, do_mmcinfo, "", ""), U_BOOT_CMD_MKENT(read, 4, 1, do_mmc_read, "", ""), U_BOOT_CMD_MKENT(wp, 2, 0, do_mmc_boot_wp, "", ""), -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) U_BOOT_CMD_MKENT(write, 4, 0, do_mmc_write, "", ""), U_BOOT_CMD_MKENT(erase, 3, 0, do_mmc_erase, "", ""), #endif -#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE) +#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE) U_BOOT_CMD_MKENT(swrite, 3, 0, do_mmc_sparse_write, "", ""), #endif U_BOOT_CMD_MKENT(rescan, 2, 1, do_mmc_rescan, "", ""), U_BOOT_CMD_MKENT(part, 1, 1, do_mmc_part, "", ""), U_BOOT_CMD_MKENT(dev, 4, 0, do_mmc_dev, "", ""), U_BOOT_CMD_MKENT(list, 1, 1, do_mmc_list, "", ""), -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) U_BOOT_CMD_MKENT(hwpartition, 28, 0, do_mmc_hwpartition, "", ""), #endif #ifdef CONFIG_SUPPORT_EMMC_BOOT @@ -1096,7 +1096,7 @@ static struct cmd_tbl cmd_mmc[] = { U_BOOT_CMD_MKENT(partconf, 5, 0, do_mmc_partconf, "", ""), U_BOOT_CMD_MKENT(rst-function, 3, 0, do_mmc_rst_func, "", ""), #endif -#if CONFIG_IS_ENABLED(CMD_MMC_RPMB) +#if IS_ENABLED(CONFIG_CMD_MMC_RPMB) U_BOOT_CMD_MKENT(rpmb, CONFIG_SYS_MAXARGS, 1, do_mmcrpmb, "", ""), #endif U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, "", ""), @@ -1138,7 +1138,7 @@ U_BOOT_CMD( "info - display info of the current MMC device\n" "mmc read addr blk# cnt\n" "mmc write addr blk# cnt\n" -#if CONFIG_IS_ENABLED(CMD_MMC_SWRITE) +#if IS_ENABLED(CONFIG_CMD_MMC_SWRITE) "mmc swrite addr blk#\n" #endif "mmc erase blk# cnt\n" @@ -1154,7 +1154,7 @@ U_BOOT_CMD( " PART - [0|1]\n" " : 0 - first boot partition, 1 - second boot partition\n" " if not assigned, write protect all boot partitions\n" -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) "mmc hwpartition - does hardware partitioning\n" " arguments (sizes in 512-byte blocks):\n" " USER - <{on|off}>\n" @@ -1178,7 +1178,7 @@ U_BOOT_CMD( " - Change the RST_n_FUNCTION field of the specified device\n" " WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.\n" #endif -#if CONFIG_IS_ENABLED(CMD_MMC_RPMB) +#if IS_ENABLED(CONFIG_CMD_MMC_RPMB) "mmc rpmb read addr blk# cnt [address of auth-key] - block size is 256 bytes\n" "mmc rpmb write addr blk# cnt
- block size is 256 bytes\n" "mmc rpmb key
- program the RPMB authentication key.\n" diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c index 1efbe2e607c..1336e1634f5 100644 --- a/cmd/mvebu/bubt.c +++ b/cmd/mvebu/bubt.c @@ -177,7 +177,7 @@ static ulong get_load_addr(void) /******************************************************************** * eMMC services ********************************************************************/ -#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_MMC_WRITE) static int mmc_burn_image(size_t image_size) { struct mmc *mmc; diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 277293679df..2913e538605 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -59,7 +59,7 @@ DECLARE_GLOBAL_DATA_PTR; #endif -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) #if !defined(ENV_IS_IN_DEVICE) && \ !defined(CONFIG_ENV_IS_NOWHERE) # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\ diff --git a/cmd/reiser.c b/cmd/reiser.c index 707167fcd59..30361cf6d3f 100644 --- a/cmd/reiser.c +++ b/cmd/reiser.c @@ -18,7 +18,7 @@ #include #include -#if !CONFIG_IS_ENABLED(DOS_PARTITION) +#if !IS_ENABLED(CONFIG_DOS_PARTITION) #error DOS partition support must be selected #endif diff --git a/cmd/sb.c b/cmd/sb.c index 0d55818e3c6..904ddb50a80 100644 --- a/cmd/sb.c +++ b/cmd/sb.c @@ -14,7 +14,7 @@ static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) if (gd->spl_handoff) printf("SPL handoff magic %lx\n", gd->spl_handoff->arch.magic); else diff --git a/cmd/sf.c b/cmd/sf.c index 11b9c25896a..df92ca04955 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -92,7 +92,7 @@ static int do_spi_flash_probe(int argc, char *const argv[]) unsigned int mode = CONFIG_SF_DEFAULT_MODE; char *endp; bool use_dt = true; -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) struct udevice *new, *bus_dev; int ret; #else @@ -127,7 +127,7 @@ static int do_spi_flash_probe(int argc, char *const argv[]) use_dt = false; } -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) /* Remove the old device, otherwise probe will just be a nop */ ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new); if (!ret) { diff --git a/cmd/spi.c b/cmd/spi.c index f30018f33be..df932afa9be 100644 --- a/cmd/spi.c +++ b/cmd/spi.c @@ -38,7 +38,7 @@ static int do_spi_xfer(int bus, int cs) struct spi_slave *slave; int ret = 0; -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) char name[30], *str; struct udevice *dev; @@ -63,7 +63,7 @@ static int do_spi_xfer(int bus, int cs) goto done; ret = spi_xfer(slave, bitlen, dout, din, SPI_XFER_BEGIN | SPI_XFER_END); -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) /* We don't get an error code in this case */ if (ret) ret = -EIO; @@ -79,7 +79,7 @@ static int do_spi_xfer(int bus, int cs) } done: spi_release_bus(slave); -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) spi_free_slave(slave); #endif diff --git a/cmd/zfs.c b/cmd/zfs.c index 6ef1b56ab10..53c57386024 100644 --- a/cmd/zfs.c +++ b/cmd/zfs.c @@ -24,7 +24,7 @@ #include #endif -#if !CONFIG_IS_ENABLED(DOS_PARTITION) && !CONFIG_IS_ENABLED(EFI_PARTITION) +#if !IS_ENABLED(CONFIG_DOS_PARTITION) && !IS_ENABLED(CONFIG_EFI_PARTITION) #error DOS or EFI partition support must be selected #endif diff --git a/common/bloblist.c b/common/bloblist.c index 0d63b6e8817..3f4f0009129 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -459,7 +459,7 @@ int bloblist_init(void) } } if (ret) { - if (CONFIG_IS_ENABLED(BLOBLIST_ALLOC)) { + if (IS_ENABLED(CONFIG_BLOBLIST_ALLOC)) { void *ptr = memalign(BLOBLIST_ALIGN, size); if (!ptr) diff --git a/common/board_f.c b/common/board_f.c index 2b4edf30c93..1f21c3e2ea1 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -171,7 +171,7 @@ static int print_resetinfo(void) } #endif -#if defined(CONFIG_DISPLAY_CPUINFO) && CONFIG_IS_ENABLED(CPU) +#if defined(CONFIG_DISPLAY_CPUINFO) && IS_ENABLED(CONFIG_CPU) static int print_cpuinfo(void) { struct udevice *dev; @@ -269,7 +269,7 @@ __weak int dram_init_banksize(void) return 0; } -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) static int init_func_i2c(void) { puts("I2C: "); @@ -307,7 +307,7 @@ static int setup_mon_len(void) static int setup_spl_handoff(void) { -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF, sizeof(struct spl_handoff)); debug("Found SPL hand-off info %p\n", gd->spl_handoff); @@ -729,7 +729,7 @@ static int fix_fdt(void) /* ARM calls relocate_code from its crt0.S */ #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \ - !CONFIG_IS_ENABLED(X86_64) + !IS_ENABLED(CONFIG_X86_64) static int jump_to_copy(void) { @@ -888,7 +888,7 @@ static const init_fnc_t init_sequence_f[] = { INIT_FUNC_WATCHDOG_INIT misc_init_f, INIT_FUNC_WATCHDOG_RESET -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) init_func_i2c, #endif #if defined(CONFIG_VID) && !defined(CONFIG_SPL) @@ -967,7 +967,7 @@ static const init_fnc_t init_sequence_f[] = { */ cyclic_unregister_all, #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \ - !CONFIG_IS_ENABLED(X86_64) + !IS_ENABLED(CONFIG_X86_64) jump_to_copy, #endif NULL, @@ -982,7 +982,7 @@ void board_init_f(ulong boot_flags) hang(); #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \ - !defined(CONFIG_EFI_APP) && !CONFIG_IS_ENABLED(X86_64) && \ + !defined(CONFIG_EFI_APP) && !IS_ENABLED(CONFIG_X86_64) && \ !defined(CONFIG_ARC) /* NOTREACHED - jump_to_copy() does not return */ hang(); @@ -1008,7 +1008,7 @@ void board_init_f(ulong boot_flags) * all archs will move to this when generic relocation is implemented. */ static const init_fnc_t init_sequence_f_r[] = { -#if !CONFIG_IS_ENABLED(X86_64) +#if !IS_ENABLED(CONFIG_X86_64) init_cache_f_r, #endif diff --git a/common/board_r.c b/common/board_r.c index df88a9dd63b..66a9fd284da 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -215,7 +215,7 @@ static int initr_malloc(void) static int initr_of_live(void) { - if (CONFIG_IS_ENABLED(OF_LIVE)) { + if (IS_ENABLED(CONFIG_OF_LIVE)) { int ret; bootstage_start(BOOTSTAGE_ID_ACCUM_OF_LIVE, "of_live"); @@ -307,7 +307,7 @@ static int initr_binman(void) { int ret; - if (!CONFIG_IS_ENABLED(BINMAN_FDT)) + if (!IS_ENABLED(CONFIG_BINMAN_FDT)) return 0; ret = binman_init(); @@ -560,7 +560,7 @@ static int dm_announce(void) dm_get_stats(&device_count, &uclass_count); printf("Core: %d devices, %d uclasses", device_count, uclass_count); - if (CONFIG_IS_ENABLED(OF_REAL)) + if (IS_ENABLED(CONFIG_OF_REAL)) printf(", devicetree: %s", fdtdec_get_srcname()); printf("\n"); if (IS_ENABLED(CONFIG_OF_HAS_PRIOR_STAGE) && @@ -609,7 +609,7 @@ static init_fnc_t init_sequence_r[] = { */ #endif initr_reloc_global_data, -#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT) +#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && IS_ENABLED(CONFIG_EVENT) event_manual_reloc, #endif #if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) @@ -656,7 +656,7 @@ static init_fnc_t init_sequence_r[] = { serial_initialize, initr_announce, dm_announce, -#if CONFIG_IS_ENABLED(WDT) +#if IS_ENABLED(CONFIG_WDT) initr_watchdog, #endif INIT_FUNC_WATCHDOG_RESET @@ -802,7 +802,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) * TODO(sjg@chromium.org): Consider doing this for all archs, or * dropping the new_gd parameter. */ - if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP)) + if (IS_ENABLED(CONFIG_X86_64) && !IS_ENABLED(CONFIG_EFI_APP)) arch_setup_gd(new_gd); #if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64) diff --git a/common/cli.c b/common/cli.c index 9451e6a1426..d3b9f53d091 100644 --- a/common/cli.c +++ b/common/cli.c @@ -168,7 +168,7 @@ int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } #endif -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) bool cli_process_fdt(const char **cmdp) { /* Allow the fdt to override the boot command */ @@ -236,7 +236,7 @@ err: */ hang(); } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ void cli_loop(void) { diff --git a/common/console.c b/common/console.c index e4301a49322..1995b8a996e 100644 --- a/common/console.c +++ b/common/console.c @@ -46,7 +46,7 @@ static int on_console(const char *name, const char *value, enum env_op op, case env_op_create: case env_op_overwrite: - if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { + if (IS_ENABLED(CONFIG_CONSOLE_MUX)) { if (iomux_doenv(console, value)) return 1; } else { @@ -72,11 +72,11 @@ U_BOOT_ENV_CALLBACK(console, on_console); static int on_silent(const char *name, const char *value, enum env_op op, int flags) { - if (!CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_SET)) + if (!IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_SET)) if (flags & H_INTERACTIVE) return 0; - if (!CONFIG_IS_ENABLED(SILENT_CONSOLE_UPDATE_ON_RELOC)) + if (!IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC)) if ((flags & H_INTERACTIVE) == 0) return 0; @@ -154,7 +154,7 @@ static int console_record_tstc(void) } #endif -#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) +#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) /* * if overwrite_console returns 1, the stdin, stderr and stdout * are switched to the serial port, else the settings in the @@ -167,7 +167,7 @@ extern int overwrite_console(void); #define OVERWRITE_CONSOLE 0 #endif /* CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE */ -#endif /* CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */ +#endif /* IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */ static int console_setfile(int file, struct stdio_dev * dev) { @@ -233,7 +233,7 @@ static bool console_dev_is_serial(struct stdio_dev *sdev) return is_serial; } -#if CONFIG_IS_ENABLED(CONSOLE_MUX) +#if IS_ENABLED(CONFIG_CONSOLE_MUX) /** Console I/O multiplexing *******************************************/ /* tstcdev: save the last stdio device with pending characters, with tstc != 0 */ @@ -378,7 +378,7 @@ static void console_flush(int file) } #endif -#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) +#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) static inline void console_doenv(int file, struct stdio_dev *dev) { iomux_doenv(file, dev->name); @@ -435,7 +435,7 @@ static inline void console_flush(int file) } #endif -#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) +#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) static inline void console_doenv(int file, struct stdio_dev *dev) { console_setfile(file, dev); @@ -503,7 +503,7 @@ int fgetc(int file) */ for (;;) { schedule(); - if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { + if (IS_ENABLED(CONFIG_CONSOLE_MUX)) { /* * Upper layer may have already called tstc() so * check for that first. @@ -623,7 +623,7 @@ int tstc(void) #define PRE_CONSOLE_FLUSHPOINT1_SERIAL 0 #define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL 1 -#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) +#if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER) #define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ)) static void pre_console_putc(const char c) @@ -987,7 +987,7 @@ static bool console_update_silent(void) int console_announce_r(void) { -#if !CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) +#if !IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER) char buf[DISPLAY_OPTIONS_BANNER_LENGTH]; display_options_get_banner(false, buf, sizeof(buf)); @@ -1035,7 +1035,7 @@ void stdio_print_current_devices(void) } } -#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) +#if IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) /* Called after the relocation - use desired console functions */ int console_init_r(void) { @@ -1068,7 +1068,7 @@ int console_init_r(void) inputdev = console_search_dev(DEV_FLAGS_INPUT, stdinname); outputdev = console_search_dev(DEV_FLAGS_OUTPUT, stdoutname); errdev = console_search_dev(DEV_FLAGS_OUTPUT, stderrname); - if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { + if (IS_ENABLED(CONFIG_CONSOLE_MUX)) { iomux_err = iomux_doenv(stdin, stdinname); iomux_err += iomux_doenv(stdout, stdoutname); iomux_err += iomux_doenv(stderr, stderrname); @@ -1124,7 +1124,7 @@ done: return 0; } -#else /* !CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */ +#else /* !IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */ /* Called after the relocation - use desired console functions */ int console_init_r(void) @@ -1191,4 +1191,4 @@ int console_init_r(void) return 0; } -#endif /* CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) */ +#endif /* IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV) */ diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 41c7230424c..c0f22d7f02a 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -12,7 +12,7 @@ #include #include -#if CONFIG_IS_ENABLED(UNIT_TEST) +#if IS_ENABLED(CONFIG_UNIT_TEST) #define DEBUG #endif @@ -1310,7 +1310,7 @@ Void_t* mALLOc(bytes) size_t bytes; return malloc_simple(bytes); #endif - if (CONFIG_IS_ENABLED(UNIT_TEST) && malloc_testing) { + if (IS_ENABLED(CONFIG_UNIT_TEST) && malloc_testing) { if (--malloc_max_allocs < 0) return NULL; } diff --git a/common/event.c b/common/event.c index 164c95f8f52..5a035b95894 100644 --- a/common/event.c +++ b/common/event.c @@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(EVENT_DEBUG) +#if IS_ENABLED(CONFIG_EVENT_DEBUG) const char *const type_name[] = { "none", "test", @@ -48,7 +48,7 @@ _Static_assert(ARRAY_SIZE(type_name) == EVT_COUNT, "event type_name size"); static const char *event_type_name(enum event_t type) { -#if CONFIG_IS_ENABLED(EVENT_DEBUG) +#if IS_ENABLED(CONFIG_EVENT_DEBUG) return type_name[type]; #else return "(unknown)"; @@ -125,7 +125,7 @@ int event_notify(enum event_t type, void *data, int size) if (ret) return log_msg_ret("sta", ret); - if (CONFIG_IS_ENABLED(EVENT_DYNAMIC)) { + if (IS_ENABLED(CONFIG_EVENT_DYNAMIC)) { ret = notify_dynamic(&event); if (ret) return log_msg_ret("dyn", ret); @@ -169,7 +169,7 @@ int event_manual_reloc(void) } #endif -#if CONFIG_IS_ENABLED(EVENT_DYNAMIC) +#if IS_ENABLED(CONFIG_EVENT_DYNAMIC) static void spy_free(struct event_spy *spy) { list_del(&spy->sibling_node); diff --git a/common/hash.c b/common/hash.c index 9a52d6073ce..7d6c65ef171 100644 --- a/common/hash.c +++ b/common/hash.c @@ -211,7 +211,7 @@ static int __maybe_unused hash_finish_crc32(struct hash_algo *algo, void *ctx, * Note that algorithm names must be in lower case. */ static struct hash_algo hash_algo[] = { -#if CONFIG_IS_ENABLED(MD5) +#if IS_ENABLED(CONFIG_MD5) { .name = "md5", .digest_size = MD5_SUM_LEN, @@ -219,17 +219,17 @@ static struct hash_algo hash_algo[] = { .hash_func_ws = md5_wd, }, #endif -#if CONFIG_IS_ENABLED(SHA1) +#if IS_ENABLED(CONFIG_SHA1) { .name = "sha1", .digest_size = SHA1_SUM_LEN, .chunk_size = CHUNKSZ_SHA1, -#if CONFIG_IS_ENABLED(SHA_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA_HW_ACCEL) .hash_func_ws = hw_sha1, #else .hash_func_ws = sha1_csum_wd, #endif -#if CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL) .hash_init = hw_sha_init, .hash_update = hw_sha_update, .hash_finish = hw_sha_finish, @@ -240,17 +240,17 @@ static struct hash_algo hash_algo[] = { #endif }, #endif -#if CONFIG_IS_ENABLED(SHA256) +#if IS_ENABLED(CONFIG_SHA256) { .name = "sha256", .digest_size = SHA256_SUM_LEN, .chunk_size = CHUNKSZ_SHA256, -#if CONFIG_IS_ENABLED(SHA_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA_HW_ACCEL) .hash_func_ws = hw_sha256, #else .hash_func_ws = sha256_csum_wd, #endif -#if CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL) .hash_init = hw_sha_init, .hash_update = hw_sha_update, .hash_finish = hw_sha_finish, @@ -261,17 +261,17 @@ static struct hash_algo hash_algo[] = { #endif }, #endif -#if CONFIG_IS_ENABLED(SHA384) +#if IS_ENABLED(CONFIG_SHA384) { .name = "sha384", .digest_size = SHA384_SUM_LEN, .chunk_size = CHUNKSZ_SHA384, -#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) .hash_func_ws = hw_sha384, #else .hash_func_ws = sha384_csum_wd, #endif -#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) && CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) && IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL) .hash_init = hw_sha_init, .hash_update = hw_sha_update, .hash_finish = hw_sha_finish, @@ -282,17 +282,17 @@ static struct hash_algo hash_algo[] = { #endif }, #endif -#if CONFIG_IS_ENABLED(SHA512) +#if IS_ENABLED(CONFIG_SHA512) { .name = "sha512", .digest_size = SHA512_SUM_LEN, .chunk_size = CHUNKSZ_SHA512, -#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) .hash_func_ws = hw_sha512, #else .hash_func_ws = sha512_csum_wd, #endif -#if CONFIG_IS_ENABLED(SHA512_HW_ACCEL) && CONFIG_IS_ENABLED(SHA_PROG_HW_ACCEL) +#if IS_ENABLED(CONFIG_SHA512_HW_ACCEL) && IS_ENABLED(CONFIG_SHA_PROG_HW_ACCEL) .hash_init = hw_sha_init, .hash_update = hw_sha_update, .hash_finish = hw_sha_finish, @@ -312,7 +312,7 @@ static struct hash_algo hash_algo[] = { .hash_update = hash_update_crc16_ccitt, .hash_finish = hash_finish_crc16_ccitt, }, -#if CONFIG_IS_ENABLED(CRC32) +#if IS_ENABLED(CONFIG_CRC32) { .name = "crc32", .digest_size = 4, @@ -326,9 +326,9 @@ static struct hash_algo hash_algo[] = { }; /* Try to minimize code size for boards that don't want much hashing */ -#if CONFIG_IS_ENABLED(SHA256) || IS_ENABLED(CONFIG_CMD_SHA1SUM) || \ - CONFIG_IS_ENABLED(CRC32_VERIFY) || IS_ENABLED(CONFIG_CMD_HASH) || \ - CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512) +#if IS_ENABLED(CONFIG_SHA256) || IS_ENABLED(CONFIG_CMD_SHA1SUM) || \ + IS_ENABLED(CONFIG_CRC32_VERIFY) || IS_ENABLED(CONFIG_CMD_HASH) || \ + IS_ENABLED(CONFIG_SHA384) || IS_ENABLED(CONFIG_SHA512) #define multi_hash() 1 #else #define multi_hash() 0 diff --git a/common/hwconfig.c b/common/hwconfig.c index cac0b6348f4..51eac8cd937 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -83,7 +83,7 @@ static const char *__hwconfig(const char *opt, size_t *arglen, "and before environment is ready\n"); return NULL; } -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) env_hwconfig = env_get("hwconfig"); #endif } diff --git a/common/init/board_init.c b/common/init/board_init.c index 96ffb79a986..e8bbb6be74c 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -27,7 +27,7 @@ __weak void arch_setup_gd(struct global_data *gd_ptr) */ __weak void board_init_f_init_stack_protection_addr(ulong base) { -#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE) +#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE) /* set up stack pointer for stack usage if not set yet */ if (!gd->start_addr_sp) gd->start_addr_sp = base; @@ -41,7 +41,7 @@ __weak void board_init_f_init_stack_protection_addr(ulong base) */ __weak void board_init_f_init_stack_protection(void) { -#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE) +#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE) ulong stack_bottom = gd->start_addr_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); @@ -148,7 +148,7 @@ void board_init_f_init_reserve(ulong base) arch_setup_gd(gd_ptr); #endif - if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)) + if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)) board_init_f_init_stack_protection_addr(base); /* next alloc will be higher by one GD plus 16-byte alignment */ @@ -164,11 +164,11 @@ void board_init_f_init_reserve(ulong base) gd->malloc_base = base; #endif - if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)) + if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)) board_init_f_init_stack_protection(); } -#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ diff --git a/common/iomux.c b/common/iomux.c index c428f7110a7..3600491ab09 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -9,7 +9,7 @@ #include #include -#if CONFIG_IS_ENABLED(CONSOLE_MUX) +#if IS_ENABLED(CONFIG_CONSOLE_MUX) void iomux_printdevs(const int console) { int i; diff --git a/common/log.c b/common/log.c index 57b71ed1b36..be4fbea23ad 100644 --- a/common/log.c +++ b/common/log.c @@ -60,7 +60,7 @@ const char *log_get_cat_name(enum log_category_t cat) if (cat >= LOGC_NONE) return log_cat_name[cat - LOGC_NONE]; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) name = uclass_get_name((enum uclass_id)cat); #else name = NULL; diff --git a/common/malloc_simple.c b/common/malloc_simple.c index 0a004d40e1e..f77fdd62f39 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -64,7 +64,7 @@ void *memalign_simple(size_t align, size_t bytes) return ptr; } -#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) +#if IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE) void *calloc(size_t nmemb, size_t elem_size) { size_t size = nmemb * elem_size; diff --git a/common/spl/spl.c b/common/spl/spl.c index a630e798661..3212631a576 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -26,7 +26,7 @@ #include #include #include -#if CONFIG_IS_ENABLED(BANNER_PRINT) +#if IS_ENABLED(CONFIG_BANNER_PRINT) #include #endif #include @@ -49,7 +49,7 @@ DECLARE_BINMAN_MAGIC_SYM; u32 *boot_params_ptr = NULL; -#if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS) +#if IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS) /* See spl.h for information about this */ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); @@ -69,14 +69,14 @@ binman_sym_declare(ulong, u_boot_vpl_any, size); /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} #endif -#if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \ +#if defined(CONFIG_SPL_OS_BOOT) || IS_ENABLED(CONFIG_HANDOFF) || \ defined(CONFIG_SPL_ATF) /* weak, default platform-specific function to initialize dram banks */ __weak int dram_init_banksize(void) @@ -95,7 +95,7 @@ __weak int dram_init_banksize(void) * 0 to not start u-boot * positive if u-boot should start */ -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) __weak int spl_start_uboot(void) { puts(SPL_TPL_PROMPT @@ -155,7 +155,7 @@ void spl_fixup_fdt(void *fdt_blob) ulong spl_get_image_pos(void) { - if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)) + if (!IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS)) return BINMAN_SYM_MISSING; #ifdef CONFIG_VPL @@ -169,7 +169,7 @@ ulong spl_get_image_pos(void) ulong spl_get_image_size(void) { - if (!CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)) + if (!IS_ENABLED(CONFIG_BINMAN_UBOOT_SYMBOLS)) return BINMAN_SYM_MISSING; #ifdef CONFIG_VPL @@ -210,7 +210,7 @@ __weak const char *spl_board_loader_name(u32 boot_device) return NULL; } -#if CONFIG_IS_ENABLED(OPTEE_IMAGE) +#if IS_ENABLED(CONFIG_OPTEE_IMAGE) __weak void __noreturn jump_to_image_optee(struct spl_image_info *spl_image) { spl_optee_entry(NULL, NULL, spl_image->fdt_addr, @@ -258,7 +258,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) } #endif -#if CONFIG_IS_ENABLED(LOAD_FIT_FULL) +#if IS_ENABLED(CONFIG_LOAD_FIT_FULL) /* Parse and load full fitImage in SPL */ static int spl_load_fit_image(struct spl_image_info *spl_image, const struct legacy_img_hdr *header) @@ -373,7 +373,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, const struct spl_boot_device *bootdev, const struct legacy_img_hdr *header) { -#if CONFIG_IS_ENABLED(LOAD_FIT_FULL) +#if IS_ENABLED(CONFIG_LOAD_FIT_FULL) int ret = spl_load_fit_image(spl_image, header); if (!ret) @@ -398,7 +398,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, panic("** no mkimage signature but raw image not supported"); #endif -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) #if defined(CMD_BOOTI) ulong start, size; @@ -459,7 +459,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) image_entry(); } -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) /** * Set up the SPL hand-off information * @@ -553,25 +553,25 @@ static int spl_common_init(bool setup_malloc) #endif /* CONFIG_BOOTSTAGE_STASH */ bootstage_mark_name(get_bootstage_id(true), spl_phase_name(spl_phase())); -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) ret = log_init(); if (ret) { debug("%s: Failed to set up logging\n", __func__); return ret; } #endif - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { ret = fdtdec_setup(); if (ret) { debug("fdtdec_setup() returned error %d\n", ret); return ret; } } - if (CONFIG_IS_ENABLED(DM)) { + if (IS_ENABLED(CONFIG_DM)) { bootstage_start(BOOTSTAGE_ID_ACCUM_DM_SPL, spl_phase() == PHASE_TPL ? "dm tpl" : "dm_spl"); /* With CONFIG_SPL_OF_PLATDATA, bring in all devices */ - ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA)); + ret = dm_init_and_scan(!IS_ENABLED(CONFIG_OF_PLATDATA)); bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_SPL); if (ret) { debug("dm_init_and_scan() returned error %d\n", ret); @@ -690,16 +690,16 @@ static int boot_from_devices(struct spl_image_info *spl_image, struct spl_image_loader *loader; int bootdev = spl_boot_list[i]; - if (CONFIG_IS_ENABLED(SHOW_ERRORS)) + if (IS_ENABLED(CONFIG_SHOW_ERRORS)) ret = -ENXIO; for (loader = drv; loader != drv + n_ents; loader++) { if (bootdev != loader->boot_device) continue; - if (!CONFIG_IS_ENABLED(SILENT_CONSOLE)) { + if (!IS_ENABLED(CONFIG_SILENT_CONSOLE)) { if (loader) printf("Trying to boot from %s\n", spl_loader_name(loader)); - else if (CONFIG_IS_ENABLED(SHOW_ERRORS)) { + else if (IS_ENABLED(CONFIG_SHOW_ERRORS)) { printf(SPL_TPL_PROMPT "Unsupported Boot Device %d\n", bootdev); @@ -722,7 +722,7 @@ static int boot_from_devices(struct spl_image_info *spl_image, #if defined(CONFIG_SPL_FRAMEWORK_BOARD_INIT_F) void board_init_f(ulong dummy) { - if (CONFIG_IS_ENABLED(OF_CONTROL)) { + if (IS_ENABLED(CONFIG_OF_CONTROL)) { int ret; ret = spl_early_init(); @@ -767,7 +767,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) */ timer_init(); #endif - if (CONFIG_IS_ENABLED(BLOBLIST)) { + if (IS_ENABLED(CONFIG_BLOBLIST)) { ret = bloblist_init(); if (ret) { debug("%s: Failed to set up bloblist: ret=%d\n", @@ -776,7 +776,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) hang(); } } - if (CONFIG_IS_ENABLED(HANDOFF)) { + if (IS_ENABLED(CONFIG_HANDOFF)) { int ret; ret = setup_spl_handoff(); @@ -786,22 +786,22 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } } -#if CONFIG_IS_ENABLED(BOARD_INIT) +#if IS_ENABLED(CONFIG_BOARD_INIT) spl_board_init(); #endif -#if defined(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT) +#if defined(CONFIG_SPL_WATCHDOG) && IS_ENABLED(CONFIG_WDT) initr_watchdog(); #endif - if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || + if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || IS_ENABLED(CONFIG_HANDOFF) || IS_ENABLED(CONFIG_SPL_ATF)) dram_init_banksize(); bootcount_inc(); /* Dump driver model states to aid analysis */ - if (CONFIG_IS_ENABLED(DM_STATS)) { + if (IS_ENABLED(CONFIG_DM_STATS)) { struct dm_stats mem; dm_get_mem(&mem); @@ -818,8 +818,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2) ret = boot_from_devices(&spl_image, spl_boot_list, ARRAY_SIZE(spl_boot_list)); if (ret) { - if (CONFIG_IS_ENABLED(SHOW_ERRORS) && - CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT)) + if (IS_ENABLED(CONFIG_SHOW_ERRORS) && + IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT)) printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n", ret); else @@ -828,13 +828,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } spl_perform_fixups(&spl_image); - if (CONFIG_IS_ENABLED(HANDOFF)) { + if (IS_ENABLED(CONFIG_HANDOFF)) { ret = write_spl_handoff(); if (ret) printf(SPL_TPL_PROMPT "SPL hand-off write failed (err=%d)\n", ret); } - if (CONFIG_IS_ENABLED(BLOBLIST)) { + if (IS_ENABLED(CONFIG_BLOBLIST)) { ret = bloblist_finish(); if (ret) printf("Warning: Failed to finish bloblist (ret=%d)\n", @@ -845,27 +845,27 @@ void board_init_r(gd_t *dummy1, ulong dummy2) case IH_OS_U_BOOT: debug("Jumping to %s...\n", spl_phase_name(spl_next_phase())); break; -#if CONFIG_IS_ENABLED(ATF) +#if IS_ENABLED(CONFIG_ATF) case IH_OS_ARM_TRUSTED_FIRMWARE: debug("Jumping to U-Boot via ARM Trusted Firmware\n"); spl_fixup_fdt(spl_image.fdt_addr); spl_invoke_atf(&spl_image); break; #endif -#if CONFIG_IS_ENABLED(OPTEE_IMAGE) +#if IS_ENABLED(CONFIG_OPTEE_IMAGE) case IH_OS_TEE: debug("Jumping to U-Boot via OP-TEE\n"); spl_board_prepare_for_optee(spl_image.fdt_addr); jump_to_image_optee(&spl_image); break; #endif -#if CONFIG_IS_ENABLED(OPENSBI) +#if IS_ENABLED(CONFIG_OPENSBI) case IH_OS_OPENSBI: debug("Jumping to U-Boot via RISC-V OpenSBI\n"); spl_invoke_opensbi(&spl_image); break; #endif -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) case IH_OS_LINUX: debug("Jumping to Linux\n"); #if defined(CONFIG_SYS_SPL_ARGS_ADDR) @@ -906,7 +906,7 @@ void preloader_console_init(void) gd->have_console = 1; -#if CONFIG_IS_ENABLED(BANNER_PRINT) +#if IS_ENABLED(CONFIG_BANNER_PRINT) puts("\nU-Boot " SPL_TPL_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - " U_BOOT_TIME " " U_BOOT_TZ ")\n"); #endif @@ -922,7 +922,7 @@ void preloader_console_init(void) */ __weak void spl_relocate_stack_check(void) { -#if CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE) +#if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE) ulong init_sp = gd->start_addr_sp; ulong stack_bottom = init_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); u8 *ptr = (u8 *)stack_bottom; @@ -962,7 +962,7 @@ ulong spl_relocate_stack_gd(void) gd_t *new_gd; ulong ptr = CONFIG_SPL_STACK_R_ADDR; - if (CONFIG_IS_ENABLED(SYS_REPORT_STACK_F_USAGE)) + if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)) spl_relocate_stack_check(); #if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN) @@ -979,7 +979,7 @@ ulong spl_relocate_stack_gd(void) ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16); new_gd = (gd_t *)ptr; memcpy(new_gd, (void *)gd, sizeof(gd_t)); -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) dm_fixup_for_gd_move(new_gd); #endif #if !defined(CONFIG_ARM) && !defined(CONFIG_RISCV) diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 2c10252834f..b83ea559fd7 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -195,7 +195,7 @@ static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry, atf_entry_t atf_entry = (atf_entry_t)bl31_entry; void *bl31_params; - if (CONFIG_IS_ENABLED(ATF_LOAD_IMAGE_V2)) + if (IS_ENABLED(CONFIG_ATF_LOAD_IMAGE_V2)) bl31_params = bl2_plat_get_bl31_params_v2(bl32_entry, bl33_entry, fdt_addr); @@ -285,7 +285,7 @@ void spl_invoke_atf(struct spl_image_info *spl_image) * older ATF versions that have insufficiently robust (or * overzealous) argument validation. */ - if (CONFIG_IS_ENABLED(ATF_NO_PLATFORM_PARAM)) + if (IS_ENABLED(CONFIG_ATF_NO_PLATFORM_PARAM)) platform_param = 0; /* diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c index f117c630bfe..91d1063e490 100644 --- a/common/spl/spl_ext.c +++ b/common/spl/spl_ext.c @@ -65,7 +65,7 @@ end: return err < 0; } -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) int spl_load_image_ext_os(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct blk_desc *block_dev, int partition) diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index f8a5b80a3bd..8295361c6ae 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -113,7 +113,7 @@ end: return (err <= 0); } -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) int spl_load_image_fat_os(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct blk_desc *block_dev, int partition) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 9ae3e5e35d4..fa4ccf6554e 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -96,7 +96,7 @@ static int spl_fit_get_image_name(const struct spl_fit_info *ctx, } } - if (!found && CONFIG_IS_ENABLED(SYSINFO) && !sysinfo_get(&sysinfo)) { + if (!found && IS_ENABLED(CONFIG_SYSINFO) && !sysinfo_get(&sysinfo)) { int rc; /* * no string in the property for this index. Check if the @@ -310,7 +310,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, src = (void *)data; /* cast away const */ } - if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) { + if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) { printf("## Checking hash(es) for Image %s ... ", fit_get_name(fit, node, NULL)); if (!fit_image_verify_with_data(fit, node, gd_fdt_blob(), src, @@ -319,7 +319,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, puts("OK\n"); } - if (CONFIG_IS_ENABLED(FIT_IMAGE_POST_PROCESS)) + if (IS_ENABLED(CONFIG_FIT_IMAGE_POST_PROCESS)) board_fit_image_post_process(fit, node, &src, &length); load_ptr = map_sysmem(load_addr, length); @@ -397,10 +397,10 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image, /* Make the load-address of the FDT available for the SPL framework */ spl_image->fdt_addr = map_sysmem(image_info.load_addr, 0); - if (CONFIG_IS_ENABLED(FIT_IMAGE_TINY)) + if (IS_ENABLED(CONFIG_FIT_IMAGE_TINY)) return 0; -#if CONFIG_IS_ENABLED(LOAD_FIT_APPLY_OVERLAY) +#if IS_ENABLED(CONFIG_LOAD_FIT_APPLY_OVERLAY) void *tmpbuffer = NULL; for (; ; index++) { @@ -470,7 +470,7 @@ static int spl_fit_record_loadable(const struct spl_fit_info *ctx, int index, const char *name; int node; - if (CONFIG_IS_ENABLED(FIT_IMAGE_TINY)) + if (IS_ENABLED(CONFIG_FIT_IMAGE_TINY)) return 0; ret = spl_fit_get_image_name(ctx, "loadables", index, &name); @@ -503,7 +503,7 @@ static int spl_fit_image_is_fpga(const void *fit, int node) static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os) { - if (!CONFIG_IS_ENABLED(FIT_IMAGE_TINY) || CONFIG_IS_ENABLED(OS_BOOT)) + if (!IS_ENABLED(CONFIG_FIT_IMAGE_TINY) || IS_ENABLED(CONFIG_OS_BOOT)) return fit_image_get_os(fit, noffset, os); const char *name = fdt_getprop(fit, noffset, FIT_OS_PROP, NULL); @@ -585,7 +585,7 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, if (!compatible) { warn_deprecated("'fpga' image without 'compatible' property"); } else { - if (CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)) + if (IS_ENABLED(CONFIG_FPGA_LOAD_SECURE)) flags = fpga_compatible2flag(devnum, compatible); if (strcmp(compatible, "u-boot,fpga-legacy")) debug("Ignoring compatible = %s property\n", diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index e4135b20487..f1a80fbeb81 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -158,7 +158,7 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device) if (mmc_dev < 0) return mmc_dev; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) err = mmc_init_device(mmc_dev); #else err = mmc_initialize(NULL); @@ -222,7 +222,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, } #endif -#if CONFIG_IS_ENABLED(FALCON_BOOT_MMCSD) +#if IS_ENABLED(CONFIG_FALCON_BOOT_MMCSD) static int mmc_load_image_raw_os(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct mmc *mmc) @@ -401,7 +401,7 @@ int __weak spl_mmc_emmc_boot_partition(struct mmc *mmc) static int spl_mmc_get_mmc_devnum(struct mmc *mmc) { struct blk_desc *block_dev; -#if !CONFIG_IS_ENABLED(BLK) +#if !IS_ENABLED(CONFIG_BLK) block_dev = &mmc->block_dev; #else block_dev = dev_get_uclass_plat(mmc->dev); @@ -444,7 +444,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, case MMCSD_MODE_EMMCBOOT: part = spl_mmc_emmc_boot_partition(mmc); - if (CONFIG_IS_ENABLED(MMC_TINY)) + if (IS_ENABLED(CONFIG_MMC_TINY)) err = mmc_switch_part(mmc, part); else err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part); diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index dc45204fc0e..e68572f3514 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -146,7 +146,7 @@ static int spl_nand_load_image(struct spl_image_info *spl_image, header = spl_get_load_buffer(0, sizeof(*header)); -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (!spl_start_uboot()) { /* * load parameter image diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c index b2c901b554b..db3cbeddd60 100644 --- a/common/spl/spl_net.c +++ b/common/spl/spl_net.c @@ -88,7 +88,7 @@ int spl_net_load_image_usb(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { bootdev->boot_device_name = "usb_ether"; -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) usb_ether_init(); #endif return spl_net_load_image(spl_image, bootdev); diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index 1ef5e412624..926cfb95d0b 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -35,7 +35,7 @@ static int spl_nor_load_image(struct spl_image_info *spl_image, */ spl_image->flags |= SPL_COPY_PAYLOAD_ONLY; -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (!spl_start_uboot()) { /* * Load Linux from its location in NOR flash to its defined diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 8139a203273..869809b1f59 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -26,7 +26,7 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, __func__, sector, count, (ulong)buf); addr = (ulong)CONFIG_SPL_LOAD_FIT_ADDRESS + sector; - if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) + if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD)) addr += image_load_offset; memcpy(buf, (void *)addr, count); @@ -42,7 +42,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS; - if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) { + if (IS_ENABLED(CONFIG_IMAGE_PRE_LOAD)) { unsigned long addr = (unsigned long)header; ret = image_pre_load(addr); @@ -53,7 +53,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, header = (struct legacy_img_hdr *)addr; } -#if CONFIG_IS_ENABLED(DFU) +#if IS_ENABLED(CONFIG_DFU) if (bootdev->boot_device == BOOT_DEVICE_DFU) spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); #endif @@ -91,9 +91,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, return ret; } -#if CONFIG_IS_ENABLED(RAM_DEVICE) +#if IS_ENABLED(CONFIG_RAM_DEVICE) SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); #endif -#if CONFIG_IS_ENABLED(DFU) +#if IS_ENABLED(CONFIG_DFU) SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 32746ce9f3c..5f7b04980b1 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -66,7 +66,7 @@ static int spl_sata_load_image(struct spl_image_info *spl_image, if (!stor_dev) return -ENODEV; -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (spl_start_uboot() || spl_load_image_fat_os(spl_image, bootdev, stor_dev, CONFIG_SYS_SATA_FAT_BOOT_PARTITION)) diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index 2aff025f76e..0774930ddb4 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -18,7 +18,7 @@ #include #include -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) /* * Load the kernel, check for a valid header we can parse, and if found load * the kernel and then device tree. @@ -113,12 +113,12 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, header = spl_get_load_buffer(-sizeof(*header), sizeof(*header)); - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { payload_offs = ofnode_conf_read_int("u-boot,spl-payload-offset", payload_offs); } -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (spl_start_uboot() || spi_load_image_os(spl_image, bootdev, flash, header)) #endif { diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index bcac25cd021..92c805f2769 100644 --- a/common/spl/spl_ubi.c +++ b/common/spl/spl_ubi.c @@ -45,7 +45,7 @@ int spl_ubi_load_image(struct spl_image_info *spl_image, info.leb_start = CONFIG_SPL_UBI_LEB_START; info.peb_count = CONFIG_SPL_UBI_MAX_PEBS - info.peb_offset; -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (!spl_start_uboot()) { volumes[0].vol_id = CONFIG_SPL_UBI_LOAD_KERNEL_ID; volumes[0].load_addr = (void *)CONFIG_SYS_LOAD_ADDR; diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c index 479e2dc1826..30484b06398 100644 --- a/common/spl/spl_usb.c +++ b/common/spl/spl_usb.c @@ -47,7 +47,7 @@ int spl_usb_load(struct spl_image_info *spl_image, debug("boot mode - FAT\n"); -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (spl_start_uboot() || spl_load_image_fat_os(spl_image, bootdev, stor_dev, partition)) #endif diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c index 77c23ba0597..a91db4ddc20 100644 --- a/common/spl/spl_xip.c +++ b/common/spl/spl_xip.c @@ -12,7 +12,7 @@ static int spl_xip(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { -#if CONFIG_IS_ENABLED(OS_BOOT) +#if IS_ENABLED(CONFIG_OS_BOOT) if (!spl_start_uboot()) { spl_image->arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR; spl_image->name = "Linux"; diff --git a/common/stdio.c b/common/stdio.c index cbedfdda539..cf897e65d5f 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -41,7 +41,7 @@ int stdio_file_to_flags(const int file) } } -#if CONFIG_IS_ENABLED(SYS_DEVICE_NULLDEV) +#if IS_ENABLED(CONFIG_SYS_DEVICE_NULLDEV) static void nulldev_putc(struct stdio_dev *dev, const char c) { /* nulldev is empty! */ @@ -337,7 +337,7 @@ int stdio_add_devices(void) __func__, dev->name, ret); } } -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) i2c_init_all(); #endif if (IS_ENABLED(CONFIG_VIDEO)) { diff --git a/common/usb.c b/common/usb.c index ae9253dfc0e..7994b87c758 100644 --- a/common/usb.c +++ b/common/usb.c @@ -45,7 +45,7 @@ static int asynch_allowed; char usb_started; /* flag for the started/stopped USB status */ -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) static struct usb_device usb_dev[USB_MAX_DEVICE]; static int dev_index; @@ -188,7 +188,7 @@ int usb_disable_asynch(int disable) asynch_allowed = !disable; return old_value; } -#endif /* !CONFIG_IS_ENABLED(DM_USB) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB) */ /*------------------------------------------------------------------- @@ -857,7 +857,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size) * the USB device are static allocated [USB_MAX_DEVICE]. */ -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* returns a pointer to the device with the index [index]. * if the device is not assigned (dev->devnum==-1) returns NULL @@ -914,7 +914,7 @@ __weak int usb_alloc_device(struct usb_device *udev) { return 0; } -#endif /* !CONFIG_IS_ENABLED(DM_USB) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB) */ static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub) { @@ -1185,7 +1185,7 @@ int usb_setup_device(struct usb_device *dev, bool do_read, return ret; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* * By the time we get here, the device has gotten a new device ID * and is in the default state. We need to identify the thing and @@ -1234,14 +1234,14 @@ int board_usb_cleanup(int index, enum usb_init_type init) bool usb_device_has_child_on_port(struct usb_device *parent, int port) { -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) return false; #else return parent->children[port] != NULL; #endif } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) void usb_find_usb2_hub_address_port(struct usb_device *udev, uint8_t *hub_address, uint8_t *hub_port) { diff --git a/common/usb_hub.c b/common/usb_hub.c index a36350f846c..2e450efc83e 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -70,7 +70,7 @@ static inline bool usb_hub_is_superspeed(struct usb_device *hdev) return hdev->descriptor.bDeviceProtocol == 3; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) bool usb_hub_is_root_hub(struct udevice *hub) { if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB) @@ -131,7 +131,7 @@ int usb_get_port_status(struct usb_device *dev, int port, void *data) USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, data, sizeof(struct usb_port_status), USB_CNTL_TIMEOUT); -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) if (ret < 0) return ret; @@ -193,7 +193,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub) * but allow this time to be increased via env variable as some * devices break the spec and require longer warm-up times */ -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) env = env_get("usb_pgood_delay"); if (env) pgood_delay = max(pgood_delay, @@ -218,7 +218,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub) max(100, (int)pgood_delay) + HUB_DEBOUNCE_TIMEOUT); } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) static struct usb_hub_device hub_dev[USB_MAX_HUB]; static int usb_hub_index; @@ -274,7 +274,7 @@ static int usb_hub_port_reset(struct usb_device *dev, int port, unsigned short portstatus, portchange; int delay = HUB_SHORT_RESET_TIME; /* start with short reset delay */ -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) debug("%s: resetting '%s' port %d...\n", __func__, dev->dev->name, port + 1); #else @@ -395,7 +395,7 @@ int usb_hub_port_connect_change(struct usb_device *dev, int port) break; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct udevice *child; ret = usb_scan_device(dev->dev, port + 1, speed, &child); @@ -587,7 +587,7 @@ static struct usb_hub_device *usb_get_hub_device(struct usb_device *dev) { struct usb_hub_device *hub; -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* "allocate" Hub device */ hub = usb_hub_allocate(); #else @@ -771,7 +771,7 @@ static int usb_hub_configure(struct usb_device *dev) (le16_to_cpu(hubsts->wHubStatus) & HUB_STATUS_OVERCURRENT) ? \ "" : "no "); -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /* * Update USB host controller's internal representation of this hub * after the hub descriptor is fetched. @@ -913,7 +913,7 @@ int usb_hub_probe(struct usb_device *dev, int ifnum) return ret; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) int usb_hub_scan(struct udevice *hub) { struct usb_device *udev = dev_get_parent_priv(hub); diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 4cbc9acb738..13fc0312346 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -580,7 +580,7 @@ static int probe_usb_keyboard(struct usb_device *dev) return error; stdinname = env_get("stdin"); -#if CONFIG_IS_ENABLED(CONSOLE_MUX) +#if IS_ENABLED(CONFIG_CONSOLE_MUX) if (strstr(stdinname, DEVNAME) != NULL) { error = iomux_doenv(stdin, stdinname); if (error) @@ -602,7 +602,7 @@ static int probe_usb_keyboard(struct usb_device *dev) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* Search for keyboard and register it if found. */ int drv_usb_kbd_init(void) { @@ -635,7 +635,7 @@ int drv_usb_kbd_init(void) /* Deregister the keyboard. */ int usb_kbd_deregister(int force) { -#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) +#if IS_ENABLED(CONFIG_SYS_STDIO_DEREGISTER) struct stdio_dev *dev; struct usb_device *usb_kbd_dev; struct usb_kbd_pdata *data; @@ -644,7 +644,7 @@ int usb_kbd_deregister(int force) if (dev) { usb_kbd_dev = (struct usb_device *)dev->priv; data = usb_kbd_dev->privptr; -#if CONFIG_IS_ENABLED(CONSOLE_MUX) +#if IS_ENABLED(CONFIG_CONSOLE_MUX) if (iomux_replace_device(stdin, DEVNAME, force ? "nulldev" : "")) return 1; #endif @@ -665,7 +665,7 @@ int usb_kbd_deregister(int force) #endif -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int usb_kbd_probe(struct udevice *dev) { @@ -687,7 +687,7 @@ static int usb_kbd_remove(struct udevice *dev) goto err; } data = udev->privptr; -#if CONFIG_IS_ENABLED(CONSOLE_MUX) +#if IS_ENABLED(CONFIG_CONSOLE_MUX) if (iomux_replace_device(stdin, DEVNAME, "nulldev")) { ret = -ENOLINK; goto err; diff --git a/common/usb_storage.c b/common/usb_storage.c index ac642757737..227ee39755e 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -71,7 +71,7 @@ static __u32 CBWTag; static int usb_max_devs; /* number of highest available usb device */ -#if !CONFIG_IS_ENABLED(BLK) +#if !IS_ENABLED(CONFIG_BLK) static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV]; #endif @@ -104,7 +104,7 @@ struct us_data { unsigned short max_xfer_blk; /* maximum transfer blocks */ }; -#if !CONFIG_IS_ENABLED(BLK) +#if !IS_ENABLED(CONFIG_BLK) static struct us_data usb_stor[USB_MAX_STOR_DEV]; #endif @@ -116,7 +116,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *us, struct blk_desc *dev_desc); int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss); -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer); static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr, @@ -141,7 +141,7 @@ static void usb_show_progress(void) int usb_stor_info(void) { int count = 0; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct udevice *dev; for (blk_first_device(UCLASS_USB, &dev); @@ -191,7 +191,7 @@ static int usb_stor_probe_device(struct usb_device *udev) { int lun, max_lun; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct us_data *data; int ret; #else @@ -202,7 +202,7 @@ static int usb_stor_probe_device(struct usb_device *udev) #endif debug("\n\nProbing for storage\n"); -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) /* * We store the us_data in the mass storage device's plat. It * is shared by all LUNs (block devices) attached to this mass storage @@ -319,7 +319,7 @@ int usb_stor_scan(int mode) if (mode == 1) printf(" scanning usb for storage devices... "); -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) unsigned char i; usb_disable_asynch(1); /* asynch transfer not allowed */ @@ -977,7 +977,7 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev, */ unsigned short blk = 240; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) size_t size; int ret; @@ -1140,7 +1140,7 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor, } #endif /* CONFIG_USB_BIN_FIXUP */ -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) #else @@ -1155,14 +1155,14 @@ static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr, struct us_data *ss; int retry; struct scsi_cmd *srb = &usb_ccb; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct blk_desc *block_dev; #endif if (blkcnt == 0) return 0; /* Setup device */ -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) block_dev = dev_get_uclass_plat(dev); udev = dev_get_parent_priv(dev_get_parent(dev)); debug("\nusb_read: udev %d\n", block_dev->devnum); @@ -1223,7 +1223,7 @@ retry_it: return blkcnt; } -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) #else @@ -1238,7 +1238,7 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr, struct us_data *ss; int retry; struct scsi_cmd *srb = &usb_ccb; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct blk_desc *block_dev; #endif @@ -1246,7 +1246,7 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr, return 0; /* Setup device */ -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) block_dev = dev_get_uclass_plat(dev); udev = dev_get_parent_priv(dev_get_parent(dev)); debug("\nusb_read: udev %d\n", block_dev->devnum); @@ -1520,7 +1520,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, return 1; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int usb_mass_storage_probe(struct udevice *dev) { @@ -1544,7 +1544,7 @@ U_BOOT_DRIVER(usb_mass_storage) = { .id = UCLASS_MASS_STORAGE, .of_match = usb_mass_storage_ids, .probe = usb_mass_storage_probe, -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) .plat_auto = sizeof(struct us_data), #endif }; @@ -1565,7 +1565,7 @@ static const struct usb_device_id mass_storage_id_table[] = { U_BOOT_USB_DEVICE(usb_mass_storage, mass_storage_id_table); #endif -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static const struct blk_ops usb_storage_ops = { .read = usb_stor_read, .write = usb_stor_write, diff --git a/common/xyzModem.c b/common/xyzModem.c index fb319f71190..fb719fb6617 100644 --- a/common/xyzModem.c +++ b/common/xyzModem.c @@ -177,7 +177,7 @@ parse_num (char *s, unsigned long *val, char **es, char *delim) } -#if defined(DEBUG) && !CONFIG_IS_ENABLED(USE_TINY_PRINTF) +#if defined(DEBUG) && !IS_ENABLED(CONFIG_USE_TINY_PRINTF) /* * Note: this debug setup works by storing the strings in a fixed buffer */ @@ -417,7 +417,7 @@ ulong xyzModem_get_initial_timeout (void) { /* timeout is in seconds, non-positive timeout value is infinity */ -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) const char *timeout_str = env_get("loadxy_timeout"); if (timeout_str) return 1000 * simple_strtol(timeout_str, NULL, 10); diff --git a/disk/disk-uclass.c b/disk/disk-uclass.c index d32747e2242..d8590b85604 100644 --- a/disk/disk-uclass.c +++ b/disk/disk-uclass.c @@ -27,7 +27,7 @@ int part_create_block_devices(struct udevice *blk_dev) struct udevice *dev; int ret; - if (!CONFIG_IS_ENABLED(PARTITIONS) || !blk_enabled()) + if (!IS_ENABLED(CONFIG_PARTITIONS) || !blk_enabled()) return 0; if (device_get_uclass_id(blk_dev) != UCLASS_BLK) diff --git a/disk/part.c b/disk/part.c index d449635254e..058be6386d2 100644 --- a/disk/part.c +++ b/disk/part.c @@ -242,11 +242,11 @@ void part_init(struct blk_desc *dev_desc) static void print_part_header(const char *type, struct blk_desc *dev_desc) { -#if CONFIG_IS_ENABLED(MAC_PARTITION) || \ - CONFIG_IS_ENABLED(DOS_PARTITION) || \ - CONFIG_IS_ENABLED(ISO_PARTITION) || \ - CONFIG_IS_ENABLED(AMIGA_PARTITION) || \ - CONFIG_IS_ENABLED(EFI_PARTITION) +#if IS_ENABLED(CONFIG_MAC_PARTITION) || \ + IS_ENABLED(CONFIG_DOS_PARTITION) || \ + IS_ENABLED(CONFIG_ISO_PARTITION) || \ + IS_ENABLED(CONFIG_AMIGA_PARTITION) || \ + IS_ENABLED(CONFIG_EFI_PARTITION) puts ("\nPartition Map for "); switch (dev_desc->uclass_id) { case UCLASS_IDE: @@ -311,7 +311,7 @@ int part_get_info(struct blk_desc *dev_desc, int part, struct part_driver *drv; if (blk_enabled()) { -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) /* The common case is no UUID support */ info->uuid[0] = 0; #endif @@ -348,7 +348,7 @@ int part_get_info_whole_disk(struct blk_desc *dev_desc, info->bootable = 0; strcpy((char *)info->type, BOOT_PART_TYPE); strcpy((char *)info->name, "Whole Disk"); -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) info->uuid[0] = 0; #endif #ifdef CONFIG_PARTITION_TYPE_GUID diff --git a/disk/part_amiga.h b/disk/part_amiga.h index 42f5eb0f941..1e07ddc6412 100644 --- a/disk/part_amiga.h +++ b/disk/part_amiga.h @@ -9,7 +9,7 @@ #define _DISK_PART_AMIGA_H #include -#if CONFIG_IS_ENABLED(ISO_PARTITION) +#if IS_ENABLED(CONFIG_ISO_PARTITION) /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS have 2048 byte blocks */ #define DEFAULT_SECTOR_SIZE 2048 diff --git a/disk/part_dos.c b/disk/part_dos.c index 56e61884def..0fb390dfb52 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -231,7 +231,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc, return -1; } -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) if (!ext_part_sector) disksig = get_unaligned_le32(&buffer[DOS_PART_DISKSIG_OFFSET]); #endif @@ -256,7 +256,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc, /* sprintf(info->type, "%d, pt->sys_ind); */ strcpy((char *)info->type, "U-Boot"); info->bootable = get_bootable(pt); -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) sprintf(info->uuid, "%08x-%02x", disksig, part_num); #endif info->sys_ind = pt->sys_ind; @@ -292,7 +292,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc, info->blksz = DOS_PART_DEFAULT_SECTOR; info->bootable = 0; strcpy((char *)info->type, "U-Boot"); -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) info->uuid[0] = 0; #endif return 0; diff --git a/disk/part_efi.c b/disk/part_efi.c index 80a44dc9f07..98990894524 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -29,7 +29,7 @@ #include /* GUID for basic data partitons */ -#if CONFIG_IS_ENABLED(EFI_PARTITION) +#if IS_ENABLED(CONFIG_EFI_PARTITION) static const efi_guid_t partition_basic_data_guid = PARTITION_BASIC_DATA_GUID; #endif @@ -186,7 +186,7 @@ static void prepare_backup_gpt_header(gpt_header *gpt_h) gpt_h->header_crc32 = cpu_to_le32(calc_crc32); } -#if CONFIG_IS_ENABLED(EFI_PARTITION) +#if IS_ENABLED(CONFIG_EFI_PARTITION) /* * Public Functions (include/part.h) */ @@ -289,7 +289,7 @@ int part_get_info_efi(struct blk_desc *dev_desc, int part, print_efiname(&gpt_pte[part - 1])); strcpy((char *)info->type, "U-Boot"); info->bootable = get_bootable(&gpt_pte[part - 1]); -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) uuid_bin_to_str(gpt_pte[part - 1].unique_partition_guid.b, info->uuid, UUID_STR_FORMAT_GUID); #endif @@ -416,7 +416,7 @@ int gpt_fill_pte(struct blk_desc *dev_desc, le64_to_cpu(gpt_h->last_usable_lba); int i, k; size_t efiname_len, dosname_len; -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) char *str_uuid; unsigned char *bin_uuid; #endif @@ -488,7 +488,7 @@ int gpt_fill_pte(struct blk_desc *dev_desc, &partition_basic_data_guid, 16); #endif -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) str_uuid = partitions[i].uuid; bin_uuid = gpt_e[i].unique_partition_guid.b; diff --git a/disk/part_mac.h b/disk/part_mac.h index 5f396c94089..a750447ffe1 100644 --- a/disk/part_mac.h +++ b/disk/part_mac.h @@ -72,7 +72,7 @@ typedef struct mac_partition { __u32 boot_cksum; /* boot code checksum */ uchar processor[16]; /* Type of Processor */ __u16 part_pad[188]; /* reserved */ -#if CONFIG_IS_ENABLED(ISO_PARTITION) +#if IS_ENABLED(CONFIG_ISO_PARTITION) uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */ #endif } mac_partition_t; diff --git a/doc/develop/driver-model/i2c-howto.rst b/doc/develop/driver-model/i2c-howto.rst index 27e7440cd46..5b33ba5571a 100644 --- a/doc/develop/driver-model/i2c-howto.rst +++ b/doc/develop/driver-model/i2c-howto.rst @@ -25,7 +25,7 @@ forward to convert these, at some point there may come a patch to remove them! Here is a suggested approach for converting your I2C driver over to driver model. Please feel free to update this file with your ideas and suggestions. -- #ifdef out all your own I2C driver code (#if !CONFIG_IS_ENABLED(DM_I2C)) +- #ifdef out all your own I2C driver code (#if !IS_ENABLED(CONFIG_DM_I2C)) - Define CONFIG_DM_I2C for your board, vendor or architecture - If the board does not already use driver model, you need CONFIG_DM also - Your board should then build, but will not work fully since there will be diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst index 579eef5ca9f..d4e9e49aa4f 100644 --- a/doc/develop/driver-model/livetree.rst +++ b/doc/develop/driver-model/livetree.rst @@ -74,7 +74,7 @@ tree will be used in SPL and before relocation in U-Boot proper. Just before relocation a livetree is built, and this is used for U-Boot proper after relocation. -Most checks for livetree use CONFIG_IS_ENABLED(OF_LIVE). This means that +Most checks for livetree use IS_ENABLED(CONFIG_OF_LIVE). This means that for SPL, the CONFIG_SPL_OF_LIVE option is checked. At present this does not exist, since SPL does not support livetree. diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/driver-model/of-plat.rst index b454f7be85e..aa6621b6cf7 100644 --- a/doc/develop/driver-model/of-plat.rst +++ b/doc/develop/driver-model/of-plat.rst @@ -39,7 +39,7 @@ SPL/TPL and should be tested with: .. code-block:: c - #if CONFIG_IS_ENABLED(OF_PLATDATA) + #if IS_ENABLED(CONFIG_OF_PLATDATA) A tool called 'dtoc' converts a devicetree file either into a set of struct declarations, one for each compatible node, and a set of @@ -202,7 +202,7 @@ For example: #include struct mmc_plat { - #if CONFIG_IS_ENABLED(OF_PLATDATA) + #if IS_ENABLED(CONFIG_OF_PLATDATA) /* Put this first since driver model will copy the data here */ struct dtd_mmc dtplat; #endif @@ -215,7 +215,7 @@ For example: static int mmc_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { /* Decode the devicetree data */ struct mmc_plat *plat = dev_get_plat(dev); const void *blob = gd->fdt_blob; @@ -231,7 +231,7 @@ For example: { struct mmc_plat *plat = dev_get_plat(dev); - #if CONFIG_IS_ENABLED(OF_PLATDATA) + #if IS_ENABLED(CONFIG_OF_PLATDATA) /* Decode the of-platdata from the C structures */ struct dtd_mmc *dtplat = &plat->dtplat; @@ -863,7 +863,7 @@ The dt-structs.h file includes the generated file `(include/generated/dt-structs.h`) if CONFIG_SPL_OF_PLATDATA is enabled. Otherwise (such as in U-Boot proper) these structs are not available. This prevents them being used inadvertently. All usage must be bracketed with -`#if CONFIG_IS_ENABLED(OF_PLATDATA)`. +`#if IS_ENABLED(CONFIG_OF_PLATDATA)`. The dt-plat.c file contains the device declarations and is is built in spl/dt-plat.c. diff --git a/doc/develop/spl.rst b/doc/develop/spl.rst index aec7b562faa..73f5aa9b42c 100644 --- a/doc/develop/spl.rst +++ b/doc/develop/spl.rst @@ -69,10 +69,10 @@ CONFIG_SPL_WATCHDOG (drivers/watchdog/libwatchdog.o) Adding SPL-specific code ------------------------ -To check whether a feature is enabled, use CONFIG_IS_ENABLED():: +To check whether a feature is enabled, use IS_ENABLED():: - if (CONFIG_IS_ENABLED(CLK)) - ... + if (IS_ENABLED(CONFIG_CLK)) + ... This checks CONFIG_CLK for the main build, CONFIG_SPL_CLK for the SPL build, CONFIG_TPL_CLK for the TPL build, etc. diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 37023512f0d..770ce494b09 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -585,7 +585,7 @@ static int meson_saradc_init(struct meson_saradc_priv *priv) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&priv->core_clk); if (ret) return ret; @@ -605,7 +605,7 @@ static int meson_saradc_init(struct meson_saradc_priv *priv) udelay(5); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&priv->adc_clk); if (ret) return ret; @@ -667,7 +667,7 @@ static int meson_saradc_probe(struct udevice *dev) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_name(dev, "core", &priv->core_clk); if (ret) return ret; diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index 167b5a395f5..bd71a313837 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -957,7 +957,7 @@ U_BOOT_DRIVER(dwc_ahsata_blk) = { .ops = &dwc_ahsata_blk_ops, }; -#if CONFIG_IS_ENABLED(DWC_AHSATA_AHCI) +#if IS_ENABLED(CONFIG_DWC_AHSATA_AHCI) struct ahci_ops dwc_ahsata_ahci_ops = { .port_status = dwc_ahsata_port_status, .reset = dwc_ahsata_bus_reset, diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index c69fc4d5182..d05ce1c016d 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -766,7 +766,7 @@ int blk_unbind_all(int uclass_id) static int blk_post_probe(struct udevice *dev) { - if (CONFIG_IS_ENABLED(PARTITIONS) && blk_enabled()) { + if (IS_ENABLED(CONFIG_PARTITIONS) && blk_enabled()) { struct blk_desc *desc = dev_get_uclass_plat(dev); part_init(desc); diff --git a/drivers/block/host-uclass.c b/drivers/block/host-uclass.c index 6460d968c23..8c0ed4e9cad 100644 --- a/drivers/block/host-uclass.c +++ b/drivers/block/host-uclass.c @@ -169,7 +169,7 @@ void host_set_cur_dev(struct udevice *dev) UCLASS_DRIVER(host) = { .id = UCLASS_HOST, .name = "host", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif .priv_auto = sizeof(struct host_priv), diff --git a/drivers/block/host_dev.c b/drivers/block/host_dev.c index 5885fc358a5..b47c1e7d5ec 100644 --- a/drivers/block/host_dev.c +++ b/drivers/block/host_dev.c @@ -113,7 +113,7 @@ static int host_sb_bind(struct udevice *dev) snprintf(desc->product, BLK_PRD_SIZE, "hostfile"); snprintf(desc->revision, BLK_REV_SIZE, "1.0"); - if (CONFIG_IS_ENABLED(BOOTSTD)) { + if (IS_ENABLED(CONFIG_BOOTSTD)) { ret = bootdev_bind(dev, "host_bootdev", "bootdev", &bdev); if (ret) return log_msg_ret("bd", ret); diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 2f9635524cf..13470cc5e52 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -35,7 +35,7 @@ struct clk *dev_get_clk_ptr(struct udevice *dev) return (struct clk *)dev_get_uclass_priv(dev); } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int clk_get_by_phandle(struct udevice *dev, const struct phandle_1_arg *cells, struct clk *clk) { @@ -50,7 +50,7 @@ int clk_get_by_phandle(struct udevice *dev, const struct phandle_1_arg *cells, } #endif -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int clk_of_xlate_default(struct clk *clk, struct ofnode_phandle_args *args) { @@ -190,7 +190,7 @@ static struct clk *clk_set_default_get_by_id(struct clk *clk) { struct clk *c = clk; - if (CONFIG_IS_ENABLED(CLK_CCF)) { + if (IS_ENABLED(CONFIG_CLK_CCF)) { int ret = clk_get_by_id(clk->id, &c); if (ret) { @@ -549,7 +549,7 @@ static void clk_get_priv(struct clk *clk, struct clk **clkp) *clkp = clk; /* get private clock struct associated to the provided clock */ - if (CONFIG_IS_ENABLED(CLK_CCF)) { + if (IS_ENABLED(CONFIG_CLK_CCF)) { /* Take id 0 as a non-valid clk, such as dummy */ if (clk->id) clk_get_by_id(clk->id, clkp); @@ -611,7 +611,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) if (ret) return ret; - if (CONFIG_IS_ENABLED(CLK_CCF)) + if (IS_ENABLED(CONFIG_CLK_CCF)) ret = device_reparent(clk->dev, parent->dev); return ret; @@ -628,7 +628,7 @@ int clk_enable(struct clk *clk) return 0; ops = clk_dev_ops(clk->dev); - if (CONFIG_IS_ENABLED(CLK_CCF)) { + if (IS_ENABLED(CONFIG_CLK_CCF)) { /* Take id 0 as a non-valid clk, such as dummy */ if (clk->id && !clk_get_by_id(clk->id, &clkp)) { if (clkp->enable_count) { @@ -688,7 +688,7 @@ int clk_disable(struct clk *clk) return 0; ops = clk_dev_ops(clk->dev); - if (CONFIG_IS_ENABLED(CLK_CCF)) { + if (IS_ENABLED(CONFIG_CLK_CCF)) { if (clk->id && !clk_get_by_id(clk->id, &clkp)) { if (clkp->flags & CLK_IS_CRITICAL) return 0; diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c index 6c1139e5c51..dfccd75cb68 100644 --- a/drivers/clk/clk_fixed_factor.c +++ b/drivers/clk/clk_fixed_factor.c @@ -43,7 +43,7 @@ const struct clk_ops clk_fixed_factor_ops = { static int clk_fixed_factor_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { int err; struct clk_fixed_factor *ff = to_clk_fixed_factor(dev); diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index b5e78c70559..eae7e690e03 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/drivers/clk/clk_fixed_rate.c @@ -36,7 +36,7 @@ void clk_fixed_rate_ofdata_to_plat_(struct udevice *dev, struct clk_fixed_rate *plat) { struct clk *clk = &plat->clk; - if (CONFIG_IS_ENABLED(OF_REAL)) + if (IS_ENABLED(CONFIG_OF_REAL)) plat->fixed_rate = dev_read_u32_default(dev, "clock-frequency", 0); @@ -64,7 +64,7 @@ static int clk_fixed_rate_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(CLK_CCF) +#if IS_ENABLED(CONFIG_CLK_CCF) struct clk *clk_register_fixed_rate(struct device *dev, const char *name, ulong rate) { diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c index 636914db8ca..fdaa48e98a2 100644 --- a/drivers/clk/clk_sandbox.c +++ b/drivers/clk/clk_sandbox.c @@ -177,7 +177,7 @@ int clk_fixed_rate_of_to_plat(struct udevice *dev) { struct clk_fixed_rate *cplat; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct sandbox_clk_fixed_rate_plat *plat = dev_get_plat(dev); cplat = &plat->fixed; diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index d172fed24c9..363bbca656d 100644 --- a/drivers/clk/clk_scmi.c +++ b/drivers/clk/clk_scmi.c @@ -158,7 +158,7 @@ static int scmi_clk_probe(struct udevice *dev) if (ret) return ret; - if (!CONFIG_IS_ENABLED(CLK_CCF)) + if (!IS_ENABLED(CONFIG_CLK_CCF)) return 0; /* register CCF children: CLK UCLASS, no probed again */ diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 663b9a1bc7e..2cbd87ce25c 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -97,7 +97,7 @@ static const char *imx8mm_usb_core_sels[] = {"clock-osc-24m", "sys_pll1_100m", " static const char *imx8mm_usb_phy_sels[] = {"clock-osc-24m", "sys_pll1_100m", "sys_pll1_40m", "sys_pll2_100m", "sys_pll2_200m", "clk_ext2", "clk_ext3", "audio_pll2_out", }; -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) static const char *imx8mm_ecspi1_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", }; @@ -339,7 +339,7 @@ static int imx8mm_clk_probe(struct udevice *dev) imx_clk_gate4("pwm4_root_clk", "pwm4", base + 0x42b0, 0)); #endif -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) clk_dm(IMX8MM_CLK_ECSPI1, imx8m_clk_composite("ecspi1", imx8mm_ecspi1_sels, base + 0xb280)); clk_dm(IMX8MM_CLK_ECSPI2, diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 35e0d935d39..fd8bd486f67 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -57,7 +57,7 @@ static const char *imx8mn_usdhc1_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sy static const char *imx8mn_usdhc2_sels[] = {"clock-osc-24m", "sys_pll1_400m", "sys_pll1_800m", "sys_pll2_500m", "sys_pll3_out", "sys_pll1_266m", "audio_pll2_out", "sys_pll1_100m", }; -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) static const char *imx8mn_ecspi1_sels[] = {"osc_24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", }; @@ -332,7 +332,7 @@ static int imx8mn_clk_probe(struct udevice *dev) base + 0x40a0, 0)); #endif -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) clk_dm(IMX8MN_CLK_ECSPI1, imx8m_clk_composite("ecspi1", imx8mn_ecspi1_sels, base + 0xb280)); clk_dm(IMX8MN_CLK_ECSPI2, diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c index 259ea335959..12b88a5a6aa 100644 --- a/drivers/clk/mediatek/clk-mt7622.c +++ b/drivers/clk/mediatek/clk-mt7622.c @@ -639,7 +639,7 @@ static int mt7622_ethsys_bind(struct udevice *dev) { int ret = 0; -#if CONFIG_IS_ENABLED(RESET_MEDIATEK) +#if IS_ENABLED(CONFIG_RESET_MEDIATEK) ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1); if (ret) debug("Warning: failed to bind reset controller\n"); diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c index 0c7411ee814..36957c1265b 100644 --- a/drivers/clk/mediatek/clk-mt7623.c +++ b/drivers/clk/mediatek/clk-mt7623.c @@ -802,7 +802,7 @@ static int mt7623_ethsys_hifsys_bind(struct udevice *dev) { int ret = 0; -#if CONFIG_IS_ENABLED(RESET_MEDIATEK) +#if IS_ENABLED(CONFIG_RESET_MEDIATEK) ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1); if (ret) debug("Warning: failed to bind reset controller\n"); diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c index 31b6fa02251..5ecf9a14ce2 100644 --- a/drivers/clk/mediatek/clk-mt7629.c +++ b/drivers/clk/mediatek/clk-mt7629.c @@ -632,7 +632,7 @@ static int mt7629_ethsys_bind(struct udevice *dev) { int ret = 0; -#if CONFIG_IS_ENABLED(RESET_MEDIATEK) +#if IS_ENABLED(CONFIG_RESET_MEDIATEK) ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1); if (ret) debug("Warning: failed to bind reset controller\n"); diff --git a/drivers/clk/mediatek/clk-mt7981.c b/drivers/clk/mediatek/clk-mt7981.c index 7fcb81419cd..98d5921f8ae 100644 --- a/drivers/clk/mediatek/clk-mt7981.c +++ b/drivers/clk/mediatek/clk-mt7981.c @@ -658,7 +658,7 @@ static int mt7981_ethsys_bind(struct udevice *dev) { int ret = 0; - if (CONFIG_IS_ENABLED(RESET_MEDIATEK)) { + if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) { ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1); if (ret) debug("Warning: failed to bind reset controller\n"); diff --git a/drivers/clk/mediatek/clk-mt7986.c b/drivers/clk/mediatek/clk-mt7986.c index b3fa63fc0ab..e44d3634496 100644 --- a/drivers/clk/mediatek/clk-mt7986.c +++ b/drivers/clk/mediatek/clk-mt7986.c @@ -647,7 +647,7 @@ static int mt7986_ethsys_bind(struct udevice *dev) { int ret = 0; - if (CONFIG_IS_ENABLED(RESET_MEDIATEK)) { + if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) { ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1); if (ret) debug("Warning: failed to bind reset controller\n"); diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c index 33a7348b9fc..0b42d81130b 100644 --- a/drivers/clk/rockchip/clk_px30.c +++ b/drivers/clk/rockchip/clk_px30.c @@ -1370,7 +1370,7 @@ static ulong px30_clk_set_rate(struct clk *clk, ulong rate) return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int px30_gmac_set_parent(struct clk *clk, struct clk *parent) { struct px30_clk_priv *priv = dev_get_priv(clk->dev); @@ -1427,7 +1427,7 @@ static int px30_clk_enable(struct clk *clk) static struct clk_ops px30_clk_ops = { .get_rate = px30_clk_get_rate, .set_rate = px30_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .set_parent = px30_clk_set_parent, #endif .enable = px30_clk_enable, @@ -1504,7 +1504,7 @@ static int px30_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct px30_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 12); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c index 026858459e3..92f386cd59d 100644 --- a/drivers/clk/rockchip/clk_rk3036.c +++ b/drivers/clk/rockchip/clk_rk3036.c @@ -357,7 +357,7 @@ static int rk3036_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3036_cru, cru_softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 9); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3066.c b/drivers/clk/rockchip/clk_rk3066.c index 2c12f6e0441..52324a88703 100644 --- a/drivers/clk/rockchip/clk_rk3066.c +++ b/drivers/clk/rockchip/clk_rk3066.c @@ -30,7 +30,7 @@ #include struct rk3066_clk_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3066a_cru dtd; #endif }; @@ -636,7 +636,7 @@ static struct clk_ops rk3066_clk_ops = { static int rk3066_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3066_clk_priv *priv = dev_get_priv(dev); priv->cru = dev_read_addr_ptr(dev); @@ -653,7 +653,7 @@ static int rk3066_clk_probe(struct udevice *dev) if (IS_ERR(priv->grf)) return PTR_ERR(priv->grf); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3066_clk_plat *plat = dev_get_plat(dev); priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -689,7 +689,7 @@ static int rk3066_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } - if (CONFIG_IS_ENABLED(RESET_ROCKCHIP)) { + if (IS_ENABLED(CONFIG_RESET_ROCKCHIP)) { reg_offset = offsetof(struct rk3066_cru, cru_softrst_con[0]); ret = rockchip_reset_bind(dev, reg_offset, 9); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c index 038cb55965e..d5284f40ff6 100644 --- a/drivers/clk/rockchip/clk_rk3188.c +++ b/drivers/clk/rockchip/clk_rk3188.c @@ -33,7 +33,7 @@ enum rk3188_clk_type { }; struct rk3188_clk_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3188_cru dtd; #endif }; @@ -540,7 +540,7 @@ static struct clk_ops rk3188_clk_ops = { static int rk3188_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3188_clk_priv *priv = dev_get_priv(dev); priv->cru = dev_read_addr_ptr(dev); @@ -560,7 +560,7 @@ static int rk3188_clk_probe(struct udevice *dev) priv->has_bwadj = (type == RK3188A_CRU) ? 1 : 0; #ifdef CONFIG_SPL_BUILD -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3188_clk_plat *plat = dev_get_plat(dev); priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -596,7 +596,7 @@ static int rk3188_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3188_cru, cru_softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 9); if (ret) diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c index dbef606d887..48c4824f3ca 100644 --- a/drivers/clk/rockchip/clk_rk322x.c +++ b/drivers/clk/rockchip/clk_rk322x.c @@ -514,7 +514,7 @@ static int rk322x_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk322x_cru, cru_softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 9); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c index 3b29992c3e5..13629ee1c0f 100644 --- a/drivers/clk/rockchip/clk_rk3288.c +++ b/drivers/clk/rockchip/clk_rk3288.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; struct rk3288_clk_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3288_cru dtd; #endif }; @@ -950,14 +950,14 @@ static int __maybe_unused rk3288_clk_set_parent(struct clk *clk, struct clk *par static struct clk_ops rk3288_clk_ops = { .get_rate = rk3288_clk_get_rate, .set_rate = rk3288_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .set_parent = rk3288_clk_set_parent, #endif }; static int rk3288_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3288_clk_priv *priv = dev_get_priv(dev); priv->cru = dev_read_addr_ptr(dev); @@ -975,7 +975,7 @@ static int rk3288_clk_probe(struct udevice *dev) if (IS_ERR(priv->grf)) return PTR_ERR(priv->grf); #ifdef CONFIG_SPL_BUILD -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3288_clk_plat *plat = dev_get_plat(dev); priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -1022,7 +1022,7 @@ static int rk3288_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rockchip_cru, cru_softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 12); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c index 2876643e6be..952436a754d 100644 --- a/drivers/clk/rockchip/clk_rk3308.c +++ b/drivers/clk/rockchip/clk_rk3308.c @@ -939,7 +939,7 @@ static ulong rk3308_clk_set_rate(struct clk *clk, ulong rate) return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int __maybe_unused rk3308_mac_set_parent(struct clk *clk, struct clk *parent) { struct rk3308_clk_priv *priv = dev_get_priv(clk->dev); @@ -976,7 +976,7 @@ static int __maybe_unused rk3308_clk_set_parent(struct clk *clk, struct clk *par static struct clk_ops rk3308_clk_ops = { .get_rate = rk3308_clk_get_rate, .set_rate = rk3308_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .set_parent = rk3308_clk_set_parent, #endif }; @@ -1050,7 +1050,7 @@ static int rk3308_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3308_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 12); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c index b825ff4cf83..8b486473b0a 100644 --- a/drivers/clk/rockchip/clk_rk3328.c +++ b/drivers/clk/rockchip/clk_rk3328.c @@ -827,7 +827,7 @@ static int rk3328_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3328_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 12); if (ret) diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c index ea8d120738f..b4ef477267c 100644 --- a/drivers/clk/rockchip/clk_rk3368.c +++ b/drivers/clk/rockchip/clk_rk3368.c @@ -25,7 +25,7 @@ #include #include -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3368_clk_plat { struct dtd_rockchip_rk3368_cru dtd; }; @@ -158,7 +158,7 @@ static void rkclk_init(struct rk3368_cru *cru) } #endif -#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC) +#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC) static ulong rk3368_mmc_get_clk(struct rk3368_cru *cru, uint clk_id) { u32 div, con, con_id, rate; @@ -470,7 +470,7 @@ static ulong rk3368_clk_get_rate(struct clk *clk) case SCLK_SPI0 ... SCLK_SPI2: rate = rk3368_spi_get_clk(priv->cru, clk->id); break; -#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC) +#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC) case HCLK_SDMMC: case HCLK_EMMC: rate = rk3368_mmc_get_clk(priv->cru, clk->id); @@ -501,7 +501,7 @@ static ulong rk3368_clk_set_rate(struct clk *clk, ulong rate) ret = rk3368_ddr_set_clk(priv->cru, rate); break; #endif -#if !IS_ENABLED(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(MMC) +#if !IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_MMC) case HCLK_SDMMC: case HCLK_EMMC: ret = rk3368_mmc_set_clk(clk, rate); @@ -574,7 +574,7 @@ static int __maybe_unused rk3368_clk_set_parent(struct clk *clk, struct clk *par static struct clk_ops rk3368_clk_ops = { .get_rate = rk3368_clk_get_rate, .set_rate = rk3368_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .set_parent = rk3368_clk_set_parent, #endif }; @@ -582,7 +582,7 @@ static struct clk_ops rk3368_clk_ops = { static int rk3368_clk_probe(struct udevice *dev) { struct rk3368_clk_priv __maybe_unused *priv = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3368_clk_plat *plat = dev_get_plat(dev); priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -596,7 +596,7 @@ static int rk3368_clk_probe(struct udevice *dev) static int rk3368_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3368_clk_priv *priv = dev_get_priv(dev); priv->cru = dev_read_addr_ptr(dev); @@ -625,7 +625,7 @@ static int rk3368_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3368_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 15); if (ret) @@ -645,7 +645,7 @@ U_BOOT_DRIVER(rockchip_rk3368_cru) = { .id = UCLASS_CLK, .of_match = rk3368_clk_ids, .priv_auto = sizeof(struct rk3368_clk_priv), -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rk3368_clk_plat), #endif .of_to_plat = rk3368_clk_of_to_plat, diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index eaeac451df4..a26e9046db8 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3399_clk_plat { struct dtd_rockchip_rk3399_cru dtd; }; @@ -1309,7 +1309,7 @@ static int rk3399_clk_disable(struct clk *clk) static struct clk_ops rk3399_clk_ops = { .get_rate = rk3399_clk_get_rate, .set_rate = rk3399_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .set_parent = rk3399_clk_set_parent, #endif .enable = rk3399_clk_enable, @@ -1399,7 +1399,7 @@ static int rk3399_clk_probe(struct udevice *dev) struct rk3399_clk_priv *priv = dev_get_priv(dev); bool init_clocks = false; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3399_clk_plat *plat = dev_get_plat(dev); priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -1407,7 +1407,7 @@ static int rk3399_clk_probe(struct udevice *dev) #if defined(CONFIG_SPL_BUILD) init_clocks = true; -#elif CONFIG_IS_ENABLED(HANDOFF) +#elif IS_ENABLED(CONFIG_HANDOFF) if (!(gd->flags & GD_FLG_RELOC)) { if (!(gd->spl_handoff)) init_clocks = true; @@ -1422,7 +1422,7 @@ static int rk3399_clk_probe(struct udevice *dev) static int rk3399_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3399_clk_priv *priv = dev_get_priv(dev); priv->cru = dev_read_addr_ptr(dev); @@ -1451,7 +1451,7 @@ static int rk3399_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rockchip_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 21); if (ret) @@ -1475,7 +1475,7 @@ U_BOOT_DRIVER(clk_rk3399) = { .ops = &rk3399_clk_ops, .bind = rk3399_clk_bind, .probe = rk3399_clk_probe, -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rk3399_clk_plat), #endif }; @@ -1617,11 +1617,11 @@ static void pmuclk_init(struct rk3399_pmucru *pmucru) static int rk3399_pmuclk_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) || !defined(CONFIG_SPL_BUILD) +#if IS_ENABLED(CONFIG_OF_PLATDATA) || !defined(CONFIG_SPL_BUILD) struct rk3399_pmuclk_priv *priv = dev_get_priv(dev); #endif -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3399_pmuclk_plat *plat = dev_get_plat(dev); priv->pmucru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]); @@ -1635,7 +1635,7 @@ static int rk3399_pmuclk_probe(struct udevice *dev) static int rk3399_pmuclk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3399_pmuclk_priv *priv = dev_get_priv(dev); priv->pmucru = dev_read_addr_ptr(dev); @@ -1646,7 +1646,7 @@ static int rk3399_pmuclk_of_to_plat(struct udevice *dev) static int rk3399_pmuclk_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) int ret; ret = offsetof(struct rk3399_pmucru, pmucru_softrst_con[0]); @@ -1671,7 +1671,7 @@ U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = { .ops = &rk3399_pmuclk_ops, .probe = rk3399_pmuclk_probe, .bind = rk3399_pmuclk_bind, -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rk3399_pmuclk_plat), #endif }; diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c index d5e45e7602c..82720672a60 100644 --- a/drivers/clk/rockchip/clk_rk3568.c +++ b/drivers/clk/rockchip/clk_rk3568.c @@ -19,7 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3568_clk_plat { struct dtd_rockchip_rk3568_cru dtd; }; @@ -491,7 +491,7 @@ static int rk3568_pmuclk_ofdata_to_platdata(struct udevice *dev) static int rk3568_pmuclk_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) int ret = 0; ret = offsetof(struct rk3568_pmucru, pmu_softrst_con[0]); @@ -517,7 +517,7 @@ U_BOOT_DRIVER(rockchip_rk3568_pmucru) = { .ops = &rk3568_pmuclk_ops, .bind = rk3568_pmuclk_bind, .probe = rk3568_pmuclk_probe, -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rk3568_pmuclk_plat), #endif @@ -2936,7 +2936,7 @@ static int rk3568_clk_bind(struct udevice *dev) glb_srsr_snd); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rk3568_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 30); if (ret) @@ -2960,7 +2960,7 @@ U_BOOT_DRIVER(rockchip_rk3568_cru) = { .ops = &rk3568_clk_ops, .bind = rk3568_clk_bind, .probe = rk3568_clk_probe, -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rk3568_clk_plat), #endif }; diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c index 555155b16da..fdefa72c768 100644 --- a/drivers/clk/rockchip/clk_rv1108.c +++ b/drivers/clk/rockchip/clk_rv1108.c @@ -702,7 +702,7 @@ static int rv1108_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rv1108_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 13); if (ret) diff --git a/drivers/clk/rockchip/clk_rv1126.c b/drivers/clk/rockchip/clk_rv1126.c index 3ed29364deb..bef68ce91cd 100644 --- a/drivers/clk/rockchip/clk_rv1126.c +++ b/drivers/clk/rockchip/clk_rv1126.c @@ -499,7 +499,7 @@ static int rv1126_pmuclk_of_to_plat(struct udevice *dev) static int rv1126_pmuclk_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) int ret; ret = offsetof(struct rv1126_pmucru, pmu_softrst_con[0]); @@ -1622,7 +1622,7 @@ static ulong rv1126_clk_set_rate(struct clk *clk, ulong rate) return ret; }; -#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA) static int rv1126_gmac_src_set_parent(struct clk *clk, struct clk *parent) { struct rv1126_clk_priv *priv = dev_get_priv(clk->dev); @@ -1705,7 +1705,7 @@ static int rv1126_clk_set_parent(struct clk *clk, struct clk *parent) static struct clk_ops rv1126_clk_ops = { .get_rate = rv1126_clk_get_rate, .set_rate = rv1126_clk_set_rate, -#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA) .set_parent = rv1126_clk_set_parent, #endif }; @@ -1863,7 +1863,7 @@ static int rv1126_clk_bind(struct udevice *dev) dev_set_priv(sys_child, priv); } -#if CONFIG_IS_ENABLED(RESET_ROCKCHIP) +#if IS_ENABLED(CONFIG_RESET_ROCKCHIP) ret = offsetof(struct rv1126_cru, softrst_con[0]); ret = rockchip_reset_bind(dev, ret, 15); if (ret) diff --git a/drivers/core/device.c b/drivers/core/device.c index d9ce546c0c4..1190ccda694 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -47,7 +47,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, bool auto_seq = true; void *ptr; - if (CONFIG_IS_ENABLED(OF_PLATDATA_NO_BIND)) + if (IS_ENABLED(CONFIG_OF_PLATDATA_NO_BIND)) return -ENOSYS; if (devp) @@ -68,7 +68,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, INIT_LIST_HEAD(&dev->sibling_node); INIT_LIST_HEAD(&dev->child_head); INIT_LIST_HEAD(&dev->uclass_node); -#if CONFIG_IS_ENABLED(DEVRES) +#if IS_ENABLED(CONFIG_DEVRES) INIT_LIST_HEAD(&dev->devres_head); #endif dev_set_plat(dev, plat); @@ -80,14 +80,14 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, dev->uclass = uc; dev->seq_ = -1; - if (CONFIG_IS_ENABLED(DM_SEQ_ALIAS) && + if (IS_ENABLED(CONFIG_DM_SEQ_ALIAS) && (uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS)) { /* * Some devices, such as a SPI bus, I2C bus and serial ports * are numbered using aliases. */ - if (CONFIG_IS_ENABLED(OF_CONTROL) && - !CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (IS_ENABLED(CONFIG_OF_CONTROL) && + !IS_ENABLED(CONFIG_OF_PLATDATA)) { if (uc->uc_drv->name && ofnode_valid(node)) { if (!dev_read_alias_seq(dev, &dev->seq_)) { auto_seq = false; @@ -107,7 +107,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, * For of-platdata, we try use the existing data, but if * plat_auto is larger, we must allocate a new space */ - if (CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA)) { if (of_plat_size) dev_or_flags(dev, DM_FLAG_OF_PLATDATA); if (of_plat_size < drv->plat_auto) @@ -125,7 +125,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, * For of-platdata, copy the old plat into the new * space */ - if (CONFIG_IS_ENABLED(OF_PLATDATA) && plat) + if (IS_ENABLED(CONFIG_OF_PLATDATA) && plat) memcpy(ptr, plat, of_plat_size); dev_set_plat(dev, ptr); } @@ -192,7 +192,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, fail_uclass_post_bind: /* There is no child unbind() method, so no clean-up required */ fail_child_post_bind: - if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) { if (drv->unbind && drv->unbind(dev)) { dm_warn("unbind() method failed on dev '%s' on error path\n", dev->name); @@ -200,14 +200,14 @@ fail_child_post_bind: } fail_bind: - if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) { if (uclass_unbind_device(dev)) { dm_warn("Failed to unbind dev '%s' on error path\n", dev->name); } } fail_uclass_bind: - if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) { list_del(&dev->sibling_node); if (dev_get_flags(dev) & DM_FLAG_ALLOC_PARENT_PDATA) { free(dev_get_parent_plat(dev)); @@ -215,14 +215,14 @@ fail_uclass_bind: } } fail_alloc3: - if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) { if (dev_get_flags(dev) & DM_FLAG_ALLOC_UCLASS_PDATA) { free(dev_get_uclass_plat(dev)); dev_set_uclass_plat(dev, NULL); } } fail_alloc2: - if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (IS_ENABLED(CONFIG_DM_DEVICE_REMOVE)) { if (dev_get_flags(dev) & DM_FLAG_ALLOC_PDATA) { free(dev_get_plat(dev)); dev_set_plat(dev, NULL); @@ -266,7 +266,7 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, if (pre_reloc_only && !(drv->flags & DM_FLAG_PRE_RELOC)) return -EPERM; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) plat_size = info->plat_size; #endif ret = device_bind_common(parent, drv, info->name, (void *)info->plat, 0, @@ -400,7 +400,7 @@ int device_of_to_plat(struct udevice *dev) * This is not needed if binding is disabled, since data is allocated * at build time. */ - if (!CONFIG_IS_ENABLED(OF_PLATDATA_NO_BIND)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA_NO_BIND)) { /* Ensure all parents have ofdata */ if (dev->parent) { ret = device_of_to_plat(dev->parent); @@ -425,7 +425,7 @@ int device_of_to_plat(struct udevice *dev) assert(drv); if (drv->of_to_plat && - (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_ofnode(dev))) { + (IS_ENABLED(CONFIG_OF_PLATDATA) || dev_has_ofnode(dev))) { ret = drv->of_to_plat(dev); if (ret) goto fail; @@ -458,7 +458,7 @@ static int device_get_dma_constraints(struct udevice *dev) u64 size = 0; int ret; - if (!CONFIG_IS_ENABLED(DM_DMA) || !parent || !dev_has_ofnode(parent)) + if (!IS_ENABLED(CONFIG_DM_DMA) || !parent || !dev_has_ofnode(parent)) return 0; /* @@ -517,7 +517,7 @@ int device_probe(struct udevice *dev) dev_or_flags(dev, DM_FLAG_ACTIVATED); - if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent && + if (IS_ENABLED(CONFIG_POWER_DOMAIN) && dev->parent && (device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) && !(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF)) { ret = dev_power_domain_on(dev); @@ -547,7 +547,7 @@ int device_probe(struct udevice *dev) dev->name, ret, errno_str(ret)); } - if (CONFIG_IS_ENABLED(IOMMU) && dev->parent && + if (IS_ENABLED(CONFIG_IOMMU) && dev->parent && (device_get_uclass_id(dev) != UCLASS_IOMMU)) { ret = dev_iommu_enable(dev); if (ret) @@ -754,7 +754,7 @@ static int device_get_device_tail(struct udevice *dev, int ret, return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /** * device_find_by_ofnode() - Return device associated with given ofnode * @@ -907,12 +907,12 @@ int device_get_global_by_ofnode(ofnode ofnode, struct udevice **devp) return device_get_device_tail(dev, dev ? 0 : -ENOENT, devp); } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int device_get_by_ofplat_idx(uint idx, struct udevice **devp) { struct udevice *dev; - if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) { struct udevice *base = ll_entry_start(struct udevice, udevice); dev = base + idx; @@ -1176,7 +1176,7 @@ void dev_set_uclass_plat(struct udevice *dev, void *uclass_plat) dev->uclass_plat_ = uclass_plat; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) bool device_is_compatible(const struct udevice *dev, const char *compat) { return ofnode_device_is_compatible(dev_ofnode(dev), compat); @@ -1239,7 +1239,7 @@ int dev_enable_by_path(const char *path) } #endif -#if CONFIG_IS_ENABLED(OF_PLATDATA_RT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_RT) static struct udevice_rt *dev_get_rt(const struct udevice *dev) { struct udevice *base = ll_entry_start(struct udevice, udevice); diff --git a/drivers/core/dump.c b/drivers/core/dump.c index 3e77832a3a0..beff069c808 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -39,7 +39,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag, u32 flags = dev_get_flags(dev); /* print the first 20 characters to not break the tree-format. */ - printf(CONFIG_IS_ENABLED(USE_TINY_PRINTF) ? " %s %d [ %c ] %s " : + printf(IS_ENABLED(CONFIG_USE_TINY_PRINTF) ? " %s %d [ %c ] %s " : " %-10.10s %3d [ %c ] %-20.20s ", dev->uclass->uc_drv->name, dev_get_uclass_index(dev, NULL), flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name); diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c index 91bcd1a2c21..c7664645f04 100644 --- a/drivers/core/fdtaddr.c +++ b/drivers/core/fdtaddr.c @@ -20,12 +20,12 @@ DECLARE_GLOBAL_DATA_PTR; fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int offset = dev_of_offset(dev); int parent = dev_of_offset(dev->parent); fdt_addr_t addr; - if (CONFIG_IS_ENABLED(OF_TRANSLATE)) { + if (IS_ENABLED(CONFIG_OF_TRANSLATE)) { const fdt32_t *reg; int len = 0; int na, ns; @@ -69,7 +69,7 @@ fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index) addr = fdtdec_get_addr_size_auto_parent(gd->fdt_blob, parent, offset, "reg", index, NULL, false); - if (CONFIG_IS_ENABLED(SIMPLE_BUS) && addr != FDT_ADDR_T_NONE) { + if (IS_ENABLED(CONFIG_SIMPLE_BUS) && addr != FDT_ADDR_T_NONE) { if (device_get_uclass_id(dev->parent) == UCLASS_SIMPLE_BUS) addr = simple_bus_translate(dev->parent, addr); @@ -103,7 +103,7 @@ void *devfdt_get_addr_index_ptr(const struct udevice *dev, int index) fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index, fdt_size_t *size) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /* * Only get the size in this first call. We'll get the addr in the * next call to the exisiting dev_get_xxx function which handles @@ -124,7 +124,7 @@ fdt_addr_t devfdt_get_addr_size_index(const struct udevice *dev, int index, fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int index; index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev), @@ -141,7 +141,7 @@ fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name) fdt_addr_t devfdt_get_addr_size_name(const struct udevice *dev, const char *name, fdt_size_t *size) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int index; index = fdt_stringlist_search(gd->fdt_blob, dev_of_offset(dev), @@ -205,7 +205,7 @@ fdt_addr_t devfdt_get_addr_pci(const struct udevice *dev) ulong addr; addr = devfdt_get_addr(dev); - if (CONFIG_IS_ENABLED(PCI) && addr == FDT_ADDR_T_NONE) { + if (IS_ENABLED(CONFIG_PCI) && addr == FDT_ADDR_T_NONE) { struct fdt_pci_addr pci_addr; u32 bar; int ret; diff --git a/drivers/core/lists.c b/drivers/core/lists.c index 8034a8f48d9..7b9f1f3c659 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -73,13 +73,13 @@ static int bind_drivers_pass(struct udevice *parent, bool pre_reloc_only) struct udevice *dev; int ret; - if (CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA)) { int parent_idx = driver_info_parent_id(entry); if (drt->dev) continue; - if (CONFIG_IS_ENABLED(OF_PLATDATA_PARENT) && + if (IS_ENABLED(CONFIG_OF_PLATDATA_PARENT) && parent_idx != -1) { struct driver_rt *parent_drt; @@ -94,7 +94,7 @@ static int bind_drivers_pass(struct udevice *parent, bool pre_reloc_only) } ret = device_bind_by_name(par, pre_reloc_only, entry, &dev); if (!ret) { - if (CONFIG_IS_ENABLED(OF_PLATDATA)) + if (IS_ENABLED(CONFIG_OF_PLATDATA)) drt->dev = dev; } else if (ret != -EPERM) { dm_warn("No match for driver '%s'\n", entry->name); @@ -154,7 +154,7 @@ int device_bind_driver_to_node(struct udevice *parent, const char *drv_name, return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /** * driver_check_compatible() - Check if a driver matches a compatible string * diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 4d56b1a7675..069c38b191c 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) +#if IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) static void *oftree_list[CONFIG_OFNODE_MULTI_TREE_MAX]; static int oftree_count; @@ -99,7 +99,7 @@ void *ofnode_to_fdt(ofnode node) if (of_live_active()) return NULL; #endif - if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && ofnode_valid(node)) + if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && ofnode_valid(node)) return ofnode_lookup_fdt(node); /* Use the control FDT by default */ @@ -120,7 +120,7 @@ int ofnode_to_offset(ofnode node) if (of_live_active()) return -1; #endif - if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && node.of_offset >= 0) + if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && node.of_offset >= 0) return OFTREE_OFFSET(node.of_offset); return node.of_offset; @@ -130,7 +130,7 @@ oftree oftree_from_fdt(void *fdt) { oftree tree; - if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE)) + if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE)) return oftree_ensure(fdt); tree.fdt = fdt; @@ -151,7 +151,7 @@ ofnode noffset_to_ofnode(ofnode other_node, int of_offset) if (of_live_active()) node.np = NULL; - else if (!CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) || of_offset < 0 || + else if (!IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) || of_offset < 0 || !ofnode_valid(other_node)) node.of_offset = of_offset; else @@ -187,7 +187,7 @@ static ofnode ofnode_from_tree_offset(oftree tree, int offset) { ofnode node; - if (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) && offset >= 0) { + if (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) && offset >= 0) { int tree_id = oftree_find(tree.fdt); if (tree_id == -1) @@ -495,7 +495,7 @@ int ofnode_read_u32_array(ofnode node, const char *propname, } } -#if !CONFIG_IS_ENABLED(DM_INLINE_OFNODE) +#if !IS_ENABLED(CONFIG_DM_INLINE_OFNODE) bool ofnode_is_enabled(ofnode node) { if (ofnode_is_np(node)) { @@ -1064,7 +1064,7 @@ fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property, ns = of_n_size_cells(np); *sizep = of_read_number(prop + na, ns); - if (CONFIG_IS_ENABLED(OF_TRANSLATE) && ns > 0) + if (IS_ENABLED(CONFIG_OF_TRANSLATE) && ns > 0) return of_translate_address(np, prop); else return of_read_number(prop, na); diff --git a/drivers/core/read.c b/drivers/core/read.c index 3e5fea87d84..42cd9a936db 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -314,7 +314,7 @@ int dev_read_alias_seq(const struct udevice *dev, int *devnump) ret = 0; } } else { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) ret = fdtdec_get_alias_seq(gd->fdt_blob, uc_name, ofnode_to_offset(node), devnump); #endif diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index e33bb9d798d..ae4d5264438 100644 --- a/drivers/core/regmap.c +++ b/drivers/core/regmap.c @@ -78,7 +78,7 @@ static struct regmap *regmap_alloc(int count) return map; } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count, struct regmap **mapp) { diff --git a/drivers/core/root.c b/drivers/core/root.c index c4fb48548bb..e3013cedbe9 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -134,7 +134,7 @@ static int dm_setup_inst(void) { DM_ROOT_NON_CONST = DM_DEVICE_GET(root); - if (CONFIG_IS_ENABLED(OF_PLATDATA_RT)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA_RT)) { struct udevice_rt *urt; void *start, *end; int each_size; @@ -174,7 +174,7 @@ int dm_init(bool of_live) dm_warn("Virtual root driver already exists!\n"); return -EINVAL; } - if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) { gd->uclass_root = &uclass_head; } else { gd->uclass_root = &DM_UCLASS_ROOT_S_NON_CONST; @@ -187,7 +187,7 @@ int dm_init(bool of_live) fix_devices(); } - if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) { ret = dm_setup_inst(); if (ret) { log_debug("dm_setup_inst() failed: %d\n", ret); @@ -198,7 +198,7 @@ int dm_init(bool of_live) &DM_ROOT_NON_CONST); if (ret) return ret; - if (CONFIG_IS_ENABLED(OF_CONTROL)) + if (IS_ENABLED(CONFIG_OF_CONTROL)) dev_set_ofnode(DM_ROOT_NON_CONST, ofnode_root()); ret = device_probe(DM_ROOT_NON_CONST); if (ret) @@ -221,7 +221,7 @@ int dm_uninit(void) return 0; } -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int dm_remove_devices_flags(uint flags) { device_remove(dm_root(), flags); @@ -234,7 +234,7 @@ int dm_scan_plat(bool pre_reloc_only) { int ret; - if (CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT)) { struct driver_rt *dyn; int n_ents; @@ -254,7 +254,7 @@ int dm_scan_plat(bool pre_reloc_only) return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /** * dm_scan_fdt_node() - Scan the device tree and bind drivers for a node * @@ -352,7 +352,7 @@ __weak int dm_scan_other(bool pre_reloc_only) return 0; } -#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY) +#if IS_ENABLED(CONFIG_OF_PLATDATA_INST) && IS_ENABLED(CONFIG_READ_ONLY) void *dm_priv_to_rw(void *priv) { long offset = priv - (void *)__priv_data_start; @@ -405,7 +405,7 @@ static int dm_scan(bool pre_reloc_only) return ret; } - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { ret = dm_extended_scan(pre_reloc_only); if (ret) { debug("dm_extended_scan() failed: %d\n", ret); @@ -424,19 +424,19 @@ int dm_init_and_scan(bool pre_reloc_only) { int ret; - ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE)); + ret = dm_init(IS_ENABLED(CONFIG_OF_LIVE)); if (ret) { debug("dm_init() failed: %d\n", ret); return ret; } - if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA_INST)) { ret = dm_scan(pre_reloc_only); if (ret) { log_debug("dm_scan() failed: %d\n", ret); return ret; } } - if (CONFIG_IS_ENABLED(DM_EVENT)) { + if (IS_ENABLED(CONFIG_DM_EVENT)) { ret = event_notify_null(EVT_DM_POST_INIT); if (ret) return log_msg_ret("ev", ret); diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c index 6022e7514e0..607e5e49ed0 100644 --- a/drivers/core/simple-bus.c +++ b/drivers/core/simple-bus.c @@ -25,13 +25,13 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr) static int simple_bus_post_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) return 0; #else struct simple_bus_plat *plat = dev_get_uclass_plat(dev); int ret; - if (CONFIG_IS_ENABLED(SIMPLE_BUS_CORRECT_RANGE)) { + if (IS_ENABLED(CONFIG_SIMPLE_BUS_CORRECT_RANGE)) { uint64_t caddr, paddr, len; /* only read range index 0 */ @@ -65,7 +65,7 @@ UCLASS_DRIVER(simple_bus) = { .per_device_plat_auto = sizeof(struct simple_bus_plat), }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id generic_simple_bus_ids[] = { { .compatible = "simple-bus" }, { .compatible = "simple-mfd" }, diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c index 25fdb66eaa0..35759ce4f5a 100644 --- a/drivers/core/syscon-uclass.c +++ b/drivers/core/syscon-uclass.c @@ -55,7 +55,7 @@ static int syscon_pre_probe(struct udevice *dev) * a 'reg' member, and this holds a single address and size. Drivers * using OF_PLATDATA will need to ensure that this is true. */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct syscon_base_plat *plat = dev_get_plat(dev); return regmap_init_mem_plat(dev, plat->reg, ARRAY_SIZE(plat->reg), @@ -186,7 +186,7 @@ static const struct udevice_id generic_syscon_ids[] = { U_BOOT_DRIVER(generic_syscon) = { .name = "syscon", .id = UCLASS_SYSCON, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .of_match = generic_syscon_ids, diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 1762a0796db..94a1cb1d00f 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -152,7 +152,7 @@ int uclass_get(enum uclass_id id, struct uclass **ucp) *ucp = NULL; uc = uclass_find(id); if (!uc) { - if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) + if (IS_ENABLED(CONFIG_OF_PLATDATA_INST)) return -ENOENT; return uclass_add(id, ucp); } @@ -311,7 +311,7 @@ int uclass_find_next_free_seq(struct uclass *uc) int max = -1; /* If using aliases, start with the highest alias value */ - if (CONFIG_IS_ENABLED(DM_SEQ_ALIAS) && + if (IS_ENABLED(CONFIG_DM_SEQ_ALIAS) && (uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS)) max = dev_read_alias_highest_id(uc->uc_drv->name); @@ -410,7 +410,7 @@ done: return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent, const char *name, struct udevice **devp) { @@ -535,7 +535,7 @@ int uclass_get_device_by_ofnode(enum uclass_id id, ofnode node, return uclass_get_device_tail(dev, ret, devp); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) int uclass_get_device_by_phandle_id(enum uclass_id id, uint phandle_id, struct udevice **devp) { @@ -713,7 +713,7 @@ err: return ret; } -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int uclass_pre_unbind_device(struct udevice *dev) { struct uclass *uc; @@ -785,7 +785,7 @@ int uclass_post_probe_device(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int uclass_pre_remove_device(struct udevice *dev) { struct uclass *uc; diff --git a/drivers/core/util.c b/drivers/core/util.c index aa60fdd15bc..5891753cd13 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -22,7 +22,7 @@ int list_count_items(struct list_head *head) return count; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int pci_get_devfn(struct udevice *dev) { struct fdt_pci_addr addr; diff --git a/drivers/crypto/aspeed/aspeed_hace.c b/drivers/crypto/aspeed/aspeed_hace.c index 6b6c8fa6588..e907ea95eb1 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 (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index ceb66dd6270..78530d7eecd 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -38,7 +38,7 @@ uint32_t sec_offset[CONFIG_SYS_FSL_MAX_NUM_OF_SEC] = { #endif }; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) struct udevice *caam_dev; #else #define SEC_ADDR(idx) \ @@ -114,7 +114,7 @@ static void jr_initregs(uint8_t sec_idx, struct caam_regs *caam) static int jr_init(uint8_t sec_idx, struct caam_regs *caam) { struct jobring *jr = &caam->jr[sec_idx]; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) ofnode scu_node = ofnode_by_compatible(ofnode_null(), "fsl,imx8-mu"); #endif memset(jr, 0, sizeof(struct jobring)); @@ -141,7 +141,7 @@ static int jr_init(uint8_t sec_idx, struct caam_regs *caam) memset(jr->input_ring, 0, JR_SIZE * sizeof(caam_dma_addr_t)); memset(jr->output_ring, 0, jr->op_size); -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) if (!ofnode_valid(scu_node)) #endif start_jr(caam); @@ -322,7 +322,7 @@ static void desc_done(uint32_t status, void *arg) static inline int run_descriptor_jr_idx(uint32_t *desc, uint8_t sec_idx) { struct caam_regs *caam; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) caam = dev_get_priv(caam_dev); #else caam = &caam_st; @@ -418,7 +418,7 @@ static int jr_hw_reset(struct jr_regs *regs) static inline int jr_reset_sec(uint8_t sec_idx) { struct caam_regs *caam; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) caam = dev_get_priv(caam_dev); #else caam = &caam_st; @@ -440,7 +440,7 @@ int jr_reset(void) int sec_reset(void) { struct caam_regs *caam; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) caam = dev_get_priv(caam_dev); #else caam = &caam_st; @@ -677,7 +677,7 @@ int sec_init_idx(uint8_t sec_idx) { int ret = 0; struct caam_regs *caam; -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) if (!caam_dev) { printf("caam_jr: caam not found\n"); return -1; @@ -689,7 +689,7 @@ int sec_init_idx(uint8_t sec_idx) caam_st.jrid = 0; caam = &caam_st; #endif -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) ofnode scu_node = ofnode_by_compatible(ofnode_null(), "fsl,imx8-mu"); if (ofnode_valid(scu_node)) @@ -758,7 +758,7 @@ int sec_init_idx(uint8_t sec_idx) liodn_s = (liodnr & JRSLIODN_MASK) >> JRSLIODN_SHIFT; #endif #endif -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) init: #endif ret = jr_init(sec_idx, caam); @@ -766,7 +766,7 @@ init: printf("SEC%u: initialization failed\n", sec_idx); return -1; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) if (ofnode_valid(scu_node)) { if (IS_ENABLED(CONFIG_DM_RNG)) { ret = device_bind_driver(NULL, "caam-rng", "caam-rng", NULL); @@ -808,10 +808,10 @@ int sec_init(void) return sec_init_idx(0); } -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) static int jr_power_on(ofnode node) { -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) struct udevice __maybe_unused jr_dev; struct power_domain pd; diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c index d8065d68ea4..62670fc0648 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 (IS_ENABLED(CONFIG_HW_WATCHDOG) || IS_ENABLED(CONFIG_WATCHDOG)) { cur = ibuf; end = ibuf + ilen; diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c index 81d081fabb0..ca96cb9f612 100644 --- a/drivers/ddr/fsl/main.c +++ b/drivers/ddr/fsl/main.c @@ -88,7 +88,7 @@ u8 spd_i2c_addr[CONFIG_SYS_NUM_DDR_CTLRS][CONFIG_DIMM_SLOTS_PER_CTLR] = { #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) #define DEV_TYPE struct udevice #else /* Local udevice */ @@ -108,7 +108,7 @@ static int ddr_i2c_read(DEV_TYPE *dev, unsigned int addr, { int ret; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = dm_i2c_read(dev, 0, buf, len); #else ret = i2c_read(dev->chip, addr, alen, buf, len); @@ -122,7 +122,7 @@ static int ddr_i2c_dummy_write(unsigned int chip_addr) { uint8_t buf = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; @@ -148,7 +148,7 @@ static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address) int ret; DEV_TYPE *dev; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_chip_for_busnum(CONFIG_SYS_SPD_BUS_NUM, i2c_address, 1, &dev); if (ret) { diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c index 7cff8234584..6e710a5689d 100644 --- a/drivers/ddr/fsl/options.c +++ b/drivers/ddr/fsl/options.c @@ -761,7 +761,7 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm, * Extract hwconfig from environment since we have not properly setup * the environment but need it for ddr config params */ -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) if (env_get_f("hwconfig", buf, sizeof(buf)) < 0) #endif buf[0] = '\0'; @@ -1410,7 +1410,7 @@ int fsl_use_spd(void) * Extract hwconfig from environment since we have not properly setup * the environment but need it for ddr config params */ -#if CONFIG_IS_ENABLED(ENV_SUPPORT) +#if IS_ENABLED(CONFIG_ENV_SUPPORT) if (env_get_f("hwconfig", buf, sizeof(buf)) < 0) #endif buf[0] = '\0'; diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 2dae1593706..5c21c58c872 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -67,7 +67,7 @@ static int dfu_flush_medium_sf(struct dfu_entity *dfu) { u64 off, length; - if (!CONFIG_IS_ENABLED(DFU_SF_PART) || !dfu->data.sf.ubi) + if (!IS_ENABLED(CONFIG_DFU_SF_PART) || !dfu->data.sf.ubi) return 0; /* in case of ubi partition, erase rest of the partition */ @@ -89,7 +89,7 @@ static unsigned int dfu_polltimeout_sf(struct dfu_entity *dfu) * ubi partition, as sectors which are not used need * to be erased */ - if (CONFIG_IS_ENABLED(DFU_SF_PART) && dfu->data.sf.ubi) + if (IS_ENABLED(CONFIG_DFU_SF_PART) && dfu->data.sf.ubi) return DFU_MANIFEST_POLL_TIMEOUT; return DFU_DEFAULT_POLL_TIMEOUT; @@ -102,7 +102,7 @@ static void dfu_free_entity_sf(struct dfu_entity *dfu) * For the non-DM case we must ensure that the the SPI device is only * freed once. */ - if (!CONFIG_IS_ENABLED(DM_SPI_FLASH)) { + if (!IS_ENABLED(CONFIG_DM_SPI_FLASH)) { struct spi_flash *dev = dfu->data.sf.dev; if (!dev) @@ -188,7 +188,7 @@ int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char **argv, int ar dfu->data.sf.size = hextoul(argv[2], &s); if (*s) return -EINVAL; - } else if (CONFIG_IS_ENABLED(DFU_SF_PART) && + } else if (IS_ENABLED(CONFIG_DFU_SF_PART) && (!strcmp(argv[0], "part") || !strcmp(argv[0], "partubi"))) { char mtd_id[32]; struct mtd_device *mtd_dev; diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index da988f6bb66..9ee2ce03706 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -85,7 +85,7 @@ static int mxs_dma_read_semaphore(int channel) return tmp; } -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) void mxs_dma_flush_desc(struct mxs_dma_desc *desc) { uint32_t addr; diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c index 34f72fa5dc8..b067edee2ca 100644 --- a/drivers/dma/dma-uclass.c +++ b/drivers/dma/dma-uclass.c @@ -29,7 +29,7 @@ static inline struct dma_ops *dma_dev_ops(struct udevice *dev) return (struct dma_ops *)dev->driver->ops; } -# if CONFIG_IS_ENABLED(OF_CONTROL) +# if IS_ENABLED(CONFIG_OF_CONTROL) static int dma_of_xlate_default(struct dma *dma, struct ofnode_phandle_args *args) { diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index a06c590234f..bbbd2c7a832 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -525,7 +525,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, } #endif -#if CONFIG_IS_ENABLED(EFI_PARTITION) +#if IS_ENABLED(CONFIG_EFI_PARTITION) if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) { dev_desc = fastboot_mmc_get_dev(response); if (!dev_desc) @@ -552,7 +552,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer, } #endif -#if CONFIG_IS_ENABLED(DOS_PARTITION) +#if IS_ENABLED(CONFIG_DOS_PARTITION) if (strcmp(cmd, CONFIG_FASTBOOT_MBR_NAME) == 0) { dev_desc = fastboot_mmc_get_dev(response); if (!dev_desc) diff --git a/drivers/firmware/firmware-uclass.c b/drivers/firmware/firmware-uclass.c index e83a147a000..93e6b30c2d3 100644 --- a/drivers/firmware/firmware-uclass.c +++ b/drivers/firmware/firmware-uclass.c @@ -9,7 +9,7 @@ UCLASS_DRIVER(firmware) = { .id = UCLASS_FIRMWARE, .name = "firmware", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index ef3e9836461..536d0957223 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -41,7 +41,7 @@ #define PSCI_FN_NATIVE(version, name) PSCI_##version##_FN_##name #endif -#if CONFIG_IS_ENABLED(EFI_LOADER) +#if IS_ENABLED(CONFIG_EFI_LOADER) int __efi_runtime_data psci_method; #else int psci_method __section(".data"); diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c index 7f6b6bc73a1..6afd47ef182 100644 --- a/drivers/fpga/fpga.c +++ b/drivers/fpga/fpga.c @@ -215,7 +215,7 @@ int fpga_fsload(int devnum, const void *buf, size_t size, } #endif -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) int fpga_loads(int devnum, const void *buf, size_t size, struct fpga_secure_info *fpga_sec_info) { @@ -353,7 +353,7 @@ int fpga_info(int devnum) return fpga_dev_info(devnum); } -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) int fpga_compatible2flag(int devnum, const char *compatible) { const fpga_desc * const desc = fpga_get_desc(devnum); diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index 8170c3368ef..99e9a9e0cbc 100644 --- a/drivers/fpga/xilinx.c +++ b/drivers/fpga/xilinx.c @@ -172,7 +172,7 @@ int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, } #endif -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) int xilinx_loads(xilinx_desc *desc, const void *buf, size_t bsize, struct fpga_secure_info *fpga_sec_info) { diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c index d1491da02c3..bdaca088c5b 100644 --- a/drivers/fpga/zynqmppl.c +++ b/drivers/fpga/zynqmppl.c @@ -200,7 +200,7 @@ static int zynqmp_validate_bitstream(xilinx_desc *desc, const void *buf, return 0; } -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) static int zynqmp_check_compatible(xilinx_desc *desc, int flags) { /* @@ -235,7 +235,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize, u32 buf_lo, buf_hi; u32 bsize_req = (u32)bsize; u32 ret_payload[PAYLOAD_ARG_CNT]; -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) struct fpga_secure_info info = { 0 }; ret = zynqmp_check_compatible(desc, flags); @@ -251,7 +251,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize, switch (flags) { case FPGA_LEGACY: break; /* Handle the legacy image later in this function */ -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) case FPGA_XILINX_ZYNQMP_DDRAUTH: /* DDR authentication */ info.authflag = ZYNQMP_FPGA_AUTH_DDR; @@ -299,7 +299,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize, return ret; } -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) static int zynqmp_loads(xilinx_desc *desc, const void *buf, size_t bsize, struct fpga_secure_info *fpga_sec_info) { @@ -362,7 +362,7 @@ static int __maybe_unused zynqmp_str2flag(xilinx_desc *desc, const char *str) { if (!strncmp(str, "u-boot,fpga-legacy", 18)) return FPGA_LEGACY; -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) if (!strncmp(str, "u-boot,zynqmp-fpga-ddrauth", 26)) return FPGA_XILINX_ZYNQMP_DDRAUTH; @@ -375,7 +375,7 @@ static int __maybe_unused zynqmp_str2flag(xilinx_desc *desc, const char *str) struct xilinx_fpga_op zynqmp_op = { .load = zynqmp_load, .info = zynqmp_pcap_info, -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) .loads = zynqmp_loads, .str2flag = zynqmp_str2flag, #endif diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 1409db5dc11..4738b3e4401 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -211,7 +211,7 @@ int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static bool at91_get_port_output(struct at91_port *at91_port, int offset) { u32 mask, val; @@ -458,7 +458,7 @@ int at91_get_pio_value(unsigned port, unsigned pin) return 0; } -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) /* Common GPIO API */ int gpio_request(unsigned gpio, const char *label) @@ -500,7 +500,7 @@ int gpio_set_value(unsigned gpio, int value) } #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct at91_port_priv { struct at91_port *regs; @@ -605,7 +605,7 @@ static int at91_gpio_probe(struct udevice *dev) clk_free(&clk); -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) plat->base_addr = dev_read_addr(dev); #endif plat->bank_name = at91_get_bank_name(plat->base_addr); @@ -617,7 +617,7 @@ static int at91_gpio_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id at91_gpio_ids[] = { { .compatible = "atmel,at91rm9200-gpio" }, { } @@ -627,7 +627,7 @@ static const struct udevice_id at91_gpio_ids[] = { U_BOOT_DRIVER(atmel_at91rm9200_gpio) = { .name = "atmel_at91rm9200_gpio", .id = UCLASS_GPIO, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = at91_gpio_ids, .plat_auto = sizeof(struct at91_port_plat), #endif diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 47ed2979814..4caa38871cd 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -176,7 +176,7 @@ int atmel_pio4_get_pio_input(u32 port, u32 pin) return (readl(&port_base->pdsr) & mask) ? 1 : 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /** * struct atmel_pioctrl_data - Atmel PIO controller (pinmux + gpio) data struct diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c index 704a6fa7121..8d6c4e0f0d9 100644 --- a/drivers/gpio/bcm2835_gpio.c +++ b/drivers/gpio/bcm2835_gpio.c @@ -115,7 +115,7 @@ static int bcm2835_gpio_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int bcm2835_gpio_of_to_plat(struct udevice *dev) { struct bcm2835_gpio_plat *plat = dev_get_plat(dev); diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c index b310f2dbf65..84a4c12c2f8 100644 --- a/drivers/gpio/da8xx_gpio.c +++ b/drivers/gpio/da8xx_gpio.c @@ -17,7 +17,7 @@ #include "da8xx_gpio.h" -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) #include #include @@ -380,7 +380,7 @@ static int _gpio_direction_output(struct davinci_gpio *bank, unsigned int gpio, return 0; } -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) void gpio_info(void) { diff --git a/drivers/gpio/da8xx_gpio.h b/drivers/gpio/da8xx_gpio.h index ca59d6a90b3..80d12944fca 100644 --- a/drivers/gpio/da8xx_gpio.h +++ b/drivers/gpio/da8xx_gpio.h @@ -28,7 +28,7 @@ struct davinci_gpio_bank { #define MAX_NUM_GPIOS 144 #define GPIO_BIT(gp) ((gp) & 0x1F) -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* Information about a GPIO bank */ struct davinci_gpio_plat { diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index dbebf3a53eb..221e3707dd0 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -75,7 +75,7 @@ static int gpio_to_device(unsigned int gpio, struct gpio_desc *desc) return -ENOENT; } -#if CONFIG_IS_ENABLED(DM_GPIO_LOOKUP_LABEL) +#if IS_ENABLED(CONFIG_DM_GPIO_LOOKUP_LABEL) /** * dm_gpio_lookup_label() - look for name in gpio device * @@ -241,7 +241,7 @@ static int gpio_find_and_xlate(struct gpio_desc *desc, return gpio_xlate_offs_flags(desc->dev, desc, args); } -#if CONFIG_IS_ENABLED(GPIO_HOG) +#if IS_ENABLED(CONFIG_GPIO_HOG) struct gpio_hog_priv { struct gpio_desc gpiod; @@ -369,7 +369,7 @@ int dm_gpio_request(struct gpio_desc *desc, const char *label) static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...) { -#if !defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(USE_TINY_PRINTF) +#if !defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_USE_TINY_PRINTF) va_list args; char buf[40]; @@ -418,7 +418,7 @@ int gpio_request(unsigned gpio, const char *label) */ int gpio_requestf(unsigned gpio, const char *fmt, ...) { -#if !defined(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(USE_TINY_PRINTF) +#if !defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_USE_TINY_PRINTF) va_list args; char buf[40]; @@ -897,7 +897,7 @@ int gpio_get_status(struct udevice *dev, int offset, char *buf, int buffsize) return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) int gpio_get_acpi(const struct gpio_desc *desc, struct acpi_gpio *gpio) { const struct dm_gpio_ops *ops; @@ -1130,7 +1130,7 @@ err: return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int _gpio_request_by_name_nodev(ofnode node, const char *list_name, int index, struct gpio_desc *desc, int flags, bool add_index) @@ -1245,7 +1245,7 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name) } #endif /* OF_PLATDATA */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int gpio_request_by_phandle(struct udevice *dev, const struct phandle_2_arg *cells, struct gpio_desc *desc, int flags) @@ -1467,7 +1467,7 @@ static int gpio_post_bind(struct udevice *dev) } #endif - if (CONFIG_IS_ENABLED(GPIO_HOG)) { + if (IS_ENABLED(CONFIG_GPIO_HOG)) { struct udevice *child; ofnode node; diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 175e460aff5..cf275a962b6 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -218,7 +218,7 @@ U_BOOT_DRIVER(imx_rgpio2p) = { .bind = imx_rgpio2p_bind, }; -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct imx_rgpio2p_plat imx_plat[] = { { 0, (struct gpio_regs *)RGPIO2P_GPIO1_BASE_ADDR }, { 1, (struct gpio_regs *)RGPIO2P_GPIO2_BASE_ADDR }, diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c index 4a3ec6d6350..a0dd0322b68 100644 --- a/drivers/gpio/intel_gpio.c +++ b/drivers/gpio/intel_gpio.c @@ -147,7 +147,7 @@ static int intel_gpio_set_flags(struct udevice *dev, unsigned int offset, return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) static int intel_gpio_get_acpi(const struct gpio_desc *desc, struct acpi_gpio *gpio) { @@ -199,12 +199,12 @@ static const struct dm_gpio_ops gpio_intel_ops = { .get_function = intel_gpio_get_function, .xlate = intel_gpio_xlate, .set_flags = intel_gpio_set_flags, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) .get_acpi = intel_gpio_get_acpi, #endif }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id intel_intel_gpio_ids[] = { { .compatible = "intel,gpio" }, { } diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c index fd26a36a0f9..1151b497018 100644 --- a/drivers/gpio/mpc83xx_spisel_boot.c +++ b/drivers/gpio/mpc83xx_spisel_boot.c @@ -60,7 +60,7 @@ static int mpc83xx_spisel_boot_get_function(struct udevice *dev, uint gpio) return GPIOF_OUTPUT; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int mpc83xx_spisel_boot_of_to_plat(struct udevice *dev) { struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev); @@ -139,7 +139,7 @@ U_BOOT_DRIVER(spisel_boot_mpc83xx) = { .name = "spisel_boot_mpc83xx", .id = UCLASS_GPIO, .ops = &mpc83xx_spisel_boot_ops, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_to_plat = mpc83xx_spisel_boot_of_to_plat, .plat_auto = sizeof(struct mpc8xxx_gpio_plat), .of_match = mpc83xx_spisel_boot_ids, diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index f7ffd8926ad..aea33111003 100644 --- a/drivers/gpio/mpc8xxx_gpio.c +++ b/drivers/gpio/mpc8xxx_gpio.c @@ -172,7 +172,7 @@ static int mpc8xxx_gpio_get_function(struct udevice *dev, uint gpio) return dir ? GPIOF_OUTPUT : GPIOF_INPUT; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int mpc8xxx_gpio_of_to_plat(struct udevice *dev) { struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev); @@ -263,7 +263,7 @@ U_BOOT_DRIVER(gpio_mpc8xxx) = { .name = "gpio_mpc8xxx", .id = UCLASS_GPIO, .ops = &gpio_mpc8xxx_ops, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_to_plat = mpc8xxx_gpio_of_to_plat, .plat_auto = sizeof(struct mpc8xxx_gpio_plat), .of_match = mpc8xxx_gpio_ids, diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c index f706a6dfa4f..81f877c6c39 100644 --- a/drivers/gpio/mvebu_gpio.c +++ b/drivers/gpio/mvebu_gpio.c @@ -100,7 +100,7 @@ static int mvebu_gpio_probe(struct udevice *dev) } static const struct dm_gpio_ops mvebu_gpio_ops = { -#if CONFIG_IS_ENABLED(PINCTRL_ARMADA_38X) +#if IS_ENABLED(CONFIG_PINCTRL_ARMADA_38X) .request = pinctrl_gpio_request, .rfree = pinctrl_gpio_free, #endif diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 1dec4e35e0a..09f046fbd20 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -24,7 +24,7 @@ enum mxc_gpio_direction { #define GPIO_PER_BANK 32 struct mxc_gpio_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* Put this first since driver model will copy the data here */ struct dtd_gpio_mxc dtplat; #endif @@ -36,7 +36,7 @@ struct mxc_bank_info { struct gpio_regs *regs; }; -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) #define GPIO_TO_PORT(n) ((n) / 32) /* GPIO port description */ @@ -168,7 +168,7 @@ int gpio_direction_output(unsigned gpio, int value) } #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) #include static int mxc_gpio_is_output(struct gpio_regs *regs, int offset) { @@ -286,7 +286,7 @@ static int mxc_gpio_probe(struct udevice *dev) int banknum; char name[18], *str; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_gpio_mxc *dtplat = &plat->dtplat; plat->regs = map_sysmem(dtplat->reg[0], dtplat->reg[1]); @@ -310,7 +310,7 @@ static int mxc_gpio_probe(struct udevice *dev) static int mxc_gpio_of_to_plat(struct udevice *dev) { struct mxc_gpio_plat *plat = dev_get_plat(dev); - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA)) { fdt_addr_t addr; addr = dev_read_addr(dev); if (addr == FDT_ADDR_T_NONE) @@ -347,7 +347,7 @@ U_BOOT_DRIVER(gpio_mxc) = { DM_DRIVER_ALIAS(gpio_mxc, fsl_imx6q_gpio) -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static const struct mxc_gpio_plat mxc_plat[] = { { 0, (struct gpio_regs *)GPIO1_BASE_ADDR }, { 1, (struct gpio_regs *)GPIO2_BASE_ADDR }, diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index 1356f89ac2f..5160d547487 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -55,7 +55,7 @@ void mxs_gpio_init(void) } } -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) int gpio_get_value(unsigned gpio) { uint32_t bank = PAD_BANK(gpio); @@ -152,7 +152,7 @@ DECLARE_GLOBAL_DATA_PTR; */ struct mxs_gpio_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_gpio dtplat; #endif unsigned int bank; @@ -241,7 +241,7 @@ static int mxs_gpio_probe(struct udevice *dev) struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); char name[16], *str; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_gpio *dtplat = &plat->dtplat; priv->bank = (unsigned int)dtplat->reg[0]; uc_priv->gpio_count = dtplat->gpio_ranges[3]; @@ -262,7 +262,7 @@ static int mxs_gpio_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int mxs_of_to_plat(struct udevice *dev) { struct mxs_gpio_plat *plat = dev_get_plat(dev); @@ -301,7 +301,7 @@ U_BOOT_DRIVER(fsl_imx23_gpio) = { .probe = mxs_gpio_probe, .priv_auto = sizeof(struct mxs_gpio_priv), .plat_auto = sizeof(struct mxs_gpio_plat), -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = mxs_gpio_ids, .of_to_plat = mxs_of_to_plat, #endif diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 50c4f75ddf5..0de6232aab7 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; #define OMAP_GPIO_DIR_OUT 0 #define OMAP_GPIO_DIR_IN 1 -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) #define GPIO_PER_BANK 32 @@ -118,7 +118,7 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio) return (__raw_readl(reg) & (1 << gpio)) != 0; } -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) static inline int get_gpio_index(int gpio) { return gpio & 0x1f; @@ -301,7 +301,7 @@ static int omap_gpio_probe(struct udevice *dev) return 0; } -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) static int omap_gpio_bind(struct udevice *dev) { struct omap_gpio_plat *plat = dev_get_plat(dev); @@ -336,7 +336,7 @@ static int omap_gpio_bind(struct udevice *dev) } #endif -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id omap_gpio_ids[] = { { .compatible = "ti,omap3-gpio" }, { .compatible = "ti,omap4-gpio" }, @@ -361,8 +361,8 @@ static int omap_gpio_of_to_plat(struct udevice *dev) U_BOOT_DRIVER(gpio_omap) = { .name = "gpio_omap", .id = UCLASS_GPIO, -#if CONFIG_IS_ENABLED(OF_CONTROL) -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = omap_gpio_ids, .of_to_plat = of_match_ptr(omap_gpio_of_to_plat), .plat_auto = sizeof(struct omap_gpio_plat), @@ -373,7 +373,7 @@ U_BOOT_DRIVER(gpio_omap) = { .ops = &gpio_omap_ops, .probe = omap_gpio_probe, .priv_auto = sizeof(struct gpio_bank), -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c index 305f9a6ff62..94de1143be5 100644 --- a/drivers/gpio/sandbox.c +++ b/drivers/gpio/sandbox.c @@ -255,7 +255,7 @@ static int sb_gpio_get_flags(struct udevice *dev, uint offset, ulong *flagsp) return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) static int sb_gpio_get_acpi(const struct gpio_desc *desc, struct acpi_gpio *gpio) { @@ -321,14 +321,14 @@ static const struct dm_gpio_ops gpio_sandbox_ops = { .xlate = sb_gpio_xlate, .set_flags = sb_gpio_set_flags, .get_flags = sb_gpio_get_flags, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) .get_acpi = sb_gpio_get_acpi, #endif }; static int sandbox_gpio_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); uc_priv->gpio_count = @@ -378,7 +378,7 @@ U_BOOT_DRIVER(sandbox_gpio) = { DM_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias) -#if CONFIG_IS_ENABLED(PINCTRL) +#if IS_ENABLED(CONFIG_PINCTRL) /* pincontrol: used only to check GPIO pin configuration (pinmux command) */ @@ -545,7 +545,7 @@ static int sb_pinctrl_get_pin_muxing(struct udevice *dev, return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) static int sb_pinctrl_get_name(const struct udevice *dev, char *out_name) { return acpi_copy_name(out_name, "PINC"); @@ -567,7 +567,7 @@ static struct pinctrl_ops sandbox_pinctrl_gpio_ops = { .get_pin_muxing = sb_pinctrl_get_pin_muxing, }; -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) struct acpi_ops pinctrl_sandbox_acpi_ops = { .get_name = sb_pinctrl_get_name, }; diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index 1e85db179a6..a3a8e381ad0 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -18,7 +18,7 @@ #include #include -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) static int sunxi_gpio_output(u32 pin, u32 val) { u32 dat; @@ -108,7 +108,7 @@ int sunxi_name_to_gpio(const char *name) } #endif /* DM_GPIO */ -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* TODO(sjg@chromium.org): Remove this function and use device tree */ int sunxi_name_to_gpio(const char *name) { diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index e54de42abc3..ecb4b91d6c4 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -335,7 +335,7 @@ int dw_i2c_gen_speed_config(const struct udevice *dev, int speed_hz, ulong rate; int ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) rate = clk_get_rate(&priv->clk); if (IS_ERR_VALUE(rate)) return log_msg_ret("clk", -EINVAL); @@ -587,7 +587,7 @@ static int __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr) writel(IC_RX_TL, &i2c_base->ic_rx_tl); writel(IC_TX_TL, &i2c_base->ic_tx_tl); writel(IC_STOP_DET, &i2c_base->ic_intr_mask); -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) _dw_i2c_set_bus_speed(NULL, i2c_base, speed, IC_CLK); writel(slaveaddr, &i2c_base->ic_sar); #endif @@ -600,7 +600,7 @@ static int __dw_i2c_init(struct i2c_regs *i2c_base, int speed, int slaveaddr) return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * The legacy I2C functions. These need to get removed once * all users of this driver are converted to DM. @@ -707,7 +707,7 @@ static int designware_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) struct dw_i2c *i2c = dev_get_priv(bus); ulong rate; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) rate = clk_get_rate(&i2c->clk); if (IS_ERR_VALUE(rate)) return log_ret(-EINVAL); @@ -752,7 +752,7 @@ int designware_i2c_of_to_plat(struct udevice *bus) reset_deassert_bulk(&priv->resets); } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(bus, 0, &priv->clk); if (ret) return ret; @@ -790,7 +790,7 @@ int designware_i2c_remove(struct udevice *dev) { struct dw_i2c *priv = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&priv->clk); clk_free(&priv->clk); #endif diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h index 049976e8a23..26ad6192773 100644 --- a/drivers/i2c/designware_i2c.h +++ b/drivers/i2c/designware_i2c.h @@ -202,7 +202,7 @@ struct dw_i2c { u32 scl_fall_time_ns; u32 sda_hold_time_ns; bool has_spk_cnt; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif struct dw_i2c_speed_config config; diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index d312f35f044..1ce7f87d1a6 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR; #define CFG_FSL_I2C_BASE_ADDR CONFIG_SYS_IMMR #endif -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static const struct fsl_i2c_base *i2c_base[4] = { (struct fsl_i2c_base *)(CFG_FSL_I2C_BASE_ADDR + CONFIG_SYS_FSL_I2C_OFFSET), #ifdef CONFIG_SYS_FSL_I2C2_OFFSET @@ -209,7 +209,7 @@ static uint set_i2c_bus_speed(const struct fsl_i2c_base *base, return speed; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static uint get_i2c_clock(int bus) { if (bus) @@ -496,7 +496,7 @@ static uint __i2c_set_bus_speed(const struct fsl_i2c_base *base, return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static void fsl_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) { __i2c_init(i2c_base[adap->hwadapnr], speed, slaveadd, diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c index 1107cf309fc..c00ae23099b 100644 --- a/drivers/i2c/i2c-emul-uclass.c +++ b/drivers/i2c/i2c-emul-uclass.c @@ -46,7 +46,7 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp) struct udevice *emul; int ret; - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA)) { ret = uclass_find_device_by_phandle(UCLASS_I2C_EMUL, dev, "sandbox,emul", &emul); } else { @@ -79,7 +79,7 @@ UCLASS_DRIVER(i2c_emul) = { UCLASS_DRIVER(i2c_emul_parent) = { .id = UCLASS_I2C_EMUL_PARENT, .name = "i2c_emul_parent", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index 8d9a89ed890..630a22365b2 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -16,7 +16,7 @@ #include #include #include -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) #include #endif #include @@ -501,7 +501,7 @@ uint i2c_get_chip_addr_offset_mask(struct udevice *dev) return chip->chip_addr_offset_mask; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static void i2c_gpio_set_pin(struct gpio_desc *pin, int bit) { if (bit) @@ -627,7 +627,7 @@ int i2c_deblock(struct udevice *bus) return ops->deblock(bus); } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip) { int addr; @@ -649,7 +649,7 @@ int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip) static int i2c_pre_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev); unsigned int max = 0; ofnode node; @@ -672,7 +672,7 @@ static int i2c_pre_probe(struct udevice *dev) static int i2c_post_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev); i2c->speed_hz = dev_read_u32_default(dev, "clock-frequency", @@ -686,7 +686,7 @@ static int i2c_post_probe(struct udevice *dev) static int i2c_child_post_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct dm_i2c_chip *plat = dev_get_parent_plat(dev); if (!dev_has_ofnode(dev)) @@ -703,7 +703,7 @@ static int i2c_post_bind(struct udevice *dev) debug("%s: %s, seq=%d\n", __func__, dev->name, dev_seq(dev)); -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) ret = dm_scan_fdt_dev(dev); #endif return ret; @@ -728,7 +728,7 @@ UCLASS_DRIVER(i2c_generic) = { static const struct udevice_id generic_chip_i2c_ids[] = { { .compatible = "i2c-chip", .data = I2C_DEVICE_GENERIC }, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) { .compatible = "hid-over-i2c", .data = I2C_DEVICE_HID_OVER_I2C }, #endif { } @@ -738,7 +738,7 @@ U_BOOT_DRIVER(i2c_generic_chip_drv) = { .name = "i2c_generic_chip_drv", .id = UCLASS_I2C_GENERIC, .of_match = generic_chip_i2c_ids, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) .of_to_plat = acpi_i2c_of_to_plat, .priv_auto = sizeof(struct acpi_i2c_priv), #endif diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c index 496f4feec56..c7a87cfaaf4 100644 --- a/drivers/i2c/lpc32xx_i2c.c +++ b/drivers/i2c/lpc32xx_i2c.c @@ -41,7 +41,7 @@ #define LPC32XX_I2C_STAT_NAI 0x00000004 #define LPC32XX_I2C_STAT_TDI 0x00000001 -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static struct lpc32xx_i2c_base *lpc32xx_i2c[] = { (struct lpc32xx_i2c_base *)I2C1_BASE, (struct lpc32xx_i2c_base *)I2C2_BASE, @@ -223,7 +223,7 @@ static int __i2c_write(struct lpc32xx_i2c_base *base, u8 dev, uint addr, return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static void lpc32xx_i2c_init(struct i2c_adapter *adap, int requested_speed, int slaveadd) { diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c index 0034dfbf6da..2be7dae0d6e 100644 --- a/drivers/i2c/muxes/pca954x.c +++ b/drivers/i2c/muxes/pca954x.c @@ -141,7 +141,7 @@ static int pca954x_of_to_plat(struct udevice *dev) static int pca954x_probe(struct udevice *dev) { - if (CONFIG_IS_ENABLED(DM_GPIO)) { + if (IS_ENABLED(CONFIG_DM_GPIO)) { struct pca954x_priv *priv = dev_get_priv(dev); int err; @@ -162,7 +162,7 @@ static int pca954x_probe(struct udevice *dev) static int pca954x_remove(struct udevice *dev) { - if (CONFIG_IS_ENABLED(DM_GPIO)) { + if (IS_ENABLED(CONFIG_DM_GPIO)) { struct pca954x_priv *priv = dev_get_priv(dev); if (dm_gpio_is_valid(&priv->gpio_mux_reset)) diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c index 5bc9cd7b295..26e43da1c5a 100644 --- a/drivers/i2c/mv_i2c.c +++ b/drivers/i2c/mv_i2c.c @@ -370,7 +370,7 @@ static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen, return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static struct mv_i2c *base_glob; diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 93bbc6916e5..e68cd1896db 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -16,7 +16,7 @@ #include #include #include -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) #include #include #include @@ -29,7 +29,7 @@ DECLARE_GLOBAL_DATA_PTR; * settings */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) #if defined(CONFIG_ARCH_ORION5X) #include #elif (defined(CONFIG_ARCH_KIRKWOOD) || defined(CONFIG_ARCH_MVEBU)) @@ -45,7 +45,7 @@ DECLARE_GLOBAL_DATA_PTR; * On SUNXI, we get CFG_SYS_TCLK from this include, so we want to * always have it. */ -#if CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_ARCH_SUNXI) +#if IS_ENABLED(CONFIG_DM_I2C) && defined(CONFIG_ARCH_SUNXI) #include #endif @@ -85,7 +85,7 @@ struct mvtwsi_registers { #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct mvtwsi_i2c_dev { /* TWSI Register base for the device */ struct mvtwsi_registers *base; @@ -186,7 +186,7 @@ inline uint calc_tick(uint speed) return (1000000000u / speed) + 100; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * twsi_get_base() - Get controller register base for specified adapter @@ -483,7 +483,7 @@ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi, writel(baud, &twsi->baudrate); /* Wait for controller for one tick */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ndelay(calc_tick(highest_speed)); #else ndelay(10000); @@ -518,7 +518,7 @@ static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed, writel(slaveadd, &twsi->slave_address); writel(0, &twsi->xtnd_slave_addr); /* Assert STOP, but don't care for the result */ -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) (void) twsi_stop(twsi, calc_tick(*actual_speed)); #else (void) twsi_stop(twsi, 10000); @@ -685,7 +685,7 @@ static int __twsi_i2c_write(struct mvtwsi_registers *twsi, uchar chip, return status != 0 ? status : stop_status; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static void twsi_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) { diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 86b9fb57c83..cee2157c80d 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -129,7 +129,7 @@ static uint8_t i2c_imx_get_clk(struct mxc_i2c_bus *i2c_bus, unsigned int rate) #endif /* Divider value calculation */ -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) i2c_clk_rate = clk_get_rate(&i2c_bus->per_clk); #else i2c_clk_rate = mxc_get_clock(MXC_I2C_CLK); @@ -368,7 +368,7 @@ static struct mxc_i2c_bus mxc_i2c_buses[] = { #endif }; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus) { if (i2c_bus && i2c_bus->idle_bus_fn) @@ -620,7 +620,7 @@ int __enable_i2c_clk(unsigned char enable, unsigned int i2c_num) int enable_i2c_clk(unsigned char enable, unsigned int i2c_num) __attribute__((weak, alias("__enable_i2c_clk"))); -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * Read data from I2C device * @@ -891,7 +891,7 @@ static int mxc_i2c_probe(struct udevice *bus) i2c_bus->bus = bus; /* Enable clk */ -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(bus, 0, &i2c_bus->per_clk); if (ret) { printf("Failed to get i2c clk\n"); diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index c656cf8b7a1..e862b8ba9a9 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -836,7 +836,7 @@ wr_exit: return i2c_error; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * The legacy I2C functions. These need to get removed once * all users of this driver are converted to DM. @@ -1034,7 +1034,7 @@ static int omap_i2c_probe(struct udevice *bus) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int omap_i2c_of_to_plat(struct udevice *bus) { struct omap_i2c_plat *plat = dev_get_plat(bus); @@ -1063,7 +1063,7 @@ static const struct dm_i2c_ops omap_i2c_ops = { U_BOOT_DRIVER(i2c_omap) = { .name = "i2c_omap", .id = UCLASS_I2C, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = omap_i2c_ids, .of_to_plat = omap_i2c_of_to_plat, .plat_auto = sizeof(struct omap_i2c_plat), @@ -1071,7 +1071,7 @@ U_BOOT_DRIVER(i2c_omap) = { .probe = omap_i2c_probe, .priv_auto = sizeof(struct omap_i2c), .ops = &omap_i2c_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/i2c/sun6i_p2wi.c b/drivers/i2c/sun6i_p2wi.c index d221323295d..08704a2b6e4 100644 --- a/drivers/i2c/sun6i_p2wi.c +++ b/drivers/i2c/sun6i_p2wi.c @@ -148,7 +148,7 @@ void p2wi_init(void) } #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct sun6i_p2wi_priv { struct sunxi_p2wi_reg *base; }; @@ -230,4 +230,4 @@ U_BOOT_DRIVER(sun6i_p2wi) = { .priv_auto = sizeof(struct sun6i_p2wi_priv), .ops = &sun6i_p2wi_ops, }; -#endif /* CONFIG_IS_ENABLED(DM_I2C) */ +#endif /* IS_ENABLED(CONFIG_DM_I2C) */ diff --git a/drivers/i2c/sun8i_rsb.c b/drivers/i2c/sun8i_rsb.c index 47fa05b6d1c..186e99c89a2 100644 --- a/drivers/i2c/sun8i_rsb.c +++ b/drivers/i2c/sun8i_rsb.c @@ -183,7 +183,7 @@ int rsb_init(void) } #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct sun8i_rsb_priv { struct sunxi_rsb_reg *base; }; @@ -283,4 +283,4 @@ U_BOOT_DRIVER(sun8i_rsb) = { .priv_auto = sizeof(struct sun8i_rsb_priv), .ops = &sun8i_rsb_ops, }; -#endif /* CONFIG_IS_ENABLED(DM_I2C) */ +#endif /* IS_ENABLED(CONFIG_DM_I2C) */ diff --git a/drivers/input/input.c b/drivers/input/input.c index a4341e8c7ce..939ac463639 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -669,7 +669,7 @@ int input_stdio_register(struct stdio_dev *dev) int error; error = stdio_register(dev); -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) +#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_ENV_SUPPORT) /* check if this is the standard input device */ if (!error && strcmp(env_get("stdin"), dev->name) == 0) { /* reassign the console */ diff --git a/drivers/iommu/iommu-uclass.c b/drivers/iommu/iommu-uclass.c index 72f123df55a..0c19a8e1daf 100644 --- a/drivers/iommu/iommu-uclass.c +++ b/drivers/iommu/iommu-uclass.c @@ -12,9 +12,9 @@ #include #include -#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) +#if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)) -#if CONFIG_IS_ENABLED(PCI) +#if IS_ENABLED(CONFIG_PCI) static int dev_pci_iommu_enable(struct udevice *dev) { struct udevice *parent = dev->parent; @@ -100,7 +100,7 @@ int dev_iommu_enable(struct udevice *dev) dev->iommu = dev_iommu; } - if (CONFIG_IS_ENABLED(PCI) && count < 0 && + if (IS_ENABLED(CONFIG_PCI) && count < 0 && device_is_on_pci_bus(dev)) return dev_pci_iommu_enable(dev); diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index 621d1752176..7bc84e6c925 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -1670,7 +1670,7 @@ UCLASS_DRIVER(cros_ec) = { .id = UCLASS_CROS_EC, .name = "cros-ec", .per_device_auto = sizeof(struct cros_ec_dev), -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif .flags = DM_UC_FLAG_ALLOC_PRIV_DMA, diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index ccf5c7a8037..b8e32f1a662 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -258,7 +258,7 @@ static int fs_loader_of_to_plat(struct udevice *dev) static int fs_loader_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_BLK) int ret; struct device_plat *plat = dev_get_plat(dev); diff --git a/drivers/misc/gsc.c b/drivers/misc/gsc.c index 65c9c2c6ce3..805026ff0c7 100644 --- a/drivers/misc/gsc.c +++ b/drivers/misc/gsc.c @@ -77,7 +77,7 @@ enum { GSC_SC_RST_CAUSE_MAX = 10, }; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct gsc_priv { int gscver; diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c index 7b79ed2df46..8f2ebcb55ed 100644 --- a/drivers/misc/irq-uclass.c +++ b/drivers/misc/irq-uclass.c @@ -63,7 +63,7 @@ int irq_read_and_clear(struct irq *irq) return ops->read_and_clear(irq); } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int irq_get_by_phandle(struct udevice *dev, const struct phandle_2_arg *cells, struct irq *irq) { @@ -179,7 +179,7 @@ int irq_first_device_type(enum irq_dev_t type, struct udevice **devp) return 0; } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) int irq_get_acpi(const struct irq *irq, struct acpi_irq *acpi_irq) { struct irq_ops *ops; diff --git a/drivers/misc/irq_sandbox.c b/drivers/misc/irq_sandbox.c index 8b5573fcadd..728e2a1aba9 100644 --- a/drivers/misc/irq_sandbox.c +++ b/drivers/misc/irq_sandbox.c @@ -83,7 +83,7 @@ static const struct irq_ops sandbox_irq_ops = { .restore_polarities = sandbox_restore_polarities, .read_and_clear = sandbox_irq_read_and_clear, .of_xlate = sandbox_irq_of_xlate, -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) .get_acpi = sandbox_get_acpi, #endif }; diff --git a/drivers/misc/misc-uclass.c b/drivers/misc/misc-uclass.c index cfe9d562fa0..d92d25cb635 100644 --- a/drivers/misc/misc-uclass.c +++ b/drivers/misc/misc-uclass.c @@ -70,7 +70,7 @@ int misc_set_enabled(struct udevice *dev, bool val) UCLASS_DRIVER(misc) = { .id = UCLASS_MISC, .name = "misc", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c index f24857a1515..631baca2255 100644 --- a/drivers/misc/p2sb-uclass.c +++ b/drivers/misc/p2sb-uclass.c @@ -172,7 +172,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid) { struct p2sb_child_plat *pplat; - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) + if (!IS_ENABLED(CONFIG_OF_PLATDATA)) return -ENOSYS; pplat = dev_get_parent_plat(dev); @@ -183,7 +183,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid) static int p2sb_child_post_bind(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct p2sb_child_plat *pplat = dev_get_parent_plat(dev); int ret; u32 pid; @@ -199,7 +199,7 @@ static int p2sb_child_post_bind(struct udevice *dev) static int p2sb_post_bind(struct udevice *dev) { - if (spl_phase() > PHASE_TPL && !CONFIG_IS_ENABLED(OF_PLATDATA)) + if (spl_phase() > PHASE_TPL && !IS_ENABLED(CONFIG_OF_PLATDATA)) return dm_scan_fdt_dev(dev); return 0; diff --git a/drivers/misc/test_drv.c b/drivers/misc/test_drv.c index 927618256f0..b653c551b30 100644 --- a/drivers/misc/test_drv.c +++ b/drivers/misc/test_drv.c @@ -22,7 +22,7 @@ struct udevice *testbus_get_clear_removed(void) static int testbus_drv_probe(struct udevice *dev) { - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA)) { int ret; ret = dm_scan_fdt_dev(dev); diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index 05ca3612809..bf6b76e45ce 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -36,7 +36,7 @@ struct davinci_mmc_priv { #endif /* Set davinci clock prescalar value based on the required clock in HZ */ -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static void dmmc_set_clock(struct mmc *mmc, uint clock) { struct davinci_mmc *host = mmc->priv; @@ -143,7 +143,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs, * Sends a command out on the bus. Takes the device pointer, * a command pointer, and an optional data pointer. */ -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int dmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { struct davinci_mmc *host = mmc->priv; @@ -337,7 +337,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data * } /* Initialize Davinci MMC controller */ -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int dmmc_init(struct mmc *mmc) { struct davinci_mmc *host = mmc->priv; @@ -378,7 +378,7 @@ static int davinci_dm_mmc_init(struct udevice *dev) } /* Set buswidth or clock as indicated by the MMC framework */ -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int dmmc_set_ios(struct mmc *mmc) { struct davinci_mmc *host = mmc->priv; @@ -399,7 +399,7 @@ static int davinci_mmc_set_ios(struct udevice *dev) /* Set clock speed */ if (mmc->clock) { -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) dmmc_set_clock(mmc, mmc->clock); #else davinci_mmc_set_clock(dev, mmc->clock); @@ -408,7 +408,7 @@ static int davinci_mmc_set_ios(struct udevice *dev) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static const struct mmc_ops dmmc_ops = { .send_cmd = dmmc_send_cmd, .set_ios = dmmc_set_ios, @@ -419,7 +419,7 @@ static const struct mmc_ops dmmc_ops = { static int davinci_mmc_getcd(struct udevice *dev) { int value = -1; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct davinci_mmc_priv *priv = dev_get_priv(dev); value = dm_gpio_get_value(&priv->cd_gpio); #endif @@ -433,7 +433,7 @@ static int davinci_mmc_getcd(struct udevice *dev) static int davinci_mmc_getwp(struct udevice *dev) { int value = -1; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct davinci_mmc_priv *priv = dev_get_priv(dev); value = dm_gpio_get_value(&priv->wp_gpio); @@ -453,7 +453,7 @@ static const struct dm_mmc_ops davinci_mmc_ops = { }; #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* Called from board_mmc_init during startup. Can be called multiple times * depending on the number of slots available on board and controller */ @@ -483,7 +483,7 @@ static int davinci_mmc_probe(struct udevice *dev) priv->reg_base = plat->reg_base; priv->input_clk = clk_get(DAVINCI_MMCSD_CLKID); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* These GPIOs are optional */ gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN); gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN); @@ -500,7 +500,7 @@ static int davinci_mmc_bind(struct udevice *dev) return mmc_bind(dev, &plat->mmc, &plat->cfg); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int davinci_mmc_of_to_plat(struct udevice *dev) { struct davinci_mmc_plat *plat = dev_get_plat(dev); @@ -525,7 +525,7 @@ static const struct udevice_id davinci_mmc_ids[] = { U_BOOT_DRIVER(ti_da830_mmc) = { .name = "davinci_mmc", .id = UCLASS_MMC, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = davinci_mmc_ids, .plat_auto = sizeof(struct davinci_mmc_plat), .of_to_plat = davinci_mmc_of_to_plat, @@ -536,7 +536,7 @@ U_BOOT_DRIVER(ti_da830_mmc) = { .probe = davinci_mmc_probe, .ops = &davinci_mmc_ops, .priv_auto = sizeof(struct davinci_mmc_priv), -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 5085a3b491d..09263ca748d 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -505,7 +505,7 @@ static int dwmci_set_ios(struct mmc *mmc) return ret; } -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (mmc->vqmmc_supply) { int ret; diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index d5066666698..11c5d0b6cef 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -103,7 +103,7 @@ struct fsl_esdhc_priv { unsigned int sdhc_clk; bool is_sdhc_per_clk; unsigned int clock; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) struct mmc *mmc; #endif struct udevice *dev; @@ -852,7 +852,7 @@ __weak int esdhc_status_fixup(void *blob, const char *compat) } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) static int fsl_esdhc_get_cd(struct udevice *dev); static void esdhc_disable_for_no_card(void *blob) { @@ -893,7 +893,7 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd) } #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int esdhc_getcd(struct mmc *mmc) { struct fsl_esdhc_priv *priv = mmc->priv; diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index da888885474..a64d46b6aef 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -109,7 +109,7 @@ struct fsl_esdhc { }; struct fsl_esdhc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* Put this first since driver model will copy the data here */ struct dtd_fsl_esdhc dtplat; #endif @@ -150,7 +150,7 @@ struct fsl_esdhc_priv { struct clk per_clk; unsigned int clock; unsigned int mode; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) struct mmc *mmc; #endif struct udevice *dev; @@ -166,7 +166,7 @@ struct fsl_esdhc_priv { u32 signal_voltage_switch_extra_delay_ms; struct udevice *vqmmc_dev; struct udevice *vmmc_dev; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc cd_gpio; struct gpio_desc wp_gpio; #endif @@ -326,7 +326,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, printf("Cannot write to locked SD card.\n"); return -EINVAL; } else { -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (dm_gpio_is_valid(&priv->wp_gpio) && dm_gpio_get_value(&priv->wp_gpio)) { printf("Cannot write to locked SD card.\n"); @@ -761,7 +761,7 @@ static int esdhc_set_voltage(struct mmc *mmc) case MMC_SIGNAL_VOLTAGE_330: if (priv->vs18_enable) return -ENOTSUPP; - if (CONFIG_IS_ENABLED(DM_REGULATOR) && + if (IS_ENABLED(CONFIG_DM_REGULATOR) && !IS_ERR_OR_NULL(priv->vqmmc_dev)) { ret = regulator_set_value(priv->vqmmc_dev, 3300000); @@ -779,7 +779,7 @@ static int esdhc_set_voltage(struct mmc *mmc) return -EAGAIN; case MMC_SIGNAL_VOLTAGE_180: - if (CONFIG_IS_ENABLED(DM_REGULATOR) && + if (IS_ENABLED(CONFIG_DM_REGULATOR) && !IS_ERR_OR_NULL(priv->vqmmc_dev)) { ret = regulator_set_value(priv->vqmmc_dev, 1800000); @@ -1045,10 +1045,10 @@ static int esdhc_getcd_common(struct fsl_esdhc_priv *priv) if (IS_ENABLED(CONFIG_ESDHC_DETECT_QUIRK)) return 1; - if (CONFIG_IS_ENABLED(DM_MMC)) { + if (IS_ENABLED(CONFIG_DM_MMC)) { if (priv->broken_cd) return 1; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (dm_gpio_is_valid(&priv->cd_gpio)) return dm_gpio_get_value(&priv->cd_gpio); #endif @@ -1103,7 +1103,7 @@ static int esdhc_reset(struct fsl_esdhc *regs) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int esdhc_getcd(struct mmc *mmc) { struct fsl_esdhc_priv *priv = mmc->priv; @@ -1188,7 +1188,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, esdhc_write32(®s->irqstaten, SDHCI_IRQ_EN_BITS); cfg = &plat->cfg; - if (!CONFIG_IS_ENABLED(DM_MMC)) + if (!IS_ENABLED(CONFIG_DM_MMC)) memset(cfg, '\0', sizeof(*cfg)); caps = esdhc_read32(®s->hostcapblt); @@ -1216,7 +1216,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, cfg->name = "FSL_SDHC"; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) cfg->ops = &esdhc_ops; #endif @@ -1262,20 +1262,20 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, * UHS doesn't have explicit ESDHC flags, so if it's * not supported, disable it in config. */ - if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)) + if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT)) cfg->host_caps |= UHS_CAPS; - if (CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)) { + if (IS_ENABLED(CONFIG_MMC_HS200_SUPPORT)) { if (priv->flags & ESDHC_FLAG_HS200) cfg->host_caps |= MMC_CAP(MMC_HS_200); } - if (CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)) { + if (IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)) { if (priv->flags & ESDHC_FLAG_HS400) cfg->host_caps |= MMC_CAP(MMC_HS_400); } - if (CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)) { + if (IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)) { if (priv->flags & ESDHC_FLAG_HS400_ES) cfg->host_caps |= MMC_CAP(MMC_HS_400_ES); } @@ -1283,7 +1283,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int fsl_esdhc_initialize(struct bd_info *bis, struct fsl_esdhc_cfg *cfg) { struct fsl_esdhc_plat *plat; @@ -1357,7 +1357,7 @@ int fsl_esdhc_mmc_init(struct bd_info *bis) } #endif -#if CONFIG_IS_ENABLED(OF_LIBFDT) +#if IS_ENABLED(CONFIG_OF_LIBFDT) __weak int esdhc_status_fixup(void *blob, const char *compat) { if (IS_ENABLED(CONFIG_FSL_ESDHC_PIN_MUX) && !hwconfig("esdhc")) { @@ -1380,7 +1380,7 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd) } #endif -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) #include __weak void init_clk_usdhc(u32 index) { @@ -1397,7 +1397,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev) fdt_addr_t addr; unsigned int val; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; addr = dev_read_addr(dev); @@ -1427,7 +1427,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev) priv->wp_enable = 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN); gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, @@ -1436,7 +1436,7 @@ static int fsl_esdhc_of_to_plat(struct udevice *dev) priv->vs18_enable = 0; - if (!CONFIG_IS_ENABLED(DM_REGULATOR)) + if (!IS_ENABLED(CONFIG_DM_REGULATOR)) return 0; /* @@ -1470,7 +1470,7 @@ static int fsl_esdhc_probe(struct udevice *dev) struct mmc *mmc; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_esdhc *dtplat = &plat->dtplat; priv->esdhc_regs = map_sysmem(dtplat->reg[0], dtplat->reg[1]); @@ -1480,7 +1480,7 @@ static int fsl_esdhc_probe(struct udevice *dev) else plat->cfg.host_caps &= ~MMC_CAP_NONREMOVABLE; - if (CONFIG_IS_ENABLED(DM_GPIO) && !dtplat->non_removable) { + if (IS_ENABLED(CONFIG_DM_GPIO) && !dtplat->non_removable) { struct udevice *gpiodev; ret = device_get_by_ofplat_idx(dtplat->cd_gpios->idx, &gpiodev); @@ -1519,7 +1519,7 @@ static int fsl_esdhc_probe(struct udevice *dev) * work as expected. */ -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) /* Assigned clock already set clock */ ret = clk_get_by_name(dev, "per", &priv->per_clk); if (ret) { @@ -1549,7 +1549,7 @@ static int fsl_esdhc_probe(struct udevice *dev) return ret; } - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { ret = mmc_of_parse(dev, &plat->cfg); if (ret) return ret; @@ -1620,7 +1620,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = { #ifdef MMC_SUPPORTS_TUNING .execute_tuning = fsl_esdhc_execute_tuning, #endif -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) .set_enhanced_strobe = fsl_esdhc_set_enhanced_strobe, #endif .wait_dat0 = fsl_esdhc_wait_dat0, diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index cabb747fbbd..56b7c6b5d8a 100644 --- a/drivers/mmc/ftsdc010_mci.c +++ b/drivers/mmc/ftsdc010_mci.c @@ -33,7 +33,7 @@ #define CFG_CMD_TIMEOUT (CONFIG_SYS_HZ >> 2) /* 250 ms */ #define CFG_RST_TIMEOUT CONFIG_SYS_HZ /* 1 sec reset timeout */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct ftsdc010 { fdt32_t bus_width; bool cap_mmc_highspeed; @@ -46,7 +46,7 @@ struct ftsdc010 { #endif struct ftsdc010_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct ftsdc010 dtplat; #endif struct mmc_config cfg; @@ -393,7 +393,7 @@ static int ftsdc010_mmc_of_to_plat(struct udevice *dev) struct ftsdc_priv *priv = dev_get_priv(dev); struct ftsdc010_chip *chip = &priv->chip; - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { chip->name = dev->name; chip->ioaddr = dev_read_addr_ptr(dev); chip->buswidth = dev_read_u32_default(dev, "bus-width", 4); @@ -424,7 +424,7 @@ static int ftsdc010_mmc_probe(struct udevice *dev) struct ftsdc010_chip *chip = &priv->chip; struct udevice *pwr_dev __maybe_unused; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) int ret; struct ftsdc010 *dtplat = &plat->dtplat; chip->name = dev->name; diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c index 61e48ee0f62..0f53ad16133 100644 --- a/drivers/mmc/jz_mmc.c +++ b/drivers/mmc/jz_mmc.c @@ -138,7 +138,7 @@ static int jz_mmc_clock_rate(void) return 24000000; } -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) static inline void jz_mmc_write_data(struct jz_mmc_priv *priv, struct mmc_data *data) { int sz = DIV_ROUND_UP(data->blocks * data->blocksize, 4); @@ -366,7 +366,7 @@ static int jz_mmc_core_init(struct mmc *mmc) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int jz_mmc_legacy_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 01d9b0201f2..9bcede2d154 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -128,7 +128,7 @@ int mmc_execute_tuning(struct mmc *mmc, uint opcode) } #endif -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) static int dm_mmc_set_enhanced_strobe(struct udevice *dev) { struct dm_mmc_ops *ops = mmc_get_ops(dev); @@ -284,7 +284,7 @@ struct mmc *mmc_get_mmc_dev(const struct udevice *dev) return upriv->mmc; } -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct mmc *find_mmc_device(int dev_num) { struct udevice *dev, *mmc_dev; @@ -494,9 +494,9 @@ static int mmc_blk_probe(struct udevice *dev) if (ret) { debug("Probing %s failed (err=%d)\n", dev->name, ret); - if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)) + if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)) mmc_deinit(mmc); return ret; @@ -505,9 +505,9 @@ static int mmc_blk_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) static int mmc_blk_remove(struct udevice *dev) { struct udevice *mmc_dev = dev_get_parent(dev); @@ -520,7 +520,7 @@ static int mmc_blk_remove(struct udevice *dev) static const struct blk_ops mmc_blk_ops = { .read = mmc_bread, -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) .write = mmc_bwrite, .erase = mmc_berase, #endif @@ -532,9 +532,9 @@ U_BOOT_DRIVER(mmc_blk) = { .id = UCLASS_BLK, .ops = &mmc_blk_ops, .probe = mmc_blk_probe, -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) .remove = mmc_blk_remove, .flags = DM_FLAG_OS_PREPARE, #endif diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index fd4aa946e2a..55a566402ce 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -30,7 +30,7 @@ static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage); -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int mmc_wait_dat0(struct mmc *mmc, int state, int timeout_us) { @@ -135,7 +135,7 @@ void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd) } #endif -#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG +#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG const char *mmc_mode_name(enum bus_mode mode) { static const char *const names[] = { @@ -197,7 +197,7 @@ static int mmc_select_mode(struct mmc *mmc, enum bus_mode mode) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { int ret; @@ -439,7 +439,7 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start, return blkcnt; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt) { if (mmc->cfg->ops->get_b_max) @@ -449,14 +449,14 @@ static int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt) } #endif -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, void *dst) #else ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst) #endif { -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; @@ -471,7 +471,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, if (!mmc) return 0; - if (CONFIG_IS_ENABLED(MMC_TINY)) + if (IS_ENABLED(CONFIG_MMC_TINY)) err = mmc_switch_part(mmc, block_dev->hwpart); else err = blk_dselect_hwpart(block_dev, block_dev->hwpart); @@ -529,7 +529,7 @@ static int mmc_go_idle(struct mmc *mmc) return 0; } -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) static int mmc_switch_voltage(struct mmc *mmc, int signal_voltage) { struct mmc_cmd cmd; @@ -656,7 +656,7 @@ static int sd_send_op_cond(struct mmc *mmc, bool uhs_en) mmc->ocr = cmd.response[0]; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) if (uhs_en && !(mmc_host_is_spi(mmc)) && (cmd.response[0] & 0x41000000) == 0x41000000) { err = mmc_switch_voltage(mmc, MMC_SIGNAL_VOLTAGE_180); @@ -893,7 +893,7 @@ int mmc_boot_wp_single_partition(struct mmc *mmc, int partition) return ret; } -#if !CONFIG_IS_ENABLED(MMC_TINY) +#if !IS_ENABLED(CONFIG_MMC_TINY) static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode, bool hsdowngrade) { @@ -908,17 +908,17 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode, case MMC_DDR_52: speed_bits = EXT_CSD_TIMING_HS; break; -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) case MMC_HS_200: speed_bits = EXT_CSD_TIMING_HS200; break; #endif -#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) case MMC_HS_400: speed_bits = EXT_CSD_TIMING_HS400; break; #endif -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) case MMC_HS_400_ES: speed_bits = EXT_CSD_TIMING_HS400; break; @@ -935,8 +935,8 @@ static int mmc_set_card_speed(struct mmc *mmc, enum bus_mode mode, if (err) return err; -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) /* * In case the eMMC is in HS200/HS400 mode and we are downgrading * to HS mode, the card clock are still running much faster than @@ -987,14 +987,14 @@ static int mmc_get_capabilities(struct mmc *mmc) cardtype = ext_csd[EXT_CSD_CARD_TYPE]; mmc->cardtype = cardtype; -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) if (cardtype & (EXT_CSD_CARD_TYPE_HS200_1_2V | EXT_CSD_CARD_TYPE_HS200_1_8V)) { mmc->card_caps |= MMC_MODE_HS200; } #endif -#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) if (cardtype & (EXT_CSD_CARD_TYPE_HS400_1_2V | EXT_CSD_CARD_TYPE_HS400_1_8V)) { mmc->card_caps |= MMC_MODE_HS400; @@ -1008,7 +1008,7 @@ static int mmc_get_capabilities(struct mmc *mmc) if (cardtype & EXT_CSD_CARD_TYPE_26) mmc->card_caps |= MMC_MODE_HS; -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) if (ext_csd[EXT_CSD_STROBE_SUPPORT] && (mmc->card_caps & MMC_MODE_HS400)) { mmc->card_caps |= MMC_MODE_HS400_ES; @@ -1071,7 +1071,7 @@ int mmc_switch_part(struct mmc *mmc, unsigned int part_num) return ret; } -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf, enum mmc_hwpart_conf_mode mode) @@ -1203,7 +1203,7 @@ int mmc_hwpart_config(struct mmc *mmc, ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1; -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) /* update erase group size to be high-capacity */ mmc->erase_grp_size = ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024; @@ -1269,7 +1269,7 @@ int mmc_hwpart_config(struct mmc *mmc, } #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int mmc_getcd(struct mmc *mmc) { int cd; @@ -1287,7 +1287,7 @@ int mmc_getcd(struct mmc *mmc) } #endif -#if !CONFIG_IS_ENABLED(MMC_TINY) +#if !IS_ENABLED(CONFIG_MMC_TINY) static int sd_switch(struct mmc *mmc, int mode, int group, u8 value, u8 *resp) { struct mmc_cmd cmd; @@ -1316,7 +1316,7 @@ static int sd_get_capabilities(struct mmc *mmc) ALLOC_CACHE_ALIGN_BUFFER(__be32, switch_status, 16); struct mmc_data data; int timeout; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) u32 sd3_bus_mode; #endif @@ -1393,7 +1393,7 @@ static int sd_get_capabilities(struct mmc *mmc) if (__be32_to_cpu(switch_status[3]) & SD_HIGHSPEED_SUPPORTED) mmc->card_caps |= MMC_CAP(SD_HS); -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) /* Version before 3.0 don't support UHS modes */ if (mmc->version < SD_VERSION_3) return 0; @@ -1432,7 +1432,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode) case SD_HS: speed = HIGH_SPEED_BUS_SPEED; break; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) case UHS_SDR12: speed = UHS_SDR12_BUS_SPEED; break; @@ -1493,7 +1493,7 @@ static int sd_select_bus_width(struct mmc *mmc, int w) } #endif -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) static int sd_read_ssr(struct mmc *mmc) { static const unsigned int sd_au_size[] = { @@ -1595,7 +1595,7 @@ static inline int bus_width(uint cap) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) #ifdef MMC_SUPPORTS_TUNING static int mmc_execute_tuning(struct mmc *mmc, uint opcode) { @@ -1649,7 +1649,7 @@ static int mmc_set_bus_width(struct mmc *mmc, uint width) return mmc_set_ios(mmc); } -#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG) +#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) /* * helper function to display the capabilities in a human * friendly manner. The capabilities include bus width and @@ -1682,7 +1682,7 @@ struct mode_width_tuning { #endif }; -#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE) +#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE) int mmc_voltage_to_mv(enum mmc_voltage voltage) { switch (voltage) { @@ -1715,9 +1715,9 @@ static inline int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage) } #endif -#if !CONFIG_IS_ENABLED(MMC_TINY) +#if !IS_ENABLED(CONFIG_MMC_TINY) static const struct mode_width_tuning sd_modes_by_pref[] = { -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) #ifdef MMC_SUPPORTS_TUNING { .mode = UHS_SDR104, @@ -1742,7 +1742,7 @@ static const struct mode_width_tuning sd_modes_by_pref[] = { .mode = SD_HS, .widths = MMC_MODE_4BIT | MMC_MODE_1BIT, }, -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) { .mode = UHS_SDR12, .widths = MMC_MODE_4BIT | MMC_MODE_1BIT, @@ -1765,7 +1765,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) int err; uint widths[] = {MMC_MODE_4BIT, MMC_MODE_1BIT}; const struct mode_width_tuning *mwt; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) bool uhs_en = (mmc->ocr & OCR_S18R) ? true : false; #else bool uhs_en = false; @@ -1781,7 +1781,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) mmc_set_bus_width(mmc, 1); mmc_select_mode(mmc, MMC_LEGACY); mmc_set_clock(mmc, mmc->tran_speed, MMC_CLK_ENABLE); -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) err = sd_read_ssr(mmc); if (err) pr_warn("unable to read ssr\n"); @@ -1833,7 +1833,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) } #endif -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) err = sd_read_ssr(mmc); if (err) pr_warn("unable to read ssr\n"); @@ -1888,7 +1888,7 @@ static int mmc_read_and_compare_ext_csd(struct mmc *mmc) return -EBADMSG; } -#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE) +#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE) static int mmc_set_lowest_voltage(struct mmc *mmc, enum bus_mode mode, uint32_t allowed_mask) { @@ -1938,20 +1938,20 @@ static inline int mmc_set_lowest_voltage(struct mmc *mmc, enum bus_mode mode, #endif static const struct mode_width_tuning mmc_modes_by_pref[] = { -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) { .mode = MMC_HS_400_ES, .widths = MMC_MODE_8BIT, }, #endif -#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) { .mode = MMC_HS_400, .widths = MMC_MODE_8BIT, .tuning = MMC_CMD_SEND_TUNING_BLOCK_HS200 }, #endif -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) { .mode = MMC_HS_200, .widths = MMC_MODE_8BIT | MMC_MODE_4BIT, @@ -1994,7 +1994,7 @@ static const struct ext_csd_bus_width { {MMC_MODE_1BIT, false, EXT_CSD_BUS_WIDTH_1}, }; -#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) static int mmc_select_hs400(struct mmc *mmc) { int err; @@ -2047,8 +2047,8 @@ static int mmc_select_hs400(struct mmc *mmc) } #endif -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) -#if !CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) +#if !IS_ENABLED(CONFIG_DM_MMC) static int mmc_set_enhanced_strobe(struct mmc *mmc) { return -ENOTSUPP; @@ -2124,9 +2124,9 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps) return -ENOTSUPP; } -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) /* * In case the eMMC is in HS200/HS400 mode, downgrade to HS mode * before doing anything else, since a transition from either of @@ -2233,7 +2233,7 @@ error: } #endif -#if CONFIG_IS_ENABLED(MMC_TINY) +#if IS_ENABLED(CONFIG_MMC_TINY) DEFINE_CACHE_ALIGN_BUFFER(u8, ext_csd_bkup, MMC_MAX_BLOCK_LEN); #endif @@ -2255,7 +2255,7 @@ static int mmc_startup_v4(struct mmc *mmc) MMC_VERSION_5_1 }; -#if CONFIG_IS_ENABLED(MMC_TINY) +#if IS_ENABLED(CONFIG_MMC_TINY) u8 *ext_csd = ext_csd_bkup; if (IS_SD(mmc) || mmc->version < MMC_VERSION_4) @@ -2394,7 +2394,7 @@ static int mmc_startup_v4(struct mmc *mmc) } if (ext_csd[EXT_CSD_ERASE_GROUP_DEF] & 0x01) { -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) /* Read out group size from ext_csd */ mmc->erase_grp_size = ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024; @@ -2413,7 +2413,7 @@ static int mmc_startup_v4(struct mmc *mmc) mmc->capacity_user = capacity; } } -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) else { /* Calculate the group size from the csd value. */ int erase_gsz, erase_gmul; @@ -2424,7 +2424,7 @@ static int mmc_startup_v4(struct mmc *mmc) * (erase_gmul + 1); } #endif -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) mmc->hc_wp_grp_size = 1024 * ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * ext_csd[EXT_CSD_HC_WP_GRP_SIZE]; @@ -2435,7 +2435,7 @@ static int mmc_startup_v4(struct mmc *mmc) return 0; error: if (mmc->ext_csd) { -#if !CONFIG_IS_ENABLED(MMC_TINY) +#if !IS_ENABLED(CONFIG_MMC_TINY) free(mmc->ext_csd); #endif mmc->ext_csd = NULL; @@ -2542,7 +2542,7 @@ static int mmc_startup(struct mmc *mmc) mmc->dsr_imp = ((cmd.response[1] >> 12) & 0x1); mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf); -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) if (IS_SD(mmc)) mmc->write_bl_len = mmc->read_bl_len; @@ -2570,7 +2570,7 @@ static int mmc_startup(struct mmc *mmc) if (mmc->read_bl_len > MMC_MAX_BLOCK_LEN) mmc->read_bl_len = MMC_MAX_BLOCK_LEN; -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) if (mmc->write_bl_len > MMC_MAX_BLOCK_LEN) mmc->write_bl_len = MMC_MAX_BLOCK_LEN; #endif @@ -2597,7 +2597,7 @@ static int mmc_startup(struct mmc *mmc) /* * For SD, its erase group is always one sector */ -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) mmc->erase_grp_size = 1; #endif mmc->part_config = MMCPART_NOAVAILABLE; @@ -2610,7 +2610,7 @@ static int mmc_startup(struct mmc *mmc) if (err) return err; -#if CONFIG_IS_ENABLED(MMC_TINY) +#if IS_ENABLED(CONFIG_MMC_TINY) mmc_set_clock(mmc, mmc->legacy_speed, false); mmc_select_mode(mmc, MMC_LEGACY); mmc_set_bus_width(mmc, 1); @@ -2635,7 +2635,7 @@ static int mmc_startup(struct mmc *mmc) /* Fix the block length for DDR mode */ if (mmc->ddr_mode) { mmc->read_bl_len = MMC_MAX_BLOCK_LEN; -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) mmc->write_bl_len = MMC_MAX_BLOCK_LEN; #endif } @@ -2650,7 +2650,7 @@ static int mmc_startup(struct mmc *mmc) bdesc->lba = lldiv(mmc->capacity, mmc->read_bl_len); #if !defined(CONFIG_SPL_BUILD) || \ (defined(CONFIG_SPL_LIBCOMMON_SUPPORT) && \ - !CONFIG_IS_ENABLED(USE_TINY_PRINTF)) + !IS_ENABLED(CONFIG_USE_TINY_PRINTF)) sprintf(bdesc->vendor, "Man %06x Snr %04x%04x", mmc->cid[0] >> 24, (mmc->cid[2] & 0xffff), (mmc->cid[3] >> 16) & 0xffff); @@ -2696,7 +2696,7 @@ static int mmc_send_if_cond(struct mmc *mmc) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* board-specific MMC power initializations. */ __weak void board_mmc_power_init(void) { @@ -2705,8 +2705,8 @@ __weak void board_mmc_power_init(void) static int mmc_power_init(struct mmc *mmc) { -#if CONFIG_IS_ENABLED(DM_MMC) -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_MMC) +#if IS_ENABLED(CONFIG_DM_REGULATOR) int ret; ret = device_get_supply_regulator(mmc->dev, "vmmc-supply", @@ -2752,7 +2752,7 @@ static void mmc_set_initial_state(struct mmc *mmc) static int mmc_power_on(struct mmc *mmc) { -#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_REGULATOR) if (mmc->vmmc_supply) { int ret = regulator_set_enable(mmc->vmmc_supply, true); @@ -2768,7 +2768,7 @@ static int mmc_power_on(struct mmc *mmc) static int mmc_power_off(struct mmc *mmc) { mmc_set_clock(mmc, 0, MMC_CLK_DISABLE); -#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_REGULATOR) if (mmc->vmmc_supply) { int ret = regulator_set_enable(mmc->vmmc_supply, false); @@ -2834,7 +2834,7 @@ int mmc_get_op_cond(struct mmc *mmc, bool quiet) if (err) return err; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) /* * Re-initialization is needed to clear old configuration for * mmc rescan. @@ -2916,7 +2916,7 @@ int mmc_start_init(struct mmc *mmc) } } } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) mmc_deferred_probe(mmc); #endif #if !defined(CONFIG_MMC_BROKEN_CD) @@ -2924,7 +2924,7 @@ int mmc_start_init(struct mmc *mmc) #else no_card = 0; #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* we pretend there's no card when init is NULL */ no_card = no_card || (mmc->cfg->ops->init == NULL); #endif @@ -2965,7 +2965,7 @@ int mmc_init(struct mmc *mmc) { int err = 0; __maybe_unused ulong start; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc->dev); upriv->mmc = mmc; @@ -2986,9 +2986,9 @@ int mmc_init(struct mmc *mmc) return err; } -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) int mmc_deinit(struct mmc *mmc) { u32 caps_filtered; @@ -3035,7 +3035,7 @@ void mmc_set_preinit(struct mmc *mmc, int preinit) mmc->preinit = preinit; } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) static int mmc_probe(struct bd_info *bis) { int ret, i; @@ -3082,8 +3082,8 @@ int mmc_initialize(struct bd_info *bis) return 0; initialized = 1; -#if !CONFIG_IS_ENABLED(BLK) -#if !CONFIG_IS_ENABLED(MMC_TINY) +#if !IS_ENABLED(CONFIG_BLK) +#if !IS_ENABLED(CONFIG_MMC_TINY) mmc_list_init(); #endif #endif @@ -3099,7 +3099,7 @@ int mmc_initialize(struct bd_info *bis) return 0; } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) int mmc_init_device(int num) { struct udevice *dev; diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c index a101ee43fde..517e2eaf3c4 100644 --- a/drivers/mmc/mmc_legacy.c +++ b/drivers/mmc/mmc_legacy.c @@ -14,7 +14,7 @@ static struct list_head mmc_devices; static int cur_dev_num = -1; -#if CONFIG_IS_ENABLED(MMC_TINY) +#if IS_ENABLED(CONFIG_MMC_TINY) static struct mmc mmc_static; struct mmc *find_mmc_device(int dev_num) { @@ -127,7 +127,7 @@ void print_mmc_devices(char separator) void print_mmc_devices(char separator) { } #endif -#if CONFIG_IS_ENABLED(MMC_TINY) +#if IS_ENABLED(CONFIG_MMC_TINY) static struct mmc mmc_static = { .dsr_imp = 0, .dsr = 0xffffffff, @@ -175,7 +175,7 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv) cfg->f_max == 0 || cfg->b_max == 0) return NULL; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) if (cfg->ops == NULL || cfg->ops->send_cmd == NULL) return NULL; #endif diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h index b32123758ea..dc13575e6d6 100644 --- a/drivers/mmc/mmc_private.h +++ b/drivers/mmc/mmc_private.h @@ -17,7 +17,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout); int mmc_set_blocklen(struct mmc *mmc, int len); -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, void *dst); #else @@ -25,9 +25,9 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, void *dst); #endif -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, const void *src); ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt); @@ -41,7 +41,7 @@ ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); /* declare dummies to reduce code size. */ -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static inline unsigned long mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) { diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index 5b7aeeb0121..fb259df3385 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -66,13 +66,13 @@ err_out: return err; } -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) #else ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) #endif { -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; @@ -184,7 +184,7 @@ static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, return blkcnt; } -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, const void *src) #else @@ -192,7 +192,7 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, const void *src) #endif { -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index b206b0a0858..738716fcdc7 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -386,7 +386,7 @@ struct msdc_host { bool cd_active_high; /* card detection / write protection GPIOs */ -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc gpio_wp; struct gpio_desc gpio_cd; #endif @@ -986,7 +986,7 @@ static int msdc_ops_get_cd(struct udevice *dev) return !val ^ host->cd_active_high; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (!host->gpio_cd.dev) return 1; @@ -998,7 +998,7 @@ static int msdc_ops_get_cd(struct udevice *dev) static int msdc_ops_get_wp(struct udevice *dev) { -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct msdc_host *host = dev_get_priv(dev); if (!host->gpio_wp.dev) @@ -1716,7 +1716,7 @@ static int msdc_of_to_plat(struct udevice *dev) clk_get_by_name(dev, "source_cg", &host->src_clk_cg); /* optional */ -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) gpio_request_by_name(dev, "wp-gpios", 0, &host->gpio_wp, GPIOD_IS_IN); gpio_request_by_name(dev, "cd-gpios", 0, &host->gpio_cd, GPIOD_IS_IN); #endif diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c index 35a8e21058e..161cd31528b 100644 --- a/drivers/mmc/mxsmmc.c +++ b/drivers/mmc/mxsmmc.c @@ -37,7 +37,7 @@ #define MXSMMC_MAX_TIMEOUT 10000 #define MXSMMC_SMALL_TRANSFER 512 -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) struct mxsmmc_priv { int id; int (*mmc_is_wp)(int); @@ -47,13 +47,13 @@ struct mxsmmc_priv { uint32_t buswidth; struct mxs_ssp_regs *regs; }; -#else /* CONFIG_IS_ENABLED(DM_MMC) */ +#else /* IS_ENABLED(CONFIG_DM_MMC) */ #include #include #include struct mxsmmc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_mmc dtplat; #endif struct mmc_config cfg; @@ -74,7 +74,7 @@ struct mxsmmc_priv { }; #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data); @@ -213,7 +213,7 @@ int mxsmmc_initialize(struct bd_info *bis, int id, int (*wp)(int), } return 0; } -#endif /* CONFIG_IS_ENABLED(DM_MMC) */ +#endif /* IS_ENABLED(CONFIG_DM_MMC) */ static int mxsmmc_send_cmd_pio(struct mxsmmc_priv *priv, struct mmc_data *data) { @@ -280,7 +280,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data) priv->desc->cmd.data |= MXS_DMA_DESC_IRQ | MXS_DMA_DESC_DEC_SEM | (data_count << MXS_DMA_DESC_BYTES_OFFSET); -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id; #else dmach = priv->dma_channel; @@ -296,7 +296,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data) return 0; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* * Sends a command out on the bus. Takes the mmc pointer, * a command pointer, and an optional data pointer. @@ -319,7 +319,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) int timeout; uint32_t ctrl0; int ret; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int devnum = mmc->block_dev.devnum; #else int devnum = mmc_get_blk_desc(mmc)->devnum; @@ -342,7 +342,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) printf("MMC%d: Bus busy timeout!\n", devnum); return -ETIMEDOUT; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* See if card is present */ if (!mxsmmc_cd(priv)) { printf("MMC%d: No card detected!\n", devnum); @@ -381,7 +381,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) /* READ or WRITE */ if (data->flags & MMC_DATA_READ) { ctrl0 |= SSP_CTRL0_READ; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) } else if (priv->mmc_is_wp && priv->mmc_is_wp(devnum)) { printf("MMC%d: Can not write a locked card!\n", devnum); @@ -483,7 +483,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) return 0; } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) /* Base numbers of i.MX2[38] clk for ssp0 IP block */ #define MXS_SSP_IMX23_CLKID_SSP0 33 #define MXS_SSP_IMX28_CLKID_SSP0 46 @@ -575,7 +575,7 @@ static int mxsmmc_probe(struct udevice *dev) debug("%s: probe\n", __func__); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_mmc *dtplat = &plat->dtplat; struct phandle_1_arg *p1a = &dtplat->clocks[0]; @@ -650,7 +650,7 @@ static int mxsmmc_probe(struct udevice *dev) return 0; }; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) static int mxsmmc_bind(struct udevice *dev) { struct mxsmmc_plat *plat = dev_get_plat(dev); @@ -665,7 +665,7 @@ static const struct dm_mmc_ops mxsmmc_ops = { .set_ios = mxsmmc_set_ios, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int mxsmmc_of_to_plat(struct udevice *bus) { struct mxsmmc_plat *plat = dev_get_plat(bus); @@ -709,12 +709,12 @@ static const struct udevice_id mxsmmc_ids[] = { U_BOOT_DRIVER(fsl_imx23_mmc) = { .name = "fsl_imx23_mmc", .id = UCLASS_MMC, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = mxsmmc_ids, .of_to_plat = mxsmmc_of_to_plat, #endif .ops = &mxsmmc_ops, -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) .bind = mxsmmc_bind, #endif .probe = mxsmmc_probe, diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c index 4ee62df9d40..17889448650 100644 --- a/drivers/mmc/octeontx_hsmmc.c +++ b/drivers/mmc/octeontx_hsmmc.c @@ -2541,7 +2541,7 @@ static int octeontx_mmc_set_ios(struct udevice *dev) slot->last_clock = mmc->clock; } - if (CONFIG_IS_ENABLED(MMC_VERBOSE)) { + if (IS_ENABLED(CONFIG_MMC_VERBOSE)) { debug("%s(%s): Setting bus mode to %s\n", __func__, dev->name, mmc_mode_name(mmc->selected_mode)); } else { diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index a2595d19e7f..3ca150fc2d5 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -82,14 +82,14 @@ struct omap_hsmmc_pinctrl_state { struct omap_hsmmc_data { struct hsmmc *base_addr; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) struct mmc_config cfg; #endif uint bus_width; uint clock; ushort last_cmd; #ifdef OMAP_HSMMC_USE_GPIO -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) struct gpio_desc cd_gpio; /* Change Detect GPIO */ struct gpio_desc wp_gpio; /* Write Protect GPIO */ #else @@ -97,7 +97,7 @@ struct omap_hsmmc_data { int wp_gpio; #endif #endif -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) enum bus_mode mode; #endif u8 controller_flags; @@ -170,7 +170,7 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit); static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc) { -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) return dev_get_priv(mmc->dev); #else return (struct omap_hsmmc_data *)mmc->priv; @@ -180,7 +180,7 @@ static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc) #if defined(CONFIG_OMAP34XX) || defined(CONFIG_IODELAY_RECALIBRATION) static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc) { -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) struct omap_hsmmc_plat *plat = dev_get_plat(mmc->dev); return &plat->cfg; #else @@ -189,12 +189,12 @@ static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc) } #endif -#if defined(OMAP_HSMMC_USE_GPIO) && !CONFIG_IS_ENABLED(DM_MMC) +#if defined(OMAP_HSMMC_USE_GPIO) && !IS_ENABLED(CONFIG_DM_MMC) static int omap_mmc_setup_gpio_in(int gpio, const char *label) { int ret; -#if !CONFIG_IS_ENABLED(DM_GPIO) +#if !IS_ENABLED(CONFIG_DM_GPIO) if (!gpio_is_valid(gpio)) return -1; #endif @@ -272,7 +272,7 @@ static unsigned char mmc_board_init(struct mmc *mmc) #endif #if (defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)) &&\ - !CONFIG_IS_ENABLED(DM_REGULATOR) + !IS_ENABLED(CONFIG_DM_REGULATOR) /* PBIAS config needed for MMC1 only */ if (mmc_get_blk_desc(mmc)->devnum == 0) vmmc_pbias_config(LDO_VOLT_3V3); @@ -309,7 +309,7 @@ void mmc_init_stream(struct hsmmc *mmc_base) writel(readl(&mmc_base->con) & ~INIT_INITSTREAM, &mmc_base->con); } -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) #ifdef CONFIG_IODELAY_RECALIBRATION static void omap_hsmmc_io_recalibrate(struct mmc *mmc) { @@ -466,8 +466,8 @@ static int omap_hsmmc_wait_dat0(struct udevice *dev, int state, int timeout_us) return ret; } -#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE) -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE) +#if IS_ENABLED(CONFIG_DM_REGULATOR) static int omap_hsmmc_set_io_regulator(struct mmc *mmc, int mV) { int ret = 0; @@ -540,7 +540,7 @@ static int omap_hsmmc_set_signal_voltage(struct mmc *mmc) omap_hsmmc_conf_bus_power(mmc, mmc->signal_voltage); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) return omap_hsmmc_set_io_regulator(mmc, mv); #elif (defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)) && \ defined(CONFIG_PALMAS_POWER) @@ -839,7 +839,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) priv->controller_flags |= OMAP_HSMMC_USE_ADMA; #endif -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) reg_val = omap_hsmmc_set_capabilities(mmc); omap_hsmmc_conf_bus_power(mmc, (reg_val & VS33_3V3SUP) ? MMC_SIGNAL_VOLTAGE_330 : MMC_SIGNAL_VOLTAGE_180); @@ -873,7 +873,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) mmc_enable_irq(mmc, NULL); -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) mmc_init_stream(mmc_base); #endif @@ -1037,7 +1037,7 @@ static void omap_hsmmc_dma_cleanup(struct mmc *mmc) #define omap_hsmmc_dma_cleanup #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { @@ -1272,7 +1272,7 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size) return 0; } -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, unsigned int size) { @@ -1414,7 +1414,7 @@ static void omap_hsmmc_set_bus_width(struct mmc *mmc) priv->bus_width = mmc->bus_width; } -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) static int omap_hsmmc_set_ios(struct mmc *mmc) { struct omap_hsmmc_data *priv = omap_hsmmc_get_data(mmc); @@ -1439,11 +1439,11 @@ static int omap_hsmmc_set_ios(struct udevice *dev) else omap_hsmmc_start_clock(mmc_base); -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) if (priv->mode != mmc->selected_mode) omap_hsmmc_set_timing(mmc); -#if CONFIG_IS_ENABLED(MMC_IO_VOLTAGE) +#if IS_ENABLED(CONFIG_MMC_IO_VOLTAGE) if (priv->signal_voltage != mmc->signal_voltage) ret = omap_hsmmc_set_signal_voltage(mmc); #endif @@ -1452,11 +1452,11 @@ static int omap_hsmmc_set_ios(struct udevice *dev) } #ifdef OMAP_HSMMC_USE_GPIO -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) static int omap_hsmmc_getcd(struct udevice *dev) { int value = -1; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct omap_hsmmc_data *priv = dev_get_priv(dev); value = dm_gpio_get_value(&priv->cd_gpio); #endif @@ -1470,7 +1470,7 @@ static int omap_hsmmc_getcd(struct udevice *dev) static int omap_hsmmc_getwp(struct udevice *dev) { int value = 0; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct omap_hsmmc_data *priv = dev_get_priv(dev); value = dm_gpio_get_value(&priv->wp_gpio); #endif @@ -1510,7 +1510,7 @@ static int omap_hsmmc_getwp(struct mmc *mmc) #endif #endif -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) static const struct dm_mmc_ops omap_hsmmc_ops = { .send_cmd = omap_hsmmc_send_cmd, .set_ios = omap_hsmmc_set_ios, @@ -1535,7 +1535,7 @@ static const struct mmc_ops omap_hsmmc_ops = { }; #endif -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, int wp_gpio) { @@ -1891,7 +1891,7 @@ static int omap_hsmmc_get_pinctrl_state(struct mmc *mmc) } #endif -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) #ifdef CONFIG_OMAP54XX __weak const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr) { @@ -1978,12 +1978,12 @@ static int omap_hsmmc_probe(struct udevice *dev) if (mmc == NULL) return -1; #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) device_get_supply_regulator(dev, "pbias-supply", &priv->pbias_supply); #endif #if defined(OMAP_HSMMC_USE_GPIO) -#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_DM_GPIO) gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN); gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN); #endif @@ -2009,7 +2009,7 @@ static int omap_hsmmc_probe(struct udevice *dev) return omap_hsmmc_init_setup(mmc); } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct omap_mmc_of_data dra7_mmc_of_data = { .controller_flags = OMAP_HSMMC_REQUIRE_IODELAY, @@ -2028,7 +2028,7 @@ static const struct udevice_id omap_hsmmc_ids[] = { U_BOOT_DRIVER(omap_hsmmc) = { .name = "omap_hsmmc", .id = UCLASS_MMC, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = omap_hsmmc_ids, .of_to_plat = omap_hsmmc_of_to_plat, .plat_auto = sizeof(struct omap_hsmmc_plat), @@ -2039,7 +2039,7 @@ U_BOOT_DRIVER(omap_hsmmc) = { .ops = &omap_hsmmc_ops, .probe = omap_hsmmc_probe, .priv_auto = sizeof(struct omap_hsmmc_data), -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c index 9fb70440293..18b36fa8317 100644 --- a/drivers/mmc/pci_mmc.c +++ b/drivers/mmc/pci_mmc.c @@ -67,7 +67,7 @@ static int pci_mmc_probe(struct udevice *dev) static int pci_mmc_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(DM_GPIO)) { + if (IS_ENABLED(CONFIG_DM_GPIO)) { struct pci_mmc_priv *priv = dev_get_priv(dev); int ret; diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 9ad92648a34..e13dd265cfe 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -23,9 +23,9 @@ #include #include "tmio-common.h" -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) /* SCC registers */ #define RENESAS_SDHI_SCC_DTCNTL 0x800 @@ -655,9 +655,9 @@ static int renesas_sdhi_set_ios(struct udevice *dev) mdelay(10); -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) struct mmc *mmc = mmc_get_mmc_dev(dev); if ((priv->caps & TMIO_SD_CAP_RCAR_UHS) && (mmc->selected_mode != UHS_SDR104) && @@ -670,7 +670,7 @@ static int renesas_sdhi_set_ios(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) static int renesas_sdhi_wait_dat0(struct udevice *dev, int state, int timeout_us) { @@ -784,9 +784,9 @@ static int renesas_sdhi_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, if (ret) return ret; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) struct tmio_sd_priv *priv = dev_get_priv(dev); renesas_sdhi_check_scc_error(dev); @@ -820,12 +820,12 @@ static const struct dm_mmc_ops renesas_sdhi_ops = { .send_cmd = renesas_sdhi_send_cmd, .set_ios = renesas_sdhi_set_ios, .get_cd = tmio_sd_get_cd, -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) .execute_tuning = renesas_sdhi_execute_tuning, #endif -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) .wait_dat0 = renesas_sdhi_wait_dat0, #endif .get_b_max = renesas_sdhi_get_b_max, @@ -866,9 +866,9 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) if (priv->caps & TMIO_SD_CAP_DMA_INTERNAL) priv->idma_bus_width = TMIO_SD_DMA_MODE_BUS_WIDTH; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) struct tmio_sd_plat *plat = dev_get_plat(dev); /* HS400 is not supported on H3 ES1.x and M3W ES1.0, ES1.1 */ @@ -1003,9 +1003,9 @@ static int renesas_sdhi_probe(struct udevice *dev) renesas_sdhi_filter_caps(dev); -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \ - CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || \ + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS)) renesas_sdhi_reset_tuning(priv); #endif diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index 573bf16c875..4d0959445cd 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -20,7 +20,7 @@ #include struct rockchip_mmc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3288_dw_mshc dtplat; #endif struct mmc_config cfg; @@ -55,7 +55,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev) struct rockchip_dwmmc_priv *priv = dev_get_priv(dev); struct dwmci_host *host = &priv->host; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; host->name = dev->name; @@ -109,7 +109,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev) struct dwmci_host *host = &priv->host; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3288_dw_mshc *dtplat = &plat->dtplat; host->name = dev->name; diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index 9608770d4ec..f0aa3aab8c7 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -271,7 +271,7 @@ static void rk3399_sdhci_set_control_reg(struct sdhci_host *host) * the device impossible to use. Set the correct value here to * let reinitialization attempts succeed. */ - if (CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)) + if (IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT)) rk3399_sdhci_set_enhanced_strobe(host); }; diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c index 0ba7940a4db..4fb4a419b75 100644 --- a/drivers/mmc/sandbox_mmc.c +++ b/drivers/mmc/sandbox_mmc.c @@ -96,7 +96,7 @@ static int sandbox_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, case SD_CMD_ERASE_WR_BLK_END: erase_end = cmd->cmdarg; break; -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) case MMC_CMD_ERASE: { struct mmc *mmc = mmc_get_mmc_dev(dev); diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index a80ad8329a3..0a430a866c9 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -70,7 +70,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host, struct mmc_data *data) } } -#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)) +#if (defined(CONFIG_MMC_SDHCI_SDMA) || IS_ENABLED(CONFIG_MMC_SDHCI_ADMA)) static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data, int *is_aligned, int trans_bytes) { @@ -108,7 +108,7 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data, dma_addr = dev_phys_to_bus(mmc_to_dev(host->mmc), host->start_addr); sdhci_writel(host, dma_addr, SDHCI_DMA_ADDRESS); } -#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA) +#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA) else if (host->flags & (USE_ADMA | USE_ADMA64)) { sdhci_prepare_adma_table(host->adma_desc_table, data, host->start_addr); @@ -177,7 +177,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data) } } while (!(stat & SDHCI_INT_DATA_END)); -#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)) +#if (defined(CONFIG_MMC_SDHCI_SDMA) || IS_ENABLED(CONFIG_MMC_SDHCI_ADMA)) dma_unmap_single(host->start_addr, data->blocks * data->blocksize, mmc_get_dma_dir(data)); #endif @@ -535,7 +535,7 @@ static void sdhci_set_voltage(struct sdhci_host *host) switch (mmc->signal_voltage) { case MMC_SIGNAL_VOLTAGE_330: -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (mmc->vqmmc_supply) { if (regulator_set_enable_if_allowed(mmc->vqmmc_supply, false)) { pr_err("failed to disable vqmmc-supply\n"); @@ -571,7 +571,7 @@ static void sdhci_set_voltage(struct sdhci_host *host) break; case MMC_SIGNAL_VOLTAGE_180: -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (mmc->vqmmc_supply) { if (regulator_set_enable_if_allowed(mmc->vqmmc_supply, false)) { pr_err("failed to disable vqmmc-supply\n"); @@ -691,7 +691,7 @@ static int sdhci_set_ios(struct mmc *mmc) static int sdhci_init(struct mmc *mmc) { struct sdhci_host *host = mmc->priv; -#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_MMC) && IS_ENABLED(CONFIG_DM_GPIO) struct udevice *dev = mmc->dev; gpio_request_by_name(dev, "cd-gpios", 0, @@ -767,7 +767,7 @@ static int sdhci_get_cd(struct udevice *dev) if (mmc->cfg->host_caps & MMC_CAP_NEEDS_POLL) return 1; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) value = dm_gpio_get_value(&host->cd_gpio); if (value >= 0) { if (mmc->cfg->host_caps & MMC_CAP_CD_ACTIVE_HIGH) @@ -803,7 +803,7 @@ static int sdhci_wait_dat0(struct udevice *dev, int state, return -ETIMEDOUT; } -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) static int sdhci_set_enhanced_strobe(struct udevice *dev) { struct mmc *mmc = mmc_get_mmc_dev(dev); @@ -825,7 +825,7 @@ const struct dm_mmc_ops sdhci_ops = { .execute_tuning = sdhci_execute_tuning, #endif .wait_dat0 = sdhci_wait_dat0, -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) .set_enhanced_strobe = sdhci_set_enhanced_strobe, #endif }; @@ -841,7 +841,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, u32 f_max, u32 f_min) { u32 caps, caps_1 = 0; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) u64 dt_caps, dt_caps_mask; dt_caps_mask = dev_read_u64_default(host->mmc->dev, @@ -864,7 +864,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, __func__); } #endif -#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA) +#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA) if (!(caps & SDHCI_CAN_DO_ADMA2)) { printf("%s: Your controller doesn't support SDMA!!\n", __func__); @@ -892,7 +892,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, /* Check whether the clock multiplier is supported or not */ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) caps_1 = ~upper_32_bits(dt_caps_mask) & sdhci_readl(host, SDHCI_CAPABILITIES_1); caps_1 |= upper_32_bits(dt_caps); diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c index be3d8bfb3d7..37725eabc57 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -89,7 +89,7 @@ static int socfpga_dwmmc_get_clk_rate(struct udevice *dev) { struct dwmci_socfpga_priv_data *priv = dev_get_priv(dev); struct dwmci_host *host = &priv->host; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; int ret; diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index b68594de373..a852b2d162f 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -37,7 +37,7 @@ struct stm32_sdmmc2_plat { struct gpio_desc cd_gpio; u32 clk_reg_msk; u32 pwr_reg_msk; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) bool vqmmc_enabled; #endif }; @@ -577,7 +577,7 @@ static void stm32_sdmmc2_pwron(struct stm32_sdmmc2_plat *plat) /* during the first 74 SDMMC_CK cycles the SDMMC is still disabled. */ -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (plat->mmc.vqmmc_supply && !plat->vqmmc_enabled) { if (regulator_set_enable_if_allowed(plat->mmc.vqmmc_supply, true)) dev_dbg(plat->mmc.dev, "failed to enable vqmmc-supply\n"); diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 23bc7da917a..95ad19bc08f 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -439,7 +439,7 @@ out: /* non-DM code here is used by the (ARM) SPL only */ -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) /* support 4 mmc hosts */ struct sunxi_mmc_priv mmc_host[4]; diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h index b1556bba5d9..3bb7712bf80 100644 --- a/drivers/mmc/tmio-common.h +++ b/drivers/mmc/tmio-common.h @@ -136,7 +136,7 @@ struct tmio_sd_priv { #ifdef CONFIG_DM_REGULATOR struct udevice *vqmmc_dev; #endif -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif #if IS_ENABLED(CONFIG_RENESAS_SDHI) diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index 75003a0113e..45a88c1b061 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -35,7 +35,7 @@ static const struct udevice_id uniphier_sd_match[] = { static ulong uniphier_sd_clk_get_rate(struct tmio_sd_priv *priv) { -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) return clk_get_rate(&priv->clk); #elif CONFIG_SPL_BUILD return 100000000; diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index aa78d41a55e..e9d842cf79b 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -768,7 +768,7 @@ int __get_mtd_device(struct mtd_info *mtd) } EXPORT_SYMBOL_GPL(__get_mtd_device); -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL) static bool mtd_device_matches_name(struct mtd_info *mtd, const char *name) { struct udevice *dev = NULL; diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 4886392a1cf..74c88af0f68 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -881,7 +881,7 @@ int add_mtd_partitions(struct mtd_info *master, return 0; } -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL) int add_mtd_partitions_of(struct mtd_info *master) { ofnode parts, child; @@ -947,7 +947,7 @@ int add_mtd_partitions_of(struct mtd_info *master) return 0; } -#endif /* CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_DM) && IS_ENABLED(CONFIG_OF_CONTROL) */ #ifndef __UBOOT__ static DEFINE_SPINLOCK(part_parser_lock); diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index e4e144bd7c8..e07f1c4ab16 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -787,7 +787,7 @@ static void davinci_nand_init(struct nand_chip *nand) nand->dev_ready = nand_davinci_dev_ready; } -#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) static int davinci_nand_probe(struct udevice *dev) { struct nand_chip *nand = dev_get_priv(dev); diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index 7853c3f74e2..78b08fac815 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -745,7 +745,7 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr, struct udevice *dev) /* If nand_scan_ident() has not selected ecc.mode, do it now */ if (nand->ecc.mode == 0 -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) && !ofnode_read_string(nand->flash_node, "nand-ecc-mode") #endif ) { diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index 65eab4c8088..3fdbd42468f 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -62,7 +62,7 @@ struct nand_ecclayout fake_ecc_layout; /* * Cache management functions */ -#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) static void mxs_nand_flush_data_buf(struct mxs_nand_info *info) { uint32_t addr = (uintptr_t)info->data_buf; diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c index eacd99c4e27..eb7856b3f62 100644 --- a/drivers/mtd/nand/raw/nand.c +++ b/drivers/mtd/nand/raw/nand.c @@ -19,7 +19,7 @@ int nand_curr_device = -1; static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; -#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if !IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE]; static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] = CFG_SYS_NAND_BASE_LIST; #endif @@ -76,7 +76,7 @@ int nand_register(int devnum, struct mtd_info *mtd) return 0; } -#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if !IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) static void nand_init_chip(int i) { struct nand_chip *nand = &nand_chip[i]; @@ -155,7 +155,7 @@ void nand_init(void) return; initialized = 1; -#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) board_nand_init(); #else int i; diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 9eba360d55f..0ad647f6500 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4482,7 +4482,7 @@ ident_done: } EXPORT_SYMBOL(nand_detect); -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode node) { @@ -4548,7 +4548,7 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod { return 0; } -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ /** * nand_scan_ident - [NAND Interface] Scan for the NAND device diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c index 56a2c39e4f6..8c24a3baea3 100644 --- a/drivers/mtd/nand/raw/omap_elm.c +++ b/drivers/mtd/nand/raw/omap_elm.c @@ -199,7 +199,7 @@ void elm_init(void) } #endif -#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) static int elm_probe(struct udevice *dev) { diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c index 1a5ed0de31a..f36f11ed76f 100644 --- a/drivers/mtd/nand/raw/omap_gpmc.c +++ b/drivers/mtd/nand/raw/omap_gpmc.c @@ -1207,7 +1207,7 @@ int gpmc_nand_init(struct nand_chip *nand) /* First NAND chip for SPL use only */ static __maybe_unused struct nand_chip *nand_chip; -#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) static int gpmc_nand_probe(struct udevice *dev) { diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index df1f75390c4..0860090e77c 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -55,7 +55,7 @@ struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs, struct udevice *bus; char *str; -#if defined(CONFIG_SPL_BUILD) && CONFIG_IS_ENABLED(USE_TINY_PRINTF) +#if defined(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_USE_TINY_PRINTF) str = "spi_flash"; #else char name[30]; @@ -90,7 +90,7 @@ static int spi_flash_post_bind(struct udevice *dev) { int ret; - if (CONFIG_IS_ENABLED(BOOTDEV_SPI_FLASH) && test_sf_bootdev_enabled()) { + if (IS_ENABLED(CONFIG_BOOTDEV_SPI_FLASH) && test_sf_bootdev_enabled()) { ret = bootdev_setup_for_dev(dev, "sf_bootdev"); if (ret) return log_msg_ret("bd", ret); diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index d3ef69ec74f..83e25c424f6 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -17,7 +17,7 @@ #define SPI_NOR_MAX_ADDR_WIDTH 4 struct flash_info { -#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY) +#if !IS_ENABLED(CONFIG_SPI_FLASH_TINY) char *name; #endif @@ -80,7 +80,7 @@ extern const struct flash_info spi_nor_ids[]; int spi_flash_cmd_get_sw_write_prot(struct spi_flash *flash); -#if CONFIG_IS_ENABLED(SPI_FLASH_MTD) +#if IS_ENABLED(CONFIG_SPI_FLASH_MTD) int spi_flash_mtd_register(struct spi_flash *flash); void spi_flash_mtd_unregister(struct spi_flash *flash); #else diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c index 071b25ac67f..5804caf4436 100644 --- a/drivers/mtd/spi/sf_mtd.c +++ b/drivers/mtd/spi/sf_mtd.c @@ -9,7 +9,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) int spi_flash_mtd_register(struct spi_flash *flash) { @@ -21,7 +21,7 @@ void spi_flash_mtd_unregister(struct spi_flash *flash) del_mtd_device(&flash->mtd); } -#else /* !CONFIG_IS_ENABLED(DM_SPI_FLASH) */ +#else /* !IS_ENABLED(CONFIG_DM_SPI_FLASH) */ static struct mtd_info sf_mtd_info; static bool sf_mtd_registered; @@ -160,4 +160,4 @@ void spi_flash_mtd_unregister(struct spi_flash *flash) sf_mtd_info.name); } -#endif /* !CONFIG_IS_ENABLED(DM_SPI_FLASH) */ +#endif /* !IS_ENABLED(CONFIG_DM_SPI_FLASH) */ diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index e192f97efdc..73b3b6f19c9 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -101,7 +101,7 @@ static int spi_flash_probe_slave(struct spi_flash *flash) if (ret) goto err_read_id; - if (CONFIG_IS_ENABLED(SPI_DIRMAP)) { + if (IS_ENABLED(CONFIG_SPI_DIRMAP)) { ret = spi_nor_create_read_dirmap(flash); if (ret) return ret; @@ -111,7 +111,7 @@ static int spi_flash_probe_slave(struct spi_flash *flash) return ret; } - if (CONFIG_IS_ENABLED(SPI_FLASH_MTD)) + if (IS_ENABLED(CONFIG_SPI_FLASH_MTD)) ret = spi_flash_mtd_register(flash); err_read_id: @@ -119,7 +119,7 @@ err_read_id: return ret; } -#if !CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if !IS_ENABLED(CONFIG_DM_SPI_FLASH) struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs, unsigned int max_hz, unsigned int spi_mode) { @@ -149,12 +149,12 @@ struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs, void spi_flash_free(struct spi_flash *flash) { - if (CONFIG_IS_ENABLED(SPI_DIRMAP)) { + if (IS_ENABLED(CONFIG_SPI_DIRMAP)) { spi_mem_dirmap_destroy(flash->dirmap.wdesc); spi_mem_dirmap_destroy(flash->dirmap.rdesc); } - if (CONFIG_IS_ENABLED(SPI_FLASH_MTD)) + if (IS_ENABLED(CONFIG_SPI_FLASH_MTD)) spi_flash_mtd_unregister(flash); spi_free_slave(flash->spi); @@ -224,7 +224,7 @@ static int spi_flash_std_remove(struct udevice *dev) struct spi_flash *flash = dev_get_uclass_priv(dev); int ret; - if (CONFIG_IS_ENABLED(SPI_DIRMAP)) { + if (IS_ENABLED(CONFIG_SPI_DIRMAP)) { spi_mem_dirmap_destroy(flash->dirmap.wdesc); spi_mem_dirmap_destroy(flash->dirmap.rdesc); } @@ -233,7 +233,7 @@ static int spi_flash_std_remove(struct udevice *dev) if (ret) return ret; - if (CONFIG_IS_ENABLED(SPI_FLASH_MTD)) + if (IS_ENABLED(CONFIG_SPI_FLASH_MTD)) spi_flash_mtd_unregister(flash); return 0; diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 3f97acdb18c..2718bd1c419 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -371,7 +371,7 @@ static ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, while (remaining) { op.data.nbytes = remaining < UINT_MAX ? remaining : UINT_MAX; - if (CONFIG_IS_ENABLED(SPI_DIRMAP) && nor->dirmap.rdesc) { + if (IS_ENABLED(CONFIG_SPI_DIRMAP) && nor->dirmap.rdesc) { /* * Record current operation information which may be used * when the address or data length exceeds address mapping. @@ -417,7 +417,7 @@ static ssize_t spi_nor_write_data(struct spi_nor *nor, loff_t to, size_t len, spi_nor_setup_op(nor, &op, nor->write_proto); - if (CONFIG_IS_ENABLED(SPI_DIRMAP) && nor->dirmap.wdesc) { + if (IS_ENABLED(CONFIG_SPI_DIRMAP) && nor->dirmap.wdesc) { memcpy(&nor->dirmap.wdesc->info.op_tmpl, &op, sizeof(struct spi_mem_op)); op.data.nbytes = spi_mem_dirmap_write(nor->dirmap.wdesc, op.addr.val, @@ -1942,7 +1942,7 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor) return 0; } -#if CONFIG_IS_ENABLED(SPI_FLASH_SFDP_SUPPORT) +#if IS_ENABLED(CONFIG_SPI_FLASH_SFDP_SUPPORT) /** * spansion_no_read_cr_quad_enable() - set QE bit in Configuration Register. * @nor: pointer to a 'struct spi_nor' @@ -1998,7 +1998,7 @@ spi_nor_set_pp_settings(struct spi_nor_pp_command *pp, pp->proto = proto; } -#if CONFIG_IS_ENABLED(SPI_FLASH_SFDP_SUPPORT) +#if IS_ENABLED(CONFIG_SPI_FLASH_SFDP_SUPPORT) /* * Serial Flash Discoverable Parameters (SFDP) parsing. */ @@ -2707,7 +2707,7 @@ static int spi_nor_init_params(struct spi_nor *nor, params->hwcaps.mask |= SNOR_HWCAPS_READ_FAST; /* Mask out Fast Read if not requested at DT instantiation. */ -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) if (!ofnode_read_bool(dev_ofnode(nor->spi->dev), "m25p,fast-read")) params->hwcaps.mask &= ~SNOR_HWCAPS_READ_FAST; @@ -3821,7 +3821,7 @@ static int spi_nor_soft_reset(struct spi_nor *nor) ext = nor->cmd_ext_type; if (nor->cmd_ext_type == SPI_NOR_EXT_NONE) { nor->cmd_ext_type = SPI_NOR_EXT_REPEAT; -#if CONFIG_IS_ENABLED(SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT) +#if IS_ENABLED(CONFIG_SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT) nor->cmd_ext_type = SPI_NOR_EXT_INVERT; #endif /* SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT */ } diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 3f8b7967893..3ec97a22487 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -13,7 +13,7 @@ #include "sf_internal.h" /* Exclude chip names for SPL to save space */ -#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY) +#if !IS_ENABLED(CONFIG_SPI_FLASH_TINY) #define INFO_NAME(_name) .name = _name, #else #define INFO_NAME(_name) diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index 68152ce3b4b..df4fc32d656 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -60,7 +60,7 @@ static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len) * spi_slave does not have a struct udevice member without DM, * so use the bus and cs instead. */ -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) dev_dbg(nor->spi->dev, "error %d reading %x\n", ret, code); #else diff --git a/drivers/net/designware.c b/drivers/net/designware.c index e09ca3313dd..0d150ac5392 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -82,7 +82,7 @@ static int dw_mdio_write(struct mii_dev *bus, int addr, int devad, int reg, return ret; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static int __dw_mdio_reset(struct udevice *dev) { struct dw_eth_dev *priv = dev_get_priv(dev); @@ -137,7 +137,7 @@ int designware_eth_mdio_write(struct udevice *mdio_dev, int addr, int devad, int return dw_mdio_write(pdata->mii_bus, addr, devad, reg, val); } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) int designware_eth_mdio_reset(struct udevice *mdio_dev) { struct mdio_perdev_priv *mdio_pdata = dev_get_uclass_priv(mdio_dev); @@ -150,7 +150,7 @@ int designware_eth_mdio_reset(struct udevice *mdio_dev) static const struct mdio_ops designware_eth_mdio_ops = { .read = designware_eth_mdio_read, .write = designware_eth_mdio_write, -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) .reset = designware_eth_mdio_reset, #endif }; @@ -184,7 +184,7 @@ static int dw_mdio_init(const char *name, void *priv) bus->read = dw_mdio_read; bus->write = dw_mdio_write; snprintf(bus->name, sizeof(bus->name), "%s", name); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) bus->reset = dw_mdio_reset; #endif @@ -805,11 +805,11 @@ const struct eth_ops designware_eth_ops = { int designware_eth_of_to_plat(struct udevice *dev) { struct dw_eth_pdata *dw_pdata = dev_get_plat(dev); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct dw_eth_dev *priv = dev_get_priv(dev); #endif struct eth_pdata *pdata = &dw_pdata->eth_pdata; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) int reset_flags = GPIOD_IS_OUT; #endif int ret = 0; @@ -821,7 +821,7 @@ int designware_eth_of_to_plat(struct udevice *dev) pdata->max_speed = dev_read_u32_default(dev, "max-speed", 0); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (dev_read_bool(dev, "snps,reset-active-low")) reset_flags |= GPIOD_ACTIVE_LOW; diff --git a/drivers/net/designware.h b/drivers/net/designware.h index 9da4e902cb0..a1e29310d85 100644 --- a/drivers/net/designware.h +++ b/drivers/net/designware.h @@ -10,7 +10,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) #include #endif @@ -233,7 +233,7 @@ struct dw_eth_dev { struct eth_mac_regs *mac_regs_p; struct eth_dma_regs *dma_regs_p; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc reset_gpio; #endif #ifdef CONFIG_CLK diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c index 27b77444a0c..a9460988f08 100644 --- a/drivers/net/eth-phy-uclass.c +++ b/drivers/net/eth-phy-uclass.c @@ -131,7 +131,7 @@ static int eth_phy_of_to_plat(struct udevice *dev) struct eth_phy_device_priv *uc_priv = dev_get_uclass_priv(dev); int ret; - if (!CONFIG_IS_ENABLED(DM_GPIO)) + if (!IS_ENABLED(CONFIG_DM_GPIO)) return 0; /* search "reset-gpios" in phy node */ @@ -152,7 +152,7 @@ void eth_phy_reset(struct udevice *dev, int value) struct eth_phy_device_priv *uc_priv = dev_get_uclass_priv(dev); u32 delay; - if (!CONFIG_IS_ENABLED(DM_GPIO)) + if (!IS_ENABLED(CONFIG_DM_GPIO)) return; if (!dm_gpio_is_valid(&uc_priv->reset_gpio)) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 5cc35958c49..a759d9cdd33 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -139,7 +139,7 @@ static int fec_get_clk_rate(void *udev, int idx) int ret; if (IS_ENABLED(CONFIG_IMX8) || - CONFIG_IS_ENABLED(CLK_CCF)) { + IS_ENABLED(CONFIG_CLK_CCF)) { dev = udev; if (!dev) { ret = uclass_get_device_by_seq(UCLASS_ETH, idx, &dev); @@ -1101,7 +1101,7 @@ static int fec_phy_init(struct fec_priv *priv, struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* FEC GPIO reset */ static void fec_gpio_reset(struct fec_priv *priv) { @@ -1145,7 +1145,7 @@ static int fecmxc_probe(struct udevice *dev) } priv->clk_rate = clk_get_rate(&priv->ipg_clk); - } else if (CONFIG_IS_ENABLED(CLK_CCF)) { + } else if (IS_ENABLED(CONFIG_CLK_CCF)) { ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk); if (ret < 0) { debug("Can't get FEC ipg clk: %d\n", ret); @@ -1202,7 +1202,7 @@ static int fecmxc_probe(struct udevice *dev) } #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) fec_gpio_reset(priv); #endif /* Reset chip. */ @@ -1316,7 +1316,7 @@ static int fecmxc_of_to_plat(struct udevice *dev) device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply); #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) ret = gpio_request_by_name(dev, "phy-reset-gpios", 0, &priv->phy_reset_gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); if (ret < 0) diff --git a/drivers/net/fec_mxc.h b/drivers/net/fec_mxc.h index 77bfc1cbf45..97012c15fa8 100644 --- a/drivers/net/fec_mxc.h +++ b/drivers/net/fec_mxc.h @@ -258,7 +258,7 @@ struct fec_priv { #ifdef CONFIG_DM_REGULATOR struct udevice *phy_supply; #endif -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc phy_reset_gpio; uint32_t reset_delay; uint32_t reset_post_delay; diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index 7dfa8219094..21167815f88 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -384,7 +384,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name) addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); int ret = 0; -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) struct udevice *new; /* speed and mode will be read from DT */ @@ -493,7 +493,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name) void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); int ret = 0; -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) struct udevice *new; /* speed and mode will be read from DT */ @@ -545,7 +545,7 @@ int fm_init_common(int index, struct ccsr_fman *reg, const char *firmware_name) if (rc) return rc; addr = (void *)new_addr; - } else if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) { + } else if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) { /* * Using a (signed) FIT wrapper is mandatory if we are * doing verified boot. diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 24933473fa0..61df9706f9b 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -280,7 +280,7 @@ struct mvneta_port { int init; struct phy_device *phydev; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc phy_reset_gpio; struct gpio_desc sfp_tx_disable_gpio; #endif @@ -1567,7 +1567,7 @@ static int mvneta_recv(struct udevice *dev, int flags, uchar **packetp) static int mvneta_probe(struct udevice *dev) { struct mvneta_port *pp = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct ofnode_phandle_args sfp_args; #endif void *bd_space; @@ -1620,7 +1620,7 @@ static int mvneta_probe(struct udevice *dev) else pp->dma_base = 0; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (!dev_read_phandle_with_args(dev, "sfp", NULL, 0, 0, &sfp_args) && ofnode_is_enabled(sfp_args.node)) gpio_request_by_name_nodev(sfp_args.node, "tx-disable-gpio", 0, diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 1bad50d344c..951640eb59d 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -965,7 +965,7 @@ struct mvpp2_port { int phyaddr; struct udevice *mdio_dev; struct mii_dev *bus; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc phy_reset_gpio; struct gpio_desc phy_tx_disable_gpio; #endif @@ -4829,7 +4829,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port) return -EINVAL; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) gpio_request_by_name(dev, "phy-reset-gpios", 0, &port->phy_reset_gpio, GPIOD_IS_OUT); gpio_request_by_name(dev, "marvell,sfp-tx-disable-gpio", 0, @@ -4846,7 +4846,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port) return 0; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* Port GPIO initialization */ static void mvpp2_gpio_init(struct mvpp2_port *port) { @@ -4879,7 +4879,7 @@ static int mvpp2_port_probe(struct udevice *dev, } mvpp2_port_power_up(port); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) mvpp2_gpio_init(port); #endif diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index c9c07a5a8ff..902658bc79f 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -307,7 +307,7 @@ static unsigned char rxdata[RX_BUF_LEN]; */ #if RTL8169_DESC_SIZE < ARCH_DMA_MINALIGN #if !defined(CONFIG_SYS_NONCACHED_MEMORY) && \ - !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_X86) + !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) && !defined(CONFIG_X86) #warning cache-line size is larger than descriptor size #endif #endif diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 8f162ca58fb..ae506dd5953 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -38,7 +38,7 @@ #endif #if defined(CFG_SH_ETHER_CACHE_WRITEBACK) && \ - !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) + !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) #define flush_cache_wback(addr, len) \ flush_dcache_range((unsigned long)addr, \ (unsigned long)(addr + ALIGN(len, CFG_SH_ETHER_ALIGNE_SIZE))) @@ -659,7 +659,7 @@ static int sh_ether_probe(struct udevice *udev) priv->iobase = pdata->iobase; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(udev, 0, &priv->clk); if (ret < 0) return ret; @@ -698,7 +698,7 @@ static int sh_ether_probe(struct udevice *udev) eth->port_info[eth->port].iobase = (void __iomem *)(uintptr_t)(BASE_IO_ADDR + 0x800 * eth->port); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&priv->clk); if (ret) goto err_mdio_register; @@ -717,7 +717,7 @@ static int sh_ether_probe(struct udevice *udev) return 0; err_phy_config: -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&priv->clk); #endif err_mdio_register: @@ -731,7 +731,7 @@ static int sh_ether_remove(struct udevice *udev) struct sh_eth_dev *eth = &priv->shdev; struct sh_eth_info *port_info = ð->port_info[eth->port]; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&priv->clk); #endif free(port_info->phydev); diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 5c5ad8b84a9..73de23a25ac 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -466,7 +466,7 @@ static int smc911x_of_to_plat(struct udevice *dev) if (!ret) priv->use_32_bit_io = (io_width == 4); else - priv->use_32_bit_io = CONFIG_IS_ENABLED(SMC911X_32_BIT); + priv->use_32_bit_io = IS_ENABLED(CONFIG_SMC911X_32_BIT); return 0; } diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index e800a326b81..ca8f4a1027c 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -169,7 +169,7 @@ struct emac_eth_dev { struct clk ephy_clk; struct reset_ctl tx_rst; struct reset_ctl ephy_rst; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc reset_gpio; #endif }; @@ -633,7 +633,7 @@ err_tx_clk: return ret; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static int sun8i_mdio_reset(struct mii_dev *bus) { struct udevice *dev = bus->priv; @@ -680,7 +680,7 @@ static int sun8i_mdio_init(const char *name, struct udevice *priv) bus->write = sun8i_mdio_write; snprintf(bus->name, sizeof(bus->name), name); bus->priv = (void *)priv; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) bus->reset = sun8i_mdio_reset; #endif @@ -795,7 +795,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev) const fdt32_t *reg; int node = dev_of_offset(dev); int offset = 0; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) int reset_flags = GPIOD_IS_OUT; #endif int ret; @@ -880,7 +880,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev) printf("%s: Invalid RX delay value %d\n", __func__, sun8i_pdata->rx_delay_ps); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev), "snps,reset-active-low")) reset_flags |= GPIOD_ACTIVE_LOW; diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 3a8cc9c52a5..da471c82ecc 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -1090,7 +1090,7 @@ static int cpsw_eth_probe(struct udevice *dev) return _cpsw_register(priv); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static void cpsw_eth_of_parse_slave(struct cpsw_platform_data *data, int slave_index, ofnode subnode) { @@ -1271,7 +1271,7 @@ int cpsw_get_slave_phy_addr(struct udevice *dev, int slave) U_BOOT_DRIVER(eth_cpsw) = { .name = "eth_cpsw", .id = UCLASS_ETH, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = cpsw_eth_ids, .of_to_plat = cpsw_eth_of_to_plat, .plat_auto = sizeof(struct eth_pdata), diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c index af028f9ceca..438e0aec6b5 100644 --- a/drivers/pch/pch-uclass.c +++ b/drivers/pch/pch-uclass.c @@ -66,7 +66,7 @@ int pch_ioctl(struct udevice *dev, ulong req, void *data, int size) UCLASS_DRIVER(pch) = { .id = UCLASS_PCH, .name = "pch", -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 47b6e6e5bcf..4eb4f967446 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -309,7 +309,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), goto err; #endif } else { -#if defined(CONFIG_X86) && (CONFIG_IS_ENABLED(X86_32BIT_INIT) || CONFIG_TPL) +#if defined(CONFIG_X86) && (IS_ENABLED(CONFIG_X86_32BIT_INIT) || CONFIG_TPL) bios_set_interrupt_handler(0x15, int15_handler); bios_run_on_x86(dev, (unsigned long)ram, vesa_mode, diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c index a0b82c78321..8dc4bc1512a 100644 --- a/drivers/pci/pcie_dw_mvebu.c +++ b/drivers/pci/pcie_dw_mvebu.c @@ -482,7 +482,7 @@ static int pcie_dw_mvebu_probe(struct udevice *dev) struct pcie_dw_mvebu *pcie = dev_get_priv(dev); struct udevice *ctlr = pci_get_controller(dev); struct pci_controller *hose = dev_get_uclass_priv(ctlr); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc reset_gpio; gpio_request_by_name(dev, "marvell,reset-gpio", 0, &reset_gpio, diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c index da48466480c..a3da13ac2b4 100644 --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -543,7 +543,7 @@ int imx6_pcie_toggle_power(struct udevice *vpcie) gpio_free(CFG_PCIE_IMX_POWER_GPIO); #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (vpcie) { regulator_set_enable(vpcie, false); mdelay(20); @@ -722,7 +722,7 @@ static int imx_pcie_dm_probe(struct udevice *dev) { struct imx_pcie_priv *priv = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) device_get_supply_regulator(dev, "vpcie-supply", &priv->vpcie); #endif diff --git a/drivers/phy/meson-axg-mipi-dphy.c b/drivers/phy/meson-axg-mipi-dphy.c index cf2a1cd14c7..9fa6ee52a88 100644 --- a/drivers/phy/meson-axg-mipi-dphy.c +++ b/drivers/phy/meson-axg-mipi-dphy.c @@ -174,7 +174,7 @@ struct phy_meson_axg_mipi_dphy_priv { struct regmap *regmap; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif struct reset_ctl reset; @@ -362,7 +362,7 @@ int meson_axg_mipi_dphy_probe(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) return ret; diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c index 2fbba7fdae0..c308760ad62 100644 --- a/drivers/phy/meson-g12a-usb2.c +++ b/drivers/phy/meson-g12a-usb2.c @@ -54,10 +54,10 @@ struct phy_meson_g12a_usb2_priv { struct regmap *regmap; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *phy_supply; #endif -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif struct reset_ctl reset; @@ -66,7 +66,7 @@ struct phy_meson_g12a_usb2_priv { static int phy_meson_g12a_usb2_power_on(struct phy *phy) { -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *dev = phy->dev; struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); @@ -82,7 +82,7 @@ static int phy_meson_g12a_usb2_power_on(struct phy *phy) static int phy_meson_g12a_usb2_power_off(struct phy *phy) { -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *dev = phy->dev; struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev); @@ -180,7 +180,7 @@ int meson_g12a_usb2_phy_probe(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) return ret; @@ -193,7 +193,7 @@ int meson_g12a_usb2_phy_probe(struct udevice *dev) } #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply); if (ret && ret != -ENOENT) { pr_err("Failed to get PHY regulator\n"); diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c index 8f72b5a6a74..e5639cf5dd6 100644 --- a/drivers/phy/meson-g12a-usb3-pcie.c +++ b/drivers/phy/meson-g12a-usb3-pcie.c @@ -62,7 +62,7 @@ struct phy_g12a_usb3_pcie_priv { struct regmap *regmap; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif struct reset_ctl_bulk resets; @@ -389,7 +389,7 @@ int meson_g12a_usb3_pcie_phy_probe(struct udevice *dev) else if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) return ret; diff --git a/drivers/phy/meson-gxbb-usb2.c b/drivers/phy/meson-gxbb-usb2.c index 7a2e3d2739e..8e2a2cfb8c0 100644 --- a/drivers/phy/meson-gxbb-usb2.c +++ b/drivers/phy/meson-gxbb-usb2.c @@ -81,7 +81,7 @@ struct phy_meson_gxbb_usb2_priv { struct regmap *regmap; struct reset_ctl_bulk resets; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *phy_supply; #endif }; @@ -92,7 +92,7 @@ static int phy_meson_gxbb_usb2_power_on(struct phy *phy) struct phy_meson_gxbb_usb2_priv *priv = dev_get_priv(dev); uint val; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->phy_supply) { int ret = regulator_set_enable(priv->phy_supply, true); @@ -142,7 +142,7 @@ static int phy_meson_gxbb_usb2_power_on(struct phy *phy) static int phy_meson_gxbb_usb2_power_off(struct phy *phy) { -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *dev = phy->dev; struct phy_meson_gxbb_usb2_priv *priv = dev_get_priv(dev); @@ -192,7 +192,7 @@ static int meson_gxbb_usb2_phy_probe(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply); if (ret && ret != -ENOENT) { pr_err("Failed to get PHY regulator\n"); diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c index 9fb376cec44..a2f8fcbd658 100644 --- a/drivers/phy/meson-gxl-usb2.c +++ b/drivers/phy/meson-gxl-usb2.c @@ -101,10 +101,10 @@ struct phy_meson_gxl_usb2_priv { struct regmap *regmap; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *phy_supply; #endif -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; #endif }; @@ -167,7 +167,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy) phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->phy_supply) { int ret = regulator_set_enable(priv->phy_supply, true); if (ret) @@ -189,7 +189,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy) val |= U2P_R0_POWER_ON_RESET; regmap_write(priv->regmap, U2P_R0, val); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->phy_supply) { int ret = regulator_set_enable(priv->phy_supply, false); if (ret) { @@ -216,7 +216,7 @@ int meson_gxl_usb2_phy_probe(struct udevice *dev) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) return ret; @@ -229,7 +229,7 @@ int meson_gxl_usb2_phy_probe(struct udevice *dev) } #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "phy-supply", &priv->phy_supply); if (ret && ret != -ENOENT) { pr_err("Failed to get PHY regulator\n"); diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c index d0904f4f075..48b685fb814 100644 --- a/drivers/phy/nop-phy.c +++ b/drivers/phy/nop-phy.c @@ -14,12 +14,12 @@ struct nop_phy_priv { struct clk_bulk bulk; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc reset_gpio; #endif }; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) static int nop_phy_reset(struct phy *phy) { struct nop_phy_priv *priv = dev_get_priv(phy->dev); @@ -37,18 +37,18 @@ static int nop_phy_init(struct phy *phy) struct nop_phy_priv *priv = dev_get_priv(phy->dev); int ret = 0; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = clk_enable_bulk(&priv->bulk); if (ret) return ret; } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) /* Take phy out of reset */ if (dm_gpio_is_valid(&priv->reset_gpio)) { ret = dm_gpio_set_value(&priv->reset_gpio, false); if (ret) { - if (CONFIG_IS_ENABLED(CLK)) + if (IS_ENABLED(CONFIG_CLK)) clk_disable_bulk(&priv->bulk); return ret; } @@ -62,14 +62,14 @@ static int nop_phy_probe(struct udevice *dev) struct nop_phy_priv *priv = dev_get_priv(dev); int ret = 0; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = clk_get_bulk(dev, &priv->bulk); if (ret < 0) { dev_err(dev, "Failed to get clk: %d\n", ret); return ret; } } -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) ret = gpio_request_by_name(dev, "reset-gpios", 0, &priv->reset_gpio, GPIOD_IS_OUT); @@ -88,7 +88,7 @@ static const struct udevice_id nop_phy_ids[] = { static struct phy_ops nop_phy_ops = { .init = nop_phy_init, -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) .reset = nop_phy_reset, #endif }; diff --git a/drivers/phy/phy-imx8mq-usb.c b/drivers/phy/phy-imx8mq-usb.c index 69f01de5553..b604179905d 100644 --- a/drivers/phy/phy-imx8mq-usb.c +++ b/drivers/phy/phy-imx8mq-usb.c @@ -76,7 +76,7 @@ enum imx8mpq_phy_type { }; struct imx8mq_usb_phy { -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk phy_clk; #endif void __iomem *base; @@ -174,7 +174,7 @@ static int imx8mq_usb_phy_power_on(struct phy *usb_phy) struct imx8mq_usb_phy *imx_phy = dev_get_priv(dev); u32 value; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) int ret; ret = clk_enable(&imx_phy->phy_clk); if (ret) { @@ -202,7 +202,7 @@ static int imx8mq_usb_phy_power_off(struct phy *usb_phy) value |= PHY_CTRL6_RXTERM_OVERRIDE_SEL; writel(value, imx_phy->base + PHY_CTRL6); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&imx_phy->phy_clk); #endif @@ -231,7 +231,7 @@ int imx8mq_usb_phy_probe(struct udevice *dev) if (!priv->base) return -EINVAL; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) int ret; /* Assigned clock already set clock */ diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c index 181a6ff2702..60a0f91aac3 100644 --- a/drivers/pinctrl/intel/pinctrl_apl.c +++ b/drivers/pinctrl/intel/pinctrl_apl.c @@ -130,7 +130,7 @@ static int apl_pinctrl_of_to_plat(struct udevice *dev) const struct pad_community *comm = NULL; int i; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct apl_gpio_plat *plat = dev_get_plat(dev); int ret; @@ -155,7 +155,7 @@ static int apl_pinctrl_of_to_plat(struct udevice *dev) return intel_pinctrl_of_to_plat(dev, comm, 2); } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id apl_gpio_ids[] = { { .compatible = "intel,apl-pinctrl"}, { } @@ -168,7 +168,7 @@ U_BOOT_DRIVER(intel_apl_pinctrl) = { .of_match = of_match_ptr(apl_gpio_ids), .probe = intel_pinctrl_probe, .ops = &intel_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .of_to_plat = apl_pinctrl_of_to_plat, diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 47e2d67426f..d45d7c03bf9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -15,7 +15,7 @@ #include "pinctrl-mtk-common.h" -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) /** * struct mtk_drive_desc - the structure that holds the information * of the driving current @@ -219,7 +219,7 @@ static int mtk_hw_get_value(struct udevice *dev, int pin, int field, return 0; } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static int mtk_get_pin_io_type(struct udevice *dev, int pin, struct mtk_io_type_desc *io_type) { @@ -323,7 +323,7 @@ static int mtk_pinmux_group_set(struct udevice *dev, return 0; } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param mtk_conf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 }, @@ -648,7 +648,7 @@ const struct pinctrl_ops mtk_pinctrl_ops = { .get_functions_count = mtk_get_functions_count, .get_function_name = mtk_get_function_name, .pinmux_group_set = mtk_pinmux_group_set, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(mtk_conf_params), .pinconf_params = mtk_conf_params, .pinconf_set = mtk_pinconf_set, @@ -657,7 +657,7 @@ const struct pinctrl_ops mtk_pinctrl_ops = { .set_state = pinctrl_generic_set_state, }; -#if CONFIG_IS_ENABLED(DM_GPIO) || \ +#if IS_ENABLED(CONFIG_DM_GPIO) || \ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO)) static int mtk_gpio_get(struct udevice *dev, unsigned int off) { @@ -790,7 +790,7 @@ int mtk_pinctrl_common_probe(struct udevice *dev, priv->base[i] = (void __iomem *)addr; } -#if CONFIG_IS_ENABLED(DM_GPIO) || \ +#if IS_ENABLED(CONFIG_DM_GPIO) || \ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO)) ret = mtk_gpiochip_register(dev); #endif diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h index 0d9596fa72c..2a8ffb8f2b4 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h @@ -197,7 +197,7 @@ struct mtk_function_desc { */ struct mtk_io_type_desc { const char *name; -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) /* Specific pinconfig operations */ int (*bias_set)(struct udevice *dev, u32 pin, bool disable, bool pullup, u32 val); @@ -244,7 +244,7 @@ void mtk_i_rmw(struct udevice *dev, u8 i, u32 reg, u32 mask, u32 set); int mtk_pinctrl_common_probe(struct udevice *dev, struct mtk_pinctrl_soc *soc); -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) int mtk_pinconf_bias_set_pu_pd(struct udevice *dev, u32 pin, bool disable, bool pullup, u32 val); diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7620.c b/drivers/pinctrl/mtmips/pinctrl-mt7620.c index 72ce8731a1d..861aa4b1b21 100644 --- a/drivers/pinctrl/mtmips/pinctrl-mt7620.c +++ b/drivers/pinctrl/mtmips/pinctrl-mt7620.c @@ -31,7 +31,7 @@ #define GM4_MASK 3 #define GM8_MASK 7 -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) static const struct mtmips_pmx_func sutif_grp[] = { FUNC("i2c", 2), FUNC("uartl", 1), @@ -146,17 +146,17 @@ static const char *mt7620_get_group_name(struct udevice *dev, { return mt7620_pinmux_data[selector].name; } -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ static int mt7620_pinctrl_probe(struct udevice *dev) { struct mtmips_pinctrl_priv *priv = dev_get_priv(dev); int ret = 0; -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) ret = mtmips_pinctrl_probe(priv, ARRAY_SIZE(mt7620_pinmux_data), mt7620_pinmux_data); -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ return ret; } @@ -173,13 +173,13 @@ static int mt7620_pinctrl_of_to_plat(struct udevice *dev) } static const struct pinctrl_ops mt7620_pinctrl_ops = { -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) .get_groups_count = mt7620_get_groups_count, .get_group_name = mt7620_get_group_name, .get_functions_count = mtmips_get_functions_count, .get_function_name = mtmips_get_function_name, .pinmux_group_set = mtmips_pinmux_group_set, -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ .set_state = pinctrl_generic_set_state, }; diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7621.c b/drivers/pinctrl/mtmips/pinctrl-mt7621.c index 3e98a01bad4..61eb82eab55 100644 --- a/drivers/pinctrl/mtmips/pinctrl-mt7621.c +++ b/drivers/pinctrl/mtmips/pinctrl-mt7621.c @@ -52,7 +52,7 @@ struct mt7621_pinctrl_priv { struct mtmips_pinctrl_priv mp; }; -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) static const struct mtmips_pmx_func esw_int_grp[] = { FUNC("gpio", 1), FUNC("esw int", 0), @@ -170,9 +170,9 @@ static const char *mt7621_get_group_name(struct udevice *dev, { return mt7621_pmx_data[selector].name; } -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param mt7621_conf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 }, @@ -254,10 +254,10 @@ static int mt7621_pinctrl_probe(struct udevice *dev) struct mt7621_pinctrl_priv *priv = dev_get_priv(dev); int ret = 0; -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) ret = mtmips_pinctrl_probe(&priv->mp, ARRAY_SIZE(mt7621_pmx_data), mt7621_pmx_data); -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ return ret; } @@ -275,18 +275,18 @@ static int mt7621_pinctrl_of_to_plat(struct udevice *dev) } static const struct pinctrl_ops mt7621_pinctrl_ops = { -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) .get_groups_count = mt7621_get_groups_count, .get_group_name = mt7621_get_group_name, .get_functions_count = mtmips_get_functions_count, .get_function_name = mtmips_get_function_name, .pinmux_group_set = mtmips_pinmux_group_set, -#endif /* CONFIG_IS_ENABLED(PINMUX) */ -#if CONFIG_IS_ENABLED(PINCONF) +#endif /* IS_ENABLED(CONFIG_PINMUX) */ +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(mt7621_conf_params), .pinconf_params = mt7621_conf_params, .pinconf_group_set = mt7621_pinconf_group_set, -#endif /* CONFIG_IS_ENABLED(PINCONF) */ +#endif /* IS_ENABLED(CONFIG_PINCONF) */ .set_state = pinctrl_generic_set_state, }; diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c index 79c63c7caec..65aa4cc211c 100644 --- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c +++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c @@ -88,7 +88,7 @@ struct mt7628_pinctrl_priv { void __iomem *pcbase; }; -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) static const struct mtmips_pmx_func ephy4_1_pad_grp[] = { FUNC("digital", 0xf), FUNC("analog", 0), @@ -377,9 +377,9 @@ static const char *mt7628_get_group_name(struct udevice *dev, { return mt7628_pinmux_data[selector].name; } -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param mt7628_conf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 }, @@ -527,10 +527,10 @@ static int mt7628_pinctrl_probe(struct udevice *dev) struct mt7628_pinctrl_priv *priv = dev_get_priv(dev); int ret = 0; -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) ret = mtmips_pinctrl_probe(&priv->mp, ARRAY_SIZE(mt7628_pinmux_data), mt7628_pinmux_data); -#endif /* CONFIG_IS_ENABLED(PINMUX) */ +#endif /* IS_ENABLED(CONFIG_PINMUX) */ return ret; } @@ -553,20 +553,20 @@ static int mt7628_pinctrl_of_to_plat(struct udevice *dev) } static const struct pinctrl_ops mt7628_pinctrl_ops = { -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) .get_groups_count = mt7628_get_groups_count, .get_group_name = mt7628_get_group_name, .get_functions_count = mtmips_get_functions_count, .get_function_name = mtmips_get_function_name, .pinmux_group_set = mtmips_pinmux_group_set, -#endif /* CONFIG_IS_ENABLED(PINMUX) */ -#if CONFIG_IS_ENABLED(PINCONF) +#endif /* IS_ENABLED(CONFIG_PINMUX) */ +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(mt7628_conf_params), .pinconf_params = mt7628_conf_params, .get_pins_count = mt7628_get_pins_count, .get_pin_name = mt7628_get_pin_name, .pinconf_set = mt7628_pinconf_set, -#endif /* CONFIG_IS_ENABLED(PINCONF) */ +#endif /* IS_ENABLED(CONFIG_PINCONF) */ .set_state = pinctrl_generic_set_state, }; diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 1ad8bfbd880..35f2adb75be 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c @@ -1328,7 +1328,7 @@ static int npcm7xx_pinmux_set(struct udevice *dev, return 0; } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) #define PIN_CONFIG_PERSIST_STATE (PIN_CONFIG_END + 1) #define PIN_CONFIG_POLARITY_STATE (PIN_CONFIG_END + 2) @@ -1604,7 +1604,7 @@ static struct pinctrl_ops npcm7xx_pinctrl_ops = { .get_function_name = npcm7xx_get_function_name, .pinmux_set = npcm7xx_pinmux_set, .pinmux_group_set = npcm7xx_pinmux_set, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(npcm7xx_conf_params), .pinconf_params = npcm7xx_conf_params, .pinconf_set = npcm7xx_pinconf_set, diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c index 0ec47e9577e..999ee910ee0 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c +++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c @@ -733,7 +733,7 @@ static const char *npcm8xx_get_function_name(struct udevice *dev, return npcm8xx_groups[selector].name; } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) #define PIN_CONFIG_PERSIST_STATE (PIN_CONFIG_END + 1) #define PIN_CONFIG_POLARITY_STATE (PIN_CONFIG_END + 2) #define PIN_CONFIG_EVENT_CLEAR (PIN_CONFIG_END + 3) @@ -973,7 +973,7 @@ static struct pinctrl_ops npcm8xx_pinctrl_ops = { .get_function_name = npcm8xx_get_function_name, .pinmux_set = npcm8xx_pinmux_set, .pinmux_group_set = npcm8xx_pinmux_group_set, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(npcm8xx_conf_params), .pinconf_params = npcm8xx_conf_params, .pinconf_set = npcm8xx_pinconf_set, diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c index eb90e28d4b2..9beae7340e7 100644 --- a/drivers/pinctrl/nxp/pinctrl-mxs.c +++ b/drivers/pinctrl/nxp/pinctrl-mxs.c @@ -186,7 +186,7 @@ U_BOOT_DRIVER(fsl_imx23_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = of_match_ptr(mxs_pinctrl_match), .probe = mxs_pinctrl_probe, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .priv_auto = sizeof(struct mxs_pinctrl_priv), diff --git a/drivers/pinctrl/pinctrl-generic.c b/drivers/pinctrl/pinctrl-generic.c index 8909b57810a..8e5df55b0c5 100644 --- a/drivers/pinctrl/pinctrl-generic.c +++ b/drivers/pinctrl/pinctrl-generic.c @@ -70,7 +70,7 @@ static int pinctrl_group_name_to_selector(struct udevice *dev, return -ENOSYS; } -#if CONFIG_IS_ENABLED(PINMUX) +#if IS_ENABLED(CONFIG_PINMUX) /** * pinmux_func_name_to_selector() - return the function selector for a function * @@ -146,7 +146,7 @@ static int pinmux_enable_setting(struct udevice *dev, bool is_group, } #endif -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) /** * pinconf_prop_name_to_param() - return parameter ID for a property name * diff --git a/drivers/pinctrl/pinctrl-qe-io.c b/drivers/pinctrl/pinctrl-qe-io.c index dc0be7ce3bd..a73682d0de3 100644 --- a/drivers/pinctrl/pinctrl-qe-io.c +++ b/drivers/pinctrl/pinctrl-qe-io.c @@ -248,7 +248,7 @@ U_BOOT_DRIVER(par_io_pinctrl) = { .of_to_plat = qe_io_of_to_plat, .plat_auto = sizeof(struct qe_io_plat), .ops = &par_io_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index 509e2a80e9a..0c4bb9580f4 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -282,7 +282,7 @@ U_BOOT_DRIVER(stmfx_gpio) = { .ops = &stmfx_gpio_ops, }; -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param stmfx_pinctrl_conf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 0 }, @@ -432,7 +432,7 @@ const struct pinctrl_ops stmfx_pinctrl_ops = { .get_pin_name = stmfx_pinctrl_get_pin_name, .set_state = pinctrl_generic_set_state, .get_pin_muxing = stmfx_pinctrl_get_pin_muxing, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_set = stmfx_pinctrl_conf_set, .pinconf_num_params = ARRAY_SIZE(stmfx_pinctrl_conf_params), .pinconf_params = stmfx_pinctrl_conf_params, diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 8837726cc16..e8c833fa2e0 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -147,10 +147,10 @@ static int pinconfig_post_bind(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(PINCTRL_FULL) +#if IS_ENABLED(CONFIG_PINCTRL_FULL) UCLASS_DRIVER(pinconfig) = { .id = UCLASS_PINCONFIG, -#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE) +#if IS_ENABLED(CONFIG_PINCONF_RECURSIVE) .post_bind = pinconfig_post_bind, #endif .name = "pinconfig", @@ -306,7 +306,7 @@ int pinctrl_select_state(struct udevice *dev, const char *statename) * Try full-implemented pinctrl first. * If it fails or is not implemented, try simple one. */ - if (CONFIG_IS_ENABLED(PINCTRL_FULL)) + if (IS_ENABLED(CONFIG_PINCTRL_FULL)) return pinctrl_select_state_full(dev, statename); return pinctrl_select_state_simple(dev); @@ -402,7 +402,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev) * should be bound so that peripheral devices can easily search in * parent devices during later DT-parsing. */ - if (CONFIG_IS_ENABLED(PINCTRL_FULL)) + if (IS_ENABLED(CONFIG_PINCTRL_FULL)) return pinconfig_post_bind(dev); return 0; @@ -410,7 +410,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev) UCLASS_DRIVER(pinctrl) = { .id = UCLASS_PINCTRL, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = pinctrl_post_bind, #endif .flags = DM_UC_FLAG_SEQ_ALIAS, diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c index b755fa42b4f..5f0dd167566 100644 --- a/drivers/pinctrl/pinctrl_stm32.c +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -431,7 +431,7 @@ static int stm32_pinctrl_bind(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(PINCTRL_FULL) +#if IS_ENABLED(CONFIG_PINCTRL_FULL) static int stm32_pinctrl_set_state(struct udevice *dev, struct udevice *config) { return stm32_pinctrl_config(dev_ofnode(config)); @@ -472,7 +472,7 @@ static int stm32_pinctrl_set_state_simple(struct udevice *dev, #endif /* PINCTRL_FULL */ static struct pinctrl_ops stm32_pinctrl_ops = { -#if CONFIG_IS_ENABLED(PINCTRL_FULL) +#if IS_ENABLED(CONFIG_PINCTRL_FULL) .set_state = stm32_pinctrl_set_state, #else /* PINCTRL_FULL */ .set_state_simple = stm32_pinctrl_set_state_simple, diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c index 490d34e56b8..facebca9ae4 100644 --- a/drivers/pinctrl/renesas/pfc.c +++ b/drivers/pinctrl/renesas/pfc.c @@ -647,7 +647,7 @@ static int sh_pfc_pinctrl_group_set(struct udevice *dev, unsigned group_selector done: return ret; } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param sh_pfc_pinconf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 }, @@ -844,7 +844,7 @@ static struct pinctrl_ops sh_pfc_pinctrl_ops = { .get_functions_count = sh_pfc_pinctrl_get_functions_count, .get_function_name = sh_pfc_pinctrl_get_function_name, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(sh_pfc_pinconf_params), .pinconf_params = sh_pfc_pinconf_params, .pinconf_set = sh_pfc_pinconf_pin_set, diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c index 2c35491b24d..7483f4e1540 100644 --- a/drivers/pinctrl/rockchip/pinctrl-px30.c +++ b/drivers/pinctrl/rockchip/pinctrl-px30.c @@ -354,7 +354,7 @@ U_BOOT_DRIVER(pinctrl_px30) = { .of_match = px30_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c index afcd34396e2..9a3953b9695 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c @@ -103,7 +103,7 @@ U_BOOT_DRIVER(pinctrl_rockchip) = { .of_match = rk3036_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3066.c b/drivers/pinctrl/rockchip/pinctrl-rk3066.c index 598b63223e3..0f21538725b 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3066.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3066.c @@ -104,7 +104,7 @@ U_BOOT_DRIVER(rockchip_rk3066a_pinctrl) = { .id = UCLASS_PINCTRL, .ops = &rockchip_pinctrl_ops, .probe = rockchip_pinctrl_probe, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .of_match = rk3066_pinctrl_ids, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c index 355c45eb7f8..190a44c83a4 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c @@ -196,7 +196,7 @@ U_BOOT_DRIVER(pinctrl_rk3128) = { .of_match = rk3128_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c index 9a982cbfad9..c0026764ac0 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c @@ -126,7 +126,7 @@ U_BOOT_DRIVER(rockchip_rk3188_pinctrl) = { .of_match = rk3188_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c index 351406da2d4..2ed4badd43e 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c @@ -283,7 +283,7 @@ U_BOOT_DRIVER(pinctrl_rk3228) = { .of_match = rk3228_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c index a976b7aeeb2..acd16b0dece 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c @@ -239,7 +239,7 @@ U_BOOT_DRIVER(rockchip_rk3288_pinctrl) = { .of_match = rk3288_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c index f9ac6347eaf..d9e425c4990 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c @@ -450,7 +450,7 @@ U_BOOT_DRIVER(pinctrl_rk3308) = { .of_match = rk3308_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c index 65a75007677..c6435677a8f 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c @@ -314,7 +314,7 @@ U_BOOT_DRIVER(rockchip_rk3328_pinctrl) = { .of_match = rk3328_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c index ba867a89174..a49a356e942 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c @@ -177,7 +177,7 @@ U_BOOT_DRIVER(rockchip_rk3368_pinctrl) = { .of_match = rk3368_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c index ae785573baf..320990a6fb1 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c +++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c @@ -308,7 +308,7 @@ U_BOOT_DRIVER(pinctrl_rk3399) = { .of_match = rk3399_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c index 5b70b503d2b..3dcd9e9efc3 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c +++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c @@ -291,7 +291,7 @@ U_BOOT_DRIVER(pinctrl_rv1108) = { .of_match = rv1108_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1126.c b/drivers/pinctrl/rockchip/pinctrl-rv1126.c index eefb8b17768..b131b3d8a60 100644 --- a/drivers/pinctrl/rockchip/pinctrl-rv1126.c +++ b/drivers/pinctrl/rockchip/pinctrl-rv1126.c @@ -409,7 +409,7 @@ U_BOOT_DRIVER(pinctrl_rv1126) = { .of_match = rv1126_pinctrl_ids, .priv_auto = sizeof(struct rockchip_pinctrl_priv), .ops = &rockchip_pinctrl_ops, -#if !CONFIG_IS_ENABLED(OF_PLATDATA) +#if !IS_ENABLED(CONFIG_OF_PLATDATA) .bind = dm_scan_fdt_dev, #endif .probe = rockchip_pinctrl_probe, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index bdca3f2f715..d5ab66e90ee 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -143,7 +143,7 @@ static int uniphier_pinconf_input_enable(struct udevice *dev, return uniphier_pinconf_input_enable_legacy(dev, pin, enable); } -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) static const struct pinconf_param uniphier_pinconf_params[] = { { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 }, @@ -333,7 +333,7 @@ static int uniphier_pinconf_group_set(struct udevice *dev, return 0; } -#endif /* CONFIG_IS_ENABLED(PINCONF) */ +#endif /* IS_ENABLED(CONFIG_PINCONF) */ static void uniphier_pinmux_set_one(struct udevice *dev, unsigned pin, int muxval) @@ -410,7 +410,7 @@ const struct pinctrl_ops uniphier_pinctrl_ops = { .get_functions_count = uniphier_pinmux_get_functions_count, .get_function_name = uniphier_pinmux_get_function_name, .pinmux_group_set = uniphier_pinmux_group_set, -#if CONFIG_IS_ENABLED(PINCONF) +#if IS_ENABLED(CONFIG_PINCONF) .pinconf_num_params = ARRAY_SIZE(uniphier_pinconf_params), .pinconf_params = uniphier_pinconf_params, .pinconf_set = uniphier_pinconf_set, diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c index 7ba2266092f..429042973b2 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c @@ -179,7 +179,7 @@ U_BOOT_DRIVER(uniphier_pro4_pinctrl) = { .probe = uniphier_pro4_pinctrl_probe, .priv_auto = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c index 9ce2e2c270e..bbcc52cf053 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c @@ -165,7 +165,7 @@ U_BOOT_DRIVER(uniphier_pro5_pinctrl) = { .probe = uniphier_pro5_pinctrl_probe, .priv_auto = sizeof(struct uniphier_pinctrl_priv), .ops = &uniphier_pinctrl_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/power/axp305.c b/drivers/power/axp305.c index 049ef07f746..2a2c0ca8276 100644 --- a/drivers/power/axp305.c +++ b/drivers/power/axp305.c @@ -69,7 +69,7 @@ int axp_init(void) return ret; } -#if !CONFIG_IS_ENABLED(ARM_PSCI_FW) && !IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF) +#if !IS_ENABLED(CONFIG_ARM_PSCI_FW) && !IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF) int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { pmic_bus_write(AXP305_SHUTDOWN, AXP305_POWEROFF); diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c index f6286c70c1d..a341a37cda7 100644 --- a/drivers/power/domain/power-domain-uclass.c +++ b/drivers/power/domain/power-domain-uclass.c @@ -126,7 +126,7 @@ int power_domain_off(struct power_domain *power_domain) return ops->off ? ops->off(power_domain) : 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int dev_power_domain_ctrl(struct udevice *dev, bool on) { struct power_domain pd; diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c index 6d62f6cae40..f3c26cd9561 100644 --- a/drivers/power/exynos-tmu.c +++ b/drivers/power/exynos-tmu.c @@ -181,7 +181,7 @@ enum tmu_status_t tmu_monitor(int *temp) */ static int get_tmu_fdt_values(struct tmu_info *info, const void *blob) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) fdt_addr_t addr; int node; int error = 0; diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c index 0959445364e..6435ed20d8f 100644 --- a/drivers/power/palmas.c +++ b/drivers/power/palmas.c @@ -176,7 +176,7 @@ int twl603x_enable_bb_charge(u8 bb_fields) return err; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) int palmas_i2c_write_u8(u8 chip_no, u8 reg, u8 val) { struct udevice *dev; diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c index 3aa3cce945e..2642caf3f44 100644 --- a/drivers/power/pmic/as3722.c +++ b/drivers/power/pmic/as3722.c @@ -116,7 +116,7 @@ static int as3722_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(PMIC_CHILDREN) +#if IS_ENABLED(CONFIG_PMIC_CHILDREN) static const struct pmic_child_info pmic_children_info[] = { { .prefix = "sd", .driver = "as3722_stepdown"}, { .prefix = "ldo", .driver = "as3722_ldo"}, @@ -170,7 +170,7 @@ U_BOOT_DRIVER(pmic_as3722) = { .name = "as3722_pmic", .id = UCLASS_PMIC, .of_match = as3722_ids, -#if CONFIG_IS_ENABLED(PMIC_CHILDREN) +#if IS_ENABLED(CONFIG_PMIC_CHILDREN) .bind = as3722_bind, #endif .probe = as3722_probe, diff --git a/drivers/power/pmic/axp.c b/drivers/power/pmic/axp.c index 025dac24f28..6293a9aa7cb 100644 --- a/drivers/power/pmic/axp.c +++ b/drivers/power/pmic/axp.c @@ -7,7 +7,7 @@ #include #include -#if CONFIG_IS_ENABLED(SYSRESET) +#if IS_ENABLED(CONFIG_SYSRESET) static int axp_sysreset_request(struct udevice *dev, enum sysreset_t type) { int ret; @@ -71,7 +71,7 @@ static int axp_pmic_bind(struct udevice *dev) if (ofnode_valid(regulators_node)) pmic_bind_children(dev, regulators_node, axp_pmic_child_info); - if (CONFIG_IS_ENABLED(SYSRESET)) { + if (IS_ENABLED(CONFIG_SYSRESET)) { ret = device_bind_driver_to_node(dev, "axp_sysreset", "axp_sysreset", dev_ofnode(dev), NULL); if (ret) diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c index fdbbd6f5593..ee447917446 100644 --- a/drivers/power/pmic/bd71837.c +++ b/drivers/power/pmic/bd71837.c @@ -63,7 +63,7 @@ static int bd71837_bind(struct udevice *dev) debug("%s: '%s' - found regulators subnode\n", __func__, dev->name); - if (CONFIG_IS_ENABLED(PMIC_CHILDREN)) { + if (IS_ENABLED(CONFIG_PMIC_CHILDREN)) { children = pmic_bind_children(dev, regulators_node, pmic_children_info); if (!children) debug("%s: %s - no child found\n", __func__, dev->name); diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c index a186edc08da..6b9befba18c 100644 --- a/drivers/power/pmic/pca9450.c +++ b/drivers/power/pmic/pca9450.c @@ -88,7 +88,7 @@ static int pca9450_probe(struct udevice *dev) struct pca9450_priv *priv = dev_get_priv(dev); int ret = 0; - if (CONFIG_IS_ENABLED(DM_GPIO) && CONFIG_IS_ENABLED(DM_REGULATOR_PCA9450)) { + if (IS_ENABLED(CONFIG_DM_GPIO) && IS_ENABLED(CONFIG_DM_REGULATOR_PCA9450)) { priv->sd_vsel_gpio = devm_gpiod_get_optional(dev, "sd-vsel", GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c index 0e2f5e1f411..fa6fc2afb10 100644 --- a/drivers/power/pmic/pmic-uclass.c +++ b/drivers/power/pmic/pmic-uclass.c @@ -18,7 +18,7 @@ #include #include -#if CONFIG_IS_ENABLED(PMIC_CHILDREN) +#if IS_ENABLED(CONFIG_PMIC_CHILDREN) int pmic_bind_children(struct udevice *pmic, ofnode parent, const struct pmic_child_info *child_info) { diff --git a/drivers/power/pmic/pmic_tps62362.c b/drivers/power/pmic/pmic_tps62362.c index 59190d6f672..16aedc022e9 100644 --- a/drivers/power/pmic/pmic_tps62362.c +++ b/drivers/power/pmic/pmic_tps62362.c @@ -10,7 +10,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *tps62362_dev __section(".data") = NULL; #endif @@ -26,7 +26,7 @@ int tps62362_voltage_update(unsigned char reg, unsigned char volt_sel) if (reg > TPS62362_NUM_REGS) return 1; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_write(TPS62362_I2C_ADDR, reg, 1, &volt_sel, 1); #else if (!tps62362_dev) @@ -35,7 +35,7 @@ int tps62362_voltage_update(unsigned char reg, unsigned char volt_sel) #endif } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int power_tps62362_init(unsigned char bus) { static const char name[] = "TPS62362"; diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c index ccbf2235933..82e224a1d9f 100644 --- a/drivers/power/pmic/pmic_tps65217.c +++ b/drivers/power/pmic/pmic_tps65217.c @@ -12,7 +12,7 @@ #include #include -#if !CONFIG_IS_ENABLED(DM_PMIC) +#if !IS_ENABLED(CONFIG_DM_PMIC) struct udevice *tps65217_dev __section(".data") = NULL; /** @@ -23,7 +23,7 @@ struct udevice *tps65217_dev __section(".data") = NULL; */ int tps65217_reg_read(uchar src_reg, uchar *src_val) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_read(TPS65217_CHIP_PM, src_reg, 1, src_val, 1); #else return dm_i2c_read(tps65217_dev, src_reg, src_val, 1); @@ -57,7 +57,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, * mask */ if (mask != TPS65217_MASK_ALL_BITS) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_read(TPS65217_CHIP_PM, dest_reg, 1, &read_val, 1); #else ret = dm_i2c_read(tps65217_dev, dest_reg, &read_val, 1); @@ -72,7 +72,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, if (prot_level > 0) { xor_reg = dest_reg ^ TPS65217_PASSWORD_UNLOCK; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(TPS65217_CHIP_PM, TPS65217_PASSWORD, 1, &xor_reg, 1); #else @@ -82,7 +82,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, if (ret) return ret; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(TPS65217_CHIP_PM, dest_reg, 1, &dest_val, 1); #else ret = dm_i2c_write(tps65217_dev, dest_reg, &dest_val, 1); @@ -91,7 +91,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, return ret; if (prot_level == TPS65217_PROT_LEVEL_2) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(TPS65217_CHIP_PM, TPS65217_PASSWORD, 1, &xor_reg, 1); #else @@ -101,7 +101,7 @@ int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, if (ret) return ret; -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) ret = i2c_write(TPS65217_CHIP_PM, dest_reg, 1, &dest_val, 1); #else ret = dm_i2c_write(tps65217_dev, dest_reg, &dest_val, 1); @@ -142,7 +142,7 @@ int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel) int power_tps65217_init(unsigned char bus) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev = NULL; int rc; @@ -153,7 +153,7 @@ int power_tps65217_init(unsigned char bus) #endif return 0; } -#else /* CONFIG_IS_ENABLED(DM_PMIC) */ +#else /* IS_ENABLED(CONFIG_DM_PMIC) */ static const struct pmic_child_info pmic_children_info[] = { { .prefix = "ldo", .driver = "tps65217_ldo" }, { }, diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c index 67174901804..e63ef0e4180 100644 --- a/drivers/power/pmic/pmic_tps65218.c +++ b/drivers/power/pmic/pmic_tps65218.c @@ -10,7 +10,7 @@ #include #include -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int tps65218_reg_read(uchar dest_reg, uchar *dest_val) { uchar read_val; @@ -225,7 +225,7 @@ int tps65218_lock_fseal(void) return 0; } -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) int power_tps65218_init(unsigned char bus) { static const char name[] = "TPS65218_PMIC"; diff --git a/drivers/power/pmic/pmic_tps65910.c b/drivers/power/pmic/pmic_tps65910.c index e3de7308215..48b826b9833 100644 --- a/drivers/power/pmic/pmic_tps65910.c +++ b/drivers/power/pmic/pmic_tps65910.c @@ -12,7 +12,7 @@ struct udevice *tps65910_dev __section(".data") = NULL; static inline int tps65910_read_reg(int addr, uchar *buf) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_read(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1); #else int rc; @@ -27,7 +27,7 @@ static inline int tps65910_read_reg(int addr, uchar *buf) static inline int tps65910_write_reg(int addr, uchar *buf) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_write(TPS65910_CTRL_I2C_ADDR, addr, 1, buf, 1); #else return dm_i2c_reg_write(tps65910_dev, addr, *buf); @@ -36,7 +36,7 @@ static inline int tps65910_write_reg(int addr, uchar *buf) int power_tps65910_init(unsigned char bus) { -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev = NULL; int rc; diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 25ef621f8df..2710b1ca31d 100644 --- a/drivers/power/pmic/rk8xx.c +++ b/drivers/power/pmic/rk8xx.c @@ -129,7 +129,7 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len) return 0; } -#if CONFIG_IS_ENABLED(PMIC_CHILDREN) +#if IS_ENABLED(CONFIG_PMIC_CHILDREN) static int rk8xx_bind(struct udevice *dev) { ofnode regulators_node; @@ -144,7 +144,7 @@ static int rk8xx_bind(struct udevice *dev) debug("%s: '%s' - found regulators subnode\n", __func__, dev->name); - if (CONFIG_IS_ENABLED(SYSRESET)) { + if (IS_ENABLED(CONFIG_SYSRESET)) { ret = device_bind_driver_to_node(dev, "rk8xx_sysreset", "rk8xx_sysreset", dev_ofnode(dev), NULL); @@ -243,7 +243,7 @@ static int rk8xx_probe(struct udevice *dev) pmic_reg_read(dev, on_source), pmic_reg_read(dev, off_source)); printf("\n"); - if (CONFIG_IS_ENABLED(ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON)) + if (IS_ENABLED(CONFIG_ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON)) rk8xx_off_for_plugin(dev); return 0; @@ -269,7 +269,7 @@ U_BOOT_DRIVER(rockchip_rk805) = { .name = "rockchip_rk805", .id = UCLASS_PMIC, .of_match = rk8xx_ids, -#if CONFIG_IS_ENABLED(PMIC_CHILDREN) +#if IS_ENABLED(CONFIG_PMIC_CHILDREN) .bind = rk8xx_bind, #endif .priv_auto = sizeof(struct rk8xx_priv), diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c index 2c85410b1bf..a5243697d08 100644 --- a/drivers/power/pmic/stpmic1.c +++ b/drivers/power/pmic/stpmic1.c @@ -29,7 +29,7 @@ enum pmic_nvm_op { NVM_WRITE, }; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) static const struct pmic_child_info stpmic1_children_info[] = { { .prefix = "ldo", .driver = "stpmic1_ldo" }, { .prefix = "buck", .driver = "stpmic1_buck" }, @@ -73,7 +73,7 @@ static int stpmic1_read(struct udevice *dev, uint reg, uint8_t *buff, int len) static int stpmic1_bind(struct udevice *dev) { int ret; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ofnode regulators_node; int children; @@ -97,7 +97,7 @@ static int stpmic1_bind(struct udevice *dev) return ret; } - if (CONFIG_IS_ENABLED(SYSRESET)) + if (IS_ENABLED(CONFIG_SYSRESET)) return device_bind_driver(dev, "stpmic1-sysreset", "stpmic1-sysreset", NULL); diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c index b67ac2f027b..28ef4cc6e74 100644 --- a/drivers/power/power_i2c.c +++ b/drivers/power/power_i2c.c @@ -23,7 +23,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val) if (check_reg(p, reg)) return -EINVAL; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; @@ -67,7 +67,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val) return -EINVAL; } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) return dm_i2c_write(dev, reg, buf, pmic_i2c_tx_num); #else return i2c_write(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num); @@ -83,7 +83,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val) if (check_reg(p, reg)) return -EINVAL; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(p->bus, pmic_i2c_addr, @@ -131,7 +131,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val) int pmic_probe(struct pmic *p) { debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name); -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) struct udevice *dev; int ret; diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c index d3e8949af99..d0b441c0ef3 100644 --- a/drivers/power/twl4030.c +++ b/drivers/power/twl4030.c @@ -182,7 +182,7 @@ int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } #endif -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val) { struct udevice *dev; diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c index 2b50a56faf8..edf0a204704 100644 --- a/drivers/power/twl6030.c +++ b/drivers/power/twl6030.c @@ -270,7 +270,7 @@ void twl6030_usb_device_settings() twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_MISC2, value); } -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val) { struct udevice *dev; diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c index 4453c247b29..71ca67b108b 100644 --- a/drivers/ram/k3-am654-ddrss.c +++ b/drivers/ram/k3-am654-ddrss.c @@ -880,7 +880,7 @@ static int am654_ddrss_power_on(struct am654_ddrss_desc *ddrss) } /* VTT enable */ -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) device_get_supply_regulator(ddrss->dev, "vtt-supply", &ddrss->vtt_supply); ret = regulator_set_value(ddrss->vtt_supply, 3300000); diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c index dd5b1917445..af3d61f5641 100644 --- a/drivers/ram/rockchip/dmc-rk3368.c +++ b/drivers/ram/rockchip/dmc-rk3368.c @@ -36,7 +36,7 @@ struct dram_info { }; struct rk3368_sdram_params { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3368_dmc of_plat; #endif struct rk3288_sdram_pctl_timing pctl_timing; @@ -883,7 +883,7 @@ static int rk3368_dmc_of_to_plat(struct udevice *dev) { int ret = 0; - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rk3368_sdram_params *plat = dev_get_plat(dev); ret = regmap_init_mem(dev_ofnode(dev), &plat->map); @@ -894,7 +894,7 @@ static int rk3368_dmc_of_to_plat(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rk3368_sdram_params *plat = dev_get_plat(dev); @@ -922,7 +922,7 @@ static int rk3368_dmc_probe(struct udevice *dev) #endif struct dram_info *priv = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = conv_of_plat(dev); if (ret) return ret; diff --git a/drivers/ram/rockchip/sdram_rk3066.c b/drivers/ram/rockchip/sdram_rk3066.c index a2425f22e2c..82bc483495a 100644 --- a/drivers/ram/rockchip/sdram_rk3066.c +++ b/drivers/ram/rockchip/sdram_rk3066.c @@ -46,7 +46,7 @@ struct rk3066_dmc_dram_info { }; struct rk3066_dmc_sdram_params { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3066_dmc of_plat; #endif struct rk3288_sdram_channel ch[2]; @@ -789,7 +789,7 @@ static int rk3066_dmc_setup_sdram(struct udevice *dev) static int rk3066_dmc_conv_of_plat(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rk3066_dmc_sdram_params *plat = dev_get_plat(dev); struct dtd_rockchip_rk3066_dmc *of_plat = &plat->of_plat; int ret; diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c index 272b1b2dce1..707c8d16af3 100644 --- a/drivers/ram/rockchip/sdram_rk3188.c +++ b/drivers/ram/rockchip/sdram_rk3188.c @@ -45,7 +45,7 @@ struct dram_info { }; struct rk3188_sdram_params { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3188_dmc of_plat; #endif struct rk3288_sdram_channel ch[2]; @@ -819,7 +819,7 @@ static int rk3188_dmc_of_to_plat(struct udevice *dev) struct rk3188_sdram_params *params = dev_get_plat(dev); int ret; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; /* rk3188 supports only one-channel */ @@ -853,7 +853,7 @@ static int rk3188_dmc_of_to_plat(struct udevice *dev) } #endif /* CONFIG_SPL_BUILD */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rk3188_sdram_params *plat = dev_get_plat(dev); @@ -889,7 +889,7 @@ static int rk3188_dmc_probe(struct udevice *dev) priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); #ifdef CONFIG_SPL_BUILD -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = conv_of_plat(dev); if (ret) return ret; diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c index 1b204fb56e6..a9bc35b560a 100644 --- a/drivers/ram/rockchip/sdram_rk322x.c +++ b/drivers/ram/rockchip/sdram_rk322x.c @@ -40,7 +40,7 @@ struct dram_info { }; struct rk322x_sdram_params { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3228_dmc of_plat; #endif struct rk322x_sdram_channel ch[1]; @@ -721,7 +721,7 @@ static int rk322x_dmc_of_to_plat(struct udevice *dev) int node = dev_of_offset(dev); int ret; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; params->num_channels = 1; @@ -755,7 +755,7 @@ static int rk322x_dmc_of_to_plat(struct udevice *dev) } #endif /* CONFIG_TPL_BUILD */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rk322x_sdram_params *plat = dev_get_plat(dev); @@ -789,7 +789,7 @@ static int rk322x_dmc_probe(struct udevice *dev) priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); #ifdef CONFIG_TPL_BUILD -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = conv_of_plat(dev); if (ret) return ret; diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index 83778ad1c2c..feae8641b9e 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -48,7 +48,7 @@ struct dram_info { }; struct rk3288_sdram_params { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3288_dmc of_plat; #endif struct rk3288_sdram_channel ch[2]; @@ -976,7 +976,7 @@ static int rk3288_dmc_of_to_plat(struct udevice *dev) struct rk3288_sdram_params *params = dev_get_plat(dev); int ret; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; /* Rk3288 supports dual-channel, set default channel num to 2 */ @@ -1015,7 +1015,7 @@ static int rk3288_dmc_of_to_plat(struct udevice *dev) } #endif /* CONFIG_SPL_BUILD */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rk3288_sdram_params *plat = dev_get_plat(dev); @@ -1052,7 +1052,7 @@ static int rk3288_dmc_probe(struct udevice *dev) priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = conv_of_plat(dev); if (ret) return ret; diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c index 184c93f7763..796f0482663 100644 --- a/drivers/ram/rockchip/sdram_rk3328.c +++ b/drivers/ram/rockchip/sdram_rk3328.c @@ -39,7 +39,7 @@ struct dram_info { struct rk3328_sdram_channel sdram_ch; struct rockchip_dmc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3328_dmc dtplat; #else struct rk3328_sdram_params sdram_params; @@ -47,7 +47,7 @@ struct rockchip_dmc_plat { struct regmap *map; }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rockchip_dmc_plat *plat = dev_get_plat(dev); @@ -517,7 +517,7 @@ static int rk3328_dmc_init(struct udevice *dev) struct rockchip_dmc_plat *plat = dev_get_plat(dev); int ret; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct rk3328_sdram_params *params = &plat->sdram_params; #else struct dtd_rockchip_rk3328_dmc *dtplat = &plat->dtplat; @@ -549,7 +549,7 @@ static int rk3328_dmc_init(struct udevice *dev) static int rk3328_dmc_of_to_plat(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct rockchip_dmc_plat *plat = dev_get_plat(dev); int ret; diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index b1fea04e84a..09f30e11622 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -97,7 +97,7 @@ struct sdram_rk3399_ops { (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) struct rockchip_dmc_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3399_dmc dtplat; #else struct rk3399_sdram_params sdram_params; @@ -3023,7 +3023,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev) struct rockchip_dmc_plat *plat = dev_get_plat(dev); int ret; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!IS_ENABLED(CONFIG_OF_REAL)) return 0; ret = dev_read_u32_array(dev, "rockchip,sdram-params", @@ -3041,7 +3041,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rockchip_dmc_plat *plat = dev_get_plat(dev); @@ -3076,7 +3076,7 @@ static int rk3399_dmc_init(struct udevice *dev) struct dram_info *priv = dev_get_priv(dev); struct rockchip_dmc_plat *plat = dev_get_plat(dev); int ret; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct rk3399_sdram_params *params = &plat->sdram_params; #else struct dtd_rockchip_rk3399_dmc *dtplat = &plat->dtplat; @@ -3113,7 +3113,7 @@ static int rk3399_dmc_init(struct udevice *dev) debug("cru %p, cic %p, grf %p, sgrf %p, pmucru %p, pmu %p\n", priv->cru, priv->cic, priv->pmugrf, priv->pmusgrf, priv->pmucru, priv->pmu); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = clk_get_by_phandle(dev, dtplat->clocks, &priv->ddr_clk); #else ret = clk_get_by_index(dev, 0, &priv->ddr_clk); diff --git a/drivers/reboot-mode/reboot-mode-gpio.c b/drivers/reboot-mode/reboot-mode-gpio.c index 305174736ed..71b3acae97f 100644 --- a/drivers/reboot-mode/reboot-mode-gpio.c +++ b/drivers/reboot-mode/reboot-mode-gpio.c @@ -45,7 +45,7 @@ static int reboot_mode_probe(struct udevice *dev) int ret; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) ret = gpio_get_list_count(dev, "gpios"); if (ret < 0) return ret; @@ -61,7 +61,7 @@ static int reboot_mode_probe(struct udevice *dev) if (!plat_data->gpio_desc) return -ENOMEM; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) ret = gpio_request_list_by_name(dev, "gpios", plat_data->gpio_desc, plat_data->gpio_count, GPIOD_IS_IN); if (ret < 0) @@ -104,7 +104,7 @@ static int reboot_mode_remove(struct udevice *dev) return gpio_free_list(dev, plat_data->gpio_desc, plat_data->gpio_count); } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id reboot_mode_ids[] = { { .compatible = "reboot-mode-gpio", 0 }, { } @@ -120,7 +120,7 @@ U_BOOT_DRIVER(reboot_mode_gpio) = { .id = UCLASS_REBOOT_MODE, .probe = reboot_mode_probe, .remove = reboot_mode_remove, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = reboot_mode_ids, #endif .plat_auto = sizeof(struct reboot_mode_gpio_platdata), diff --git a/drivers/reboot-mode/reboot-mode-rtc.c b/drivers/reboot-mode/reboot-mode-rtc.c index 972d0cdbcb5..8f5b74ed7f0 100644 --- a/drivers/reboot-mode/reboot-mode-rtc.c +++ b/drivers/reboot-mode/reboot-mode-rtc.c @@ -67,7 +67,7 @@ static int reboot_mode_set(struct udevice *dev, u32 buf) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int reboot_mode_ofdata_to_platdata(struct udevice *dev) { struct ofnode_phandle_args phandle_args; @@ -118,7 +118,7 @@ static const struct reboot_mode_ops reboot_mode_rtc_ops = { U_BOOT_DRIVER(reboot_mode_rtc) = { .name = "reboot-mode-rtc", .id = UCLASS_REBOOT_MODE, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = reboot_mode_ids, .of_to_plat = reboot_mode_ofdata_to_platdata, #endif diff --git a/drivers/reboot-mode/reboot-mode-uclass.c b/drivers/reboot-mode/reboot-mode-uclass.c index 2b38aa26b85..bac932ae0fd 100644 --- a/drivers/reboot-mode/reboot-mode-uclass.c +++ b/drivers/reboot-mode/reboot-mode-uclass.c @@ -63,7 +63,7 @@ int dm_reboot_mode_pre_probe(struct udevice *dev) if (!plat_data) return -EINVAL; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) const char *mode_prefix = "mode-"; const int mode_prefix_len = strlen(mode_prefix); struct ofprop property; diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c index 50bcc9030e9..92bdda5548e 100644 --- a/drivers/remoteproc/rproc-uclass.c +++ b/drivers/remoteproc/rproc-uclass.c @@ -132,7 +132,7 @@ static int rproc_pre_probe(struct udevice *dev) /* See if we need to populate via fdt */ if (!dev_get_plat(dev)) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) bool tmp; debug("'%s': using fdt\n", dev->name); uc_pdata->name = dev_read_string(dev, "remoteproc-name"); diff --git a/drivers/reset/reset-at91.c b/drivers/reset/reset-at91.c index 165c87acdc4..f598e4d5866 100644 --- a/drivers/reset/reset-at91.c +++ b/drivers/reset/reset-at91.c @@ -107,7 +107,7 @@ static int at91_reset_bind(struct udevice *dev) { struct udevice *at91_sysreset; - if (CONFIG_IS_ENABLED(SYSRESET_AT91)) + if (IS_ENABLED(CONFIG_SYSRESET_AT91)) return device_bind_driver_to_node(dev, "at91_sysreset", "at91_sysreset", dev_ofnode(dev), diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 6e3f03e2484..7af7089089f 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -47,7 +47,7 @@ struct socfpga_reset_data { */ static bool socfpga_reset_keep_enabled(void) { -#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT) +#if !defined(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_ENV_SUPPORT) const char *env_str; long val; diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c index 2c780ab8edf..e8863281e88 100644 --- a/drivers/rtc/ds1337.c +++ b/drivers/rtc/ds1337.c @@ -63,7 +63,7 @@ #define RTC_STAT_BIT_OSF 0x80 /* Oscillator stop flag */ -#if !CONFIG_IS_ENABLED(DM_RTC) +#if !IS_ENABLED(CONFIG_DM_RTC) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c index bd32ed2dbf9..694b198f49c 100644 --- a/drivers/rtc/ds3231.c +++ b/drivers/rtc/ds3231.c @@ -55,7 +55,7 @@ #define RTC_STAT_BIT_EN32KHZ 0x8 /* Enable 32KHz Output */ -#if !CONFIG_IS_ENABLED(DM_RTC) +#if !IS_ENABLED(CONFIG_DM_RTC) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c index 91a412440b8..870c8545efa 100644 --- a/drivers/rtc/pcf8563.c +++ b/drivers/rtc/pcf8563.c @@ -17,7 +17,7 @@ #include #include -#if !CONFIG_IS_ENABLED(DM_RTC) +#if !IS_ENABLED(CONFIG_DM_RTC) static uchar rtc_read (uchar reg); static void rtc_write (uchar reg, uchar val); diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c index e0a7bd3662f..da13af3407a 100644 --- a/drivers/rtc/pt7c4338.c +++ b/drivers/rtc/pt7c4338.c @@ -49,7 +49,7 @@ #define RTC_PT7C4338_RESET_VAL \ (RTC_CTL_STAT_BIT_RS0 | RTC_CTL_STAT_BIT_RS1 | RTC_CTL_STAT_BIT_OUT) -#if !CONFIG_IS_ENABLED(DM_RTC) +#if !IS_ENABLED(CONFIG_DM_RTC) /****** Helper functions ****************************************/ static u8 rtc_read(u8 reg) { diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c index e5ae6ea4d5f..8053b388e58 100644 --- a/drivers/rtc/rtc-uclass.c +++ b/drivers/rtc/rtc-uclass.c @@ -177,7 +177,7 @@ UCLASS_DRIVER(rtc) = { .name = "rtc", .id = UCLASS_RTC, .flags = DM_UC_FLAG_SEQ_ALIAS, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/rtc/sandbox_rtc.c b/drivers/rtc/sandbox_rtc.c index 657e5c7be2c..c57bd63c689 100644 --- a/drivers/rtc/sandbox_rtc.c +++ b/drivers/rtc/sandbox_rtc.c @@ -68,7 +68,7 @@ static int sandbox_rtc_write8(struct udevice *dev, unsigned int reg, int val) return dm_i2c_reg_write(dev, reg, val); } -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) static int sandbox_rtc_get_name(const struct udevice *dev, char *out_name) { return acpi_copy_name(out_name, "RTCC"); @@ -81,7 +81,7 @@ struct acpi_ops sandbox_rtc_acpi_ops = { static int sandbox_rtc_bind(struct udevice *dev) { -#if CONFIG_IS_ENABLED(PLATDATA) +#if IS_ENABLED(CONFIG_PLATDATA) struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); /* Set up the emul_idx for i2c_emul_find() */ diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index 9853f49c94f..6327a590a69 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -18,7 +18,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) #include #endif #include @@ -28,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) static void atmel_serial_setbrg_internal(atmel_usart3_t *usart, int id, int baudrate) { @@ -264,7 +264,7 @@ static int atmel_serial_probe(struct udevice *dev) struct atmel_serial_plat *plat = dev_get_plat(dev); struct atmel_serial_priv *priv = dev_get_priv(dev); int ret; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) fdt_addr_t addr_base; addr_base = dev_read_addr(dev); @@ -284,7 +284,7 @@ static int atmel_serial_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id atmel_serial_ids[] = { { .compatible = "atmel,at91sam9260-dbgu", @@ -301,13 +301,13 @@ static const struct udevice_id atmel_serial_ids[] = { U_BOOT_DRIVER(serial_atmel) = { .name = "serial_atmel", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = atmel_serial_ids, .plat_auto = sizeof(struct atmel_serial_plat), #endif .probe = atmel_serial_probe, .ops = &atmel_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct atmel_serial_priv), diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index eab9537fbae..ab96cebd4ea 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; #define UART_MCRVAL (UART_MCR_DTR | \ UART_MCR_RTS) /* RTS/DTR */ -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #ifdef CONFIG_SYS_NS16550_PORT_MAPPED #define serial_out(x, y) outb(x, (ulong)y) #define serial_in(y) inb((ulong)y) @@ -90,7 +90,7 @@ static inline int serial_in_shift(void *addr, int shift) #endif } -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) #ifndef CFG_SYS_NS16550_CLK #define CFG_SYS_NS16550_CLK 0 @@ -272,7 +272,7 @@ void ns16550_init(struct ns16550 *com_port, int baud_divisor) #endif } -#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) +#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) void ns16550_reinit(struct ns16550 *com_port, int baud_divisor) { serial_out(CFG_SYS_NS16550_IER, &com_port->ier); @@ -281,7 +281,7 @@ void ns16550_reinit(struct ns16550 *com_port, int baud_divisor) serial_out(ns16550_getfcr(com_port), &com_port->fcr); ns16550_setbrg(com_port, baud_divisor); } -#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */ +#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */ void ns16550_putc(struct ns16550 *com_port, char c) { @@ -299,7 +299,7 @@ void ns16550_putc(struct ns16550 *com_port, char c) schedule(); } -#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) +#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) char ns16550_getc(struct ns16550 *com_port) { while ((serial_in(&com_port->lsr) & UART_LSR_DR) == 0) { @@ -317,7 +317,7 @@ int ns16550_tstc(struct ns16550 *com_port) return (serial_in(&com_port->lsr) & UART_LSR_DR) != 0; } -#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */ +#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */ #ifdef CONFIG_DEBUG_UART_NS16550 @@ -379,7 +379,7 @@ DEBUG_UART_FUNCS #endif -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) static int ns16550_serial_putc(struct udevice *dev, const char ch) { struct ns16550 *const com_port = dev_get_priv(dev); @@ -530,14 +530,14 @@ int ns16550_serial_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) enum { PORT_NS16550 = 0, PORT_JZ4780, }; #endif -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) int ns16550_serial_of_to_plat(struct udevice *dev) { struct ns16550_plat *plat = dev_get_plat(dev); @@ -592,7 +592,7 @@ const struct dm_serial_ops ns16550_serial_ops = { .getinfo = ns16550_serial_getinfo, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /* * Please consider existing compatible strings before adding a new * one to keep this table compact. Or you may add a generic "ns16550" @@ -608,14 +608,14 @@ static const struct udevice_id ns16550_serial_ids[] = { }; #endif /* OF_REAL */ -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) /* TODO(sjg@chromium.org): Integrate this into a macro like CONFIG_IS_ENABLED */ #if !defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_DM_SERIAL) U_BOOT_DRIVER(ns16550_serial) = { .name = "ns16550_serial", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = ns16550_serial_ids, .of_to_plat = ns16550_serial_of_to_plat, .plat_auto = sizeof(struct ns16550_plat), @@ -623,7 +623,7 @@ U_BOOT_DRIVER(ns16550_serial) = { .priv_auto = sizeof(struct ns16550), .probe = ns16550_serial_probe, .ops = &ns16550_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index f4003811ee7..9311c24aa85 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -85,7 +85,7 @@ static void sandbox_print_color(struct udevice *dev) struct sandbox_serial_plat *plat = dev_get_plat(dev); /* With of-platdata we don't real the colour correctly, so disable it */ - if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line && + if (!IS_ENABLED(CONFIG_OF_PLATDATA) && priv->start_of_line && plat->colour != -1) { priv->start_of_line = false; output_ansi_colour(plat->colour); @@ -236,7 +236,7 @@ static int sandbox_serial_of_to_plat(struct udevice *dev) const char *colour; int i; - if (CONFIG_IS_ENABLED(OF_PLATDATA)) + if (IS_ENABLED(CONFIG_OF_PLATDATA)) return 0; plat->colour = -1; colour = dev_read_string(dev, "sandbox,text-colour"); @@ -280,7 +280,7 @@ U_BOOT_DRIVER(sandbox_serial) = { .flags = DM_FLAG_PRE_RELOC, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct sandbox_serial_plat platdata_non_fdt = { .colour = -1, }; diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 77d3f373721..87d632490aa 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; */ static const unsigned long baudrate_table[] = CFG_SYS_BAUDRATE_TABLE; -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) static int serial_check_stdout(const void *blob, struct udevice **devp) { int node = -1; @@ -82,13 +82,13 @@ static void serial_find_console_or_panic(void) int ret; #endif - if (CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (IS_ENABLED(CONFIG_OF_PLATDATA)) { uclass_first_device(UCLASS_SERIAL, &dev); if (dev) { gd->cur_serial_dev = dev; return; } - } else if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) { + } else if (IS_ENABLED(CONFIG_OF_CONTROL) && blob) { /* Live tree has support for stdout */ if (of_live_active()) { struct device_node *np = of_get_stdout(); @@ -105,7 +105,7 @@ static void serial_find_console_or_panic(void) } } } - if (!IS_ENABLED(CONFIG_SPL_BUILD) || !CONFIG_IS_ENABLED(OF_CONTROL) || + if (!IS_ENABLED(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_OF_CONTROL) || !blob) { /* * Try to use CONFIG_CONS_INDEX if available (it is numbered @@ -161,7 +161,7 @@ static void serial_find_console_or_panic(void) /* Called prior to relocation */ int serial_init(void) { -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) serial_find_console_or_panic(); gd->flags |= GD_FLG_SERIAL_READY; serial_setbrg(); @@ -218,7 +218,7 @@ static void _serial_puts(struct udevice *dev, const char *str) { struct dm_serial_ops *ops = serial_get_ops(dev); - if (!CONFIG_IS_ENABLED(SERIAL_PUTS) || !ops->puts) { + if (!IS_ENABLED(CONFIG_SERIAL_PUTS) || !ops->puts) { while (*str) _serial_putc(dev, *str++); return; @@ -274,7 +274,7 @@ static int __serial_tstc(struct udevice *dev) return 1; } -#if CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) +#if IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) static int _serial_tstc(struct udevice *dev) { struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); @@ -302,7 +302,7 @@ static int _serial_getc(struct udevice *dev) return val; } -#else /* CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) */ +#else /* IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) */ static int _serial_getc(struct udevice *dev) { @@ -313,7 +313,7 @@ static int _serial_tstc(struct udevice *dev) { return __serial_tstc(dev); } -#endif /* CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) */ +#endif /* IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) */ void serial_putc(char ch) { @@ -407,9 +407,9 @@ void serial_stdio_init(void) { } -#if CONFIG_IS_ENABLED(DM_STDIO) +#if IS_ENABLED(CONFIG_DM_STDIO) -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) static void serial_stub_putc(struct stdio_dev *sdev, const char ch) { _serial_putc(sdev->priv, ch); @@ -501,11 +501,11 @@ static int on_baudrate(const char *name, const char *value, enum env_op op, } U_BOOT_ENV_CALLBACK(baudrate, on_baudrate); -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) static int serial_post_probe(struct udevice *dev) { struct dm_serial_ops *ops = serial_get_ops(dev); -#if CONFIG_IS_ENABLED(DM_STDIO) +#if IS_ENABLED(CONFIG_DM_STDIO) struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); struct stdio_dev sdev; #endif @@ -540,7 +540,7 @@ static int serial_post_probe(struct udevice *dev) return ret; } -#if CONFIG_IS_ENABLED(DM_STDIO) +#if IS_ENABLED(CONFIG_DM_STDIO) if (!(gd->flags & GD_FLG_RELOC)) return 0; memset(&sdev, '\0', sizeof(sdev)); @@ -554,7 +554,7 @@ static int serial_post_probe(struct udevice *dev) sdev.getc = serial_stub_getc; sdev.tstc = serial_stub_tstc; -#if CONFIG_IS_ENABLED(SERIAL_RX_BUFFER) +#if IS_ENABLED(CONFIG_SERIAL_RX_BUFFER) /* Allocate the RX buffer */ upriv->buf = malloc(CONFIG_SERIAL_RX_BUFFER_SIZE); #endif @@ -566,7 +566,7 @@ static int serial_post_probe(struct udevice *dev) static int serial_pre_remove(struct udevice *dev) { -#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) +#if IS_ENABLED(CONFIG_SYS_STDIO_DEREGISTER) struct serial_dev_priv *upriv = dev_get_uclass_priv(dev); if (stdio_deregister_dev(upriv->sdev, true)) diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c index 7585f790d22..6c9423ea63b 100644 --- a/drivers/serial/serial_bcm283x_mu.c +++ b/drivers/serial/serial_bcm283x_mu.c @@ -128,7 +128,7 @@ static const struct dm_serial_ops bcm283x_mu_serial_ops = { .setbrg = bcm283x_mu_serial_setbrg, }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id bcm283x_mu_serial_id[] = { {.compatible = "brcm,bcm2835-aux-uart"}, {} @@ -197,7 +197,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = { .plat_auto = sizeof(struct bcm283x_mu_serial_plat), .probe = bcm283x_mu_serial_probe, .ops = &bcm283x_mu_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) +#if !IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct bcm283x_mu_priv), diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c index 09a9868a38f..0314c9aeaf1 100644 --- a/drivers/serial/serial_bcm283x_pl011.c +++ b/drivers/serial/serial_bcm283x_pl011.c @@ -94,7 +94,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = { .probe = bcm283x_pl011_serial_probe, .plat_auto = sizeof(struct pl01x_serial_plat), .ops = &bcm283x_pl011_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) +#if !IS_ENABLED(CONFIG_OF_CONTROL) || IS_ENABLED(CONFIG_OF_BOARD) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct pl01x_priv), diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index 51e66abdbc1..1da5f3aa173 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -108,7 +108,7 @@ u32 __weak get_lpuart_clk(void) return get_board_sys_clk(); } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk) { struct clk per_clk; @@ -150,7 +150,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev, u16 sbr; int ret; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = get_lpuart_clk_rate(dev, &clk); if (ret) return; @@ -240,7 +240,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev, u32 clk; int ret; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = get_lpuart_clk_rate(dev, &clk); if (ret) return; @@ -309,7 +309,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev, u32 sbr; int ret; - if (CONFIG_IS_ENABLED(CLK)) { + if (IS_ENABLED(CONFIG_CLK)) { ret = get_lpuart_clk_rate(dev, &clk); if (ret) return; @@ -478,7 +478,7 @@ static int lpuart_serial_pending(struct udevice *dev, bool input) static int lpuart_serial_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk per_clk; int ret; diff --git a/drivers/serial/serial_mt7620.c b/drivers/serial/serial_mt7620.c index b00e2f2c366..903ba2dd6ac 100644 --- a/drivers/serial/serial_mt7620.c +++ b/drivers/serial/serial_mt7620.c @@ -20,7 +20,7 @@ #include #include -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) #include #endif @@ -63,7 +63,7 @@ struct mt7620_serial_regs { UART_FCR_TXSR) struct mt7620_serial_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_serial_mt7620 dtplat; #endif @@ -131,7 +131,7 @@ static int mt7620_serial_probe(struct udevice *dev) { struct mt7620_serial_plat *plat = dev_get_plat(dev); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) plat->regs = (void __iomem *)KSEG1ADDR(plat->dtplat.reg[0]); plat->clock = plat->dtplat.clock_frequency; #endif @@ -145,7 +145,7 @@ static int mt7620_serial_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int mt7620_serial_of_to_plat(struct udevice *dev) { struct mt7620_serial_plat *plat = dev_get_plat(dev); @@ -200,7 +200,7 @@ static const struct dm_serial_ops mt7620_serial_ops = { U_BOOT_DRIVER(serial_mt7620) = { .name = "serial_mt7620", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = mt7620_serial_ids, .of_to_plat = mt7620_serial_of_to_plat, #endif diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c index ded7346a13f..a9d1b8280ef 100644 --- a/drivers/serial/serial_mtk.c +++ b/drivers/serial/serial_mtk.c @@ -173,7 +173,7 @@ static int _mtk_serial_pending(struct mtk_serial_priv *priv, bool input) return (readl(&priv->regs->lsr) & UART_LSR_THRE) ? 0 : 1; } -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) static int mtk_serial_setbrg(struct udevice *dev, int baudrate) { struct mtk_serial_priv *priv = dev_get_priv(dev); diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index 8bcbbf2bbfc..7825c89f3b6 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -192,7 +192,7 @@ static void _mxc_serial_setbrg(struct mxc_uart *base, unsigned long clk, writel(UCR1_UARTEN, &base->cr1); } -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #ifndef CFG_MXC_UART_BASE #error "define CFG_MXC_UART_BASE to use the MXC UART driver" @@ -274,7 +274,7 @@ __weak struct serial_device *default_serial_console(void) } #endif -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) int mxc_serial_setbrg(struct udevice *dev, int baudrate) { @@ -338,7 +338,7 @@ static const struct dm_serial_ops mxc_serial_ops = { .setbrg = mxc_serial_setbrg, }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int mxc_serial_of_to_plat(struct udevice *dev) { struct mxc_serial_plat *plat = dev_get_plat(dev); @@ -369,7 +369,7 @@ static const struct udevice_id mxc_serial_ids[] = { U_BOOT_DRIVER(serial_mxc) = { .name = "serial_mxc", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = mxc_serial_ids, .of_to_plat = mxc_serial_of_to_plat, .plat_auto = sizeof(struct mxc_serial_plat), diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 4014f682040..c955c997eb2 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -11,7 +11,7 @@ #include #include -#if !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) +#if !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) DECLARE_GLOBAL_DATA_PTR; @@ -251,4 +251,4 @@ void ns16550_serial_initialize(void) #endif } -#endif /* !CONFIG_IS_ENABLED(NS16550_MIN_FUNCTIONS) */ +#endif /* !IS_ENABLED(CONFIG_NS16550_MIN_FUNCTIONS) */ diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index 26310b0b746..3eae2db313e 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -96,9 +96,9 @@ DEBUG_UART_FUNCS #endif -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int omap_serial_of_to_plat(struct udevice *dev) { struct ns16550_plat *plat = dev_get_plat(dev); @@ -151,11 +151,11 @@ static const struct udevice_id omap_serial_ids[] = { }; #endif /* OF_REAL */ -#if CONFIG_IS_ENABLED(SERIAL_PRESENT) +#if IS_ENABLED(CONFIG_SERIAL_PRESENT) U_BOOT_DRIVER(omap_serial) = { .name = "omap_serial", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = omap_serial_ids, .of_to_plat = omap_serial_of_to_plat, .plat_auto = sizeof(struct ns16550_plat), @@ -163,7 +163,7 @@ U_BOOT_DRIVER(omap_serial) = { .priv_auto = sizeof(struct ns16550), .probe = ns16550_serial_probe, .ops = &ns16550_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index f5468353e10..b3a988cb241 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) static volatile unsigned char *const port[] = CFG_PL01x_PORTS; static enum pl01x_type pl01x_type __section(".data"); static struct pl01x_regs *base_regs __section(".data"); @@ -185,7 +185,7 @@ static int pl01x_generic_setbrg(struct pl01x_regs *regs, enum pl01x_type type, return 0; } -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) static void pl01x_serial_init_baud(int baudrate) { int clock = 0; @@ -331,7 +331,7 @@ static const struct dm_serial_ops pl01x_serial_ops = { .setbrg = pl01x_serial_setbrg, }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id pl01x_serial_id[] ={ {.compatible = "arm,pl011", .data = TYPE_PL011}, {.compatible = "arm,pl010", .data = TYPE_PL010}, diff --git a/drivers/serial/serial_pl01x_internal.h b/drivers/serial/serial_pl01x_internal.h index 71c52bb5312..6754d232f06 100644 --- a/drivers/serial/serial_pl01x_internal.h +++ b/drivers/serial/serial_pl01x_internal.h @@ -38,7 +38,7 @@ struct pl01x_regs { u32 pl011_cr; /* 0x30 Control register */ }; -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) int pl01x_serial_of_to_plat(struct udevice *dev); int pl01x_serial_probe(struct udevice *dev); diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c index f4e9422ed91..13cd7473639 100644 --- a/drivers/serial/serial_rockchip.c +++ b/drivers/serial/serial_rockchip.c @@ -13,19 +13,19 @@ #include struct rockchip_uart_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_uart dtplat; #endif struct ns16550_plat plat; }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_uart *dtplat, s_dtplat; #endif static int rockchip_serial_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rockchip_uart_plat *plat = dev_get_plat(dev); /* Create some new platform data for the standard driver */ diff --git a/drivers/serial/serial_sbi.c b/drivers/serial/serial_sbi.c index b9f35ed36e6..e0372f54f9d 100644 --- a/drivers/serial/serial_sbi.c +++ b/drivers/serial/serial_sbi.c @@ -9,7 +9,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int c) { - if (CONFIG_IS_ENABLED(RISCV_SMODE)) + if (IS_ENABLED(CONFIG_RISCV_SMODE)) sbi_console_putchar(c); } diff --git a/drivers/serial/serial_semihosting.c b/drivers/serial/serial_semihosting.c index cfa1ec3148c..8c9c4f9f355 100644 --- a/drivers/serial/serial_semihosting.c +++ b/drivers/serial/serial_semihosting.c @@ -21,7 +21,7 @@ struct smh_serial_priv { unsigned counter; }; -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) static int smh_serial_getc(struct udevice *dev) { char ch = 0; diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index 4671217b59a..8f283cf616a 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -145,7 +145,7 @@ static int sh_serial_getc_generic(struct uart_port *port) return ch; } -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) static int sh_serial_pending(struct udevice *dev, bool input) { @@ -200,7 +200,7 @@ static const struct dm_serial_ops sh_serial_ops = { .setbrg = sh_serial_setbrg, }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id sh_serial_id[] ={ {.compatible = "renesas,sci", .data = PORT_SCI}, {.compatible = "renesas,scif", .data = PORT_SCIF}, @@ -244,7 +244,7 @@ U_BOOT_DRIVER(serial_sh) = { .plat_auto = sizeof(struct sh_serial_plat), .probe = sh_serial_probe, .ops = &sh_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif .priv_auto = sizeof(struct uart_port), diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c index 2ba92bf9c48..37ceca426d2 100644 --- a/drivers/serial/serial_stm32.c +++ b/drivers/serial/serial_stm32.c @@ -247,7 +247,7 @@ U_BOOT_DRIVER(serial_stm32) = { .plat_auto = sizeof(struct stm32x7_serial_plat), .ops = &stm32_serial_ops, .probe = stm32_serial_probe, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/serial/serial_xen.c b/drivers/serial/serial_xen.c index ab318b06462..fd44b6bad54 100644 --- a/drivers/serial/serial_xen.c +++ b/drivers/serial/serial_xen.c @@ -160,7 +160,7 @@ static const struct dm_serial_ops xen_serial_ops = { .pending = xen_serial_pending, }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static const struct udevice_id xen_serial_ids[] = { { .compatible = "xen,xen" }, { } @@ -170,13 +170,13 @@ static const struct udevice_id xen_serial_ids[] = { U_BOOT_DRIVER(serial_xen) = { .name = "serial_xen", .id = UCLASS_SERIAL, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_match = xen_serial_ids, #endif .priv_auto = sizeof(struct xen_uart_priv), .probe = xen_serial_probe, .ops = &xen_serial_ops, -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, #endif }; diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 702e2253581..721b2f8278b 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -13,7 +13,7 @@ #include #include #include -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) #include #endif #include @@ -113,7 +113,7 @@ struct atmel_spi_priv { unsigned int freq; /* Default frequency */ unsigned int mode; ulong bus_clk_rate; -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct gpio_desc cs_gpios[MAX_CS_COUNT]; #endif }; @@ -170,7 +170,7 @@ static int atmel_spi_release_bus(struct udevice *dev) static void atmel_spi_cs_activate(struct udevice *dev) { -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct udevice *bus = dev_get_parent(dev); struct atmel_spi_priv *priv = dev_get_priv(bus); struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev); @@ -185,7 +185,7 @@ static void atmel_spi_cs_activate(struct udevice *dev) static void atmel_spi_cs_deactivate(struct udevice *dev) { -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct udevice *bus = dev_get_parent(dev); struct atmel_spi_priv *priv = dev_get_priv(bus); struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev); @@ -353,7 +353,7 @@ static int atmel_spi_probe(struct udevice *bus) bus_plat->regs = dev_read_addr_ptr(bus); -#if CONFIG_IS_ENABLED(DM_GPIO) +#if IS_ENABLED(CONFIG_DM_GPIO) struct atmel_spi_priv *priv = dev_get_priv(bus); int i; diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c index 1a841b5dcef..68844b9d529 100644 --- a/drivers/spi/cf_spi.c +++ b/drivers/spi/cf_spi.c @@ -384,7 +384,7 @@ static int coldfire_spi_probe(struct udevice *bus) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int coldfire_dspi_of_to_plat(struct udevice *bus) { fdt_addr_t addr; @@ -450,7 +450,7 @@ static const struct dm_spi_ops coldfire_spi_ops = { U_BOOT_DRIVER(coldfire_spi) = { .name = "spi_coldfire", .id = UCLASS_SPI, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = coldfire_spi_ids, .of_to_plat = coldfire_dspi_of_to_plat, .plat_auto = sizeof(struct coldfire_spi_plat), diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 9ebc4ed48f0..fdbf7e2c1ae 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -391,7 +391,7 @@ static int davinci_spi_probe(struct udevice *bus) return 0; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int davinci_ofdata_to_platadata(struct udevice *bus) { struct davinci_spi_plat *plat = dev_get_plat(bus); @@ -418,7 +418,7 @@ static const struct udevice_id davinci_spi_ids[] = { U_BOOT_DRIVER(davinci_spi) = { .name = "davinci_spi", .id = UCLASS_SPI, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = davinci_spi_ids, .of_to_plat = davinci_ofdata_to_platadata, .plat_auto = sizeof(struct davinci_spi_plat), diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 1c7d0ca310b..84936459068 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -217,7 +217,7 @@ static int dw_spi_dwc_init(struct udevice *bus, struct dw_spi_priv *priv) static int request_gpio_cs(struct udevice *bus) { -#if CONFIG_IS_ENABLED(DM_GPIO) && !defined(CONFIG_SPL_BUILD) +#if IS_ENABLED(CONFIG_DM_GPIO) && !defined(CONFIG_SPL_BUILD) struct dw_spi_priv *priv = dev_get_priv(bus); int ret; @@ -481,7 +481,7 @@ static int poll_transfer(struct dw_spi_priv *priv) */ __weak void external_cs_manage(struct udevice *dev, bool on) { -#if CONFIG_IS_ENABLED(DM_GPIO) && !defined(CONFIG_SPL_BUILD) +#if IS_ENABLED(CONFIG_DM_GPIO) && !defined(CONFIG_SPL_BUILD) struct dw_spi_priv *priv = dev_get_priv(dev->parent); if (!dm_gpio_is_valid(&priv->cs_gpio)) @@ -727,7 +727,7 @@ static int dw_spi_remove(struct udevice *bus) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_disable(&priv->clk); if (ret) return ret; diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c index 5ce9d73570b..bf52e0b086b 100644 --- a/drivers/spi/fsl_espi.c +++ b/drivers/spi/fsl_espi.c @@ -372,7 +372,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl) * 10), spi_freq);/* Set eSPI BRG clock source */ } -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs < ESPI_MAX_CS_NUM; @@ -541,7 +541,7 @@ static const struct dm_spi_ops fsl_espi_ops = { .set_mode = fsl_espi_set_mode, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int fsl_espi_of_to_plat(struct udevice *bus) { fdt_addr_t addr; @@ -572,7 +572,7 @@ static const struct udevice_id fsl_espi_ids[] = { U_BOOT_DRIVER(fsl_espi) = { .name = "fsl_espi", .id = UCLASS_SPI, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = fsl_espi_ids, .of_to_plat = fsl_espi_of_to_plat, #endif diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 9142ffd2387..b57e1c8b26d 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -114,7 +114,7 @@ static bool ich9_can_do_33mhz(struct udevice *dev) struct ich_spi_priv *priv = dev_get_priv(dev); u32 fdod, speed; - if (!CONFIG_IS_ENABLED(PCI) || !priv->pch) + if (!IS_ENABLED(CONFIG_PCI) || !priv->pch) return false; /* Observe SPI Descriptor Component Section 0 */ dm_pci_write_config32(priv->pch, 0xb0, 0x1000); @@ -604,7 +604,7 @@ static int ich_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /** * ich_spi_get_basics() - Get basic information about the ICH device * @@ -672,7 +672,7 @@ static int ich_get_mmap_bus(struct udevice *bus, ulong *map_basep, uint *map_sizep, uint *offsetp) { pci_dev_t spi_bdf; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) if (device_is_on_pci_bus(bus)) { struct pci_child_plat *pplat; @@ -940,7 +940,7 @@ static int ich_spi_of_to_plat(struct udevice *dev) { struct ich_spi_plat *plat = dev_get_plat(dev); -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) struct ich_spi_priv *priv = dev_get_priv(dev); int ret; diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h index 8fd150d44a4..9c87c6196bc 100644 --- a/drivers/spi/ich.h +++ b/drivers/spi/ich.h @@ -231,7 +231,7 @@ struct ich_spi_priv { }; struct ich_spi_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_intel_fast_spi dtplat; #endif enum ich_version ich_version; /* Controller version, 7 or 9 */ diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c index 52882e8b263..49565a636f2 100644 --- a/drivers/spi/mvebu_a3700_spi.c +++ b/drivers/spi/mvebu_a3700_spi.c @@ -47,7 +47,7 @@ struct mvebu_spi_plat { static void spi_cs_activate(struct mvebu_spi_plat *plat, int cs) { - if (CONFIG_IS_ENABLED(DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs])) + if (IS_ENABLED(CONFIG_DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs])) dm_gpio_set_value(&plat->cs_gpios[cs], 1); else setbits_le32(&plat->spireg->ctrl, MVEBU_SPI_A3700_SPI_EN_0 << cs); @@ -55,7 +55,7 @@ static void spi_cs_activate(struct mvebu_spi_plat *plat, int cs) static void spi_cs_deactivate(struct mvebu_spi_plat *plat, int cs) { - if (CONFIG_IS_ENABLED(DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs])) + if (IS_ENABLED(CONFIG_DM_GPIO) && dm_gpio_is_valid(&plat->cs_gpios[cs])) dm_gpio_set_value(&plat->cs_gpios[cs], 0); else clrbits_le32(&plat->spireg->ctrl, MVEBU_SPI_A3700_SPI_EN_0 << cs); @@ -258,7 +258,7 @@ static int mvebu_spi_probe(struct udevice *bus) writel(data, ®->cfg); /* Set up CS GPIOs in device tree, if any */ - if (CONFIG_IS_ENABLED(DM_GPIO) && gpio_get_list_count(bus, "cs-gpios") > 0) { + if (IS_ENABLED(CONFIG_DM_GPIO) && gpio_get_list_count(bus, "cs-gpios") > 0) { int i; for (i = 0; i < ARRAY_SIZE(plat->cs_gpios); i++) { diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 840660ffe9a..a36429d273b 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -130,7 +130,7 @@ static inline struct mxc_spi_slave *to_mxc_spi_slave(struct spi_slave *slave) static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs) { -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) struct udevice *dev = mxcs->dev; struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev); @@ -148,7 +148,7 @@ static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs) static void mxc_spi_cs_deactivate(struct mxc_spi_slave *mxcs) { -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) struct udevice *dev = mxcs->dev; struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev); @@ -473,7 +473,7 @@ static int mxc_spi_claim_bus_internal(struct mxc_spi_slave *mxcs, int cs) return 0; } -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { @@ -597,7 +597,7 @@ static int mxc_spi_probe(struct udevice *bus) if (mxcs->base == FDT_ADDR_T_NONE) return -ENODEV; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; ret = clk_get_by_index(bus, 0, &clk); if (ret) diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index 773e26bbed7..c7c7f2c5957 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -42,7 +42,7 @@ #define MXS_SSP_IMX28_CLKID_SSP0 46 struct mxs_spi_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_spi dtplat; #endif s32 frequency; /* Default clock frequency, -1 for none */ @@ -317,7 +317,7 @@ static int mxs_spi_probe(struct udevice *bus) debug("%s: probe\n", __func__); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_fsl_imx23_spi *dtplat = &plat->dtplat; struct phandle_1_arg *p1a = &dtplat->clocks[0]; @@ -440,7 +440,7 @@ static const struct dm_spi_ops mxs_spi_ops = { */ }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int mxs_of_to_plat(struct udevice *bus) { struct mxs_spi_plat *plat = dev_get_plat(bus); @@ -483,7 +483,7 @@ static const struct udevice_id mxs_spi_ids[] = { U_BOOT_DRIVER(fsl_imx23_spi) = { .name = "fsl_imx23_spi", .id = UCLASS_SPI, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = mxs_spi_ids, .of_to_plat = mxs_of_to_plat, #endif diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c index 579d6bac9b1..9785242c1ef 100644 --- a/drivers/spi/nxp_fspi.c +++ b/drivers/spi/nxp_fspi.c @@ -542,7 +542,7 @@ static void nxp_fspi_prepare_lut(struct nxp_fspi *f, fspi_writel(f, FSPI_LCKER_LOCK, f->iobase + FSPI_LCKCR); } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) static int nxp_fspi_clk_prep_enable(struct nxp_fspi *f) { int ret; @@ -865,7 +865,7 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f) int ret, i; u32 reg; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) /* the default frequency, we will change it later if necessary. */ ret = clk_set_rate(&f->clk, 20000000); if (ret < 0) @@ -963,7 +963,7 @@ static int nxp_fspi_claim_bus(struct udevice *dev) static int nxp_fspi_set_speed(struct udevice *bus, uint speed) { -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct nxp_fspi *f = dev_get_priv(bus); int ret; @@ -989,7 +989,7 @@ static int nxp_fspi_set_mode(struct udevice *bus, uint mode) static int nxp_fspi_of_to_plat(struct udevice *bus) { struct nxp_fspi *f = dev_get_priv(bus); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) int ret; #endif @@ -1015,7 +1015,7 @@ static int nxp_fspi_of_to_plat(struct udevice *bus) f->ahb_addr = map_physmem(ahb_addr, ahb_size, MAP_NOCACHE); f->memmap_phy_size = ahb_size; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_name(bus, "fspi_en", &f->clk_en); if (ret) { dev_err(bus, "failed to get fspi_en clock\n"); diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 1cbb5d46fd6..91d3fd19347 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -481,7 +481,7 @@ static const struct dm_spi_ops omap3_spi_ops = { */ }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static struct omap2_mcspi_platform_config omap2_pdata = { .regs_offset = 0, }; @@ -516,7 +516,7 @@ U_BOOT_DRIVER(omap3_spi) = { .name = "omap3_spi", .id = UCLASS_SPI, .flags = DM_FLAG_PRE_RELOC, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = omap3_spi_ids, .of_to_plat = omap3_spi_of_to_plat, .plat_auto = sizeof(struct omap3_spi_plat), diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c index 828eab3d342..4c3a7483ca6 100644 --- a/drivers/spi/pl022_spi.c +++ b/drivers/spi/pl022_spi.c @@ -286,7 +286,7 @@ static const struct dm_spi_ops pl022_spi_ops = { .cs_info = pl022_cs_info, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int pl022_spi_of_to_plat(struct udevice *bus) { struct pl022_spi_pdata *plat = dev_get_plat(bus); @@ -315,7 +315,7 @@ static const struct udevice_id pl022_spi_ids[] = { U_BOOT_DRIVER(pl022_spi) = { .name = "pl022_spi", .id = UCLASS_SPI, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .of_match = pl022_spi_ids, .of_to_plat = pl022_spi_of_to_plat, #endif diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c index cb2b8fb64de..9aa00fcacc9 100644 --- a/drivers/spi/renesas_rpc_spi.c +++ b/drivers/spi/renesas_rpc_spi.c @@ -412,7 +412,7 @@ static int rpc_spi_probe(struct udevice *dev) priv->regs = plat->regs; priv->extr = plat->extr; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_enable(&priv->clk); #endif return 0; @@ -425,7 +425,7 @@ static int rpc_spi_of_to_plat(struct udevice *bus) plat->regs = dev_read_addr_index(bus, 0); plat->extr = dev_read_addr_index(bus, 1); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct rpc_spi_priv *priv = dev_get_priv(bus); int ret; diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c index 66b20fce9ba..6415c2f68ba 100644 --- a/drivers/spi/rk_spi.c +++ b/drivers/spi/rk_spi.c @@ -41,7 +41,7 @@ struct rockchip_spi_params { }; struct rockchip_spi_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_rockchip_rk3288_spi of_plat; #endif s32 frequency; /* Default clock frequency, -1 for none */ @@ -173,7 +173,7 @@ static void spi_cs_deactivate(struct udevice *dev, uint cs) priv->last_transaction_us = timer_get_us(); } -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) static int conv_of_plat(struct udevice *dev) { struct rockchip_spi_plat *plat = dev_get_plat(dev); @@ -197,7 +197,7 @@ static int rockchip_spi_of_to_plat(struct udevice *bus) struct rockchip_spi_priv *priv = dev_get_priv(bus); int ret; - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { plat->base = dev_read_addr(bus); ret = clk_get_by_index(bus, 0, &priv->clk); @@ -257,7 +257,7 @@ static int rockchip_spi_probe(struct udevice *bus) int ret; debug("%s: probe\n", __func__); -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = conv_of_plat(bus); if (ret) return ret; diff --git a/drivers/spi/rockchip_sfc.c b/drivers/spi/rockchip_sfc.c index 851a6482985..0c0c663a9f7 100644 --- a/drivers/spi/rockchip_sfc.c +++ b/drivers/spi/rockchip_sfc.c @@ -232,7 +232,7 @@ static int rockchip_sfc_ofdata_to_platdata(struct udevice *bus) else sfc->use_dma = true; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) int ret; ret = clk_get_by_index(bus, 0, &sfc->clk); @@ -256,7 +256,7 @@ static int rockchip_sfc_probe(struct udevice *bus) struct rockchip_sfc *sfc = dev_get_plat(bus); int ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&sfc->hclk); if (ret) dev_dbg(sfc->dev, "sfc Enable ahb clock fail %s: %d\n", bus->name, ret); @@ -278,7 +278,7 @@ static int rockchip_sfc_probe(struct udevice *bus) return 0; err_init: -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&sfc->clk); clk_disable(&sfc->hclk); #endif @@ -599,7 +599,7 @@ static int rockchip_sfc_set_speed(struct udevice *bus, uint speed) if (speed == sfc->speed) return 0; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) int ret = clk_set_rate(&sfc->clk, speed); if (ret < 0) { diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c index 861423bef3f..54981769d38 100644 --- a/drivers/spi/sh_qspi.c +++ b/drivers/spi/sh_qspi.c @@ -70,7 +70,7 @@ struct sh_qspi_regs { }; struct sh_qspi_slave { -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) struct spi_slave slave; #endif struct sh_qspi_regs *regs; @@ -225,7 +225,7 @@ static int sh_qspi_xfer_common(struct sh_qspi_slave *ss, unsigned int bitlen, return ret; } -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) static inline struct sh_qspi_slave *to_sh_qspi(struct spi_slave *slave) { return container_of(slave, struct sh_qspi_slave, slave); diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index c929e7c1d0e..ddb7995ebfe 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -177,7 +177,7 @@ int spi_write_then_read(struct spi_slave *slave, const u8 *opcode, return ret; } -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static int spi_child_post_bind(struct udevice *dev) { struct dm_spi_slave_plat *plat = dev_get_parent_plat(dev); @@ -191,7 +191,7 @@ static int spi_child_post_bind(struct udevice *dev) static int spi_post_probe(struct udevice *bus) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct dm_spi_bus *spi = dev_get_uclass_priv(bus); spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0); @@ -363,7 +363,7 @@ int spi_get_bus_and_cs(int busnum, int cs, struct udevice **busp, struct spi_slave *slave; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = uclass_first_device_err(UCLASS_SPI, &bus); #else ret = uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus); @@ -422,7 +422,7 @@ int _spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, bool created = false; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) ret = uclass_first_device_err(UCLASS_SPI, &bus); #else ret = uclass_get_device_by_seq(UCLASS_SPI, busnum, &bus); @@ -602,7 +602,7 @@ UCLASS_DRIVER(spi) = { .id = UCLASS_SPI, .name = "spi", .flags = DM_UC_FLAG_SEQ_ALIAS, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif .post_probe = spi_post_probe, @@ -610,7 +610,7 @@ UCLASS_DRIVER(spi) = { .per_device_auto = sizeof(struct dm_spi_bus), .per_child_auto = sizeof(struct spi_slave), .per_child_plat_auto = sizeof(struct dm_spi_slave_plat), -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .child_post_bind = spi_child_post_bind, #endif }; diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 99acb108823..cb5aa2ccd02 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -417,7 +417,7 @@ static int ti_qspi_probe(struct udevice *bus) static void *map_syscon_chipselects(struct udevice *bus) { -#if CONFIG_IS_ENABLED(SYSCON) +#if IS_ENABLED(CONFIG_SYSCON) struct udevice *syscon; struct regmap *regmap; const fdt32_t *cell; diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c index 0ee286cbb34..874c021c9b7 100644 --- a/drivers/sysreset/sysreset_sandbox.c +++ b/drivers/sysreset/sysreset_sandbox.c @@ -133,7 +133,7 @@ U_BOOT_DRIVER(warm_sysreset_sandbox) = { .ops = &sandbox_warm_sysreset_ops, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) /* This is here in case we don't have a device tree */ U_BOOT_DRVINFO(sysreset_sandbox_non_fdt) = { .name = "sysreset_sandbox", diff --git a/drivers/timer/andes_plmt_timer.c b/drivers/timer/andes_plmt_timer.c index 42dd4b62317..6417fcb9c9a 100644 --- a/drivers/timer/andes_plmt_timer.c +++ b/drivers/timer/andes_plmt_timer.c @@ -23,7 +23,7 @@ static u64 notrace andes_plmt_get_count(struct udevice *dev) return readq((void __iomem *)MTIME_REG(dev_get_priv(dev))); } -#if CONFIG_IS_ENABLED(RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) +#if IS_ENABLED(CONFIG_RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) /** * timer_early_get_rate() - Get the timer rate before driver model */ diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c index 2eff45060ad..0c580e59147 100644 --- a/drivers/timer/cadence-ttc.c +++ b/drivers/timer/cadence-ttc.c @@ -36,7 +36,7 @@ struct cadence_ttc_priv { struct cadence_ttc_regs *regs; }; -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) ulong timer_get_boot_us(void) { u64 ticks = 0; diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c index 10f0a9f646e..1ab7c34b7a8 100644 --- a/drivers/timer/dw-apb-timer.c +++ b/drivers/timer/dw-apb-timer.c @@ -28,7 +28,7 @@ struct dw_apb_timer_priv { }; struct dw_apb_timer_plat { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dtd_snps_dw_apb_timer dtplat; #endif }; @@ -51,7 +51,7 @@ static int dw_apb_timer_probe(struct udevice *dev) struct dw_apb_timer_priv *priv = dev_get_priv(dev); struct clk clk; int ret; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct dw_apb_timer_plat *plat = dev_get_plat(dev); struct dtd_snps_dw_apb_timer *dtplat = &plat->dtplat; @@ -63,7 +63,7 @@ static int dw_apb_timer_probe(struct udevice *dev) uc_priv->clock_rate = dtplat->clock_frequency; #endif - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { ret = reset_get_bulk(dev, &priv->resets); if (ret) dev_warn(dev, "Can't get reset: %d\n", ret); @@ -89,7 +89,7 @@ static int dw_apb_timer_probe(struct udevice *dev) static int dw_apb_timer_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct dw_apb_timer_priv *priv = dev_get_priv(dev); priv->regs = dev_read_addr(dev); diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c index aa2e4360c1b..da0d8b063df 100644 --- a/drivers/timer/omap-timer.c +++ b/drivers/timer/omap-timer.c @@ -84,7 +84,7 @@ static int omap_timer_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) ulong timer_get_boot_us(void) { u64 ticks = 0; diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c index 3ec729d2c43..75357766e57 100644 --- a/drivers/timer/ostm_timer.c +++ b/drivers/timer/ostm_timer.c @@ -40,7 +40,7 @@ static int ostm_probe(struct udevice *dev) { struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct ostm_priv *priv = dev_get_priv(dev); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; int ret; diff --git a/drivers/timer/riscv_timer.c b/drivers/timer/riscv_timer.c index 3627ed79b81..60a649a605f 100644 --- a/drivers/timer/riscv_timer.c +++ b/drivers/timer/riscv_timer.c @@ -31,7 +31,7 @@ static u64 notrace riscv_timer_get_count(struct udevice *dev) return ((u64)hi << 32) | lo; } -#if CONFIG_IS_ENABLED(RISCV_SMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) +#if IS_ENABLED(CONFIG_RISCV_SMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) /** * timer_early_get_rate() - Get the timer rate before driver model */ diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c index 62eacb98689..bc3a5b09183 100644 --- a/drivers/timer/rockchip_timer.c +++ b/drivers/timer/rockchip_timer.c @@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct rockchip_timer_plat { struct dtd_rockchip_rk3368_timer dtd; }; @@ -41,7 +41,7 @@ static inline int64_t rockchip_timer_get_curr_value(struct rk_timer *timer) return cntr; } -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) ulong timer_get_boot_us(void) { uint64_t ticks = 0; @@ -55,7 +55,7 @@ ulong timer_get_boot_us(void) /* The timer is available */ rate = timer_get_rate(gd->timer); timer_get_count(gd->timer, &ticks); - } else if (CONFIG_IS_ENABLED(OF_REAL) && ret == -EAGAIN) { + } else if (IS_ENABLED(CONFIG_OF_REAL) && ret == -EAGAIN) { /* We have been called so early that the DM is not ready,... */ ofnode node = offset_to_ofnode(-1); struct rk_timer *timer = NULL; @@ -98,7 +98,7 @@ static u64 rockchip_timer_get_count(struct udevice *dev) static int rockchip_clk_of_to_plat(struct udevice *dev) { - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct rockchip_timer_priv *priv = dev_get_priv(dev); priv->timer = dev_read_addr_ptr(dev); @@ -135,7 +135,7 @@ static int rockchip_timer_start(struct udevice *dev) static int rockchip_timer_probe(struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct rockchip_timer_priv *priv = dev_get_priv(dev); struct rockchip_timer_plat *plat = dev_get_plat(dev); @@ -165,7 +165,7 @@ U_BOOT_DRIVER(rockchip_rk3368_timer) = { .probe = rockchip_timer_probe, .ops = &rockchip_timer_ops, .priv_auto = sizeof(struct rockchip_timer_priv), -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) .plat_auto = sizeof(struct rockchip_timer_plat), #endif .of_to_plat = rockchip_clk_of_to_plat, diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c index c846bfb9f12..740dc2a2271 100644 --- a/drivers/timer/sandbox_timer.c +++ b/drivers/timer/sandbox_timer.c @@ -38,7 +38,7 @@ static int sandbox_timer_probe(struct udevice *dev) { struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); - if (CONFIG_IS_ENABLED(CPU) && + if (IS_ENABLED(CONFIG_CPU) && dev_read_bool(dev, "sandbox,timebase-frequency-fallback")) return timer_timebase_fallback(dev); else if (!uc_priv->clock_rate) diff --git a/drivers/timer/sifive_clint_timer.c b/drivers/timer/sifive_clint_timer.c index 939b99d937d..fa81e7b42fa 100644 --- a/drivers/timer/sifive_clint_timer.c +++ b/drivers/timer/sifive_clint_timer.c @@ -20,7 +20,7 @@ static u64 notrace sifive_clint_get_count(struct udevice *dev) return readq((void __iomem *)MTIME_REG(dev_get_priv(dev))); } -#if CONFIG_IS_ENABLED(RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) +#if IS_ENABLED(CONFIG_RISCV_MMODE) && IS_ENABLED(CONFIG_TIMER_EARLY) /** * timer_early_get_rate() - Get the timer rate before driver model */ diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c index bb719792135..1085ccb7038 100644 --- a/drivers/timer/timer-uclass.c +++ b/drivers/timer/timer-uclass.c @@ -64,7 +64,7 @@ static int timer_pre_probe(struct udevice *dev) } } - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct clk timer_clk; int err; @@ -101,7 +101,7 @@ static int timer_post_probe(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(CPU) +#if IS_ENABLED(CONFIG_CPU) int timer_timebase_fallback(struct udevice *dev) { struct udevice *cpu; @@ -152,7 +152,7 @@ int notrace dm_timer_init(void) if (gd->dm_root == NULL) return -EAGAIN; - if (CONFIG_IS_ENABLED(OF_REAL)) { + if (IS_ENABLED(CONFIG_OF_REAL)) { /* Check for a chosen timer to be used for tick */ node = ofnode_get_chosen_node("tick-timer"); diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 192c7b71a5a..b7a90f62d09 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -54,7 +54,7 @@ static unsigned long native_calibrate_tsc(void) return 0; crystal_freq = tsc_info.ecx / 1000; - if (!CONFIG_IS_ENABLED(X86_TSC_TIMER_NATIVE) && !crystal_freq) { + if (!IS_ENABLED(CONFIG_X86_TSC_TIMER_NATIVE) && !crystal_freq) { switch (gd->arch.x86_model) { case INTEL_FAM6_SKYLAKE_MOBILE: case INTEL_FAM6_SKYLAKE_DESKTOP: @@ -409,7 +409,7 @@ static void tsc_timer_ensure_setup(bool early) goto done; /* Reduce code size by dropping other methods */ - if (CONFIG_IS_ENABLED(X86_TSC_TIMER_NATIVE)) + if (IS_ENABLED(CONFIG_X86_TSC_TIMER_NATIVE)) panic("no timer"); fast_calibrate = cpu_mhz_from_cpuid(); @@ -479,7 +479,7 @@ static const struct timer_ops tsc_timer_ops = { .get_count = tsc_timer_get_count, }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) static const struct udevice_id tsc_timer_ids[] = { { .compatible = "x86,tsc-timer", }, { } diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c index b2286f7e7ed..66195e49519 100644 --- a/drivers/tpm/tpm-uclass.c +++ b/drivers/tpm/tpm-uclass.c @@ -177,7 +177,7 @@ UCLASS_DRIVER(tpm) = { .id = UCLASS_TPM, .name = "tpm", .flags = DM_UC_FLAG_SEQ_ALIAS, -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) .post_bind = dm_scan_fdt_dev, #endif .post_probe = tpm_uclass_post_probe, diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c index de9cf8f21e0..116d928a3d7 100644 --- a/drivers/tpm/tpm2_tis_spi.c +++ b/drivers/tpm/tpm2_tis_spi.c @@ -228,7 +228,7 @@ static int tpm_tis_spi_probe(struct udevice *dev) /* Use the TPM v2 stack */ priv->version = TPM_V2; - if (CONFIG_IS_ENABLED(DM_GPIO)) { + if (IS_ENABLED(CONFIG_DM_GPIO)) { struct gpio_desc reset_gpio; ret = gpio_request_by_name(dev, "reset-gpios", 0, diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index 644a9791b9c..2d2da75d4f7 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -160,7 +160,7 @@ static int cdns3_core_init_role(struct cdns3 *cdns) } #endif -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_PERIPHERAL) { ret = cdns3_gadget_init(cdns); if (ret) { @@ -410,7 +410,7 @@ int cdns3_bind(struct udevice *parent) driver = "cdns-usb3-host"; break; #endif -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) case USB_DR_MODE_PERIPHERAL: debug("%s: dr_mode: PERIPHERAL\n", __func__); driver = "cdns-usb3-peripheral"; @@ -436,7 +436,7 @@ fail: return 0; } -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) static int cdns3_gadget_probe(struct udevice *dev) { struct cdns3_gadget_priv *priv = dev_get_priv(dev); diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c index cff86a51ae0..171baece668 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c @@ -91,7 +91,7 @@ enum usb_device_speed usb_get_maximum_speed(ofnode node) return USB_SPEED_UNKNOWN; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static const char *const usbphy_modes[] = { [USBPHY_INTERFACE_MODE_UNKNOWN] = "", [USBPHY_INTERFACE_MODE_UTMI] = "utmi", diff --git a/drivers/usb/common/usb_urb.c b/drivers/usb/common/usb_urb.c index be3b6b9f32e..eb05eecaea3 100644 --- a/drivers/usb/common/usb_urb.c +++ b/drivers/usb/common/usb_urb.c @@ -13,7 +13,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct usb_device *usb_dev_get_parent(struct usb_device *udev) { struct udevice *parent = udev->dev->parent; diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 49f6a1900b0..889f50515c1 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1010,7 +1010,7 @@ MODULE_AUTHOR("Felipe Balbi "); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver"); -#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_PHY) && IS_ENABLED(CONFIG_DM_USB) int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys) { int ret; @@ -1040,7 +1040,7 @@ int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys) } #endif -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) void dwc3_of_parse(struct dwc3 *dwc) { const u8 *tmp; diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 532746dd88d..4265b7922fc 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -760,7 +760,7 @@ struct dwc3 { /* device lock */ spinlock_t lock; -#if defined(__UBOOT__) && CONFIG_IS_ENABLED(DM_USB) +#if defined(__UBOOT__) && IS_ENABLED(CONFIG_DM_USB) struct udevice *dev; #else struct device *dev; diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 78966718d01..5951ce65876 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -65,7 +65,7 @@ static int dwc3_generic_probe(struct udevice *dev, dwc3->dev = dev; dwc3->maximum_speed = plat->maximum_speed; dwc3->dr_mode = plat->dr_mode; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) dwc3_of_parse(dwc3); node = dev_ofnode(dev->parent); @@ -89,7 +89,7 @@ static int dwc3_generic_probe(struct udevice *dev, if (rc && rc != -ENOTSUPP) return rc; - if (CONFIG_IS_ENABLED(DM_GPIO) && + if (IS_ENABLED(CONFIG_DM_GPIO) && device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) { rc = gpio_request_by_name(dev->parent, "reset-gpios", 0, &priv->ulpi_reset, GPIOD_ACTIVE_LOW); @@ -131,7 +131,7 @@ static int dwc3_generic_remove(struct udevice *dev, { struct dwc3 *dwc3 = &priv->dwc3; - if (CONFIG_IS_ENABLED(DM_GPIO) && + if (IS_ENABLED(CONFIG_DM_GPIO) && device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) { struct gpio_desc *ulpi_reset = &priv->ulpi_reset; @@ -177,7 +177,7 @@ static int dwc3_generic_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) int dm_usb_gadget_handle_interrupts(struct udevice *dev) { struct dwc3_generic_priv *priv = dev_get_priv(dev); @@ -420,7 +420,7 @@ static int dwc3_glue_bind(struct udevice *parent) switch (dr_mode) { case USB_DR_MODE_PERIPHERAL: case USB_DR_MODE_OTG: -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) debug("%s: dr_mode: OTG or Peripheral\n", __func__); driver = "dwc3-generic-peripheral"; #endif @@ -482,7 +482,7 @@ static int dwc3_glue_clk_init(struct udevice *dev, if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable_bulk(&glue->clks); if (ret) { clk_release_bulk(&glue->clks); diff --git a/drivers/usb/dwc3/dwc3-layerscape.c b/drivers/usb/dwc3/dwc3-layerscape.c index 79cf71f7a85..cce8f17474e 100644 --- a/drivers/usb/dwc3/dwc3-layerscape.c +++ b/drivers/usb/dwc3/dwc3-layerscape.c @@ -46,7 +46,7 @@ static int dwc3_layerscape_probe(struct udevice *dev, dwc3->dev = dev; dwc3->maximum_speed = plat->maximum_speed; dwc3->dr_mode = plat->dr_mode; - if (CONFIG_IS_ENABLED(OF_CONTROL)) + if (IS_ENABLED(CONFIG_OF_CONTROL)) dwc3_of_parse(dwc3); rc = dwc3_setup_phy(dev, &priv->phys); @@ -99,7 +99,7 @@ static int dwc3_layerscape_of_to_plat(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) int dm_usb_gadget_handle_interrupts(struct udevice *dev) { struct dwc3_layerscape_priv *priv = dev_get_priv(dev); @@ -188,7 +188,7 @@ static int dwc3_layerscape_bind(struct udevice *dev) dr_mode = usb_get_dr_mode(node); switch (dr_mode) { -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) case USB_DR_MODE_PERIPHERAL: dev_dbg(dev, "Using peripheral mode\n"); driver = "dwc3-layerscape-peripheral"; diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 90418ddc1da..a3c54638f89 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -116,7 +116,7 @@ struct dwc3_meson_g12a { enum usb_dr_mode otg_phy_mode; unsigned int usb2_ports; unsigned int usb3_ports; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *vbus_supply; #endif }; @@ -274,7 +274,7 @@ int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) else debug("%s: switching to Device Mode\n", __func__); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) { int ret = regulator_set_enable(priv->vbus_supply, (mode == USB_DR_MODE_PERIPHERAL)); @@ -343,7 +343,7 @@ static int dwc3_meson_g12a_clk_init(struct dwc3_meson_g12a *priv) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&priv->clk); if (ret) { clk_free(&priv->clk); @@ -377,7 +377,7 @@ static int dwc3_meson_g12a_probe(struct udevice *dev) if (ret) return ret; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); if (ret && ret != -ENOENT) { diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 6c6d463203c..7e155623814 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -116,7 +116,7 @@ struct dwc3_meson_gxl { enum usb_dr_mode otg_mode; enum usb_dr_mode otg_phy_mode; unsigned int usb2_ports; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *vbus_supply; #endif }; @@ -215,7 +215,7 @@ int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) else debug("%s: switching to Device Mode\n", __func__); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) { int ret = regulator_set_enable(priv->vbus_supply, (mode == USB_DR_MODE_PERIPHERAL)); @@ -282,7 +282,7 @@ static int dwc3_meson_gxl_clk_init(struct dwc3_meson_gxl *priv) if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable(&priv->clk); if (ret) { clk_free(&priv->clk); @@ -316,7 +316,7 @@ static int dwc3_meson_gxl_probe(struct udevice *dev) if (ret) return ret; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); if (ret && ret != -ENOENT) { diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index b9258d73575..88285748e14 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -1022,7 +1022,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) if (!driver->bind || !driver->setup || !driver->disconnect) return -EINVAL; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) ret = usb_setup_ehci_gadget(&controller.ctrl); #else ret = usb_lowlevel_init(0, USB_INIT_DEVICE, (void **)&controller.ctrl); @@ -1057,7 +1057,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) free(controller.items_mem); free(controller.epts); -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) usb_remove_ehci_gadget(&controller.ctrl); #else usb_lowlevel_stop(0); diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 2a309e624e1..2b59f24d5bf 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1158,7 +1158,7 @@ unknown: /* * OS descriptors handling */ - if (CONFIG_IS_ENABLED(USB_GADGET_OS_DESCRIPTORS) && cdev->use_os_string && + if (IS_ENABLED(CONFIG_USB_GADGET_OS_DESCRIPTORS) && cdev->use_os_string && cdev->os_desc_config && (ctrl->bRequestType & USB_TYPE_VENDOR) && ctrl->bRequest == cdev->b_vendor_code) { struct usb_configuration *os_desc_cfg; diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 2bf7ed8d604..6dae5d066d7 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -244,7 +244,7 @@ static int dwc2_gadget_pullup(struct usb_gadget *g, int is_on) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB_GADGET) +#if !IS_ENABLED(CONFIG_DM_USB_GADGET) /* Register entry point for the peripheral controller driver. */ @@ -317,7 +317,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) udc_disable(dev); return 0; } -#else /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */ +#else /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */ static int dwc2_gadget_start(struct usb_gadget *g, struct usb_gadget_driver *driver) @@ -362,7 +362,7 @@ static int dwc2_gadget_stop(struct usb_gadget *g) return 0; } -#endif /* !CONFIG_IS_ENABLED(DM_USB_GADGET) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB_GADGET) */ /* * done - retire a request; caller blocked irqs @@ -815,7 +815,7 @@ static void dwc2_fifo_flush(struct usb_ep *_ep) static const struct usb_gadget_ops dwc2_udc_ops = { .pullup = dwc2_gadget_pullup, /* current versions must always be self-powered */ -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) .udc_start = dwc2_gadget_start, .udc_stop = dwc2_gadget_stop, #endif @@ -941,14 +941,14 @@ int dwc2_udc_handle_interrupt(void) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB_GADGET) +#if !IS_ENABLED(CONFIG_DM_USB_GADGET) int usb_gadget_handle_interrupts(int index) { return dwc2_udc_handle_interrupt(); } -#else /* CONFIG_IS_ENABLED(DM_USB_GADGET) */ +#else /* IS_ENABLED(CONFIG_DM_USB_GADGET) */ struct dwc2_priv_data { struct clk_bulk clks; @@ -1117,7 +1117,7 @@ static int dwc2_udc_otg_probe(struct udevice *dev) return ret; if (plat->activate_stm_id_vb_detection) { - if (CONFIG_IS_ENABLED(DM_REGULATOR) && + if (IS_ENABLED(CONFIG_DM_REGULATOR) && (!plat->force_b_session_valid || plat->force_vbus_detection)) { ret = device_get_supply_regulator(dev, "usb33d-supply", @@ -1208,4 +1208,4 @@ int dwc2_udc_B_session_valid(struct udevice *dev) return readl(&usbotg_reg->gotgctl) & B_SESSION_VALID; } -#endif /* CONFIG_IS_ENABLED(DM_USB_GADGET) */ +#endif /* IS_ENABLED(CONFIG_DM_USB_GADGET) */ diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 6d97b4bbdc3..8967064224a 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -545,7 +545,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) fastboot_func->in_req->complete = compl_do_reset; break; case FASTBOOT_COMMAND_ACMD: - if (CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)) + if (IS_ENABLED(CONFIG_FASTBOOT_UUU_SUPPORT)) fastboot_func->in_req->complete = do_acmd_complete; break; } diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c index de8861829c7..70491ec7275 100644 --- a/drivers/usb/gadget/udc/udc-uclass.c +++ b/drivers/usb/gadget/udc/udc-uclass.c @@ -11,7 +11,7 @@ #include #include -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) #define MAX_UDC_DEVICES 4 static struct udevice *dev_array[MAX_UDC_DEVICES]; int usb_gadget_initialize(int index) @@ -37,7 +37,7 @@ int usb_gadget_initialize(int index) int usb_gadget_release(int index) { -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int ret; if (index < 0 || index >= ARRAY_SIZE(dev_array)) return -EINVAL; diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 23060fc369c..19ae2f56a68 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -37,7 +37,7 @@ #define MAX_ENDPOINT 16 struct dwc2_priv { -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) uint8_t aligned_buffer[DWC2_DATA_BUF_SIZE] __aligned(ARCH_DMA_MINALIGN); uint8_t status_buffer[DWC2_STATUS_BUF_SIZE] __aligned(ARCH_DMA_MINALIGN); #ifdef CONFIG_DM_REGULATOR @@ -64,7 +64,7 @@ struct dwc2_priv { struct reset_ctl_bulk resets; }; -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* We need cacheline-aligned buffers for DMA transfers and dcache support */ DEFINE_ALIGN_BUFFER(uint8_t, aligned_buffer_addr, DWC2_DATA_BUF_SIZE, ARCH_DMA_MINALIGN); @@ -181,7 +181,7 @@ static void dwc_otg_core_reset(struct udevice *dev, mdelay(100); } -#if CONFIG_IS_ENABLED(DM_USB) && defined(CONFIG_DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_USB) && defined(CONFIG_DM_REGULATOR) static int dwc_vbus_supply_init(struct udevice *dev) { struct dwc2_priv *priv = dev_get_priv(dev); @@ -224,7 +224,7 @@ static int dwc_vbus_supply_init(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int dwc_vbus_supply_exit(struct udevice *dev) { return 0; @@ -1133,7 +1133,7 @@ int _submit_int_msg(struct dwc2_priv *priv, struct usb_device *dev, timeout = get_timer(0) + USB_TIMEOUT_MS(pipe); for (;;) { if (get_timer(0) > timeout) { -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) dev_err(dev->dev, "Timeout poll on interrupt endpoint\n"); #else @@ -1252,7 +1252,7 @@ static void dwc2_uninit_common(struct dwc2_core_regs *regs) DWC2_HPRT0_PRTRST); } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int len, struct devrequest *setup) { @@ -1298,7 +1298,7 @@ int usb_lowlevel_stop(int index) } #endif -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int dwc2_submit_control_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, struct devrequest *setup) diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c index 66b3e96b007..05e9260728e 100644 --- a/drivers/usb/host/dwc3-of-simple.c +++ b/drivers/usb/host/dwc3-of-simple.c @@ -51,7 +51,7 @@ static int dwc3_of_simple_clk_init(struct udevice *dev, if (ret) return ret; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_enable_bulk(&simple->clks); if (ret) { clk_release_bulk(&simple->clks); diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index fba3595e10f..fad1885f8da 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -16,7 +16,7 @@ #include "ehci.h" -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9839aa17492..30fb7acc329 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -31,7 +31,7 @@ */ #define HCHALT_TIMEOUT (8 * 1000) -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) static struct ehci_ctrl ehcic[CONFIG_USB_MAX_CONTROLLER_COUNT]; #endif @@ -112,7 +112,7 @@ static struct descriptor { static struct ehci_ctrl *ehci_get_ctrl(struct usb_device *udev) { -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) return dev_get_priv(usb_get_bus(udev->dev)); #else return udev->controller; @@ -1028,7 +1028,7 @@ static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) } } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) void ehci_set_controller_priv(int index, void *priv, const struct ehci_ops *ops) { struct ehci_ctrl *ctrl = &ehcic[index]; @@ -1152,7 +1152,7 @@ static int ehci_common_init(struct ehci_ctrl *ctrl, uint tweaks) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int usb_lowlevel_stop(int index) { ehci_shutdown(&ehcic[index]); @@ -1578,7 +1578,7 @@ static int _ehci_lock_async(struct ehci_ctrl *ctrl, int lock) return ehci_disable_async(ctrl); } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int length) { @@ -1624,7 +1624,7 @@ int usb_lock_async(struct usb_device *dev, int lock) } #endif -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int ehci_submit_control_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, struct devrequest *setup) diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 6093c8fb0b6..358a2ff4e3d 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR; /* * USB 2.0 Bridge Address Decoding registers setup */ -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct ehci_mvebu_priv { struct ehci_ctrl ehci; @@ -268,4 +268,4 @@ int ehci_hcd_stop(int index) return 0; } -#endif /* CONFIG_IS_ENABLED(DM_USB) */ +#endif /* IS_ENABLED(CONFIG_DM_USB) */ diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 91633f013a5..7eec3d33a5f 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -285,7 +285,7 @@ static void usb_oc_config(struct usbnc_regs *usbnc, int index) } #endif -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /** * board_usb_phy_mode - override usb phy mode * @port: usb host/otg port @@ -477,7 +477,7 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev) #endif #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) { int ret; ret = regulator_set_enable(priv->vbus_supply, @@ -657,7 +657,7 @@ static int ehci_usb_probe(struct udevice *dev) priv->init_type = type; priv->phy_type = usb_get_phy_mode(dev_ofnode(dev)); -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) return ret; @@ -685,7 +685,7 @@ static int ehci_usb_probe(struct udevice *dev) priv->init_type = plat->init_type; } -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); if (ret) @@ -705,7 +705,7 @@ static int ehci_usb_probe(struct udevice *dev) #endif #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) { ret = regulator_set_enable(priv->vbus_supply, (type == USB_INIT_DEVICE) ? @@ -746,12 +746,12 @@ err_phy: generic_shutdown_phy(&priv->phy); err_regulator: #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) regulator_set_enable(priv->vbus_supply, false); #endif err_clk: -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&priv->clk); #else /* Compatibility with DM_USB and !CLK */ @@ -770,12 +770,12 @@ int ehci_usb_remove(struct udevice *dev) generic_shutdown_phy(&priv->phy); #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) regulator_set_enable(priv->vbus_supply, false); #endif -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_disable(&priv->clk); #endif diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c index 147b2fa145d..38a7b877ffc 100644 --- a/drivers/usb/host/ehci-mxs.c +++ b/drivers/usb/host/ehci-mxs.c @@ -228,7 +228,7 @@ static int ehci_usb_probe(struct udevice *dev) type == USB_INIT_HOST ? "HOST" : "DEVICE", port->usb_regs, (uint32_t *)port->phy_regs); -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); if (ret) @@ -262,7 +262,7 @@ static int ehci_usb_remove(struct udevice *dev) if (ret) return ret; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) if (priv->vbus_supply) { ret = regulator_set_enable(priv->vbus_supply, false); if (ret) { diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index e98ab312618..66a56c3f3b3 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -21,7 +21,7 @@ struct ehci_pci_priv { struct phy phy; }; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int ehci_pci_init(struct udevice *dev, struct ehci_hccr **ret_hccr, struct ehci_hcor **ret_hcor) { @@ -124,9 +124,9 @@ int ehci_hcd_stop(int index) { return 0; } -#endif /* !CONFIG_IS_ENABLED(DM_USB) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB) */ -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int ehci_pci_probe(struct udevice *dev) { struct ehci_hccr *hccr; @@ -176,4 +176,4 @@ static struct pci_device_id ehci_pci_supported[] = { U_BOOT_PCI_DEVICE(ehci_pci, ehci_pci_supported); -#endif /* CONFIG_IS_ENABLED(DM_USB) */ +#endif /* IS_ENABLED(CONFIG_DM_USB) */ diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c index 648e136447d..798b19f382a 100644 --- a/drivers/usb/host/ehci-vf.c +++ b/drivers/usb/host/ehci-vf.c @@ -156,7 +156,7 @@ int ehci_vf_common_init(struct usb_ehci *ehci, int index) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 33c4a911a09..a8769b77bfd 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -86,7 +86,7 @@ int usb_cpu_init_fail(void) return usb_cpu_stop(); } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int ohci_da8xx_probe(struct udevice *dev) { struct ohci_regs *regs = dev_read_addr_ptr(dev); diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 3f4418198cc..a556ebecb67 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -98,7 +98,7 @@ #define invalidate_dcache_iso_td(addr) invalidate_dcache_buffer(addr, 32) #define invalidate_dcache_hcca(addr) invalidate_dcache_buffer(addr, 256) -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /* * The various ohci_mdelay(1) calls in the code seem unnecessary. We keep * them around when building for older boards not yet converted to the dm @@ -109,7 +109,7 @@ #define ohci_mdelay(x) mdelay(x) #endif -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* global ohci_t */ static ohci_t gohci; /* this must be aligned to a 256 byte boundary */ @@ -1667,7 +1667,7 @@ static int _ohci_destroy_int_queue(ohci_t *ohci, struct usb_device *dev, return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* submit routines called from usb.c */ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len) @@ -1956,7 +1956,7 @@ static int hc_interrupt(ohci_t *ohci) /*-------------------------------------------------------------------------*/ -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /*-------------------------------------------------------------------------*/ @@ -2044,7 +2044,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, } #endif -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int ohci_submit_control_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, struct devrequest *setup) diff --git a/drivers/usb/host/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c index a04b2961b96..5cebb410d19 100644 --- a/drivers/usb/host/ohci-lpc32xx.c +++ b/drivers/usb/host/ohci-lpc32xx.c @@ -86,7 +86,7 @@ static struct clk_pm_regs *clk_pwr = (struct clk_pm_regs *)CLK_PM_BASE; static int isp1301_set_value(struct udevice *dev, int reg, u8 value) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) return i2c_write(ISP1301_I2C_ADDR, reg, 1, &value, 1); #else return dm_i2c_write(dev, reg, &value, 1); @@ -95,7 +95,7 @@ static int isp1301_set_value(struct udevice *dev, int reg, u8 value) static void isp1301_configure(struct udevice *dev) { -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) i2c_set_bus_num(I2C_2); #endif @@ -160,7 +160,7 @@ int usb_cpu_init(void) u32 ret; struct udevice *dev = NULL; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_chip_for_busnum(I2C_2, ISP1301_I2C_ADDR, 1, &dev); if (ret) { debug("%s: No bus %d\n", __func__, I2C_2); @@ -216,7 +216,7 @@ int usb_cpu_stop(void) struct udevice *dev = NULL; int ret = 0; -#if CONFIG_IS_ENABLED(DM_I2C) +#if IS_ENABLED(CONFIG_DM_I2C) ret = i2c_get_chip_for_busnum(I2C_2, ISP1301_I2C_ADDR, 1, &dev); if (ret) { debug("%s: No bus %d\n", __func__, I2C_2); diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 87ef19074b0..976386c7432 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -28,7 +28,7 @@ #define ED_ALIGNMENT 16 #endif -#if CONFIG_IS_ENABLED(DM_USB) && ARCH_DMA_MINALIGN > 32 +#if IS_ENABLED(CONFIG_DM_USB) && ARCH_DMA_MINALIGN > 32 #define TD_ALIGNMENT ARCH_DMA_MINALIGN #else #define TD_ALIGNMENT 32 @@ -399,7 +399,7 @@ typedef struct ohci { const char *slot_name; } ohci_t; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) extern struct dm_usb_ops ohci_usb_ops; int ohci_register(struct udevice *dev, struct ohci_regs *regs); diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 3ccbc16da37..24ec724e193 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -798,7 +798,7 @@ static int r8a66597_usb_probe(struct udevice *dev) bus_priv->desc_before_addr = true; - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { + if (IS_ENABLED(CONFIG_DM_REGULATOR)) { ret = device_get_supply_regulator(dev, "vbus-supply", &priv->vbus_supply); if (ret) { @@ -836,7 +836,7 @@ static int r8a66597_usb_remove(struct udevice *dev) disable_controller(priv); - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { + if (IS_ENABLED(CONFIG_DM_REGULATOR)) { ret = regulator_set_enable(priv->vbus_supply, false); if (ret) { dev_err(dev, diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c index 1dbd65dfaa3..3e44a7cc642 100644 --- a/drivers/usb/host/xhci-dwc3.c +++ b/drivers/usb/host/xhci-dwc3.c @@ -115,7 +115,7 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val) GFLADJ_30MHZ(val)); } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int xhci_dwc3_reset_init(struct udevice *dev, struct xhci_dwc3_plat *plat) { diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 72b75306265..160d4b0d339 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -753,7 +753,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl, int slot_id = udev->slot_id; int speed = udev->speed; int route = 0; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct usb_device *dev = udev; struct usb_hub_device *hub; #endif @@ -769,7 +769,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl, /* Only the control endpoint is valid - one endpoint context */ slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(1)); -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /* Calculate the route string for this device */ port_num = dev->portnr; while (!usb_hub_is_root_hub(dev->dev)) { @@ -812,7 +812,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl, BUG(); } -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /* Set up TT fields to support FS/LS devices */ if (speed == USB_SPEED_LOW || speed == USB_SPEED_FULL) { struct udevice *parent = udev->dev; diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index b1b22b9357c..e4d8328e559 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -223,7 +223,7 @@ static const struct udevice_id ssusb_of_match[] = { {}, }; -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) int dm_usb_gadget_handle_interrupts(struct udevice *dev) { struct mtu3 *mtu = dev_get_priv(dev); @@ -321,7 +321,7 @@ static int mtu3_glue_bind(struct udevice *parent) dr_mode = usb_get_dr_mode(node); switch (dr_mode) { -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) case USB_DR_MODE_PERIPHERAL: case USB_DR_MODE_OTG: dev_dbg(parent, "%s: dr_mode: peripheral\n", __func__); diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c index 62c5e8e5fa4..0c70ce0a127 100644 --- a/drivers/usb/musb-new/musb_uboot.c +++ b/drivers/usb/musb-new/musb_uboot.c @@ -23,7 +23,7 @@ struct int_queue { struct urb urb; }; -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) struct musb_host_data musb_host; #endif @@ -247,7 +247,7 @@ int musb_lowlevel_init(struct musb_host_data *host) return 0; } -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) int usb_lowlevel_stop(int index) { if (!musb_host.host) { @@ -305,9 +305,9 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) { return musb_lowlevel_init(&musb_host); } -#endif /* !CONFIG_IS_ENABLED(DM_USB) */ +#endif /* !IS_ENABLED(CONFIG_DM_USB) */ -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) static int musb_submit_control_msg(struct udevice *dev, struct usb_device *udev, unsigned long pipe, void *buffer, int length, struct devrequest *setup) @@ -370,10 +370,10 @@ struct dm_usb_ops musb_usb_ops = { .destroy_int_queue = musb_destroy_int_queue, .reset_root_port = musb_reset_root_port, }; -#endif /* CONFIG_IS_ENABLED(DM_USB) */ +#endif /* IS_ENABLED(CONFIG_DM_USB) */ #endif /* CONFIG_USB_MUSB_HOST */ -#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET) +#if defined(CONFIG_USB_MUSB_GADGET) && !IS_ENABLED(CONFIG_DM_USB_GADGET) static struct musb *gadget; int usb_gadget_handle_interrupts(int index) @@ -431,12 +431,12 @@ struct musb *musb_register(struct musb_hdrc_platform_data *plat, void *bdata, struct musb **musbp; switch (plat->mode) { -#if defined(CONFIG_USB_MUSB_HOST) && !CONFIG_IS_ENABLED(DM_USB) +#if defined(CONFIG_USB_MUSB_HOST) && !IS_ENABLED(CONFIG_DM_USB) case MUSB_HOST: musbp = &musb_host.host; break; #endif -#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET) +#if defined(CONFIG_USB_MUSB_GADGET) && !IS_ENABLED(CONFIG_DM_USB_GADGET) case MUSB_PERIPHERAL: musbp = &gadget; break; diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c index 482dfdc6be6..a730c078d5c 100644 --- a/drivers/usb/musb-new/omap2430.c +++ b/drivers/usb/musb-new/omap2430.c @@ -149,7 +149,7 @@ const struct musb_platform_ops omap2430_ops = { .disable = omap2430_musb_disable, }; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct omap2430_musb_plat { void *base; @@ -244,7 +244,7 @@ static int omap2430_musb_probe(struct udevice *dev) return -EIO; return musb_lowlevel_init(host); - } else if (CONFIG_IS_ENABLED(DM_USB_GADGET)) { + } else if (IS_ENABLED(CONFIG_DM_USB_GADGET)) { struct musb_host_data *host = dev_get_priv(dev); host->host = musb_init_controller(&plat->plat, @@ -297,4 +297,4 @@ U_BOOT_DRIVER(omap2430_musb) = { .priv_auto = sizeof(struct musb_host_data), }; -#endif /* CONFIG_IS_ENABLED(DM_USB) */ +#endif /* IS_ENABLED(CONFIG_DM_USB) */ diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c index 91042935b07..5542c9b6fc4 100644 --- a/drivers/usb/musb-new/ti-musb.c +++ b/drivers/usb/musb-new/ti-musb.c @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /* USB 2.0 PHY Control */ #define CM_PHY_PWRDN (1 << 0) #define CM_PHY_OTG_PWRDN (1 << 1) @@ -49,7 +49,7 @@ static void ti_musb_set_phy_power(struct udevice *dev, u8 on) } } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int ti_musb_get_usb_index(int node) { @@ -176,7 +176,7 @@ static int ti_musb_host_remove(struct udevice *dev) return 0; } -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int ti_musb_host_of_to_plat(struct udevice *dev) { struct ti_musb_plat *plat = dev_get_plat(dev); @@ -199,7 +199,7 @@ static int ti_musb_host_of_to_plat(struct udevice *dev) U_BOOT_DRIVER(ti_musb_host) = { .name = "ti-musb-host", .id = UCLASS_USB, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_to_plat = ti_musb_host_of_to_plat, #endif .probe = ti_musb_host_probe, @@ -209,12 +209,12 @@ U_BOOT_DRIVER(ti_musb_host) = { .priv_auto = sizeof(struct musb_host_data), }; -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) struct ti_musb_peripheral { struct musb *periph; }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int ti_musb_peripheral_of_to_plat(struct udevice *dev) { struct ti_musb_plat *plat = dev_get_plat(dev); @@ -272,7 +272,7 @@ static int ti_musb_peripheral_remove(struct udevice *dev) U_BOOT_DRIVER(ti_musb_peripheral) = { .name = "ti-musb-peripheral", .id = UCLASS_USB_GADGET_GENERIC, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .of_to_plat = ti_musb_peripheral_of_to_plat, #endif .probe = ti_musb_peripheral_probe, @@ -284,7 +284,7 @@ U_BOOT_DRIVER(ti_musb_peripheral) = { }; #endif -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static int ti_musb_wrapper_bind(struct udevice *parent) { ofnode node; @@ -339,6 +339,6 @@ U_BOOT_DRIVER(ti_musb_wrapper) = { .of_match = ti_musb_ids, .bind = ti_musb_wrapper_bind, }; -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ -#endif /* CONFIG_IS_ENABLED(DM_USB) */ +#endif /* IS_ENABLED(CONFIG_DM_USB) */ diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c index c4fbb182944..5ac674e1e99 100644 --- a/drivers/video/dw_hdmi.c +++ b/drivers/video/dw_hdmi.c @@ -815,7 +815,7 @@ static int hdmi_read_edid(struct dw_hdmi *hdmi, int block, u8 *buff) u32 trytime = 5; u32 n; - if (CONFIG_IS_ENABLED(DM_I2C) && hdmi->ddc_bus) { + if (IS_ENABLED(CONFIG_DM_I2C) && hdmi->ddc_bus) { struct udevice *chip; edid_read_err = i2c_get_chip(hdmi->ddc_bus, diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index e5f28132053..92d97df9323 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -379,7 +379,7 @@ static int meson_dw_hdmi_probe(struct udevice *dev) struct meson_dw_hdmi *priv = dev_get_priv(dev); struct reset_ctl_bulk resets; struct clk_bulk clocks; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *supply; #endif int ret; @@ -406,7 +406,7 @@ static int meson_dw_hdmi_probe(struct udevice *dev) priv->hdmi.i2c_clk_high = 0x67; priv->hdmi.i2c_clk_low = 0x78; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) ret = device_get_supply_regulator(dev, "hdmi-supply", &supply); if (ret && ret != -ENOENT) { pr_err("Failed to get HDMI regulator\n"); diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 10433949bb8..f8f622fb996 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -65,7 +65,7 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, uint8_t valid_data = 0; uint32_t vdctrl0; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; int ret; diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c index af2698ffca8..2bb8e149ee8 100644 --- a/drivers/video/nexell_display.c +++ b/drivers/video/nexell_display.c @@ -39,7 +39,7 @@ static char *const dp_dev_str[] = { [DP_DEVICE_DP1] = "DP1", }; -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static void nx_display_parse_dp_sync(ofnode node, struct dp_sync_info *sync) { sync->h_active_len = ofnode_read_s32_default(node, "h_active_len", 0); @@ -416,7 +416,7 @@ static struct nx_display_dev *nx_display_setup(void) } node = dev_ofnode(dev).of_offset; - if (CONFIG_IS_ENABLED(OF_CONTROL)) { + if (IS_ENABLED(CONFIG_OF_CONTROL)) { ret = nx_display_parse_dt(dev, dp, plat); if (ret) goto err_setup; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 6aaacff10df..0b773af2ff3 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -233,7 +233,7 @@ void video_set_default_colors(struct udevice *dev, bool invert) struct video_priv *priv = dev_get_uclass_priv(dev); int fore, back; - if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) { + if (IS_ENABLED(CONFIG_SYS_WHITE_ON_BLACK)) { /* White is used when switching to bold, use light gray here */ fore = VID_LIGHT_GRAY; back = VID_BLACK; @@ -271,7 +271,7 @@ int video_sync(struct udevice *vid, bool force) * architectures do not actually implement it. Is there a way to find * out whether it exists? For now, ARM is safe. */ -#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +#if defined(CONFIG_ARM) && !IS_ENABLED(CONFIG_SYS_DCACHE_OFF) struct video_priv *priv = dev_get_uclass_priv(vid); if (priv->flush_dcache) { @@ -455,7 +455,7 @@ static int video_post_probe(struct udevice *dev) /* Set up colors */ video_set_default_colors(dev, false); - if (!CONFIG_IS_ENABLED(NO_FB_CLEAR)) + if (!IS_ENABLED(CONFIG_NO_FB_CLEAR)) video_clear(dev); /* diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c index 70ba537243f..349f208a0ee 100644 --- a/drivers/w1-eeprom/w1-eeprom-uclass.c +++ b/drivers/w1-eeprom/w1-eeprom-uclass.c @@ -54,7 +54,7 @@ UCLASS_DRIVER(w1_eeprom) = { .name = "w1_eeprom", .id = UCLASS_W1_EEPROM, .flags = DM_UC_FLAG_SEQ_ALIAS, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .post_bind = dm_scan_fdt_dev, #endif }; diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index a4247ecd623..ab8631996c8 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -303,7 +303,7 @@ UCLASS_DRIVER(w1) = { .flags = DM_UC_FLAG_SEQ_ALIAS, .per_device_auto = sizeof(struct w1_bus), .post_probe = w1_post_probe, -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) .post_bind = dm_scan_fdt_dev, #endif .per_child_plat_auto = sizeof(struct w1_device), diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c index 447a22d3b36..a54850aa07e 100644 --- a/drivers/watchdog/designware_wdt.c +++ b/drivers/watchdog/designware_wdt.c @@ -77,7 +77,7 @@ static int designware_wdt_stop(struct udevice *dev) designware_wdt_reset(dev); writel(0, priv->base + DW_WDT_CR); - if (CONFIG_IS_ENABLED(DM_RESET) && + if (IS_ENABLED(CONFIG_DM_RESET) && ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) { ret = reset_assert_bulk(&priv->resets); if (ret) @@ -115,7 +115,7 @@ static int designware_wdt_probe(struct udevice *dev) if (!priv->base) return -EINVAL; -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) struct clk clk; ret = clk_get_by_index(dev, 0, &clk); @@ -135,7 +135,7 @@ static int designware_wdt_probe(struct udevice *dev) priv->clk_khz = CFG_DW_WDT_CLOCK_KHZ; #endif - if (CONFIG_IS_ENABLED(DM_RESET) && + if (IS_ENABLED(CONFIG_DM_RESET) && ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) { ret = reset_get_bulk(dev, &priv->resets); if (ret) @@ -150,7 +150,7 @@ static int designware_wdt_probe(struct udevice *dev) return designware_wdt_stop(dev); err: -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) clk_free(&clk); #endif return ret; diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c index 894158b304a..5cb31c80209 100644 --- a/drivers/watchdog/imx_watchdog.c +++ b/drivers/watchdog/imx_watchdog.c @@ -43,7 +43,7 @@ static void imx_watchdog_expire_now(struct watchdog_regs *wdog, bool ext_reset) } #if !defined(CONFIG_IMX_WATCHDOG) || \ - (defined(CONFIG_IMX_WATCHDOG) && !CONFIG_IS_ENABLED(WDT)) + (defined(CONFIG_IMX_WATCHDOG) && !IS_ENABLED(CONFIG_WDT)) void __attribute__((weak)) reset_cpu(void) { struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; @@ -86,7 +86,7 @@ static void imx_watchdog_init(struct watchdog_regs *wdog, bool ext_reset, imx_watchdog_reset(wdog); } -#if !CONFIG_IS_ENABLED(WDT) +#if !IS_ENABLED(CONFIG_WDT) void hw_watchdog_reset(void) { struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index f0e57b4f728..60f6dd31aaf 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -50,7 +50,7 @@ /* Hardware timeout in seconds */ #define WDT_HW_TIMEOUT 60 -#if !CONFIG_IS_ENABLED(WDT) +#if !IS_ENABLED(CONFIG_WDT) static unsigned int wdt_trgr_pattern = 0x1234; void hw_watchdog_reset(void) @@ -265,4 +265,4 @@ U_BOOT_DRIVER(omap3_wdt) = { .probe = omap3_wdt_probe, .priv_auto = sizeof(struct omap3_wdt_priv), }; -#endif /* !CONFIG_IS_ENABLED(WDT) */ +#endif /* !IS_ENABLED(CONFIG_WDT) */ diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index 509896a1b80..585591ec8f9 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -269,7 +269,7 @@ static int wdt_pre_probe(struct udevice *dev) bool autostart = IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART); struct wdt_priv *priv; - if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { + if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)) { timeout = dev_read_u32_default(dev, "timeout-sec", timeout); reset_period = dev_read_u32_default(dev, "hw_margin_ms", 4 * reset_period) / 4; diff --git a/env/env.c b/env/env.c index 0f73ebc08e0..5ab5eed7a62 100644 --- a/env/env.c +++ b/env/env.c @@ -209,7 +209,7 @@ int env_load(void) printf("OK\n"); gd->env_load_prio = prio; -#if !CONFIG_IS_ENABLED(ENV_APPEND) +#if !IS_ENABLED(CONFIG_ENV_APPEND) return 0; #endif } else if (ret == -ENOMSG) { diff --git a/env/mmc.c b/env/mmc.c index 85761417f28..e6b8e35373f 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -53,7 +53,7 @@ DECLARE_GLOBAL_DATA_PTR; #define ENV_MMC_HWPART_REDUND 1 #endif -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) static inline int mmc_offset_try_partition(const char *str, int copy, s64 *val) { struct disk_partition info; @@ -210,7 +210,7 @@ static const char *init_mmc_for_env(struct mmc *mmc) if (!mmc) return "No MMC card found"; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct udevice *dev; if (blk_get_from_parent(mmc->dev, &dev)) diff --git a/env/sf.c b/env/sf.c index a425ecc11c8..dc7eaac7504 100644 --- a/env/sf.c +++ b/env/sf.c @@ -41,7 +41,7 @@ DECLARE_GLOBAL_DATA_PTR; static int setup_flash_device(struct spi_flash **env_flash) { -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) struct udevice *new; int ret; diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 2da93dae3cf..196518f8d7b 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -108,7 +108,7 @@ int fat_register_device(struct blk_desc *dev_desc, int part_no) info.name[0] = 0; info.type[0] = 0; info.bootable = 0; -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) info.uuid[0] = 0; #endif } @@ -148,7 +148,7 @@ static void get_name(dir_entry *dirent, char *s_name) static int flush_dirty_fat_buffer(fsdata *mydata); -#if !CONFIG_IS_ENABLED(FAT_WRITE) +#if !IS_ENABLED(CONFIG_FAT_WRITE) /* Stub for read only operation */ int flush_dirty_fat_buffer(fsdata *mydata) { @@ -1332,7 +1332,7 @@ int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp) memset(dent, 0, sizeof(*dent)); strcpy(dent->name, dir->itr.name); - if (CONFIG_IS_ENABLED(EFI_LOADER)) { + if (IS_ENABLED(CONFIG_EFI_LOADER)) { dent->attr = dir->itr.dent->attr; fat2rtc(le16_to_cpu(dir->itr.dent->cdate), le16_to_cpu(dir->itr.dent->ctime), &dent->create_time); diff --git a/fs/fs.c b/fs/fs.c index 8324b4a22f2..cb34e8e5939 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -183,7 +183,7 @@ struct fstype_info { }; static struct fstype_info fstypes[] = { -#if CONFIG_IS_ENABLED(FS_FAT) +#if IS_ENABLED(CONFIG_FS_FAT) { .fstype = FS_TYPE_FAT, .name = "fat", @@ -194,7 +194,7 @@ static struct fstype_info fstypes[] = { .exists = fat_exists, .size = fat_size, .read = fat_read_file, -#if CONFIG_IS_ENABLED(FAT_WRITE) +#if IS_ENABLED(CONFIG_FAT_WRITE) .write = file_fat_write, .unlink = fat_unlink, .mkdir = fat_mkdir, @@ -211,7 +211,7 @@ static struct fstype_info fstypes[] = { }, #endif -#if CONFIG_IS_ENABLED(FS_EXT4) +#if IS_ENABLED(CONFIG_FS_EXT4) { .fstype = FS_TYPE_EXT, .name = "ext4", @@ -315,7 +315,7 @@ static struct fstype_info fstypes[] = { }, #endif #endif -#if CONFIG_IS_ENABLED(FS_SQUASHFS) +#if IS_ENABLED(CONFIG_FS_SQUASHFS) { .fstype = FS_TYPE_SQUASHFS, .name = "squashfs", diff --git a/include/_exports.h b/include/_exports.h index 1af946fac32..2bfd065fa88 100644 --- a/include/_exports.h +++ b/include/_exports.h @@ -26,7 +26,7 @@ EXPORT_FUNC(dummy, void, free_hdlr, void) #endif EXPORT_FUNC(malloc, void *, malloc, size_t) -#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) +#if !IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE) EXPORT_FUNC(free, void, free, void *) #endif EXPORT_FUNC(udelay, void, udelay, unsigned long) @@ -43,7 +43,7 @@ EXPORT_FUNC(simple_strtol, long, simple_strtol, const char *, char **, unsigned int) EXPORT_FUNC(strcmp, int, strcmp, const char *cs, const char *ct) -#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C) +#if defined(CONFIG_CMD_I2C) && !IS_ENABLED(CONFIG_DM_I2C) EXPORT_FUNC(i2c_write, int, i2c_write, uchar, uint, int , uchar * , int) EXPORT_FUNC(i2c_read, int, i2c_read, uchar, uint, int , uchar * , int) #else diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index ac7640c5ed0..c595c72489a 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -112,7 +112,7 @@ struct global_data { * not be called. */ unsigned long have_console; -#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER) +#if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER) /** * @precon_buf_idx: pre-console buffer index * @@ -217,11 +217,11 @@ struct global_data { * @uclass_root_s. */ struct list_head *uclass_root; -# if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT) +# if IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT) /** @dm_driver_rt: Dynamic info about the driver */ struct driver_rt *dm_driver_rt; # endif -#if CONFIG_IS_ENABLED(OF_PLATDATA_RT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_RT) /** @dm_udevice_rt: Dynamic info about the udevice */ struct udevice_rt *dm_udevice_rt; /** @@ -254,14 +254,14 @@ struct global_data { * @fdt_src: Source of FDT */ enum fdt_source_t fdt_src; -#if CONFIG_IS_ENABLED(OF_LIVE) +#if IS_ENABLED(CONFIG_OF_LIVE) /** * @of_root: root node of the live tree */ struct device_node *of_root; #endif -#if CONFIG_IS_ENABLED(MULTI_DTB_FIT) +#if IS_ENABLED(CONFIG_MULTI_DTB_FIT) /** * @multi_dtb_fit: pointer to uncompressed multi-dtb FIT image */ @@ -287,7 +287,7 @@ struct global_data { */ void *trace_buff; #endif -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) /** * @cur_i2c_bus: currently used I2C bus */ @@ -433,7 +433,7 @@ struct global_data { */ bool log_cont; #endif -#if CONFIG_IS_ENABLED(BLOBLIST) +#if IS_ENABLED(CONFIG_BLOBLIST) /** * @bloblist: blob list information */ @@ -443,7 +443,7 @@ struct global_data { */ struct bloblist_hdr *new_bloblist; #endif -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) /** * @spl_handoff: SPL hand-off information */ @@ -473,7 +473,7 @@ struct global_data { */ char *smbios_version; #endif -#if CONFIG_IS_ENABLED(EVENT) +#if IS_ENABLED(CONFIG_EVENT) /** * @event_state: Points to the current state of events */ @@ -506,7 +506,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #endif /* These macros help avoid #ifdefs in the code */ -#if CONFIG_IS_ENABLED(OF_LIVE) +#if IS_ENABLED(CONFIG_OF_LIVE) #define gd_of_root() gd->of_root #define gd_of_root_ptr() &gd->of_root #define gd_set_of_root(_root) gd->of_root = (_root) @@ -516,7 +516,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_set_of_root(_root) #endif -#if CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT) #define gd_set_dm_driver_rt(dyn) gd->dm_driver_rt = dyn #define gd_dm_driver_rt() gd->dm_driver_rt #else @@ -524,7 +524,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_dm_driver_rt() NULL #endif -#if CONFIG_IS_ENABLED(OF_PLATDATA_RT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_RT) #define gd_set_dm_udevice_rt(dyn) gd->dm_udevice_rt = dyn #define gd_dm_udevice_rt() gd->dm_udevice_rt #define gd_set_dm_priv_base(dyn) gd->dm_priv_base = dyn @@ -546,7 +546,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_set_acpi_start(addr) #endif -#if CONFIG_IS_ENABLED(MULTI_DTB_FIT) +#if IS_ENABLED(CONFIG_MULTI_DTB_FIT) #define gd_multi_dtb_fit() gd->multi_dtb_fit #define gd_set_multi_dtb_fit(_dtb) gd->multi_dtb_fit = _dtb #else @@ -554,7 +554,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_set_multi_dtb_fit(_dtb) #endif -#if CONFIG_IS_ENABLED(EVENT_DYNAMIC) +#if IS_ENABLED(CONFIG_EVENT_DYNAMIC) #define gd_event_state() ((struct event_state *)&gd->event_state) #else #define gd_event_state() NULL diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index dd0bdf2315e..eac16ea5b88 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -381,7 +381,7 @@ struct dm_gpio_ops { int (*get_flags)(struct udevice *dev, unsigned int offset, ulong *flagsp); -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) /** * get_acpi() - Get the ACPI info for a GPIO * diff --git a/include/atf_common.h b/include/atf_common.h index d69892fac6c..8ace8404c34 100644 --- a/include/atf_common.h +++ b/include/atf_common.h @@ -127,7 +127,7 @@ struct atf_image_info { struct param_header h; uintptr_t image_base; /* physical address of base of image */ uint32_t image_size; /* bytes read from image file */ -#if CONFIG_IS_ENABLED(ATF_LOAD_IMAGE_V2) +#if IS_ENABLED(CONFIG_ATF_LOAD_IMAGE_V2) uint32_t image_max_size; #endif }; diff --git a/include/binman_sym.h b/include/binman_sym.h index 528d7e4e90e..973feff7e20 100644 --- a/include/binman_sym.h +++ b/include/binman_sym.h @@ -15,7 +15,7 @@ #define BINMAN_SYM_MAGIC_VALUE (0x4d595342UL) #define BINMAN_SYM_MISSING (-1UL) -#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) +#if IS_ENABLED(CONFIG_BINMAN_SYMBOLS) /** * binman_symname() - Internal function to get a binman symbol name @@ -114,7 +114,7 @@ extern ulong _binman_sym_magic; (*(_type *)&binman_symname(_entry_name, _prop_name)) : \ BINMAN_SYM_MISSING) -#else /* !CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */ +#else /* !IS_ENABLED(CONFIG_BINMAN_SYMBOLS) */ #define binman_sym_declare(_type, _entry_name, _prop_name) @@ -128,6 +128,6 @@ extern ulong _binman_sym_magic; #define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING -#endif /* CONFIG_IS_ENABLED(BINMAN_SYMBOLS) */ +#endif /* IS_ENABLED(CONFIG_BINMAN_SYMBOLS) */ #endif diff --git a/include/blk.h b/include/blk.h index 1db203c1bab..9d73f0f693d 100644 --- a/include/blk.h +++ b/include/blk.h @@ -24,7 +24,7 @@ struct udevice; static inline bool blk_enabled(void) { - return CONFIG_IS_ENABLED(BLK) || IS_ENABLED(CONFIG_SPL_LEGACY_BLOCK); + return IS_ENABLED(CONFIG_BLK) || IS_ENABLED(CONFIG_SPL_LEGACY_BLOCK); } #define BLK_VEN_SIZE 40 @@ -77,7 +77,7 @@ struct blk_desc { uint32_t mbr_sig; /* MBR integer signature */ efi_guid_t guid_sig; /* GPT GUID Signature */ }; -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) /* * For now we have a few functions which take struct blk_desc as a * parameter. This field allows them to look up the associated @@ -104,7 +104,7 @@ struct blk_desc { #define PAD_TO_BLOCKSIZE(size, blk_desc) \ (PAD_SIZE(size, blk_desc->blksz)) -#if CONFIG_IS_ENABLED(BLOCK_CACHE) +#if IS_ENABLED(CONFIG_BLOCK_CACHE) /** * blkcache_init() - initialize the block cache list pointers @@ -200,7 +200,7 @@ static inline void blkcache_free(void) {} #endif -#if CONFIG_IS_ENABLED(BLK) +#if IS_ENABLED(CONFIG_BLK) struct udevice; /* Operations on block devices */ diff --git a/include/bootdev.h b/include/bootdev.h index b92ff4d4f15..264883be847 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -367,7 +367,7 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, */ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp); -#if CONFIG_IS_ENABLED(BOOTSTD) +#if IS_ENABLED(CONFIG_BOOTSTD) /** * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated) * diff --git a/include/bootstage.h b/include/bootstage.h index 685939ccffc..ec4fc0faf11 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -224,7 +224,7 @@ enum bootstage_id { */ ulong timer_get_boot_us(void); -#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS) +#if defined(USE_HOSTCC) || !IS_ENABLED(CONFIG_SHOW_BOOT_PROGRESS) #define show_boot_progress(val) do {} while (0) #else /** @@ -237,7 +237,7 @@ void show_boot_progress(int val); #endif #if !defined(USE_HOSTCC) -#if CONFIG_IS_ENABLED(BOOTSTAGE) +#if IS_ENABLED(CONFIG_BOOTSTAGE) #define ENABLE_BOOTSTAGE #endif #endif diff --git a/include/cli.h b/include/cli.h index c777c90313f..f433f932711 100644 --- a/include/cli.h +++ b/include/cli.h @@ -126,7 +126,7 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, */ int cli_simple_parse_line(char *line, char *argv[]); -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) /** * cli_process_fdt() - process the boot command from the FDT * diff --git a/include/clk.h b/include/clk.h index 138766bd49f..836c0901317 100644 --- a/include/clk.h +++ b/include/clk.h @@ -90,7 +90,7 @@ struct clk_bulk { struct phandle_1_arg; -#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_CLK) /** * clk_get_by_phandle() - Get a clock by its phandle information (of-platadata) * @dev: Device containing the phandle @@ -388,7 +388,7 @@ enum clk_defaults_stage { CLK_DEFAULTS_POST_FORCE, }; -#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_CLK) /** * clk_set_defaults - Process ``assigned-{clocks/clock-parents/clock-rates}`` * properties to configure clocks @@ -422,7 +422,7 @@ static inline int clk_release_bulk(struct clk_bulk *bulk) return clk_release_all(bulk->clks, bulk->count); } -#if CONFIG_IS_ENABLED(CLK) +#if IS_ENABLED(CONFIG_CLK) /** * clk_request() - Request a clock by provider-specific ID. * @dev: The clock provider device. @@ -585,7 +585,7 @@ int clk_get_by_id(ulong id, struct clk **clkp); */ bool clk_dev_binded(struct clk *clk); -#else /* CONFIG_IS_ENABLED(CLK) */ +#else /* IS_ENABLED(CONFIG_CLK) */ static inline int clk_request(struct udevice *dev, struct clk *clk) { @@ -661,7 +661,7 @@ static inline bool clk_dev_binded(struct clk *clk) { return false; } -#endif /* CONFIG_IS_ENABLED(CLK) */ +#endif /* IS_ENABLED(CONFIG_CLK) */ /** * clk_valid() - check if clk is valid diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index 6f3e298a249..03b4d2808df 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -229,7 +229,7 @@ /* * I2C */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) #define CFG_SYS_I2C_NOPROBES { {0, 0x69} } #endif diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h index e7ae18ec5f9..1d87b29b4d3 100644 --- a/include/configs/kmcent2.h +++ b/include/configs/kmcent2.h @@ -314,7 +314,7 @@ * shorted - index 1 * Retain non-DM serial port for debug purposes. */ -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #define CFG_SYS_NS16550_CLK (get_bus_freq(0) / 2) #define CFG_SYS_NS16550_COM1 (CFG_SYS_CCSRBAR + 0x11C500) #endif diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index 3dfcb138b49..bc0b6f263ab 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -33,7 +33,7 @@ * NS16550 Configuration */ #define CFG_SYS_NS16550_CLK CFG_SYS_TCLK -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE #endif diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 7fd68c70fc6..b5533da639c 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -311,7 +311,7 @@ #define CFG_SYS_NS16550_COM2 (CFG_SYS_CCSRBAR+0x4600) /* I2C */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) #define CFG_SYS_I2C_NOPROBES { {0, 0x29} } #endif diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index d2d70f0fc23..2545a5acb71 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -23,7 +23,7 @@ #else #define CFG_SYS_NS16550_CLK 24000000 #endif -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) # define CFG_SYS_NS16550_COM1 SUNXI_UART0_BASE # define CFG_SYS_NS16550_COM2 SUNXI_UART1_BASE # define CFG_SYS_NS16550_COM3 SUNXI_UART2_BASE diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 9e312ac16d1..2a44cb9b549 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -28,7 +28,7 @@ * Hardware drivers */ #define CFG_SYS_NS16550_CLK 48000000 -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #define CFG_SYS_NS16550_COM3 UART3_BASE #endif diff --git a/include/configs/x530.h b/include/configs/x530.h index e1678e79e49..472aef8c90f 100644 --- a/include/configs/x530.h +++ b/include/configs/x530.h @@ -14,7 +14,7 @@ * NS16550 Configuration */ #define CFG_SYS_NS16550_CLK CFG_SYS_TCLK -#if !CONFIG_IS_ENABLED(DM_SERIAL) +#if !IS_ENABLED(CONFIG_DM_SERIAL) #define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE #endif diff --git a/include/ctype.h b/include/ctype.h deleted file mode 120000 index 9e43f9c6c6c..00000000000 --- a/include/ctype.h +++ /dev/null @@ -1 +0,0 @@ -linux/ctype.h \ No newline at end of file diff --git a/include/ctype.h b/include/ctype.h new file mode 100644 index 00000000000..42f9305a028 --- /dev/null +++ b/include/ctype.h @@ -0,0 +1,60 @@ +#ifndef _LINUX_CTYPE_H +#define _LINUX_CTYPE_H + +/* + * NOTE! This ctype does not handle EOF like the standard C + * library is required to. + */ + +#define _U 0x01 /* upper */ +#define _L 0x02 /* lower */ +#define _D 0x04 /* digit */ +#define _C 0x08 /* cntrl */ +#define _P 0x10 /* punct */ +#define _S 0x20 /* white space (space/lf/tab) */ +#define _X 0x40 /* hex digit */ +#define _SP 0x80 /* hard space (0x20) */ + +extern const unsigned char _ctype[]; + +#define __ismask(x) (_ctype[(int)(unsigned char)(x)]) + +#define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) +#define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) +#define iscntrl(c) ((__ismask(c)&(_C)) != 0) +#define isdigit(c) ((__ismask(c)&(_D)) != 0) +#define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) +#define islower(c) ((__ismask(c)&(_L)) != 0) +#define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) +#define ispunct(c) ((__ismask(c)&(_P)) != 0) +#define isspace(c) ((__ismask(c)&(_S)) != 0) +#define isupper(c) ((__ismask(c)&(_U)) != 0) +#define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0) + +/* + * Rather than doubling the size of the _ctype lookup table to hold a 'blank' + * flag, just check for space or tab. + */ +#define isblank(c) (c == ' ' || c == '\t') + +#define isascii(c) (((unsigned char)(c))<=0x7f) +#define toascii(c) (((unsigned char)(c))&0x7f) + +static inline unsigned char __tolower(unsigned char c) +{ + if (isupper(c)) + c -= 'A'-'a'; + return c; +} + +static inline unsigned char __toupper(unsigned char c) +{ + if (islower(c)) + c -= 'a'-'A'; + return c; +} + +#define tolower(c) __tolower(c) +#define toupper(c) __toupper(c) + +#endif diff --git a/include/dfu.h b/include/dfu.h index 06efbf4b208..76dae7023cf 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -435,7 +435,7 @@ int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size); /* Each entity has 5 arguments in maximum. */ #define DFU_MAX_ENTITY_ARGS 5 -#if CONFIG_IS_ENABLED(DFU_MMC) +#if IS_ENABLED(CONFIG_DFU_MMC) extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char **argv, int argc); #else @@ -447,7 +447,7 @@ static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, } #endif -#if CONFIG_IS_ENABLED(DFU_NAND) +#if IS_ENABLED(CONFIG_DFU_NAND) extern int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, char **argv, int argc); #else @@ -459,7 +459,7 @@ static inline int dfu_fill_entity_nand(struct dfu_entity *dfu, char *devstr, } #endif -#if CONFIG_IS_ENABLED(DFU_RAM) +#if IS_ENABLED(CONFIG_DFU_RAM) extern int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, char **argv, int argc); #else @@ -471,7 +471,7 @@ static inline int dfu_fill_entity_ram(struct dfu_entity *dfu, char *devstr, } #endif -#if CONFIG_IS_ENABLED(DFU_SF) +#if IS_ENABLED(CONFIG_DFU_SF) extern int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, char **argv, int argc); #else @@ -483,7 +483,7 @@ static inline int dfu_fill_entity_sf(struct dfu_entity *dfu, char *devstr, } #endif -#if CONFIG_IS_ENABLED(DFU_MTD) +#if IS_ENABLED(CONFIG_DFU_MTD) extern int dfu_fill_entity_mtd(struct dfu_entity *dfu, char *devstr, char **argv, int argc); #else @@ -514,7 +514,7 @@ static inline int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr, extern bool dfu_reinit_needed; -#if CONFIG_IS_ENABLED(DFU_WRITE_ALT) +#if IS_ENABLED(CONFIG_DFU_WRITE_ALT) /** * dfu_write_by_name() - write data to DFU medium * @dfu_entity_name: Name of DFU entity to write diff --git a/include/dm/acpi.h b/include/dm/acpi.h index 3adfe217678..04e793c3176 100644 --- a/include/dm/acpi.h +++ b/include/dm/acpi.h @@ -10,7 +10,7 @@ #define __DM_ACPI_H__ /* Allow operations to be optional for ACPI */ -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) #define ACPI_OPS_PTR(_ptr) .acpi_ops = _ptr, #else #define ACPI_OPS_PTR(_ptr) diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index f31c4702086..f8045625292 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -204,7 +204,7 @@ int device_probe(struct udevice *dev); * this is a vital device and flags is DM_REMOVE_NON_VITAL, other -ve on * error (such an error here is normally a very bad thing) */ -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int device_remove(struct udevice *dev, uint flags); #else static inline int device_remove(struct udevice *dev, uint flags) { return 0; } @@ -218,13 +218,13 @@ static inline int device_remove(struct udevice *dev, uint flags) { return 0; } * @dev: Pointer to device to unbind * Return: 0 if OK, -ve on error */ -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int device_unbind(struct udevice *dev); #else static inline int device_unbind(struct udevice *dev) { return 0; } #endif -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) void device_free(struct udevice *dev); #else static inline void device_free(struct udevice *dev) {} @@ -241,7 +241,7 @@ static inline void device_free(struct udevice *dev) {} * @drv: The targeted driver * Return: 0 on success, -ve on error */ -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int device_chld_unbind(struct udevice *dev, struct driver *drv); #else static inline int device_chld_unbind(struct udevice *dev, struct driver *drv) @@ -266,7 +266,7 @@ static inline int device_chld_unbind(struct udevice *dev, struct driver *drv) * Return: 0 on success, -EPROBE_DEFER if any child failed to remove, other * -ve on error */ -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int device_chld_remove(struct udevice *dev, struct driver *drv, uint flags); #else @@ -397,7 +397,7 @@ fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr); #define DM_UCLASS_ROOT_S_NON_CONST (((gd_t *)gd)->uclass_root_s) /* device resource management */ -#if CONFIG_IS_ENABLED(DEVRES) +#if IS_ENABLED(CONFIG_DEVRES) /** * devres_release_probe - Release managed resources allocated after probing @@ -431,7 +431,7 @@ static inline void devres_release_all(struct udevice *dev) static inline int device_notify(const struct udevice *dev, enum event_t type) { -#if CONFIG_IS_ENABLED(DM_EVENT) +#if IS_ENABLED(CONFIG_DM_EVENT) return event_notify(type, &dev, sizeof(dev)); #else return 0; diff --git a/include/dm/device.h b/include/dm/device.h index e9460386ca9..0e12a846a68 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -182,27 +182,27 @@ struct udevice { struct list_head uclass_node; struct list_head child_head; struct list_head sibling_node; -#if !CONFIG_IS_ENABLED(OF_PLATDATA_RT) +#if !IS_ENABLED(CONFIG_OF_PLATDATA_RT) u32 flags_; #endif int seq_; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) ofnode node_; #endif -#if CONFIG_IS_ENABLED(DEVRES) +#if IS_ENABLED(CONFIG_DEVRES) struct list_head devres_head; #endif -#if CONFIG_IS_ENABLED(DM_DMA) +#if IS_ENABLED(CONFIG_DM_DMA) ulong dma_offset; #endif -#if CONFIG_IS_ENABLED(IOMMU) +#if IS_ENABLED(CONFIG_IOMMU) struct udevice *iommu; #endif }; static inline int dm_udevice_size(void) { - if (CONFIG_IS_ENABLED(OF_PLATDATA_RT)) + if (IS_ENABLED(CONFIG_OF_PLATDATA_RT)) return ALIGN(sizeof(struct udevice), CONFIG_LINKER_LIST_ALIGN); return sizeof(struct udevice); @@ -230,7 +230,7 @@ struct udevice_rt { /* Returns the operations for a device */ #define device_get_ops(dev) ((dev)->driver->ops) -#if CONFIG_IS_ENABLED(OF_PLATDATA_RT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_RT) u32 dev_get_flags(const struct udevice *dev); void dev_or_flags(const struct udevice *dev, u32 or); void dev_bic_flags(const struct udevice *dev, u32 bic); @@ -259,7 +259,7 @@ static inline void dev_bic_flags(struct udevice *dev, u32 bic) */ static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) return dev->node_; #else return ofnode_null(); @@ -269,7 +269,7 @@ static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev) /* Returns non-zero if the device is active (probed and not removed) */ #define device_active(dev) (dev_get_flags(dev) & DM_FLAG_ACTIVATED) -#if CONFIG_IS_ENABLED(DM_DMA) +#if IS_ENABLED(CONFIG_DM_DMA) #define dev_set_dma_offset(_dev, _offset) _dev->dma_offset = _offset #define dev_get_dma_offset(_dev) _dev->dma_offset #else @@ -279,7 +279,7 @@ static inline __attribute_const__ ofnode dev_ofnode(const struct udevice *dev) static inline __attribute_const__ int dev_of_offset(const struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) return ofnode_to_offset(dev_ofnode(dev)); #else return -1; @@ -288,7 +288,7 @@ static inline __attribute_const__ int dev_of_offset(const struct udevice *dev) static inline __attribute_const__ bool dev_has_ofnode(const struct udevice *dev) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) return ofnode_valid(dev_ofnode(dev)); #else return false; @@ -297,7 +297,7 @@ static inline __attribute_const__ bool dev_has_ofnode(const struct udevice *dev) static inline void dev_set_ofnode(struct udevice *dev, ofnode node) { -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) dev->node_ = node; #endif } @@ -317,11 +317,11 @@ struct udevice_id { ulong data; }; -#if CONFIG_IS_ENABLED(OF_REAL) +#if IS_ENABLED(CONFIG_OF_REAL) #define of_match_ptr(_ptr) (_ptr) #else #define of_match_ptr(_ptr) NULL -#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ +#endif /* IS_ENABLED(CONFIG_OF_CONTROL) */ /** * struct driver - A driver for a feature or peripheral @@ -389,7 +389,7 @@ struct driver { int per_child_plat_auto; const void *ops; /* driver-specific operations */ uint32_t flags; -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) struct acpi_ops *acpi_ops; #endif }; diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h index 82d7a7d4924..47329089d50 100644 --- a/include/dm/device_compat.h +++ b/include/dm/device_compat.h @@ -48,7 +48,7 @@ if ((_DEBUG && level == LOGL_DEBUG) || \ (_VERBOSE_DEBUG && level == LOGL_DEBUG_CONTENT)) \ printf(fmt, ##__VA_ARGS__); \ - else if (CONFIG_IS_ENABLED(LOG)) \ + else if (IS_ENABLED(CONFIG_LOG)) \ log(cat, level, fmt, ##__VA_ARGS__); \ else if (level < CONFIG_VAL(LOGLEVEL)) \ printf(fmt, ##__VA_ARGS__); \ diff --git a/include/dm/devres.h b/include/dm/devres.h index 697534aa5be..92717e1c30c 100644 --- a/include/dm/devres.h +++ b/include/dm/devres.h @@ -30,7 +30,7 @@ struct devres_stats { int total_size; }; -#if CONFIG_IS_ENABLED(DEVRES) +#if IS_ENABLED(CONFIG_DEVRES) #ifdef CONFIG_DEBUG_DEVRES void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp, diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index fa9865602d8..02a92f2ca18 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -27,7 +27,7 @@ struct ofnode_phandle_args { uint32_t args[OF_MAX_PHANDLE_ARGS]; }; -#if CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) +#if IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) /** * oftree_reset() - reset the state of the oftree list * @@ -549,7 +549,7 @@ bool ofnode_read_bool(ofnode node, const char *propname); */ ofnode ofnode_find_subnode(ofnode node, const char *subnode_name); -#if CONFIG_IS_ENABLED(DM_INLINE_OFNODE) +#if IS_ENABLED(CONFIG_DM_INLINE_OFNODE) #include static inline bool ofnode_is_enabled(ofnode node) @@ -1436,7 +1436,7 @@ ofnode ofnode_get_phy_node(ofnode eth_node); */ phy_interface_t ofnode_read_phy_mode(ofnode mac_node); -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) /** * ofnode_conf_read_bool() - Read a boolean value from the U-Boot config * diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index e3e50afeaff..933774fca8e 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -479,7 +479,7 @@ enum pin_config_param { PIN_CONFIG_MAX = 255, /* 0xFF */ }; -#if CONFIG_IS_ENABLED(PINCTRL_GENERIC) +#if IS_ENABLED(CONFIG_PINCTRL_GENERIC) /** * pinctrl_generic_set_state() - Generic set_state operation * @pctldev: Pinctrl device to use @@ -501,7 +501,7 @@ static inline int pinctrl_generic_set_state(struct udevice *pctldev, } #endif -#if CONFIG_IS_ENABLED(PINCTRL) +#if IS_ENABLED(CONFIG_PINCTRL) /** * pinctrl_select_state() - Set a device to a given state * @dev: Peripheral device diff --git a/include/dm/platdata.h b/include/dm/platdata.h index 47ba8aab7ae..322541f3b3d 100644 --- a/include/dm/platdata.h +++ b/include/dm/platdata.h @@ -27,13 +27,13 @@ struct driver_info { const char *name; const void *plat; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) unsigned short plat_size; short parent_idx; #endif }; -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) #define driver_info_parent_id(driver_info) driver_info->parent_idx #else #define driver_info_parent_id(driver_info) (-1) @@ -59,7 +59,7 @@ struct driver_rt { * When of-platdata is in use, U_BOOT_DRVINFO() cannot be used outside of the * dt-plat.c file created by dtoc */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) && !defined(DT_PLAT_C) +#if IS_ENABLED(CONFIG_OF_PLATDATA) && !defined(DT_PLAT_C) #define U_BOOT_DRVINFO(__name) _Static_assert(false, \ "Cannot use U_BOOT_DRVINFO with of-platdata. Please use devicetree instead") #else diff --git a/include/dm/read.h b/include/dm/read.h index cc4f16196fd..cb9d1b0bb14 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -18,7 +18,7 @@ struct resource; -#if CONFIG_IS_ENABLED(OF_LIVE) +#if IS_ENABLED(CONFIG_OF_LIVE) static inline const struct device_node *dev_np(const struct udevice *dev) { return ofnode_to_np(dev_ofnode(dev)); @@ -30,7 +30,7 @@ static inline const struct device_node *dev_np(const struct udevice *dev) } #endif -#if !defined(CONFIG_DM_DEV_READ_INLINE) || CONFIG_IS_ENABLED(OF_PLATDATA) +#if !defined(CONFIG_DM_DEV_READ_INLINE) || IS_ENABLED(CONFIG_OF_PLATDATA) /** * dev_read_u8() - read a 8-bit integer from a device's DT property * @@ -1096,7 +1096,7 @@ static inline const void *dev_read_prop_by_prop(struct ofprop *prop, static inline int dev_read_alias_seq(const struct udevice *dev, int *devnump) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name, dev_of_offset(dev), devnump); #else @@ -1166,7 +1166,7 @@ static inline int dev_get_dma_range(const struct udevice *dev, phys_addr_t *cpu, static inline int dev_read_alias_highest_id(const char *stem) { - if (!CONFIG_IS_ENABLED(OF_LIBFDT) || !gd->fdt_blob) + if (!IS_ENABLED(CONFIG_OF_LIBFDT) || !gd->fdt_blob) return -1; return fdtdec_get_alias_highest_id(gd->fdt_blob, stem); } diff --git a/include/dm/root.h b/include/dm/root.h index b2f30a842f5..85276535aa4 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -155,7 +155,7 @@ int dm_init(bool of_live); */ int dm_uninit(void); -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) /** * dm_remove_devices_flags - Call remove function of all drivers with * specific removal flags set to selectively diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h index 3ddcdd21439..47f753b049a 100644 --- a/include/dm/uclass-internal.h +++ b/include/dm/uclass-internal.h @@ -259,7 +259,7 @@ int uclass_find_device_by_phandle(enum uclass_id id, struct udevice *parent, */ int uclass_bind_device(struct udevice *dev); -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) /** * uclass_pre_unbind_device() - Prepare to deassociate device with a uclass * @@ -316,7 +316,7 @@ int uclass_post_probe_device(struct udevice *dev); * @dev: Pointer to the device * Return: 0 on success, -ve on error */ -#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +#if IS_ENABLED(CONFIG_DM_DEVICE_REMOVE) int uclass_pre_remove_device(struct udevice *dev); #else static inline int uclass_pre_remove_device(struct udevice *dev) { return 0; } diff --git a/include/dm/util.h b/include/dm/util.h index 4bb49e9e8c0..28660fe9482 100644 --- a/include/dm/util.h +++ b/include/dm/util.h @@ -8,7 +8,7 @@ struct dm_stats; -#if CONFIG_IS_ENABLED(DM_WARN) +#if IS_ENABLED(CONFIG_DM_WARN) #define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt) #else static inline void dm_warn(const char *fmt, ...) @@ -61,7 +61,7 @@ void dm_dump_static_driver_info(void); */ void dm_dump_mem(struct dm_stats *stats); -#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY) +#if IS_ENABLED(CONFIG_OF_PLATDATA_INST) && IS_ENABLED(CONFIG_READ_ONLY) void *dm_priv_to_rw(void *priv); #else static inline void *dm_priv_to_rw(void *priv) diff --git a/include/dma.h b/include/dma.h index 9b392212277..f10f3c700da 100644 --- a/include/dma.h +++ b/include/dma.h @@ -165,7 +165,7 @@ struct dma { unsigned long id; }; -# if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(DMA) +# if IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_DMA) /** * dma_get_by_index - Get/request a DMA by integer index. * @@ -307,7 +307,7 @@ int dma_send(struct dma *dma, void *src, size_t len, void *metadata); int dma_get_cfg(struct dma *dma, u32 cfg_id, void **cfg_data); #endif /* CONFIG_DMA_CHANNELS */ -#if CONFIG_IS_ENABLED(DMA) +#if IS_ENABLED(CONFIG_DMA) /* * dma_get_device - get a DMA device which supports transfer * type of transfer_type diff --git a/include/dt-structs.h b/include/dt-structs.h index fa1622cb1dc..7c73c9d0da6 100644 --- a/include/dt-structs.h +++ b/include/dt-structs.h @@ -7,7 +7,7 @@ #define __DT_STRUCTS /* These structures may only be used in SPL */ -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) struct driver_info; /** diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h index e08530ec4e5..da723df174c 100644 --- a/include/dwc3-uboot.h +++ b/include/dwc3-uboot.h @@ -47,7 +47,7 @@ void dwc3_uboot_exit(int index); void dwc3_uboot_handle_interrupt(int index); struct phy; -#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_PHY) && IS_ENABLED(CONFIG_DM_USB) int dwc3_setup_phy(struct udevice *dev, struct phy_bulk *phys); int dwc3_shutdown_phy(struct udevice *dev, struct phy_bulk *phys); #else diff --git a/include/efi_loader.h b/include/efi_loader.h index 4560b0d04cb..e345f1ee479 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -32,7 +32,7 @@ static inline void *guidcpy(void *dst, const void *src) return memcpy(dst, src, sizeof(efi_guid_t)); } -#if CONFIG_IS_ENABLED(EFI_LOADER) +#if IS_ENABLED(CONFIG_EFI_LOADER) /** * __efi_runtime_data - declares a non-const variable for EFI runtime section @@ -102,7 +102,7 @@ void efi_print_image_infos(void *pc); /* Hook at initialization */ efi_status_t efi_launch_capsules(void); -#else /* CONFIG_IS_ENABLED(EFI_LOADER) */ +#else /* IS_ENABLED(CONFIG_EFI_LOADER) */ /* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */ #define __efi_runtime_data @@ -125,7 +125,7 @@ static inline efi_status_t efi_launch_capsules(void) return EFI_SUCCESS; } -#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */ +#endif /* IS_ENABLED(CONFIG_EFI_LOADER) */ /* Maximum number of configuration tables */ #define EFI_MAX_CONFIGURATION_TABLES 16 diff --git a/include/env_internal.h b/include/env_internal.h index 6a694946468..5421af6628e 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -188,7 +188,7 @@ struct env_driver { #define env_save_ptr(x) NULL #endif -#define ENV_SAVE_PTR(x) (CONFIG_IS_ENABLED(SAVEENV) ? (x) : NULL) +#define ENV_SAVE_PTR(x) (IS_ENABLED(CONFIG_SAVEENV) ? (x) : NULL) #define ENV_ERASE_PTR(x) (IS_ENABLED(CONFIG_CMD_ERASEENV) ? (x) : NULL) extern struct hsearch_data env_htab; diff --git a/include/errno.h b/include/errno.h index 5a8816d0a1d..5dc03603b63 100644 --- a/include/errno.h +++ b/include/errno.h @@ -25,7 +25,7 @@ extern int errno __errno_asm_label; * Return: string describing the error. If CONFIG_ERRNO_STR is not * defined an empty string is returned. */ -#if CONFIG_IS_ENABLED(ERRNO_STR) +#if IS_ENABLED(CONFIG_ERRNO_STR) const char *errno_str(int errno); #else static const char error_message[] = ""; diff --git a/include/event.h b/include/event.h index e4580b68350..b7b1effb524 100644 --- a/include/event.h +++ b/include/event.h @@ -95,13 +95,13 @@ typedef int (*event_handler_t)(void *ctx, struct event *event); struct evspy_info { event_handler_t func; enum event_t type; -#if CONFIG_IS_ENABLED(EVENT_DEBUG) +#if IS_ENABLED(CONFIG_EVENT_DEBUG) const char *id; #endif }; /* Declare a new event spy */ -#if CONFIG_IS_ENABLED(EVENT_DEBUG) +#if IS_ENABLED(CONFIG_EVENT_DEBUG) #define _ESPY_REC(_type, _func) { _func, _type, #_func, } #else #define _ESPY_REC(_type, _func) { _func, _type, } @@ -109,7 +109,7 @@ struct evspy_info { static inline const char *event_spy_id(struct evspy_info *spy) { -#if CONFIG_IS_ENABLED(EVENT_DEBUG) +#if IS_ENABLED(CONFIG_EVENT_DEBUG) return spy->id; #else return "?"; @@ -190,7 +190,7 @@ int event_manual_reloc(void); */ int event_notify(enum event_t type, void *data, int size); -#if CONFIG_IS_ENABLED(EVENT) +#if IS_ENABLED(CONFIG_EVENT) /** * event_notify_null() - notify spies about an event * @@ -207,7 +207,7 @@ static inline int event_notify_null(enum event_t type) } #endif -#if CONFIG_IS_ENABLED(EVENT_DYNAMIC) +#if IS_ENABLED(CONFIG_EVENT_DYNAMIC) /** * event_uninit() - Clean up dynamic events * diff --git a/include/exports.h b/include/exports.h index 6f8c9cf4517..e1845bc228e 100644 --- a/include/exports.h +++ b/include/exports.h @@ -35,7 +35,7 @@ int printf(const char* fmt, ...); void install_hdlr(int, interrupt_handler_t, void*); void free_hdlr(int); void *malloc(size_t); -#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) +#if !IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE) void free(void*); #endif void __udelay(unsigned long); @@ -49,7 +49,7 @@ long simple_strtol(const char *cp, char **endp, unsigned int base); int strcmp(const char *cs, const char *ct); unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); -#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C) +#if defined(CONFIG_CMD_I2C) && !IS_ENABLED(CONFIG_DM_I2C) int i2c_write (uchar, uint, int , uchar* , int); int i2c_read (uchar, uint, int , uchar* , int); #endif diff --git a/include/generic-phy.h b/include/generic-phy.h index f8eddeff67a..70c215a5262 100644 --- a/include/generic-phy.h +++ b/include/generic-phy.h @@ -155,7 +155,7 @@ struct phy_bulk { unsigned int count; }; -#if CONFIG_IS_ENABLED(PHY) +#if IS_ENABLED(CONFIG_PHY) /** * generic_phy_init() - initialize the PHY port diff --git a/include/handoff.h b/include/handoff.h index 0104b834f2c..503b388c44f 100644 --- a/include/handoff.h +++ b/include/handoff.h @@ -8,7 +8,7 @@ #ifndef __HANDOFF_H #define __HANDOFF_H -#if CONFIG_IS_ENABLED(HANDOFF) +#if IS_ENABLED(CONFIG_HANDOFF) #include diff --git a/include/hash.h b/include/hash.h index 8b3f79ec473..e418598aec7 100644 --- a/include/hash.h +++ b/include/hash.h @@ -16,7 +16,7 @@ struct cmd_tbl; * Maximum digest size for all algorithms we support. Having this value * avoids a malloc() or C99 local declaration in common/cmd_hash.c. */ -#if CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512) +#if IS_ENABLED(CONFIG_SHA384) || IS_ENABLED(CONFIG_SHA512) #define HASH_MAX_DIGEST_SIZE 64 #else #define HASH_MAX_DIGEST_SIZE 32 diff --git a/include/hwspinlock.h b/include/hwspinlock.h index d8556c0b4b4..6a3968fb4f5 100644 --- a/include/hwspinlock.h +++ b/include/hwspinlock.h @@ -26,7 +26,7 @@ struct hwspinlock { unsigned long id; }; -#if CONFIG_IS_ENABLED(DM_HWSPINLOCK) +#if IS_ENABLED(CONFIG_DM_HWSPINLOCK) /** * hwspinlock_get_by_index - Get a hardware spinlock by integer index diff --git a/include/i2c.h b/include/i2c.h index ef3820eaba7..14f7d190abe 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -614,7 +614,7 @@ int acpi_i2c_of_to_plat(struct udevice *dev); void i2c_early_init_f(void); #endif -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING @@ -750,7 +750,7 @@ extern struct i2c_bus_hose i2c_bus[]; void i2c_init(int speed, int slaveaddr); void i2c_init_board(void); -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) /* * i2c_get_bus_num: * @@ -930,7 +930,7 @@ unsigned int i2c_get_bus_speed(void); * only for backwardcompatibility, should go away if we switched * completely to new multibus support. */ -#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY) || defined(CFG_I2C_MULTI_BUS) +#if IS_ENABLED(CONFIG_SYS_I2C_LEGACY) || defined(CFG_I2C_MULTI_BUS) # if !defined(CFG_SYS_MAX_I2C_BUS) # define CFG_SYS_MAX_I2C_BUS 2 # endif diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h index 32dcb034973..fa86a7cc7e0 100644 --- a/include/i2c_eeprom.h +++ b/include/i2c_eeprom.h @@ -22,7 +22,7 @@ struct i2c_eeprom { unsigned long size; }; -#if CONFIG_IS_ENABLED(I2C_EEPROM) +#if IS_ENABLED(CONFIG_I2C_EEPROM) /* * i2c_eeprom_read() - read bytes from an I2C EEPROM chip * diff --git a/include/image.h b/include/image.h index 7717a4c13d3..8aa05d55e87 100644 --- a/include/image.h +++ b/include/image.h @@ -1262,7 +1262,7 @@ int fit_image_verify_with_data(const void *fit, int image_noffset, size_t size); int fit_image_verify(const void *fit, int noffset); -#if CONFIG_IS_ENABLED(FIT_SIGNATURE) +#if IS_ENABLED(CONFIG_FIT_SIGNATURE) int fit_config_verify(const void *fit, int conf_noffset); #else static inline int fit_config_verify(const void *fit, int conf_noffset) @@ -1398,7 +1398,7 @@ int calculate_hash(const void *data, int data_len, const char *algo, # endif #else # define IMAGE_ENABLE_SIGN 0 -# define FIT_IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) +# define FIT_IMAGE_ENABLE_VERIFY IS_ENABLED(CONFIG_FIT_SIGNATURE) #endif #ifdef USE_HOSTCC @@ -1691,7 +1691,7 @@ static inline int fit_image_check_target_arch(const void *fdt, int node) # endif #else # define IMAGE_ENABLE_ENCRYPT 0 -# define IMAGE_ENABLE_DECRYPT CONFIG_IS_ENABLED(FIT_CIPHER) +# define IMAGE_ENABLE_DECRYPT IS_ENABLED(CONFIG_FIT_CIPHER) #endif /* Information passed to the ciphering routines */ diff --git a/include/init.h b/include/init.h index 699dc2482c0..7588122ef41 100644 --- a/include/init.h +++ b/include/init.h @@ -223,7 +223,7 @@ int pci_init(void); */ int init_cache_f_r(void); -#if !CONFIG_IS_ENABLED(CPU) +#if !IS_ENABLED(CONFIG_CPU) /** * print_cpuinfo() - Display information about the CPU * diff --git a/include/iommu.h b/include/iommu.h index cf9719c5e91..c35eefc3fa2 100644 --- a/include/iommu.h +++ b/include/iommu.h @@ -24,8 +24,8 @@ struct iommu_ops { void (*unmap)(struct udevice *dev, dma_addr_t addr, size_t size); }; -#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \ - CONFIG_IS_ENABLED(IOMMU) +#if (IS_ENABLED(CONFIG_OF_CONTROL) && !IS_ENABLED(CONFIG_OF_PLATDATA)) && \ + IS_ENABLED(CONFIG_IOMMU) int dev_iommu_enable(struct udevice *dev); #else static inline int dev_iommu_enable(struct udevice *dev) diff --git a/include/irq.h b/include/irq.h index 1d08cb858d0..4d26878537c 100644 --- a/include/irq.h +++ b/include/irq.h @@ -125,7 +125,7 @@ struct irq_ops { */ int (*free)(struct irq *irq); -#if CONFIG_IS_ENABLED(ACPIGEN) +#if IS_ENABLED(CONFIG_ACPIGEN) /** * get_acpi() - Get the ACPI info for an irq * diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 1a3060117f1..b2e49b8f681 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -138,7 +138,7 @@ struct ftrace_likely_data { * Do not use __always_inline here, since currently it expands to inline again * (which would break users of __always_inline). */ -#if !CONFIG_IS_ENABLED(OPTIMIZE_INLINING) +#if !IS_ENABLED(CONFIG_OPTIMIZE_INLINING) #define inline inline __attribute__((__always_inline__)) __gnu_inline \ __inline_maybe_unused notrace #else diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 09f52698877..61e1d9bd0bf 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -572,8 +572,8 @@ static inline int del_mtd_partitions(struct mtd_info *mtd) } #endif -#if defined(CONFIG_MTD_PARTITIONS) && CONFIG_IS_ENABLED(DM) && \ - CONFIG_IS_ENABLED(OF_CONTROL) +#if defined(CONFIG_MTD_PARTITIONS) && IS_ENABLED(CONFIG_DM) && \ + IS_ENABLED(CONFIG_OF_CONTROL) int add_mtd_partitions_of(struct mtd_info *master); #else static inline int add_mtd_partitions_of(struct mtd_info *master) diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 2861b73edbc..b8988aff24b 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -636,7 +636,7 @@ void spi_nor_setup_op(const struct spi_nor *nor, */ int spi_nor_scan(struct spi_nor *nor); -#if CONFIG_IS_ENABLED(SPI_FLASH_TINY) +#if IS_ENABLED(CONFIG_SPI_FLASH_TINY) static inline int spi_nor_remove(struct spi_nor *nor) { return 0; diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index b3f4b8d134c..1d7d67bbffd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -970,7 +970,7 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *); extern int usb_gadget_handle_interrupts(int index); -#if CONFIG_IS_ENABLED(DM_USB_GADGET) +#if IS_ENABLED(CONFIG_DM_USB_GADGET) int usb_gadget_initialize(int index); int usb_gadget_release(int index); int dm_usb_gadget_handle_interrupts(struct udevice *dev); diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 14b2c7eb2e6..fe288c9d42e 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -21,7 +21,7 @@ enum usb_phy_interface { USBPHY_INTERFACE_MODE_HSIC, }; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /** * usb_get_phy_mode - Get phy mode for given device_node * @np: Pointer to the given device_node diff --git a/include/log.h b/include/log.h index 8a7b961bbfb..e97b62db015 100644 --- a/include/log.h +++ b/include/log.h @@ -162,7 +162,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level, * This header may be including when CONFIG_LOG is disabled, in which case * CONFIG_LOG_MAX_LEVEL is not defined. Add a check for this. */ -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) #define _LOG_MAX_LEVEL CONFIG_VAL(LOG_MAX_LEVEL) #else #define _LOG_MAX_LEVEL LOGL_INFO @@ -189,7 +189,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level, #define _LOG_DEBUG 0 #endif -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) /* Emit a log record if the level is less that the maximum */ #define log(_cat, _level, _fmt, _args...) ({ \ @@ -240,7 +240,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level, #define _SPL_BUILD 0 #endif -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) #define debug_cond(cond, fmt, args...) \ ({ \ @@ -314,7 +314,7 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line, _val; \ }) -#if CONFIG_IS_ENABLED(LOG) && defined(CONFIG_LOG_ERROR_RETURN) +#if IS_ENABLED(CONFIG_LOG) && defined(CONFIG_LOG_ERROR_RETURN) /* * Log an error return value, possibly with a message. Usage: * @@ -654,7 +654,7 @@ int log_remove_filter(const char *drv_name, int filter_num); */ int log_device_set_enable(struct log_driver *drv, bool enable); -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) /** * log_init() - Set up the log system ready for use * diff --git a/include/malloc.h b/include/malloc.h index 161ccbd1298..4ccc719ff11 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -895,7 +895,7 @@ void malloc_enable_testing(int max_allocs); /** malloc_disable_testing() - Put malloc() into normal mode */ void malloc_disable_testing(void); -#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) +#if IS_ENABLED(CONFIG_SYS_MALLOC_SIMPLE) #define malloc malloc_simple #define realloc realloc_simple #define memalign memalign_simple diff --git a/include/mmc.h b/include/mmc.h index 571fa625d02..bd71961a916 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -18,10 +18,10 @@ struct bd_info; -#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) #define MMC_SUPPORTS_TUNING #endif -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) #define MMC_SUPPORTS_TUNING #endif @@ -429,7 +429,7 @@ struct mmc_data { /* forward decl. */ struct mmc; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) struct dm_mmc_ops { /** * deferred_probe() - Some configurations that need to be deferred @@ -504,7 +504,7 @@ struct dm_mmc_ops { */ int (*wait_dat0)(struct udevice *dev, int state, int timeout_us); -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) /* set_enhanced_strobe() - set HS400 enhanced strobe */ int (*set_enhanced_strobe)(struct udevice *dev); #endif @@ -576,7 +576,7 @@ static inline int mmc_hs400_prepare_ddr(struct mmc *mmc) struct mmc_config { const char *name; -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) const struct mmc_ops *ops; #endif uint host_caps; @@ -620,15 +620,15 @@ static inline bool mmc_is_mode_ddr(enum bus_mode mode) { if (mode == MMC_DDR_52) return true; -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) else if (mode == UHS_DDR50) return true; #endif -#if CONFIG_IS_ENABLED(MMC_HS400_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_SUPPORT) else if (mode == MMC_HS_400) return true; #endif -#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_HS400_ES_SUPPORT) else if (mode == MMC_HS_400_ES) return true; #endif @@ -642,7 +642,7 @@ static inline bool mmc_is_mode_ddr(enum bus_mode mode) static inline bool supports_uhs(uint caps) { -#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) +#if IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) return (caps & UHS_CAPS) ? true : false; #else return false; @@ -656,7 +656,7 @@ static inline bool supports_uhs(uint caps) * TODO struct mmc should be in mmc_private but it's hard to fix right now */ struct mmc { -#if !CONFIG_IS_ENABLED(BLK) +#if !IS_ENABLED(CONFIG_BLK) struct list_head link; #endif const struct mmc_config *cfg; /* provided configuration */ @@ -687,14 +687,14 @@ struct mmc { uint tran_speed; uint legacy_speed; /* speed for the legacy mode provided by the card */ uint read_bl_len; -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) uint write_bl_len; uint erase_grp_size; /* in 512-byte sectors */ #endif -#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING) +#if IS_ENABLED(CONFIG_MMC_HW_PARTITIONING) uint hc_wp_grp_size; /* in 512-byte sectors */ #endif -#if CONFIG_IS_ENABLED(MMC_WRITE) +#if IS_ENABLED(CONFIG_MMC_WRITE) struct sd_ssr ssr; /* SD status register */ #endif u64 capacity; @@ -706,16 +706,16 @@ struct mmc { u64 enh_user_start; u64 enh_user_size; #endif -#if !CONFIG_IS_ENABLED(BLK) +#if !IS_ENABLED(CONFIG_BLK) struct blk_desc block_dev; #endif char op_cond_pending; /* 1 if we are waiting on an op_cond command */ char init_in_progress; /* 1 if we have done mmc_start_init() */ char preinit; /* start init as early as possible */ int ddr_mode; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) struct udevice *dev; /* Device for this MMC controller */ -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) struct udevice *vmmc_supply; /* Main voltage regulator (Vcc)*/ struct udevice *vqmmc_supply; /* IO voltage regulator (Vccq)*/ #endif @@ -735,7 +735,7 @@ struct mmc { enum bus_mode user_speed_mode; /* input speed mode from user */ }; -#if CONFIG_IS_ENABLED(DM_MMC) +#if IS_ENABLED(CONFIG_DM_MMC) #define mmc_to_dev(_mmc) _mmc->dev #else #define mmc_to_dev(_mmc) NULL @@ -849,7 +849,7 @@ int mmc_switch_part(struct mmc *mmc, unsigned int part_num); int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf, enum mmc_hwpart_conf_mode mode); -#if !CONFIG_IS_ENABLED(DM_MMC) +#if !IS_ENABLED(CONFIG_DM_MMC) int mmc_getcd(struct mmc *mmc); int board_mmc_getcd(struct mmc *mmc); int mmc_getwp(struct mmc *mmc); diff --git a/include/mpc85xx.h b/include/mpc85xx.h index e26e131114c..ca6eb974b8c 100644 --- a/include/mpc85xx.h +++ b/include/mpc85xx.h @@ -35,7 +35,7 @@ CFG_SYS_CCSRBAR_PHYS_LOW and/or CFG_SYS_CCSRBAR_PHYS_HIGH instead." #endif -#if CONFIG_IS_ENABLED(SYS_CCSR_DO_NOT_RELOCATE) +#if IS_ENABLED(CONFIG_SYS_CCSR_DO_NOT_RELOCATE) #undef CFG_SYS_CCSRBAR_PHYS_HIGH #undef CFG_SYS_CCSRBAR_PHYS_LOW #define CFG_SYS_CCSRBAR_PHYS_HIGH 0 diff --git a/include/nand.h b/include/nand.h index 70c1286ccb4..9cb3fe676a3 100644 --- a/include/nand.h +++ b/include/nand.h @@ -18,7 +18,7 @@ unsigned long nand_size(void); int nand_mtd_to_devnum(struct mtd_info *mtd); -#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT) +#if IS_ENABLED(CONFIG_SYS_NAND_SELF_INIT) void board_nand_init(void); int nand_register(int devnum, struct mtd_info *mtd); #else diff --git a/include/net.h b/include/net.h index 399af5e0645..009a7bfba43 100644 --- a/include/net.h +++ b/include/net.h @@ -901,7 +901,7 @@ static inline struct in_addr env_get_ip(char *var) */ void reset_phy(void); -#if CONFIG_IS_ENABLED(NET) +#if IS_ENABLED(CONFIG_NET) /** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs * diff --git a/include/ns16550.h b/include/ns16550.h index e7e68663d03..15414fcb120 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -26,7 +26,7 @@ #include -#if CONFIG_IS_ENABLED(DM_SERIAL) || defined(CONFIG_NS16550_DYNAMIC) || \ +#if IS_ENABLED(CONFIG_DM_SERIAL) || defined(CONFIG_NS16550_DYNAMIC) || \ defined(CONFIG_DEBUG_UART) /* * For driver model we always use one byte per register, and sort out the @@ -109,7 +109,7 @@ struct ns16550 { UART_REG(scr); /* 10*/ UART_REG(ssr); /* 11*/ #endif -#if CONFIG_IS_ENABLED(DM_SERIAL) +#if IS_ENABLED(CONFIG_DM_SERIAL) struct ns16550_plat *plat; #endif }; diff --git a/include/nvmem.h b/include/nvmem.h index 822e698bdd4..7eeb69a3016 100644 --- a/include/nvmem.h +++ b/include/nvmem.h @@ -33,7 +33,7 @@ struct nvmem_cell { struct udevice; -#if CONFIG_IS_ENABLED(NVMEM) +#if IS_ENABLED(CONFIG_NVMEM) /** * nvmem_cell_read() - Read the value of an nvmem cell diff --git a/include/palmas.h b/include/palmas.h index e259a4d04ba..e6a0f93257a 100644 --- a/include/palmas.h +++ b/include/palmas.h @@ -117,7 +117,7 @@ #define BB_VSEL_VBAT (3 << 1) #define BB_CHRG_EN (1 << 0) -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) /* * Functions to read and write from TPS659038/TWL6035/TWL6037 * or other Palmas family of TI PMICs diff --git a/include/part.h b/include/part.h index be75c735495..d65e4fa59c1 100644 --- a/include/part.h +++ b/include/part.h @@ -69,7 +69,7 @@ struct disk_partition { * PART_EFI_SYSTEM_PARTITION the partition is an EFI system partition */ int bootable; -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) char uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */ #endif #ifdef CONFIG_PARTITION_TYPE_GUID @@ -87,7 +87,7 @@ struct disk_part { }; /* Misc _get_dev functions */ -#if CONFIG_IS_ENABLED(PARTITIONS) +#if IS_ENABLED(CONFIG_PARTITIONS) /** * blk_get_dev() - get a pointer to a block device given its type and number * @@ -414,7 +414,7 @@ struct part_driver { #include -#if CONFIG_IS_ENABLED(EFI_PARTITION) +#if IS_ENABLED(CONFIG_EFI_PARTITION) /* disk/part_efi.c */ /** * write_gpt_table() - Write the GUID Partition Table to disk @@ -550,7 +550,7 @@ int get_disk_guid(struct blk_desc *dev_desc, char *guid); #endif -#if CONFIG_IS_ENABLED(DOS_PARTITION) +#if IS_ENABLED(CONFIG_DOS_PARTITION) /** * is_valid_dos_buf() - Ensure that a DOS MBR image is valid * @@ -577,7 +577,7 @@ int layout_mbr_partitions(struct disk_partition *p, int count, #endif -#if CONFIG_IS_ENABLED(PARTITIONS) +#if IS_ENABLED(CONFIG_PARTITIONS) /** * part_driver_get_count() - get partition driver count * diff --git a/include/phys2bus.h b/include/phys2bus.h index 866b8b51a8c..7db6826adc0 100644 --- a/include/phys2bus.h +++ b/include/phys2bus.h @@ -21,7 +21,7 @@ static inline unsigned long bus_to_phys(unsigned long bus) } #endif -#if CONFIG_IS_ENABLED(DM) +#if IS_ENABLED(CONFIG_DM) #include static inline dma_addr_t dev_phys_to_bus(struct udevice *dev, phys_addr_t phys) diff --git a/include/power-domain.h b/include/power-domain.h index 2ff6c77cd76..9fb8f458b83 100644 --- a/include/power-domain.h +++ b/include/power-domain.h @@ -76,7 +76,7 @@ struct power_domain { * @power_domain A pointer to a power domain struct to initialize. * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_get(struct udevice *dev, struct power_domain *power_domain); #else static inline @@ -95,7 +95,7 @@ int power_domain_get(struct udevice *dev, struct power_domain *power_domain) * * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_get_by_index(struct udevice *dev, struct power_domain *power_domain, int index); #else @@ -116,7 +116,7 @@ int power_domain_get_by_index(struct udevice *dev, * * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_get_by_name(struct udevice *dev, struct power_domain *power_domain, const char *name); #else @@ -135,7 +135,7 @@ int power_domain_get_by_name(struct udevice *dev, * requested by power_domain_get(). * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_free(struct power_domain *power_domain); #else static inline int power_domain_free(struct power_domain *power_domain) @@ -151,7 +151,7 @@ static inline int power_domain_free(struct power_domain *power_domain) * requested by power_domain_get(). * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_on(struct power_domain *power_domain); #else static inline int power_domain_on(struct power_domain *power_domain) @@ -167,7 +167,7 @@ static inline int power_domain_on(struct power_domain *power_domain) * requested by power_domain_get(). * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_POWER_DOMAIN) int power_domain_off(struct power_domain *power_domain); #else static inline int power_domain_off(struct power_domain *power_domain) @@ -183,7 +183,7 @@ static inline int power_domain_off(struct power_domain *power_domain) * * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_POWER_DOMAIN) int dev_power_domain_on(struct udevice *dev); #else static inline int dev_power_domain_on(struct udevice *dev) @@ -199,7 +199,7 @@ static inline int dev_power_domain_on(struct udevice *dev) * * Return: 0 if OK, or a negative error code. */ -#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(POWER_DOMAIN) +#if IS_ENABLED(CONFIG_OF_REAL) && IS_ENABLED(CONFIG_POWER_DOMAIN) int dev_power_domain_off(struct udevice *dev); #else static inline int dev_power_domain_off(struct udevice *dev) diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h index cf476c85ab3..ca7e9ffb711 100644 --- a/include/power/max77686_pmic.h +++ b/include/power/max77686_pmic.h @@ -154,7 +154,7 @@ enum { OPMODE_ON, }; -#if CONFIG_IS_ENABLED(POWER_LEGACY) +#if IS_ENABLED(CONFIG_POWER_LEGACY) int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV); int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode); int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV); diff --git a/include/power/pmic.h b/include/power/pmic.h index 70f2709bd0b..ea9447ca1e1 100644 --- a/include/power/pmic.h +++ b/include/power/pmic.h @@ -17,8 +17,8 @@ enum { PMIC_I2C, PMIC_SPI, PMIC_NONE}; -/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ -#if CONFIG_IS_ENABLED(POWER_LEGACY) +/* TODO: Change to !IS_ENABLED(CONFIG_DM_PMIC) when SPL_DM_PMIC exists */ +#if IS_ENABLED(CONFIG_POWER_LEGACY) enum { I2C_PMIC, I2C_NUM, }; enum { PMIC_READ, PMIC_WRITE, }; enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, }; @@ -83,9 +83,9 @@ struct pmic { struct pmic *parent; struct list_head list; }; -#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ +#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */ -/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ +/* TODO: Change to IS_ENABLED(CONFIG_DM_PMIC) when SPL_DM_PMIC exists */ #ifdef CONFIG_DM_PMIC /** * U-Boot PMIC Framework @@ -310,8 +310,8 @@ struct uc_pmic_priv { #endif /* DM_PMIC */ -/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */ -#if CONFIG_IS_ENABLED(POWER_LEGACY) +/* TODO: Change to IS_ENABLED(CONFIG_DM_PMIC) when SPL_DM_PMIC exists */ +#if IS_ENABLED(CONFIG_POWER_LEGACY) /* Legacy API, do not use */ int pmic_init(unsigned char bus); @@ -324,7 +324,7 @@ int pmic_probe(struct pmic *p); int pmic_reg_read(struct pmic *p, u32 reg, u32 *val); int pmic_reg_write(struct pmic *p, u32 reg, u32 val); int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on); -#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */ +#endif /* IS_ENABLED(CONFIG_POWER_LEGACY) */ #define pmic_i2c_addr (p->hw.i2c.addr) #define pmic_i2c_tx_num (p->hw.i2c.tx_num) diff --git a/include/power/regulator.h b/include/power/regulator.h index ff1bfc2435a..2e8118ef731 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -268,7 +268,7 @@ struct dm_regulator_ops { int (*set_mode)(struct udevice *dev, int mode_id); }; -#if CONFIG_IS_ENABLED(DM_REGULATOR) +#if IS_ENABLED(CONFIG_DM_REGULATOR) /** * regulator_mode: returns a pointer to the array of regulator mode info * diff --git a/include/reboot-mode/reboot-mode-gpio.h b/include/reboot-mode/reboot-mode-gpio.h index 16b1185c698..93d65d2b4f6 100644 --- a/include/reboot-mode/reboot-mode-gpio.h +++ b/include/reboot-mode/reboot-mode-gpio.h @@ -13,7 +13,7 @@ * we can use this struct to declare the pins used. */ -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) struct reboot_mode_gpio_config { int gpio_dev_offset; int gpio_offset; @@ -23,7 +23,7 @@ struct reboot_mode_gpio_config { struct reboot_mode_gpio_platdata { struct gpio_desc *gpio_desc; -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if !IS_ENABLED(CONFIG_OF_CONTROL) struct reboot_mode_gpio_config *gpios_config; #endif int gpio_count; diff --git a/include/remoteproc.h b/include/remoteproc.h index f48054de6ba..8a7e8e5f6c1 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -506,7 +506,7 @@ struct dm_rproc_ops { /* Accessor */ #define rproc_get_ops(dev) ((struct dm_rproc_ops *)(dev)->driver->ops) -#if CONFIG_IS_ENABLED(REMOTEPROC) +#if IS_ENABLED(CONFIG_REMOTEPROC) /** * rproc_init() - Initialize all bound remote proc devices * Return: 0 if all ok, else appropriate error value. diff --git a/include/reset.h b/include/reset.h index 965f02e0cee..ef34b7bf52b 100644 --- a/include/reset.h +++ b/include/reset.h @@ -83,7 +83,7 @@ struct reset_ctl_bulk { unsigned int count; }; -#if CONFIG_IS_ENABLED(DM_RESET) +#if IS_ENABLED(CONFIG_DM_RESET) /** * devm_reset_control_get - resource managed reset_get_by_name() diff --git a/include/rtc.h b/include/rtc.h index b6fdbb60dc2..f2accf78b84 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -20,7 +20,7 @@ typedef int64_t time64_t; struct udevice; -#if CONFIG_IS_ENABLED(DM_RTC) +#if IS_ENABLED(CONFIG_DM_RTC) struct rtc_ops { /** * get() - get the current time diff --git a/include/sdhci.h b/include/sdhci.h index 24b4599b857..af9043deb38 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -347,7 +347,7 @@ struct sdhci_host { #define USE_ADMA64 (0x1 << 2) #define USE_DMA (USE_SDMA | USE_ADMA | USE_ADMA64) dma_addr_t adma_addr; -#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA) +#if IS_ENABLED(CONFIG_MMC_SDHCI_ADMA) struct sdhci_adma_desc *adma_desc_table; #endif }; diff --git a/include/semihosting.h b/include/semihosting.h index 4e844cbad87..abf37c040ac 100644 --- a/include/semihosting.h +++ b/include/semihosting.h @@ -28,7 +28,7 @@ long smh_trap(unsigned int sysnum, void *addr); -#if CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK) +#if IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK) /** * semihosting_enabled() - Determine whether semihosting is supported * @@ -50,7 +50,7 @@ void disable_semihosting(void); #else static inline bool semihosting_enabled(void) { - return CONFIG_IS_ENABLED(SEMIHOSTING); + return IS_ENABLED(CONFIG_SEMIHOSTING); } static inline void disable_semihosting(void) diff --git a/include/serial.h b/include/serial.h index 5c8be294bf6..2aa117c37b7 100644 --- a/include/serial.h +++ b/include/serial.h @@ -362,7 +362,7 @@ void serial_setbrg(void); void serial_putc(const char ch); void serial_putc_raw(const char ch); void serial_puts(const char *str); -#if defined(CONFIG_CONSOLE_FLUSH_SUPPORT) && CONFIG_IS_ENABLED(DM_SERIAL) +#if defined(CONFIG_CONSOLE_FLUSH_SUPPORT) && IS_ENABLED(CONFIG_DM_SERIAL) void serial_flush(void); #else static inline void serial_flush(void) {} diff --git a/include/spi.h b/include/spi.h index 1bc18e65525..0d40949de55 100644 --- a/include/spi.h +++ b/include/spi.h @@ -139,7 +139,7 @@ enum spi_polarity { * @flags: Indication of SPI flags. */ struct spi_slave { -#if CONFIG_IS_ENABLED(DM_SPI) +#if IS_ENABLED(CONFIG_DM_SPI) struct udevice *dev; /* struct spi_slave is dev->parentdata */ uint max_hz; #else @@ -327,7 +327,7 @@ int spi_cs_is_valid(unsigned int bus, unsigned int cs); * removed soon as part of the SPI DM migration. Drop them if driver model is * enabled for SPI. */ -#if !CONFIG_IS_ENABLED(DM_SPI) +#if !IS_ENABLED(CONFIG_DM_SPI) /** * Activate a SPI chipselect. * This function is provided by the board code when using a driver diff --git a/include/spi_flash.h b/include/spi_flash.h index 10d19fd4b11..6ec41d03497 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -39,7 +39,7 @@ struct dm_spi_flash_ops { /* Access the serial operations for a device */ #define sf_get_ops(dev) ((struct dm_spi_flash_ops *)(dev)->driver->ops) -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) /** * spi_flash_read_dm() - Read data from SPI flash * diff --git a/include/spl.h b/include/spl.h index 827bd25c883..308444d9e1e 100644 --- a/include/spl.h +++ b/include/spl.h @@ -247,7 +247,7 @@ struct spl_image_info { u8 os; uintptr_t load_addr; uintptr_t entry_point; -#if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL) +#if IS_ENABLED(CONFIG_LOAD_FIT) || IS_ENABLED(CONFIG_LOAD_FIT_FULL) void *fdt_addr; #endif u32 boot_device; diff --git a/include/syscon.h b/include/syscon.h index f5e6cc1a4b1..4d15d50615f 100644 --- a/include/syscon.h +++ b/include/syscon.h @@ -25,7 +25,7 @@ struct syscon_ops { #define syscon_get_ops(dev) ((struct syscon_ops *)(dev)->driver->ops) -#if CONFIG_IS_ENABLED(OF_PLATDATA) +#if IS_ENABLED(CONFIG_OF_PLATDATA) /* * We don't support 64-bit machines. If they are so resource-contrained that * they need to use OF_PLATDATA, something is horribly wrong with the diff --git a/include/sysinfo.h b/include/sysinfo.h index b140d742e93..febbc84464e 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -122,7 +122,7 @@ struct sysinfo_ops { #define sysinfo_get_ops(dev) ((struct sysinfo_ops *)(dev)->driver->ops) -#if CONFIG_IS_ENABLED(SYSINFO) +#if IS_ENABLED(CONFIG_SYSINFO) /** * sysinfo_detect() - Run the hardware info detection procedure for this device. * diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h index a2c333e7446..7fefa1c2c5e 100644 --- a/include/tlv_eeprom.h +++ b/include/tlv_eeprom.h @@ -65,7 +65,7 @@ struct __attribute__ ((__packed__)) tlvinfo_tlv { #define TLV_CODE_VENDOR_EXT 0xFD #define TLV_CODE_CRC_32 0xFE -#if CONFIG_IS_ENABLED(CMD_TLV_EEPROM) +#if IS_ENABLED(CONFIG_CMD_TLV_EEPROM) /** * read_tlv_eeprom - Read the EEPROM binary data from the hardware @@ -110,7 +110,7 @@ int write_tlv_eeprom(void *eeprom, int len); int read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr, struct tlvinfo_tlv **first_entry, int dev); -#else /* !CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */ +#else /* !IS_ENABLED(CONFIG_CMD_TLV_EEPROM) */ static inline int read_tlv_eeprom(void *eeprom, int offset, int len, int dev) { @@ -129,7 +129,7 @@ read_tlvinfo_tlv_eeprom(void *eeprom, struct tlvinfo_header **hdr, return -ENOSYS; } -#endif /* CONFIG_IS_ENABLED(CMD_TLV_EEPROM) */ +#endif /* IS_ENABLED(CONFIG_CMD_TLV_EEPROM) */ /** * is_valid_tlvinfo_header diff --git a/include/twl4030.h b/include/twl4030.h index 0a6d85a7c1c..e0d5243f6af 100644 --- a/include/twl4030.h +++ b/include/twl4030.h @@ -648,7 +648,7 @@ * examples are TWL4030_PM_RECEIVER_VMMC1_DEV_GRP and * TWL4030_LED_LEDEN. */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static inline int twl4030_i2c_write_u8(u8 chip_no, u8 reg, u8 val) { return i2c_write(chip_no, reg, 1, &val, 1); diff --git a/include/twl6030.h b/include/twl6030.h index 05d476f8048..2b149a2c230 100644 --- a/include/twl6030.h +++ b/include/twl6030.h @@ -186,7 +186,7 @@ struct twl6030_data{ }; /* Functions to read and write from TWL6030 */ -#if !CONFIG_IS_ENABLED(DM_I2C) +#if !IS_ENABLED(CONFIG_DM_I2C) static inline int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val) { return i2c_write(chip_no, reg, 1, &val, 1); diff --git a/include/usb.h b/include/usb.h index 80cb8467203..1473990540c 100644 --- a/include/usb.h +++ b/include/usb.h @@ -140,7 +140,7 @@ struct usb_device { int act_len; /* transferred bytes */ int maxchild; /* Number of ports if hub */ int portnr; /* Port number, 1=first */ -#if !CONFIG_IS_ENABLED(DM_USB) +#if !IS_ENABLED(CONFIG_DM_USB) /* parent hub, or NULL if this is the root hub */ struct usb_device *parent; struct usb_device *children[USB_MAXCHILDREN]; @@ -148,7 +148,7 @@ struct usb_device { #endif /* slot_id - for xHCI enabled devices */ unsigned int slot_id; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct udevice *dev; /* Pointer to associated device */ struct udevice *controller_dev; /* Pointer to associated controller */ #endif @@ -174,7 +174,7 @@ enum usb_init_type { int usb_lowlevel_init(int index, enum usb_init_type init, void **controller); int usb_lowlevel_stop(int index); -#if defined(CONFIG_USB_MUSB_HOST) || CONFIG_IS_ENABLED(DM_USB) +#if defined(CONFIG_USB_MUSB_HOST) || IS_ENABLED(CONFIG_DM_USB) int usb_reset_root_port(struct usb_device *dev); #else #define usb_reset_root_port(dev) @@ -188,7 +188,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len, int interval, bool nonblock); #if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST \ - || CONFIG_IS_ENABLED(DM_USB) + || IS_ENABLED(CONFIG_DM_USB) struct int_queue *create_int_queue(struct usb_device *dev, unsigned long pipe, int queuesize, int elementsize, void *buffer, int interval); int destroy_int_queue(struct usb_device *dev, struct int_queue *queue); @@ -596,7 +596,7 @@ struct usb_hub_device { struct usb_tt tt; /* Transaction Translator */ }; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) /** * struct usb_plat - Platform data about a USB controller * @@ -924,7 +924,7 @@ int usb_remove_ehci_gadget(struct ehci_ctrl **ctlrp); */ void usb_stor_reset(void); -#else /* !CONFIG_IS_ENABLED(DM_USB) */ +#else /* !IS_ENABLED(CONFIG_DM_USB) */ struct usb_device *usb_get_dev_index(int index); diff --git a/include/usb/xhci.h b/include/usb/xhci.h index 4a4ac10229a..b06c520165f 100644 --- a/include/usb/xhci.h +++ b/include/usb/xhci.h @@ -1204,7 +1204,7 @@ void xhci_hcd_stop(int index); #define XHCI_STS_CNR (1 << 11) struct xhci_ctrl { -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) struct udevice *dev; #endif struct xhci_hccr *hccr; /* R/O registers, not need for volatile */ @@ -1230,7 +1230,7 @@ struct xhci_ctrl { #define XHCI_MTK_HOST BIT(0) }; -#if CONFIG_IS_ENABLED(DM_USB) +#if IS_ENABLED(CONFIG_DM_USB) #define xhci_to_dev(_ctrl) _ctrl->dev #else #define xhci_to_dev(_ctrl) NULL @@ -1297,7 +1297,7 @@ struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev); static inline dma_addr_t xhci_dma_map(struct xhci_ctrl *ctrl, void *addr, size_t size) { -#if CONFIG_IS_ENABLED(IOMMU) +#if IS_ENABLED(CONFIG_IOMMU) return dev_iommu_dma_map(xhci_to_dev(ctrl), addr, size); #else return dev_phys_to_bus(xhci_to_dev(ctrl), virt_to_phys(addr)); @@ -1307,7 +1307,7 @@ static inline dma_addr_t xhci_dma_map(struct xhci_ctrl *ctrl, void *addr, static inline void xhci_dma_unmap(struct xhci_ctrl *ctrl, dma_addr_t addr, size_t size) { -#if CONFIG_IS_ENABLED(IOMMU) +#if IS_ENABLED(CONFIG_IOMMU) dev_iommu_dma_unmap(xhci_to_dev(ctrl), addr, size); #endif } diff --git a/include/xilinx.h b/include/xilinx.h index e4e29797988..5e8219b3d28 100644 --- a/include/xilinx.h +++ b/include/xilinx.h @@ -62,7 +62,7 @@ struct xilinx_fpga_op { struct fpga_secure_info *fpga_sec_info); int (*dump)(xilinx_desc *desc, const void *buf, size_t bsize); int (*info)(xilinx_desc *desc); -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) int (*str2flag)(xilinx_desc *desc, const char *string); #endif }; diff --git a/include/zynqmppl.h b/include/zynqmppl.h index acf75a8f079..0f5feeb5044 100644 --- a/include/zynqmppl.h +++ b/include/zynqmppl.h @@ -25,7 +25,7 @@ extern struct xilinx_fpga_op zynqmp_op; -#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) +#if IS_ENABLED(CONFIG_FPGA_LOAD_SECURE) #define ZYNQMP_FPGA_FLAGS (FPGA_LEGACY | \ FPGA_XILINX_ZYNQMP_DDRAUTH | \ FPGA_XILINX_ZYNQMP_ENC) diff --git a/lib/display_options.c b/lib/display_options.c index 80def5201f9..7d1455c0d60 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -189,7 +189,7 @@ int hexdump_line(ulong addr, const void *data, uint width, uint count, x = lb.us[i] = *(volatile uint16_t *)data; else x = lb.uc[i] = *(volatile uint8_t *)data; - if (CONFIG_IS_ENABLED(USE_TINY_PRINTF)) + if (IS_ENABLED(CONFIG_USE_TINY_PRINTF)) out += sprintf(out, " %x", (uint)x); else out += sprintf(out, " %0*lx", width * 2, x); diff --git a/lib/efi_loader/efi_conformance.c b/lib/efi_loader/efi_conformance.c index 3036d46349a..ee8c85d526c 100644 --- a/lib/efi_loader/efi_conformance.c +++ b/lib/efi_loader/efi_conformance.c @@ -38,7 +38,7 @@ efi_status_t efi_ecpt_register(void) return ret; } - if (CONFIG_IS_ENABLED(EFI_EBBR_2_1_CONFORMANCE)) + if (IS_ENABLED(CONFIG_EFI_EBBR_2_1_CONFORMANCE)) guidcpy(&ecpt->conformance_profiles[num_entries++], &efi_ebbr_2_1_guid); diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 1ed8c7aa36e..2e2d7929822 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -465,7 +465,7 @@ static efi_status_t EFIAPI efi_cout_set_attribute( */ static void efi_clear_screen(void) { - if (CONFIG_IS_ENABLED(EFI_SCROLL_ON_CLEAR_SCREEN)) { + if (IS_ENABLED(CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN)) { unsigned int row, screen_rows, screen_columns; /* Avoid overwriting previous outputs on streaming consoles */ @@ -1313,7 +1313,7 @@ efi_status_t efi_console_register(void) NULL); /* Create console node and install device path protocols */ - if (CONFIG_IS_ENABLED(DM_SERIAL)) { + if (IS_ENABLED(CONFIG_DM_SERIAL)) { dp = efi_dp_from_uart(); if (!dp) goto out_of_memory; diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 3b267b713e9..58adb11f577 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -863,7 +863,7 @@ static void *dp_part_node(void *buf, struct blk_desc *desc, int part) break; case SIG_TYPE_GUID: hddp->signature_type = 2; -#if CONFIG_IS_ENABLED(PARTITION_UUIDS) +#if IS_ENABLED(CONFIG_PARTITION_UUIDS) /* info.uuid exists only with PARTITION_UUIDS */ if (uuid_str_to_bin(info.uuid, hddp->partition_signature, diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index d2256713a8e..bffd03e6b78 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -123,7 +123,7 @@ static efi_status_t efi_disk_rw_blocks(struct efi_block_io *this, if (buffer_size & (blksz - 1)) return EFI_BAD_BUFFER_SIZE; - if (CONFIG_IS_ENABLED(PARTITIONS) && + if (IS_ENABLED(CONFIG_PARTITIONS) && device_get_uclass_id(diskobj->header.dev) == UCLASS_PARTITION) { if (direction == EFI_DISK_READ) n = disk_blk_read(diskobj->header.dev, lba, blocks, diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c index 108c14b95bd..cdc5d94cee3 100644 --- a/lib/efi_loader/efi_root_node.c +++ b/lib/efi_loader/efi_root_node.c @@ -53,7 +53,7 @@ efi_status_t efi_root_node_register(void) (&efi_root, /* Device path protocol */ &efi_guid_device_path, dp, -#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) +#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT) /* Device path to text protocol */ &efi_guid_device_path_to_text_protocol, &efi_device_path_to_text, @@ -63,7 +63,7 @@ efi_status_t efi_root_node_register(void) &efi_guid_device_path_utilities_protocol, &efi_device_path_utilities, #endif -#if CONFIG_IS_ENABLED(EFI_DT_FIXUP) +#if IS_ENABLED(CONFIG_EFI_DT_FIXUP) /* Device-tree fix-up protocol */ &efi_guid_dt_fixup_protocol, &efi_dt_fixup_prot, diff --git a/lib/efi_selftest/efi_selftest_ecpt.c b/lib/efi_selftest/efi_selftest_ecpt.c index 09c5e96c5e1..839fd56841c 100644 --- a/lib/efi_selftest/efi_selftest_ecpt.c +++ b/lib/efi_selftest/efi_selftest_ecpt.c @@ -53,7 +53,7 @@ static int execute(void) return EFI_ST_FAILURE; } - if (CONFIG_IS_ENABLED(EFI_EBBR_2_1_CONFORMANCE)) { + if (IS_ENABLED(CONFIG_EFI_EBBR_2_1_CONFORMANCE)) { ++expected_entries; if (ecpt_find_guid(ecpt, &guid_ebbr_2_1)) return EFI_ST_FAILURE; diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 0827e16859f..b044bd33826 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -127,7 +127,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node, return FDT_ADDR_T_NONE; } -#if CONFIG_IS_ENABLED(OF_TRANSLATE) +#if IS_ENABLED(CONFIG_OF_TRANSLATE) if (translate) addr = fdt_translate_address(blob, node, prop_addr); else @@ -912,7 +912,7 @@ int fdt_get_resource(const void *fdt, int node, const char *property, while (ptr + na + ns <= end) { if (i == index) { - if (CONFIG_IS_ENABLED(OF_TRANSLATE)) + if (IS_ENABLED(CONFIG_OF_TRANSLATE)) res->start = fdt_translate_address(fdt, node, ptr); else res->start = fdtdec_get_number(ptr, na); @@ -1158,18 +1158,18 @@ int fdtdec_setup_mem_size_base_lowest(void) static int uncompress_blob(const void *src, ulong sz_src, void **dstp) { -#if CONFIG_IS_ENABLED(MULTI_DTB_FIT_GZIP) ||\ - CONFIG_IS_ENABLED(MULTI_DTB_FIT_LZO) +#if IS_ENABLED(CONFIG_MULTI_DTB_FIT_GZIP) ||\ + IS_ENABLED(CONFIG_MULTI_DTB_FIT_LZO) size_t sz_out = CONFIG_VAL(MULTI_DTB_FIT_UNCOMPRESS_SZ); bool gzip = 0, lzo = 0; ulong sz_in = sz_src; void *dst; int rc; - if (CONFIG_IS_ENABLED(GZIP)) + if (IS_ENABLED(CONFIG_GZIP)) if (gzip_parse_header(src, sz_in) >= 0) gzip = 1; - if (CONFIG_IS_ENABLED(LZO)) + if (IS_ENABLED(CONFIG_LZO)) if (!gzip && lzop_is_valid_header(src)) lzo = 1; @@ -1177,23 +1177,23 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp) return -EBADMSG; - if (CONFIG_IS_ENABLED(MULTI_DTB_FIT_DYN_ALLOC)) { + if (IS_ENABLED(CONFIG_MULTI_DTB_FIT_DYN_ALLOC)) { dst = malloc(sz_out); if (!dst) { puts("uncompress_blob: Unable to allocate memory\n"); return -ENOMEM; } } else { -# if CONFIG_IS_ENABLED(MULTI_DTB_FIT_USER_DEFINED_AREA) +# if IS_ENABLED(CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA) dst = (void *)CONFIG_VAL(MULTI_DTB_FIT_USER_DEF_ADDR); # else return -ENOTSUPP; # endif } - if (CONFIG_IS_ENABLED(GZIP) && gzip) + if (IS_ENABLED(CONFIG_GZIP) && gzip) rc = gunzip(dst, sz_out, (u8 *)src, &sz_in); - else if (CONFIG_IS_ENABLED(LZO) && lzo) + else if (IS_ENABLED(CONFIG_LZO) && lzo) rc = lzop_decompress(src, sz_in, dst, &sz_out); else hang(); @@ -1201,7 +1201,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp) if (rc < 0) { /* not a valid compressed blob */ puts("uncompress_blob: Unable to uncompress\n"); - if (CONFIG_IS_ENABLED(MULTI_DTB_FIT_DYN_ALLOC)) + if (IS_ENABLED(CONFIG_MULTI_DTB_FIT_DYN_ALLOC)) free(dst); return -EBADMSG; } @@ -1691,7 +1691,7 @@ int fdtdec_setup(void) } } - if (CONFIG_IS_ENABLED(MULTI_DTB_FIT)) + if (IS_ENABLED(CONFIG_MULTI_DTB_FIT)) setup_multi_dtb_fit(); ret = fdtdec_prepare_fdt(gd->fdt_blob); diff --git a/lib/hang.c b/lib/hang.c index 2735774f9a4..4e6d04b3ec2 100644 --- a/lib/hang.c +++ b/lib/hang.c @@ -23,8 +23,8 @@ void hang(void) { #if !defined(CONFIG_SPL_BUILD) || \ - (CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \ - CONFIG_IS_ENABLED(SERIAL)) + (IS_ENABLED(CONFIG_LIBCOMMON_SUPPORT) && \ + IS_ENABLED(CONFIG_SERIAL)) puts("### ERROR ### Please RESET the board ###\n"); #endif bootstage_error(BOOTSTAGE_ID_NEED_RESET); diff --git a/lib/hashtable.c b/lib/hashtable.c index f2d36bd34b4..b741a527dc6 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -818,7 +818,7 @@ int himport_r(struct hsearch_data *htab, if (nvars) memcpy(localvars, vars, sizeof(vars[0]) * nvars); -#if CONFIG_IS_ENABLED(ENV_APPEND) +#if IS_ENABLED(CONFIG_ENV_APPEND) flag |= H_NOCLEAR; #endif diff --git a/lib/hexdump.c b/lib/hexdump.c index 149c93ead8b..c76c4f564da 100644 --- a/lib/hexdump.c +++ b/lib/hexdump.c @@ -21,7 +21,7 @@ const char hex_asc[] = "0123456789abcdef"; const char hex_asc_upper[] = "0123456789ABCDEF"; -#if CONFIG_IS_ENABLED(HEXDUMP) +#if IS_ENABLED(CONFIG_HEXDUMP) int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, char *linebuf, size_t linebuflen, bool ascii) { diff --git a/lib/image-sparse.c b/lib/image-sparse.c index 5ec0f94ab3e..c72f8fb10a5 100644 --- a/lib/image-sparse.c +++ b/lib/image-sparse.c @@ -58,7 +58,7 @@ static lbaint_t write_sparse_chunk_raw(struct sparse_storage *info, lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100; uint32_t *aligned_buf = NULL; - if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) { + if (IS_ENABLED(CONFIG_SYS_DCACHE_OFF)) { write_blks = info->write(info, blk, n, data); if (write_blks < n) goto write_fail; diff --git a/lib/lmb.c b/lib/lmb.c index ec790760db6..08720ddedca 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -191,10 +191,10 @@ static void lmb_reserve_common(struct lmb *lmb, void *fdt_blob) arch_lmb_reserve(lmb); board_lmb_reserve(lmb); - if (CONFIG_IS_ENABLED(OF_LIBFDT) && fdt_blob) + if (IS_ENABLED(CONFIG_OF_LIBFDT) && fdt_blob) boot_fdt_add_mem_rsv_regions(lmb, fdt_blob); - if (CONFIG_IS_ENABLED(EFI_LOADER)) + if (IS_ENABLED(CONFIG_EFI_LOADER)) efi_lmb_reserve(lmb); } diff --git a/lib/panic.c b/lib/panic.c index 58382ac4f4c..746a2824c29 100644 --- a/lib/panic.c +++ b/lib/panic.c @@ -39,7 +39,7 @@ void panic_str(const char *str) void panic(const char *fmt, ...) { -#if CONFIG_IS_ENABLED(PRINTF) +#if IS_ENABLED(CONFIG_PRINTF) va_list args; va_start(args, fmt); vprintf(fmt, args); diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index d20bdb58a57..97403481a03 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -402,7 +402,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo, goto err_sign; } - if (CONFIG_IS_ENABLED(FIT_RSASSA_PSS) && padding_algo && + if (IS_ENABLED(CONFIG_FIT_RSASSA_PSS) && padding_algo && !strcmp(padding_algo->name, "pss")) { if (EVP_PKEY_CTX_set_rsa_padding(ckey, RSA_PKCS1_PSS_PADDING) <= 0) { diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 2f3b3440391..4eab297d87b 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -90,7 +90,7 @@ U_BOOT_PADDING_ALGO(pkcs_15) = { }; #endif -#if CONFIG_IS_ENABLED(FIT_RSASSA_PSS) +#if IS_ENABLED(CONFIG_FIT_RSASSA_PSS) static void u32_i2osp(uint32_t val, uint8_t *buf) { buf[0] = (uint8_t)((val >> 24) & 0xff); @@ -400,7 +400,7 @@ int rsa_verify_with_pkey(struct image_sign_info *info, struct key_prop *prop; int ret; - if (!CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY)) + if (!IS_ENABLED(CONFIG_RSA_VERIFY_WITH_PKEY)) return -EACCES; /* Public key is self-described to fill key_prop */ @@ -418,7 +418,7 @@ int rsa_verify_with_pkey(struct image_sign_info *info, return ret; } -#if CONFIG_IS_ENABLED(FIT_SIGNATURE) +#if IS_ENABLED(CONFIG_FIT_SIGNATURE) /** * rsa_verify_with_keynode() - Verify a signature against some data using * information in node with prperties of RSA Key like modulus, exponent etc. @@ -499,7 +499,7 @@ int rsa_verify_hash(struct image_sign_info *info, * RSA encryption, rsa_verify_with_pkey()/rsa_gen_key_prop() are * of no use and should not be compiled in. */ - if (!tools_build() && CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY) && + if (!tools_build() && IS_ENABLED(CONFIG_RSA_VERIFY_WITH_PKEY) && !info->fdt_blob) { /* don't rely on fdt properties */ ret = rsa_verify_with_pkey(info, hash, sig, sig_len); @@ -508,7 +508,7 @@ int rsa_verify_hash(struct image_sign_info *info, return ret; } - if (CONFIG_IS_ENABLED(FIT_SIGNATURE)) { + if (IS_ENABLED(CONFIG_FIT_SIGNATURE)) { const void *blob = info->fdt_blob; int ndepth, noffset; int sig_node, node; diff --git a/lib/semihosting.c b/lib/semihosting.c index 831774e3566..d5cbac4b01b 100644 --- a/lib/semihosting.c +++ b/lib/semihosting.c @@ -20,7 +20,7 @@ #define SYSFLEN 0x0C #define SYSERRNO 0x13 -#if CONFIG_IS_ENABLED(SEMIHOSTING_FALLBACK) +#if IS_ENABLED(CONFIG_SEMIHOSTING_FALLBACK) static bool _semihosting_enabled = true; static bool try_semihosting = true; diff --git a/lib/string.c b/lib/string.c index ecea755f405..0afa8d35078 100644 --- a/lib/string.c +++ b/lib/string.c @@ -526,7 +526,7 @@ __used void * memset(void * s,int c,size_t count) unsigned long *sl = (unsigned long *) s; char *s8; -#if !CONFIG_IS_ENABLED(TINY_MEMSET) +#if !IS_ENABLED(CONFIG_TINY_MEMSET) unsigned long cl = 0; int i; diff --git a/lib/time.c b/lib/time.c index 5252190af53..aaa70ecb3f8 100644 --- a/lib/time.c +++ b/lib/time.c @@ -66,7 +66,7 @@ ulong timer_get_boot_us(void) extern unsigned long timer_read_counter(void); #endif -#if CONFIG_IS_ENABLED(TIMER) +#if IS_ENABLED(CONFIG_TIMER) ulong notrace get_tbclk(void) { if (!gd->timer) { diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index f661fc65054..d8c389b5780 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -270,7 +270,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) } break; case 'p': - if (CONFIG_IS_ENABLED(NET) || _DEBUG) { + if (IS_ENABLED(CONFIG_NET) || _DEBUG) { pointer(info, fmt, va_arg(va, void *)); /* * Skip this because it pulls in _ctype which is @@ -327,7 +327,7 @@ abort: return 0; } -#if CONFIG_IS_ENABLED(PRINTF) +#if IS_ENABLED(CONFIG_PRINTF) static void putc_normal(struct printf_info *info, char ch) { putc(ch); @@ -378,7 +378,7 @@ int sprintf(char *buf, const char *fmt, ...) return ret; } -#if CONFIG_IS_ENABLED(LOG) +#if IS_ENABLED(CONFIG_LOG) /* Note that size is ignored */ int vsnprintf(char *buf, size_t size, const char *fmt, va_list va) { diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 2d13e68b579..86c6cfee45f 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -308,7 +308,7 @@ static __maybe_unused char *string16(char *buf, char *end, u16 *s, return buf; } -#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) +#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT) static char *device_path_string(char *buf, char *end, void *dp, int field_width, int precision, int flags) { @@ -469,7 +469,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, switch (*fmt) { /* Device paths only exist in the EFI context. */ -#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD) +#if IS_ENABLED(CONFIG_EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD) case 'D': return device_path_string(buf, end, ptr, field_width, precision, flags); @@ -629,7 +629,7 @@ repeat: case 's': /* U-Boot uses UTF-16 strings in the EFI context only. */ -#if (CONFIG_IS_ENABLED(EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) && \ +#if (IS_ENABLED(CONFIG_EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) && \ !defined(API_BUILD) if (qualifier == 'l') { str = string16(str, end, va_arg(args, u16 *), @@ -808,7 +808,7 @@ int sprintf(char *buf, const char *fmt, ...) return i; } -#if CONFIG_IS_ENABLED(PRINTF) +#if IS_ENABLED(CONFIG_PRINTF) int printf(const char *fmt, ...) { va_list args; diff --git a/net/bootp.c b/net/bootp.c index 8b1a4ae2ef8..5fd911a6d8b 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -1077,7 +1077,7 @@ static void dhcp_handler(uchar *pkt, unsigned dest, struct in_addr sip, strlen(CONFIG_SYS_BOOTFILE_PREFIX)) == 0) { #endif /* CONFIG_SYS_BOOTFILE_PREFIX */ dhcp_packet_process_options(bp); - if (CONFIG_IS_ENABLED(EFI_LOADER) && + if (IS_ENABLED(CONFIG_EFI_LOADER) && IS_ENABLED(CONFIG_NETDEVICES)) efi_net_set_dhcp_ack(pkt, len); diff --git a/net/eth-uclass.c b/net/eth-uclass.c index b01a910938e..c4283b836d8 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -500,7 +500,7 @@ static int eth_post_bind(struct udevice *dev) #ifdef CONFIG_DM_ETH_PHY eth_phy_binds_nodes(dev); #endif - if (CONFIG_IS_ENABLED(BOOTDEV_ETH) && !priv->no_bootdevs) { + if (IS_ENABLED(CONFIG_BOOTDEV_ETH) && !priv->no_bootdevs) { ret = bootdev_setup_for_dev(dev, "eth_bootdev"); if (ret) return log_msg_ret("bootdev", ret); @@ -520,7 +520,7 @@ static int eth_pre_unbind(struct udevice *dev) static bool eth_dev_get_mac_address(struct udevice *dev, u8 mac[ARP_HLEN]) { -#if CONFIG_IS_ENABLED(OF_CONTROL) +#if IS_ENABLED(CONFIG_OF_CONTROL) const uint8_t *p; struct nvmem_cell mac_cell; diff --git a/net/eth_common.c b/net/eth_common.c index 82d527abba6..b33a6268819 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -32,7 +32,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index, void eth_common_init(void) { bootstage_mark(BOOTSTAGE_ID_NET_ETH_START); -#if CONFIG_IS_ENABLED(ETH) +#if IS_ENABLED(CONFIG_ETH) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB) miiphy_init(); #endif diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index fe8180ab4e7..82a3b748b65 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -477,7 +477,7 @@ static int run_tests(void) CHECKP(buf + 7, out); CHECKP(buf + 13, end); - strcpy(buf, "CONFIG_IS_ENABLED(FRED)"); + strcpy(buf, "IS_ENABLED(CONFIG_FRED)"); out = parse_config_line(buf, &end); CHECKP(buf + 18, out); CHECKP(buf + 22, end); diff --git a/test/cmd_ut.c b/test/cmd_ut.c index 1713d0d1c85..821061b269f 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -93,7 +93,7 @@ static struct cmd_tbl cmd_ut_sub[] = { #ifdef CONFIG_UT_TIME U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""), #endif -#if CONFIG_IS_ENABLED(UT_UNICODE) && !defined(API_BUILD) +#if IS_ENABLED(CONFIG_UT_UNICODE) && !defined(API_BUILD) U_BOOT_CMD_MKENT(unicode, CONFIG_SYS_MAXARGS, 1, do_ut_unicode, "", ""), #endif #ifdef CONFIG_SANDBOX diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index e4ebb93cdad..80065e5da53 100644 --- a/test/dm/clk_ccf.c +++ b/test/dm/clk_ccf.c @@ -22,7 +22,7 @@ static int dm_test_clk_ccf(struct unit_test_state *uts) struct udevice *dev; long long rate; int ret; -#if CONFIG_IS_ENABLED(CLK_CCF) +#if IS_ENABLED(CONFIG_CLK_CCF) const char *clkname; int clkid, i; #endif @@ -108,7 +108,7 @@ static int dm_test_clk_ccf(struct unit_test_state *uts) rate = clk_get_rate(clk); ut_asserteq(rate, 60000000); -#if CONFIG_IS_ENABLED(CLK_CCF) +#if IS_ENABLED(CONFIG_CLK_CCF) /* Test clk tree enable/disable */ ret = clk_get_by_id(SANDBOX_CLK_I2C_ROOT, &clk); ut_assertok(ret); diff --git a/test/dm/core.c b/test/dm/core.c index 7f3f8d183bc..4544bc69deb 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -1203,7 +1203,7 @@ static int dm_test_all_have_seq(struct unit_test_state *uts) } DM_TEST(dm_test_all_have_seq, UT_TESTF_SCAN_PDATA); -#if CONFIG_IS_ENABLED(DM_DMA) +#if IS_ENABLED(CONFIG_DM_DMA) static int dm_test_dma_offset(struct unit_test_state *uts) { struct udevice *dev; diff --git a/test/dm/fastboot.c b/test/dm/fastboot.c index 758538d0e85..52c0c7a8ba7 100644 --- a/test/dm/fastboot.c +++ b/test/dm/fastboot.c @@ -41,7 +41,7 @@ static int dm_test_fastboot_mmc_part(struct unit_test_state *uts) */ ut_asserteq(0, CONFIG_FASTBOOT_FLASH_MMC_DEV); ut_assertok(blk_get_device_by_str("mmc", "0", &mmc_dev_desc)); - if (CONFIG_IS_ENABLED(RANDOM_UUID)) { + if (IS_ENABLED(CONFIG_RANDOM_UUID)) { gen_rand_uuid_str(parts[0].uuid, UUID_STR_FORMAT_STD); gen_rand_uuid_str(parts[1].uuid, UUID_STR_FORMAT_STD); gen_rand_uuid_str(str_disk_guid, UUID_STR_FORMAT_STD); diff --git a/test/dm/of_platdata.c b/test/dm/of_platdata.c index a241c427936..85015154883 100644 --- a/test/dm/of_platdata.c +++ b/test/dm/of_platdata.c @@ -149,7 +149,7 @@ static int dm_test_of_plat_dev(struct unit_test_state *uts) uint i; /* Skip this test if there is no platform data */ - if (!CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)) + if (!IS_ENABLED(CONFIG_OF_PLATDATA_DRIVER_RT)) return -EAGAIN; /* Record the indexes that are found */ @@ -209,7 +209,7 @@ static int dm_test_of_plat_phandle(struct unit_test_state *uts) } DM_TEST(dm_test_of_plat_phandle, UT_TESTF_SCAN_PDATA); -#if CONFIG_IS_ENABLED(OF_PLATDATA_PARENT) +#if IS_ENABLED(CONFIG_OF_PLATDATA_PARENT) /* Test that device parents are correctly set up */ static int dm_test_of_plat_parent(struct unit_test_state *uts) { diff --git a/test/dm/part.c b/test/dm/part.c index 35e99eeb01a..940d2bc6697 100644 --- a/test/dm/part.c +++ b/test/dm/part.c @@ -44,7 +44,7 @@ static int dm_test_part(struct unit_test_state *uts) }; ut_asserteq(2, blk_get_device_by_str("mmc", "2", &mmc_dev_desc)); - if (CONFIG_IS_ENABLED(RANDOM_UUID)) { + if (IS_ENABLED(CONFIG_RANDOM_UUID)) { gen_rand_uuid_str(parts[0].uuid, UUID_STR_FORMAT_STD); gen_rand_uuid_str(parts[1].uuid, UUID_STR_FORMAT_STD); gen_rand_uuid_str(str_disk_guid, UUID_STR_FORMAT_STD); diff --git a/test/dm/spi.c b/test/dm/spi.c index 325799bbf10..1f63fe289f6 100644 --- a/test/dm/spi.c +++ b/test/dm/spi.c @@ -194,7 +194,7 @@ static int dm_test_spi_xfer(struct unit_test_state *uts) * Since we are about to destroy all devices, we must tell sandbox * to forget the emulation device */ -#if CONFIG_IS_ENABLED(DM_SPI_FLASH) +#if IS_ENABLED(CONFIG_DM_SPI_FLASH) sandbox_sf_unbind_emul(state_get_current(), busnum, cs); #endif diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c index 472d2c57280..8fb6422c905 100644 --- a/test/lib/kconfig.c +++ b/test/lib/kconfig.c @@ -18,9 +18,9 @@ static int lib_test_is_enabled(struct unit_test_state *uts) ut_asserteq(1, IS_ENABLED(CONFIG_CMDLINE)) ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED)) - ut_asserteq(1, CONFIG_IS_ENABLED(CMDLINE)) - ut_asserteq(0, CONFIG_IS_ENABLED(OF_PLATDATA)) - ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED)) + ut_asserteq(1, IS_ENABLED(CONFIG_CMDLINE)) + ut_asserteq(0, IS_ENABLED(CONFIG_OF_PLATDATA)) + ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED)) ut_asserteq(0xc000, IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); @@ -47,7 +47,7 @@ static int lib_test_is_enabled(struct unit_test_state *uts) * cause SPL to not be built. */ if (!IS_ENABLED(CONFIG_SANDBOX_SPL) && - CONFIG_IS_ENABLED(TEST_KCONFIG)) { + IS_ENABLED(CONFIG_TEST_KCONFIG)) { val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, TEST_KCONFIG_VALUE); printf("value2 %ld\n", val); diff --git a/test/lib/kconfig_spl.c b/test/lib/kconfig_spl.c index c89ceaec66f..5c66183dc3d 100644 --- a/test/lib/kconfig_spl.c +++ b/test/lib/kconfig_spl.c @@ -15,9 +15,9 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts) { ulong val; - ut_asserteq(0, CONFIG_IS_ENABLED(CMDLINE)) - ut_asserteq(1, CONFIG_IS_ENABLED(OF_PLATDATA)) - ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED)) + ut_asserteq(0, IS_ENABLED(CONFIG_CMDLINE)) + ut_asserteq(1, IS_ENABLED(CONFIG_OF_PLATDATA)) + ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED)) /* * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the @@ -33,7 +33,7 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts) * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the * value is used. */ - if (CONFIG_IS_ENABLED(TEST_KCONFIG)) { + if (IS_ENABLED(CONFIG_TEST_KCONFIG)) { val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, TEST_KCONFIG_VALUE); printf("value2 %ld\n", val); diff --git a/test/print_ut.c b/test/print_ut.c index 47a6ce57840..eb7592ff740 100644 --- a/test/print_ut.c +++ b/test/print_ut.c @@ -23,7 +23,7 @@ /* Declare a new print test */ #define PRINT_TEST(_name, _flags) UNIT_TEST(_name, _flags, print_test) -#if CONFIG_IS_ENABLED(LIB_UUID) +#if IS_ENABLED(CONFIG_LIB_UUID) /* Test printing GUIDs */ static int print_guid(struct unit_test_state *uts) { @@ -62,7 +62,7 @@ static int print_guid(struct unit_test_state *uts) PRINT_TEST(print_guid, 0); #endif -#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) +#if IS_ENABLED(CONFIG_EFI_LOADER) && !defined(API_BUILD) /* Test efi_loader specific printing */ static int print_efi_ut(struct unit_test_state *uts) { diff --git a/test/test-main.c b/test/test-main.c index ea959f4e859..290cfd6c41b 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -47,7 +47,7 @@ enum fdtchk_t { static enum fdtchk_t fdt_action(void) { /* Do a copy for sandbox (but only the U-Boot build, not SPL) */ - if (CONFIG_IS_ENABLED(SANDBOX)) + if (IS_ENABLED(CONFIG_SANDBOX)) return FDTCHK_COPY; /* For sandbox SPL builds, do nothing */ @@ -96,7 +96,7 @@ static int dm_test_pre_run(struct unit_test_state *uts) fdt_totalsize(gd->fdt_blob)); gd->dm_root = NULL; malloc_disable_testing(); - if (CONFIG_IS_ENABLED(UT_DM) && !CONFIG_IS_ENABLED(OF_PLATDATA)) + if (IS_ENABLED(CONFIG_UT_DM) && !IS_ENABLED(CONFIG_OF_PLATDATA)) memset(dm_testdrv_op_count, '\0', sizeof(dm_testdrv_op_count)); arch_reset_for_test(); @@ -145,7 +145,7 @@ static int dm_test_post_run(struct unit_test_state *uts) * destroy them we cannot get them back since uclass_add() is not * supported. So skip this. */ - if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + if (!IS_ENABLED(CONFIG_OF_PLATDATA_INST)) { for (id = 0; id < UCLASS_COUNT; id++) { struct uclass *uc; @@ -267,11 +267,11 @@ static int dm_test_restore(struct device_node *of_root) gd_set_of_root(of_root); gd->dm_root = NULL; - ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE)); + ret = dm_init(IS_ENABLED(CONFIG_OF_LIVE)); if (ret) return ret; dm_scan_plat(false); - if (!CONFIG_IS_ENABLED(OF_PLATDATA)) + if (!IS_ENABLED(CONFIG_OF_PLATDATA)) dm_scan_fdt(false); return 0; @@ -303,7 +303,7 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test) if (test->flags & UT_TESTF_PROBE_TEST) ut_assertok(do_autoprobe(uts)); - if (!CONFIG_IS_ENABLED(OF_PLATDATA) && + if (!IS_ENABLED(CONFIG_OF_PLATDATA) && (test->flags & UT_TESTF_SCAN_FDT)) { /* * only set this if we know the ethernet uclass will be created @@ -456,7 +456,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts, /* Run with the live tree if possible */ runs = 0; - if (CONFIG_IS_ENABLED(OF_LIVE)) { + if (IS_ENABLED(CONFIG_OF_LIVE)) { if (!(test->flags & UT_TESTF_FLAT_TREE)) { uts->of_live = true; ut_assertok(ut_run_test(uts, test, test->name)); @@ -477,7 +477,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts, * boards) */ if (!(test->flags & UT_TESTF_LIVE_TREE) && - (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) || + (IS_ENABLED(CONFIG_OFNODE_MULTI_TREE) || !(test->flags & UT_TESTF_OTHER_FDT)) && (!runs || ut_test_run_on_flattree(test)) && !(gd->flags & GD_FLG_FDT_CHANGED)) { @@ -600,7 +600,7 @@ int ut_run_list(const char *category, const char *prefix, bool has_dm_tests = false; int ret; - if (!CONFIG_IS_ENABLED(OF_PLATDATA) && + if (!IS_ENABLED(CONFIG_OF_PLATDATA) && ut_list_has_dm_tests(tests, count)) { has_dm_tests = true; /* diff --git a/test/unicode_ut.c b/test/unicode_ut.c index 382b7965161..1d28a4b00fd 100644 --- a/test/unicode_ut.c +++ b/test/unicode_ut.c @@ -104,7 +104,7 @@ static int unicode_test_u16_strcpy(struct unit_test_state *uts) UNICODE_TEST(unicode_test_u16_strcpy); /* U-Boot uses UTF-16 strings in the EFI context only. */ -#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) +#if IS_ENABLED(CONFIG_EFI_LOADER) && !defined(API_BUILD) static int unicode_test_string16(struct unit_test_state *uts) { char buf[20]; @@ -635,7 +635,7 @@ static int unicode_test_u16_strcasecmp(struct unit_test_state *uts) ut_assert(u16_strcasecmp(u"abcd", u"abcE") < 0); ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0); ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0); - if (CONFIG_IS_ENABLED(EFI_UNICODE_CAPITALIZATION)) { + if (IS_ENABLED(CONFIG_EFI_UNICODE_CAPITALIZATION)) { /* Cyrillic letters */ ut_assert(u16_strcasecmp(u"\x043a\x043d\x0438\x0433\x0430", u"\x041a\x041d\x0418\x0413\x0410") == 0); From patchwork Tue Jan 31 15:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734953 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=UCDjLhZT; 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 4P5pwG07b1z23gV for ; Wed, 1 Feb 2023 02:33:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73A2285B3E; Tue, 31 Jan 2023 16:29:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="UCDjLhZT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACAA385AFA; Tue, 31 Jan 2023 16:28:29 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (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 E477385AF0 for ; Tue, 31 Jan 2023 16:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x133.google.com with SMTP id i17so6456858ils.11 for ; Tue, 31 Jan 2023 07:28:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=Xl49c+wcaUWI8k03WlrDXYXN4QHhBIqnehFOLi1M5NA=; b=UCDjLhZTCTyUPLFDlgx+2b/BlTcfE/8/7Q1vcmG1I2QcbjGrs+gXOi6DaGVZbOTxS7 OAktGvTzSYOl8VszxklNp4z3BiTVL2JgjcPSxowhFFSILq5WNrejpKbES0D+Sr0sZ+KB x9jyxIvdObbt6BzmR7pXpyycb0uXKdgbgYpSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xl49c+wcaUWI8k03WlrDXYXN4QHhBIqnehFOLi1M5NA=; b=Gm6ZO0Lem5KHqSig9fyBREtHkJvFe1F1g+ylherPwO/yVoQWrZKmE1zeL/BEiit7av Bs72o8LwqxB2BwnIx6hrpj/Jm2n+RsE/y1OHVfHffNg4dquW/NKpp9R3AThLeAYjmmB4 FHUdMj5ModdD4i29dGuE0UM2apWE9f0jSZ9eOkwNAUW24xYbET030M82aN5hhB4bTTO+ dXjuIscXjdq/eA5K5Wh8bMFHjRdUHTM56LaYSoQTu+H2TB2h+GlvrpG4/uqSf9PWKskD kYiHEd+ycSa25dJgvFskFJDvjdGdLFshyp1KycyX3uUAySr6J8qBqtfRIRaRYEMQ8LhG kd0Q== X-Gm-Message-State: AO0yUKVIIj34HZLO5Kx7O6xQmE0VE6ykwk4n/el8PIQMVrE3LdkcTfQs tGnI1g2p6UHpriBA4nyYT2OJ+MkLCKhIDSJG X-Google-Smtp-Source: AK7set9LYft8w9WhPsI/5KSdbt+Py3nwxDDBJudPhtTglpjXmMzpyvRULSTnF4gX+0/5S2rngV9e5A== X-Received: by 2002:a05:6e02:12c5:b0:310:a5b8:5050 with SMTP id i5-20020a056e0212c500b00310a5b85050mr18001433ilm.22.1675178881134; Tue, 31 Jan 2023 07:28:01 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:00 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 26/32] kconfig: Adjust the meaning of CONFIG_IS_ENABLED() Date: Tue, 31 Jan 2023 08:26:56 -0700 Message-Id: <20230131152702.249197-27-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Adjust this to require the CONFIG option be provided, so that instead of: CONFIG_IS_ENABLED(FOO) you must write: CONFIG_IS_ENABLED(CONFIG_FOO) This is in preparation for dropping this and just using it is as the new implementation of IS_ENABLED(). For now, update IS_ENABLED() to use CONFIG_IS_ENABLED(), so we can rely on the three-argument version. Signed-off-by: Simon Glass --- arch/x86/lib/fsp/fsp_dram.c | 2 +- board/st/stm32mp1/stm32mp1.c | 2 +- drivers/fastboot/fb_command.c | 16 ++++++++-------- include/linux/kconfig.h | 34 ++++++++++++---------------------- test/dm/ofnode.c | 2 +- test/lib/kconfig.c | 6 +++--- test/lib/kconfig_spl.c | 4 ++-- 7 files changed, 28 insertions(+), 38 deletions(-) diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index db4e3ff5fa2..13e89d41727 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -152,7 +152,7 @@ unsigned int install_e820_map(unsigned int max_entries, if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)) { ulong stack_size; - stack_size = CONFIG_IS_ENABLED(HAVE_ACPI_RESUME, + stack_size = IS_ENABLED(CONFIG_HAVE_ACPI_RESUME, (CONFIG_STACK_SIZE_RESUME), (0)); /* * Everything between U-Boot's stack and ram top needs to be diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 0ffcca419f2..6dd44396185 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -903,7 +903,7 @@ const char *env_ext4_get_dev_part(void) int mmc_get_env_dev(void) { - const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1)); + const int mmc_env_dev = IS_ENABLED(CONFIG_ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1)); if (mmc_env_dev >= 0) return mmc_env_dev; diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 71cfaec6e9d..3a5e29861a2 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -56,11 +56,11 @@ static const struct { }, [FASTBOOT_COMMAND_FLASH] = { .command = "flash", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_FLASH, (flash), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_FLASH, (flash), (NULL)) }, [FASTBOOT_COMMAND_ERASE] = { .command = "erase", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_FLASH, (erase), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_FLASH, (erase), (NULL)) }, [FASTBOOT_COMMAND_BOOT] = { .command = "boot", @@ -92,27 +92,27 @@ static const struct { }, [FASTBOOT_COMMAND_OEM_FORMAT] = { .command = "oem format", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_FORMAT, (oem_format), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_CMD_OEM_FORMAT, (oem_format), (NULL)) }, [FASTBOOT_COMMAND_OEM_PARTCONF] = { .command = "oem partconf", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_PARTCONF, (oem_partconf), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_CMD_OEM_PARTCONF, (oem_partconf), (NULL)) }, [FASTBOOT_COMMAND_OEM_BOOTBUS] = { .command = "oem bootbus", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_BOOTBUS, (oem_bootbus), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_CMD_OEM_BOOTBUS, (oem_bootbus), (NULL)) }, [FASTBOOT_COMMAND_OEM_RUN] = { .command = "oem run", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_OEM_RUN, (run_ucmd), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_OEM_RUN, (run_ucmd), (NULL)) }, [FASTBOOT_COMMAND_UCMD] = { .command = "UCmd", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT, (run_ucmd), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_UUU_SUPPORT, (run_ucmd), (NULL)) }, [FASTBOOT_COMMAND_ACMD] = { .command = "ACmd", - .dispatch = CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT, (run_acmd), (NULL)) + .dispatch = IS_ENABLED(CONFIG_FASTBOOT_UUU_SUPPORT, (run_acmd), (NULL)) }, }; diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index f00686eb3e1..57d5afc7a1a 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -32,12 +32,6 @@ #define __config_enabled(arg1_or_junk, def_val) ___config_enabled(arg1_or_junk 1, def_val) #define ___config_enabled(__ignored, val, ...) val -/* - * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', - * 0 otherwise. - */ -#define IS_ENABLED(option) config_enabled(option, 0) - #define __config_val(cfg) CONFIG_ ## cfg #define CONFIG_VAL(option) __config_val(option) @@ -83,34 +77,30 @@ long invalid_use_of_IF_ENABLED_INT(void); #define __CONFIG_IS_ENABLED_1(option) __CONFIG_IS_ENABLED_3(option, (1), (0)) #define __CONFIG_IS_ENABLED_2(option, case1) __CONFIG_IS_ENABLED_3(option, case1, ()) #define __CONFIG_IS_ENABLED_3(option, case1, case0) \ - __concat(__unwrap, config_enabled(CONFIG_VAL(option), 0)) (case1, case0) + __concat(__unwrap, config_enabled(option, 0)) (case1, case0) /* - * CONFIG_IS_ENABLED(FOO) returns 1 if CONFIG_FOO is enabled for the phase being - * built, else 0. Note that CONFIG_FOO corresponds to CONFIG_SPL_FOO (in - * Kconfig) for the SPL phase, CONFIG_TPL_FOO for the TPL phase, etc. - * - * The _nospl version of a CONFIG is emitted by kconfig when an option has no - * SPL equivalent. So in that case there is a CONFIG_xxx for example, but not a - * CONFIG_SPL_xxx - * - * This is needed as a transition measure while CONFIG_IS_ENABLED() is used on - * options without SPL equivalent, since in that case it should always return - * zero. Once we add SPL equivalents, this clause can be dropped. + * CONFIG_IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the + * phase being built, else 0. * * The optional second and third arguments must be parenthesized; that * allows one to include a trailing comma, e.g. for use in * - * CONFIG_IS_ENABLED(ACME, ({.compatible = "acme,frobnozzle"},)) + * CONFIG_IS_ENABLED(CONFIG_ACME, ({.compatible = "acme,frobnozzle"},)) * - * which adds an entry to the array being defined if CONFIG_ACME (or - * CONFIG_SPL_ACME/CONFIG_TPL_ACME, depending on build context) is + * which adds an entry to the array being defined if CONFIG_ACME is * set, and nothing otherwise. */ #define CONFIG_IS_ENABLED(option, ...) \ __concat(__CONFIG_IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) +/* + * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', + * 0 otherwise. + */ +#define IS_ENABLED(option, ...) CONFIG_IS_ENABLED(option, ##__VA_ARGS__) + #ifndef __ASSEMBLY__ /* * Detect usage of a the value when the conditional is not enabled. When used @@ -125,7 +115,7 @@ long invalid_use_of_CONFIG_IF_ENABLED_INT(void); * otherwise build error */ #define CONFIG_IF_ENABLED_INT(option, int_option) \ - CONFIG_IS_ENABLED(option, (CONFIG_VAL(int_option)), \ + CONFIG_IS_ENABLED(option, (int_option), \ (invalid_use_of_CONFIG_IF_ENABLED_INT())) #define CONFIG_IF_INT(option, int_option) \ diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 8077affabb7..8aec458c3c5 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1148,7 +1148,7 @@ DM_TEST(dm_test_ofnode_get_name, UT_TESTF_SCAN_FDT); /* try to access more FDTs than is supported */ static int dm_test_ofnode_too_many(struct unit_test_state *uts) { - const int max_trees = CONFIG_IS_ENABLED(OFNODE_MULTI_TREE, + const int max_trees = IS_ENABLED(CONFIG_OFNODE_MULTI_TREE, (CONFIG_OFNODE_MULTI_TREE_MAX), (1)); const int fdt_size = 256; const int num_trees = max_trees + 1; diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c index 8fb6422c905..029a2be8cd9 100644 --- a/test/lib/kconfig.c +++ b/test/lib/kconfig.c @@ -25,7 +25,7 @@ static int lib_test_is_enabled(struct unit_test_state *uts) ut_asserteq(0xc000, IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); ut_asserteq(0xc000, - CONFIG_IF_ENABLED_INT(BLOBLIST_FIXED, BLOBLIST_ADDR)); + CONFIG_IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); /* * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the @@ -48,8 +48,8 @@ static int lib_test_is_enabled(struct unit_test_state *uts) */ if (!IS_ENABLED(CONFIG_SANDBOX_SPL) && IS_ENABLED(CONFIG_TEST_KCONFIG)) { - val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, - TEST_KCONFIG_VALUE); + val = CONFIG_IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, + CONFIG_TEST_KCONFIG_VALUE); printf("value2 %ld\n", val); } diff --git a/test/lib/kconfig_spl.c b/test/lib/kconfig_spl.c index 5c66183dc3d..2894a03f1e8 100644 --- a/test/lib/kconfig_spl.c +++ b/test/lib/kconfig_spl.c @@ -34,8 +34,8 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts) * value is used. */ if (IS_ENABLED(CONFIG_TEST_KCONFIG)) { - val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, - TEST_KCONFIG_VALUE); + val = CONFIG_IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, + CONFIG_TEST_KCONFIG_VALUE); printf("value2 %ld\n", val); } From patchwork Tue Jan 31 15:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734954 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=BrUIwuyt; 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 4P5pwX2Nczz23gV for ; Wed, 1 Feb 2023 02:33:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 05EA385B43; Tue, 31 Jan 2023 16:29:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BrUIwuyt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F50B85AF0; Tue, 31 Jan 2023 16:28: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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 E45C785AEE for ; Tue, 31 Jan 2023 16:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id u8so6604333ilq.13 for ; Tue, 31 Jan 2023 07:28:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=TpCdDn5WCw28rB+S/Piu79J2uCGZ142Qa7smPyHrkQs=; b=BrUIwuytfq+BDoktERysaKEU198+VF+TvotbH905GC0C65UmeaUlHjzXm+fnvoQtd4 e1mPcoFn7vcj5PCnOhSmsFTvCmkoa/tHNp3tF6Ro7b0N3H9HTXih6C5A6GLj0ij0xnug LVTiDqter13diNMdmO6Dd58CYoxK54Z586kOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TpCdDn5WCw28rB+S/Piu79J2uCGZ142Qa7smPyHrkQs=; b=i7KIMg2trzXBltkC8S9rXa78tGTIkvw06NWkJUevrb8+ziRdcFnhl+/UY0+Xrg0RsR 09UM3bqPb9cKo6TwZuJ3gQsos3ujj2TfLRIv2WR8vFV1mycCQpwwW+8fz/GatTdqM+o+ liiCevHoJXN0D+aShdjJDtEgE0O1Jxe+6tEV6VjGFdEN9DUNeZ2TOV3jWGeuQ1CLxLST 5ehuPZV/YyjLVxHJfDCnhZLx2QQzTrahJe5bBhJMrtAqytSEskx2Q2biF8NnPjy6w/9Y 7egXj5DuvYVg/CDKokixBYTyMzDHdgHdMV19NArZU6R4+mLwSWrDZQirwGThjVyguO60 1ZAA== X-Gm-Message-State: AO0yUKXG6EkMFF1Q6SSNR5Nr2loCENjzZLSaZhcWBpxbiQ0uXBhgblIJ M33n3ctq9DQXeGOqtqhLUWArMVy8eKEku1y9 X-Google-Smtp-Source: AK7set8cq91Yon+I4t2v2MG+uy5gjh4m31+oXgG/zBcNqJbZ5cKQVT/s2E4l8P0CJGjTkoNDcbAgug== X-Received: by 2002:a05:6e02:1aaa:b0:310:fbaa:192b with SMTP id l10-20020a056e021aaa00b00310fbaa192bmr4414994ilv.30.1675178881936; Tue, 31 Jan 2023 07:28:01 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:01 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 27/32] kconfig: Drop CONFIG_IF_ENABLED_INT() Date: Tue, 31 Jan 2023 08:26:57 -0700 Message-Id: <20230131152702.249197-28-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean We can use IF_ENABLED_INT() instead, so drop the other macro. Also clean up a few things left behind and fix the comment. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 32 ++++++-------------------------- test/lib/kconfig.c | 15 --------------- test/lib/kconfig_spl.c | 10 ---------- test/py/tests/test_kconfig.py | 6 ++---- 4 files changed, 8 insertions(+), 55 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 57d5afc7a1a..77d8e6b6129 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -47,19 +47,6 @@ ___config_opt_enabled(arg1_or_junk arg2, def_val) #define ___config_opt_enabled(__ignored, val, ...) val -#ifndef __ASSEMBLY__ -/* - * Detect usage of a the value when the conditional is not enabled. When used - * in assembly context, this likely produces a assembly error, or hopefully at - * least something recognisable. - */ -long invalid_use_of_IF_ENABLED_INT(void); -#endif - -/* Evaluates to int_option if option is defined, otherwise a build error */ -#define IF_ENABLED_INT(option, int_option) \ - config_opt_enabled(option, int_option, invalid_use_of_IF_ENABLED_INT()) - /* * Count number of arguments to a variadic macro. Currently only need * it for 1, 2 or 3 arguments. @@ -103,22 +90,15 @@ long invalid_use_of_IF_ENABLED_INT(void); #ifndef __ASSEMBLY__ /* - * Detect usage of a the value when the conditional is not enabled. When used - * in assembly context, this likely produces a assembly error, or hopefully at + * Detect usage of the value when the conditional is not enabled. When used + * in assembly context, this likely produces an assembly error, or hopefully at * least something recognisable. */ -long invalid_use_of_CONFIG_IF_ENABLED_INT(void); +long invalid_use_of_IF_ENABLED_INT(void); #endif -/* - * Evaluates to SPL_/TPL_int_option if SPL_/TPL_/option is not defined, - * otherwise build error - */ -#define CONFIG_IF_ENABLED_INT(option, int_option) \ - CONFIG_IS_ENABLED(option, (int_option), \ - (invalid_use_of_CONFIG_IF_ENABLED_INT())) - -#define CONFIG_IF_INT(option, int_option) \ - CONFIG_IF_ENABLED_INT(option, int_option) +/* Evaluates to int_option if option is defined, otherwise build error */ +#define IF_ENABLED_INT(option, int_option) \ + IS_ENABLED(option, (int_option), (invalid_use_of_IF_ENABLED_INT())) #endif /* __LINUX_KCONFIG_H */ diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c index 029a2be8cd9..0c4345b6b3f 100644 --- a/test/lib/kconfig.c +++ b/test/lib/kconfig.c @@ -24,8 +24,6 @@ static int lib_test_is_enabled(struct unit_test_state *uts) ut_asserteq(0xc000, IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); - ut_asserteq(0xc000, - CONFIG_IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); /* * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the @@ -40,19 +38,6 @@ static int lib_test_is_enabled(struct unit_test_state *uts) printf("value %ld\n", val); } - /* - * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the - * value is used. Disable for SPL so that the errors in kconfig_spl.c - * are detected, since otherwise a build error when building U-Boot may - * cause SPL to not be built. - */ - if (!IS_ENABLED(CONFIG_SANDBOX_SPL) && - IS_ENABLED(CONFIG_TEST_KCONFIG)) { - val = CONFIG_IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, - CONFIG_TEST_KCONFIG_VALUE); - printf("value2 %ld\n", val); - } - return 0; } LIB_TEST(lib_test_is_enabled, 0); diff --git a/test/lib/kconfig_spl.c b/test/lib/kconfig_spl.c index 2894a03f1e8..69c107fd524 100644 --- a/test/lib/kconfig_spl.c +++ b/test/lib/kconfig_spl.c @@ -29,16 +29,6 @@ static int lib_test_spl_is_enabled(struct unit_test_state *uts) printf("value %ld\n", val); } - /* - * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the - * value is used. - */ - if (IS_ENABLED(CONFIG_TEST_KCONFIG)) { - val = CONFIG_IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, - CONFIG_TEST_KCONFIG_VALUE); - printf("value2 %ld\n", val); - } - return 0; } LIB_TEST(lib_test_spl_is_enabled, 0); diff --git a/test/py/tests/test_kconfig.py b/test/py/tests/test_kconfig.py index 0b9e6bc3bd1..c4287e1144c 100644 --- a/test/py/tests/test_kconfig.py +++ b/test/py/tests/test_kconfig.py @@ -20,7 +20,6 @@ def test_kconfig(u_boot_console): cons, ['./tools/buildman/buildman', '-m', '--board', 'sandbox', '-a', 'TEST_KCONFIG', '-o', TMPDIR], ignore_errors=True) assert 'invalid_use_of_IF_ENABLED_INT' in out - assert 'invalid_use_of_CONFIG_IF_ENABLED_INT' in out @pytest.mark.slow @pytest.mark.boardspec('sandbox_spl') @@ -32,8 +31,7 @@ def test_kconfig_spl(u_boot_console): out = util.run_and_log( cons, ['./tools/buildman/buildman', '-m', '--board', 'sandbox_spl', '-a', 'TEST_KCONFIG', '-o', TMPDIR], ignore_errors=True) - assert 'invalid_use_of_IF_ENABLED_INT' in out - # There is no CONFIG_SPL_TEST_KCONFIG, so the CONFIG_IF_ENABLED_INT() + # There is no CONFIG_SPL_TEST_KCONFIG, so the IF_ENABLED_INT() # line should not generate an error - assert 'invalid_use_of_CONFIG_IF_ENABLED_INT' not in out + assert 'invalid_use_of_IF_ENABLED_INT' not in out From patchwork Tue Jan 31 15:26:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734957 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XSumH4JX; 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 4P5pxJ2FD1z23gV for ; Wed, 1 Feb 2023 02:33:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DFD185B52; Tue, 31 Jan 2023 16:29:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="XSumH4JX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E2CA85AFE; Tue, 31 Jan 2023 16:28:36 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 E1BF785AE7 for ; Tue, 31 Jan 2023 16:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id l7so4747742ilf.0 for ; Tue, 31 Jan 2023 07:28:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=WCWvr4ohVG5mNArdQzSiT+qeQVwKlRtlKAbAmPhdMww=; b=XSumH4JXCj5ns9HUiVJsnLSaAwt4TEF9VEv3go7uwxdisp1W/KQE8lmG8uj0V8Rtyz bdDUAIlXQav4+5GTiwZtieJq9qkcF/omcp6xAvu5VaqtCmcjeqajJ1LB8eouXnd/y67B 6tbck0hu3bHobI8cQgb8jtioSlqxtKFMBlFs4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WCWvr4ohVG5mNArdQzSiT+qeQVwKlRtlKAbAmPhdMww=; b=s4EiueU/hOzEP5Dj5+H/aPcKTNbfdP67fTiZQlGvi9cri5p5QHaVmwwjYdCniWwsS0 bgrbEBccsQsVofsG0CRfga2SJNOOSVEzePHH1bHZM3XTaRZ5NkzRLaUpPKfx52q7Ot1+ FDo2xxPLQAWt7WGPrt6/R41GfbW7lR2ViBZIUKniywx3H10fB3otLKSXfYwfcq9HQ63I ADHz/bGBio5/O0A6LV+fKH/vt1VmFt9Unj54MYUCLciaA4pUEyB2fRUFEEFHhmfKTIP+ vlRKCTHJDf1BLWRXl7clnl5kLTAvZHCatUdXyGEVH+VuAjDAOilI7jNLE5ioLT3Gqvwv OzvQ== X-Gm-Message-State: AO0yUKUxivtRnTP9vmDP9EBKDJuoBVyxThR2uZSK95uMzgp+b3nbIee3 9pqJ6ANB2fIu7jElHMSBZGnqUNsq8wX0pyUg X-Google-Smtp-Source: AK7set+QZBSnwVH4ZhFapgqUX5nSRSXr/i8nzw43QAffx6Ux4SaEKocuq1fejxzGRJ+7Fx+dnWPqLg== X-Received: by 2002:a05:6e02:1b05:b0:311:e5:5d15 with SMTP id i5-20020a056e021b0500b0031100e55d15mr4923738ilv.10.1675178882706; Tue, 31 Jan 2023 07:28:02 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:02 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 28/32] kconfig: Drop CONFIG_IS_ENABLED() Date: Tue, 31 Jan 2023 08:26:58 -0700 Message-Id: <20230131152702.249197-29-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean We can use IS_ENABLED() now, so drop the CONFIG_IS_ENABLED() macro. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 77d8e6b6129..50e5a3d7606 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -61,32 +61,26 @@ #define __unwrap1(case1, case0) __unwrap case1 #define __unwrap0(case1, case0) __unwrap case0 -#define __CONFIG_IS_ENABLED_1(option) __CONFIG_IS_ENABLED_3(option, (1), (0)) -#define __CONFIG_IS_ENABLED_2(option, case1) __CONFIG_IS_ENABLED_3(option, case1, ()) -#define __CONFIG_IS_ENABLED_3(option, case1, case0) \ +#define __IS_ENABLED_1(option) __IS_ENABLED_3(option, (1), (0)) +#define __IS_ENABLED_2(option, case1) __IS_ENABLED_3(option, case1, ()) +#define __IS_ENABLED_3(option, case1, case0) \ __concat(__unwrap, config_enabled(option, 0)) (case1, case0) /* - * CONFIG_IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the - * phase being built, else 0. + * IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the phase being + * built, else 0. * * The optional second and third arguments must be parenthesized; that * allows one to include a trailing comma, e.g. for use in * - * CONFIG_IS_ENABLED(CONFIG_ACME, ({.compatible = "acme,frobnozzle"},)) + * IS_ENABLED(CONFIG_ACME, ({.compatible = "acme,frobnozzle"},)) * * which adds an entry to the array being defined if CONFIG_ACME is * set, and nothing otherwise. */ -#define CONFIG_IS_ENABLED(option, ...) \ - __concat(__CONFIG_IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) - -/* - * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', - * 0 otherwise. - */ -#define IS_ENABLED(option, ...) CONFIG_IS_ENABLED(option, ##__VA_ARGS__) +#define IS_ENABLED(option, ...) \ + __concat(__IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) #ifndef __ASSEMBLY__ /* From patchwork Tue Jan 31 15:26:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734956 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=RVzw/kho; 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 4P5px259rnz23gV for ; Wed, 1 Feb 2023 02:33:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9207785B49; Tue, 31 Jan 2023 16:29:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="RVzw/kho"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 708AC85AFC; Tue, 31 Jan 2023 16:28:33 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 41B2B85AE9 for ; Tue, 31 Jan 2023 16:28:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id e204so5765523iof.1 for ; Tue, 31 Jan 2023 07:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=dp+/fPwbUqytjaX/kokDkuXARnJoYhWOTsd3zEpKlJM=; b=RVzw/khoRGRiD3d8LYYMWciNrGZyn+P9vSQl8uN4wHpeBwZ1aRqTqQlNEx+qup7PHl eix5CT1CEU6ru7XP4oQg67WlZ2e4CP40feQLyQ8J6wRBljxlqIBcykVL8Wn63+3HualZ Hz8ZNyphtmMs2ZDSpf3gWNHLH/YnwY3jfBjgw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dp+/fPwbUqytjaX/kokDkuXARnJoYhWOTsd3zEpKlJM=; b=SzqvKV9My+j8ymEk2lOuPngfI5i+be1Y0ONngbInLOln1jYqKGv8Z2JZn2lOvROiEw yMIkUh4qfdViaWQQ+1ZaXQRhWv6H2wh2S6bi1A/mLmESlpsbZ8huHxuKUHkzKX83zd9w 4VSeWtS/GJ+IJE8i5hZPYgmr9EjgvPvyd2UA4nnUdLM5kJL7evioa/w/lI2Jtlz6V5h3 5wyvm2WjYmP7qKC0KGK30/i6iwLbzuNfgjQ0bknnX01wfKm10NYda5XT5yNFy3B724cW YoLXn+a1y6DM3QYOGopAeseOQV+Qpe4mOmei5KChvDUi7QkZtZQhbBlhoPe/rQW2tHk8 Xbaw== X-Gm-Message-State: AO0yUKWWxqTG/gumW3emUe0Wrl2O7uU8q/lQHv3XJK+Wfg+jQdT2714H j+bQP1NtvtG5MBVt9RcgdEu8O0H0rSh2NFoF X-Google-Smtp-Source: AK7set+1sughi2o1Zn9gSuf9zapbUo3nx+ax+eAzrBx3bUqLP3CafRKXKg5yr7ruNkZRV1u1GPr4TA== X-Received: by 2002:a5e:d601:0:b0:715:f1fe:7bd0 with SMTP id w1-20020a5ed601000000b00715f1fe7bd0mr7829134iom.12.1675178883498; Tue, 31 Jan 2023 07:28:03 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:03 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 29/32] kconfig: drop config_opt_enabled() Date: Tue, 31 Jan 2023 08:26:59 -0700 Message-Id: <20230131152702.249197-30-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This is include used in three places. It does not appear in Linux. Use IS_ENABLED() instead since it provides a similar feature, albeit needing brackets. Signed-off-by: Simon Glass --- drivers/fastboot/fb_command.c | 12 ++++++------ drivers/fastboot/fb_common.c | 4 ++-- include/linux/kconfig.h | 11 ----------- net/tftp.c | 3 ++- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 3a5e29861a2..23a18a26aa6 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -424,8 +424,8 @@ static void reboot_recovery(char *cmd_parameter, char *response) static void __maybe_unused oem_format(char *cmd_parameter, char *response) { char cmdbuf[32]; - const int mmc_dev = config_opt_enabled(CONFIG_FASTBOOT_FLASH_MMC, - CONFIG_FASTBOOT_FLASH_MMC_DEV, -1); + const int mmc_dev = IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC, + (CONFIG_FASTBOOT_FLASH_MMC_DEV), (-1)); if (!env_get("partitions")) { fastboot_fail("partitions not set", response); @@ -447,8 +447,8 @@ static void __maybe_unused oem_format(char *cmd_parameter, char *response) static void __maybe_unused oem_partconf(char *cmd_parameter, char *response) { char cmdbuf[32]; - const int mmc_dev = config_opt_enabled(CONFIG_FASTBOOT_FLASH_MMC, - CONFIG_FASTBOOT_FLASH_MMC_DEV, -1); + const int mmc_dev = IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC, + (CONFIG_FASTBOOT_FLASH_MMC_DEV), (-1)); if (!cmd_parameter) { fastboot_fail("Expected command parameter", response); @@ -473,8 +473,8 @@ static void __maybe_unused oem_partconf(char *cmd_parameter, char *response) static void __maybe_unused oem_bootbus(char *cmd_parameter, char *response) { char cmdbuf[32]; - const int mmc_dev = config_opt_enabled(CONFIG_FASTBOOT_FLASH_MMC, - CONFIG_FASTBOOT_FLASH_MMC_DEV, -1); + const int mmc_dev = IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC, + (CONFIG_FASTBOOT_FLASH_MMC_DEV), (-1)); if (!cmd_parameter) { fastboot_fail("Expected command parameter", response); diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index 57b6182c46a..70fba02634f 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -96,8 +96,8 @@ int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot", [FASTBOOT_REBOOT_REASON_RECOVERY] = "boot-recovery" }; - const int mmc_dev = config_opt_enabled(CONFIG_FASTBOOT_FLASH_MMC, - CONFIG_FASTBOOT_FLASH_MMC_DEV, -1); + const int mmc_dev = IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC, + (CONFIG_FASTBOOT_FLASH_MMC_DEV), (-1)); if (!IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC)) return -EINVAL; diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 50e5a3d7606..cebce7bb164 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -36,17 +36,6 @@ #define CONFIG_VAL(option) __config_val(option) -/* - * This uses a similar mechanism to config_enabled() above. If cfg is enabled, - * it resolves to the value of opt_cfg, otherwise it resolves to def_val - */ -#define config_opt_enabled(cfg, opt_cfg, def_val) _config_opt_enabled(cfg, opt_cfg, def_val) -#define _config_opt_enabled(cfg_val, opt_value, def_val) \ - __config_opt_enabled(__ARG_PLACEHOLDER_##cfg_val, opt_value, def_val) -#define __config_opt_enabled(arg1_or_junk, arg2, def_val) \ - ___config_opt_enabled(arg1_or_junk arg2, def_val) -#define ___config_opt_enabled(__ignored, val, ...) val - /* * Count number of arguments to a variadic macro. Currently only need * it for 1, 2 or 3 arguments. diff --git a/net/tftp.c b/net/tftp.c index c780c33f379..2e93a12f4c8 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -728,7 +728,8 @@ static void sanitize_tftp_block_size_option(enum proto_t protocol) switch (protocol) { case TFTPGET: - max_defrag = config_opt_enabled(CONFIG_IP_DEFRAG, CONFIG_NET_MAXDEFRAG, 0); + max_defrag = IS_ENABLED(CONFIG_IP_DEFRAG, + (CONFIG_NET_MAXDEFRAG), (0)); if (max_defrag) { /* Account for IP, UDP and TFTP headers. */ cap = max_defrag - (20 + 8 + 4); From patchwork Tue Jan 31 15:27:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734959 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=I4fJeZQr; 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 4P5pxt04nXz23gV for ; Wed, 1 Feb 2023 02:34:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10FD585A75; Tue, 31 Jan 2023 16:30:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="I4fJeZQr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99C6685AE3; Tue, 31 Jan 2023 16:28:40 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 5543C85AE0 for ; Tue, 31 Jan 2023 16:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12c.google.com with SMTP id h18so3846077ilj.6 for ; Tue, 31 Jan 2023 07:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=rpL/ILUlYmKbWB+3G7SCf7X+OXqyLPrx29T49NJY31Y=; b=I4fJeZQrete2vtcCdlz618ixwzJ7njILuZqekb+F4umOSlRD5A+DiRHHukphHLlnc2 RYvhSvte6VNyGqqLozkrx9pwK0A3i1XxNyZmZ9qlTjrdt/qh3QRth5J1QK7coTdGrYZC KHjyg1YPoQR+8d+tm8GijREBk30srEGth58VY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rpL/ILUlYmKbWB+3G7SCf7X+OXqyLPrx29T49NJY31Y=; b=L9jhngCn2nDi2vT6cvsQ5G44HELyc9vJIRcA+YFJAuiR8WPvKOk9Rs7gP43mn3a4oR ++7/n9K5kRSCwjBJmBWI2XTv6MaIEgH3fkg8KY+J0n8iOIIWoKy3w2Uz3vkjyor8QueI 8jrdATH5kVOhVKDWGnR4Op/6D9rMbYBCwQJYH6bSdQRKqLthJ3A+2IVwNT8jtzxnLM63 a0WCEORt8hF4Or6TRxgnzcv/1VMPk4TCmdhPuEa/om0D1LmqVphVGhcucO1mrjroqWK/ PWrtkA3DhXg3YSbfSNzdwLPVdPrhl5x8Lau9SgJb71B0OnDeOW+bo/dP4tbfoAZDB/+l +QXw== X-Gm-Message-State: AO0yUKUcyL9inkdnqeJHP0cp6D0dK3IFoZ4H4p2glvOXxdDwnwha2BgQ 81w+YbLhPzDNecxSE6zs7NSHAHrAtUQkeVDZ X-Google-Smtp-Source: AK7set8eBXC/9yckeczsEW++IZNcB0x1vMz+xpUV0Q0UDMRgk+KMw+kkPKmUFn61tX3BVTZkmgCH/w== X-Received: by 2002:a05:6e02:154e:b0:310:a8a0:338d with SMTP id j14-20020a056e02154e00b00310a8a0338dmr18575629ilu.28.1675178884396; Tue, 31 Jan 2023 07:28:04 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:04 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 30/32] kconfig: Drop CONFIG_VAL() Date: Tue, 31 Jan 2023 08:27:00 -0700 Message-Id: <20230131152702.249197-31-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This serves no purpose now since we can write CONFIG_FOO instead of CONFIG_VAL(FOO) Drop it. Signed-off-by: Simon Glass --- arch/arm/lib/bdinfo.c | 4 +- arch/arm/mach-at91/arm926ejs/eflash.c | 4 +- arch/arm/mach-exynos/clock_init_exynos5.c | 8 ++-- arch/arm/mach-exynos/exynos5_setup.h | 6 +-- arch/arm/mach-k3/am654_init.c | 2 +- .../arm/mach-uniphier/debug-uart/debug-uart.c | 4 +- arch/mips/cpu/start.S | 6 +-- arch/mips/mach-mtmips/mt7621/spl/start.S | 6 +-- arch/powerpc/cpu/mpc83xx/start.S | 6 +-- arch/powerpc/cpu/mpc85xx/start.S | 40 +++++++++---------- arch/sandbox/cpu/start.c | 2 +- arch/sh/lib/start.S | 4 +- arch/x86/cpu/apollolake/cpu_common.c | 2 +- board/eets/pdu001/board.c | 2 +- board/freescale/p1010rdb/spl.c | 10 ++--- board/freescale/p1_p2_rdb_pc/spl.c | 10 ++--- board/samsung/common/board.c | 2 +- boot/image-fit-sig.c | 2 +- boot/vbe_simple_fw.c | 2 +- common/board_f.c | 4 +- common/board_r.c | 2 +- common/bootstage.c | 2 +- common/console.c | 12 +++--- common/dlmalloc.c | 14 +++---- common/init/board_init.c | 12 +++--- common/malloc_simple.c | 2 +- common/spl/spl.c | 16 ++++---- common/spl/spl_mmc.c | 2 +- drivers/mmc/mmc.c | 2 +- drivers/serial/altera_jtag_uart.c | 2 +- drivers/serial/altera_uart.c | 4 +- drivers/serial/atmel_usart.c | 4 +- drivers/serial/ns16550.c | 4 +- drivers/serial/serial_ar933x.c | 4 +- drivers/serial/serial_arc.c | 4 +- drivers/serial/serial_bcm6345.c | 4 +- drivers/serial/serial_linflexuart.c | 4 +- drivers/serial/serial_meson.c | 2 +- drivers/serial/serial_msm_geni.c | 6 +-- drivers/serial/serial_mt7620.c | 4 +- drivers/serial/serial_mtk.c | 4 +- drivers/serial/serial_mvebu_a3700.c | 4 +- drivers/serial/serial_mxc.c | 4 +- drivers/serial/serial_omap.c | 4 +- drivers/serial/serial_pic32.c | 4 +- drivers/serial/serial_pl01x.c | 4 +- drivers/serial/serial_s5p.c | 4 +- drivers/serial/serial_sifive.c | 4 +- drivers/serial/serial_stm32.c | 4 +- drivers/serial/serial_xuartlite.c | 4 +- drivers/serial/serial_zynq.c | 4 +- include/asm-generic/global_data.h | 2 +- include/dm/device_compat.h | 2 +- include/linux/kconfig.h | 4 -- include/log.h | 2 +- lib/asm-offsets.c | 2 +- lib/efi/efi_app.c | 2 +- lib/fdtdec.c | 4 +- scripts/basic/fixdep.c | 2 +- 59 files changed, 146 insertions(+), 150 deletions(-) diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index e62a13a3b96..06cce862b6b 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -57,8 +57,8 @@ void arch_print_bdinfo(void) #ifdef CONFIG_BOARD_TYPES printf("Board Type = %ld\n", gd->board_type); #endif -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr, - CONFIG_VAL(SYS_MALLOC_F_LEN)); + CONFIG_SYS_MALLOC_F_LEN); #endif } diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c index aade13cc014..dff69f4133d 100644 --- a/arch/arm/mach-at91/arm926ejs/eflash.c +++ b/arch/arm/mach-at91/arm926ejs/eflash.c @@ -121,7 +121,7 @@ unsigned long flash_init(void) if (i%32 == 0) tmp = readl(&eefc->frr); flash_info[0].protect[i] = (tmp >> (i%32)) & 1; -#if CONFIG_VAL(EFLASH_PROTSECTORS) +#if CONFIG_EFLASH_PROTSECTORS if (i < CONFIG_EFLASH_PROTSECTORS) flash_info[0].protect[i] = 1; #endif @@ -159,7 +159,7 @@ int flash_real_protect (flash_info_t *info, long sector, int prot) debug("protect sector=%ld prot=%d\n", sector, prot); -#if CONFIG_VAL(EFLASH_PROTSECTORS) +#if CONFIG_EFLASH_PROTSECTORS if (sector < CONFIG_EFLASH_PROTSECTORS) { if (!prot) { printf("eflash: sector %lu cannot be unprotected\n", diff --git a/arch/arm/mach-exynos/clock_init_exynos5.c b/arch/arm/mach-exynos/clock_init_exynos5.c index 1cb8d391e7c..c821938ca57 100644 --- a/arch/arm/mach-exynos/clock_init_exynos5.c +++ b/arch/arm/mach-exynos/clock_init_exynos5.c @@ -347,8 +347,8 @@ struct mem_timings mem_timings[] = { DMC_MEMCONFIGX_CHIP_COL_10 | DMC_MEMCONFIGX_CHIP_ROW_15 | DMC_MEMCONFIGX_CHIP_BANK_8, - .membaseconfig0 = DMC_MEMBASECONFIG_VAL(0x40), - .membaseconfig1 = DMC_MEMBASECONFIG_VAL(0x80), + .membaseconfig0 = DMC_MEMBASECONFIG_0x40, + .membaseconfig1 = DMC_MEMBASECONFIG_0x80, .prechconfig_tp_cnt = 0xff, .dpwrdn_cyc = 0xff, .dsref_cyc = 0xffff, @@ -450,8 +450,8 @@ struct mem_timings mem_timings[] = { DMC_MEMCONFIGX_CHIP_COL_10 | DMC_MEMCONFIGX_CHIP_ROW_15 | DMC_MEMCONFIGX_CHIP_BANK_8, - .membaseconfig0 = DMC_MEMBASECONFIG_VAL(0x40), - .membaseconfig1 = DMC_MEMBASECONFIG_VAL(0x80), + .membaseconfig0 = DMC_MEMBASECONFIG_0x40, + .membaseconfig1 = DMC_MEMBASECONFIG_0x80, .prechconfig_tp_cnt = 0xff, .dpwrdn_cyc = 0xff, .dsref_cyc = 0xffff, diff --git a/arch/arm/mach-exynos/exynos5_setup.h b/arch/arm/mach-exynos/exynos5_setup.h index af7a5afb03c..95f14e10d0e 100644 --- a/arch/arm/mach-exynos/exynos5_setup.h +++ b/arch/arm/mach-exynos/exynos5_setup.h @@ -59,7 +59,7 @@ #define DMC_MEMBASECONFIGX_CHIP_BASE(x) (x << 16) #define DMC_MEMBASECONFIGX_CHIP_MASK(x) (x << 0) -#define DMC_MEMBASECONFIG_VAL(x) ( \ +#define DMC_MEMBASECONFIG_x ( \ DMC_MEMBASECONFIGX_CHIP_BASE(x) | \ DMC_MEMBASECONFIGX_CHIP_MASK(0x780) \ ) @@ -75,8 +75,8 @@ #define DMC_CHIP_BASE_1 0x50 #define DMC_CHIP_MASK 0x7C0 -#define DMC_MEMBASECONFIG0_VAL DMC_MEMBASECONFIG_VAL(0x40) -#define DMC_MEMBASECONFIG1_VAL DMC_MEMBASECONFIG_VAL(0x80) +#define DMC_MEMBASECONFIG0_VAL DMC_MEMBASECONFIG_0x40 +#define DMC_MEMBASECONFIG1_VAL DMC_MEMBASECONFIG_0x80 #define DMC_PRECHCONFIG_VAL 0xFF000000 #define DMC_PWRDNCONFIG_VAL 0xFFFF00FF diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c index cc645289ae3..83632c68118 100644 --- a/arch/arm/mach-k3/am654_init.c +++ b/arch/arm/mach-k3/am654_init.c @@ -204,7 +204,7 @@ void board_init_f(ulong dummy) * new malloc area inside the currently active pre-relocation "first" * malloc pool of which we use all that's left. */ - pool_size = CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr; + pool_size = CONFIG_SYS_MALLOC_F_LEN - gd->malloc_ptr; pool_addr = malloc(pool_size); if (!pool_addr) panic("ERROR: Can't allocate full malloc pool!\n"); diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c index 1ba012ca45d..d116d46812d 100644 --- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c +++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c @@ -18,7 +18,7 @@ static void _debug_uart_putc(int c) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; while (!(readl(base + UNIPHIER_UART_LSR) & UART_LSR_THRE)) ; @@ -57,7 +57,7 @@ void sg_set_iectrl(unsigned int pin) void _debug_uart_init(void) { #ifdef CONFIG_SPL_BUILD - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; unsigned int divisor; switch (uniphier_get_soc_id()) { diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index c89118c24e3..dd94a5c5ad8 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -46,9 +46,9 @@ sp, sp, GD_SIZE # reserve space for gd and sp, sp, t0 # force 16 byte alignment move k0, sp # save gd pointer -#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ +#if CONFIG_SYS_MALLOC_F_LEN && \ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) - li t2, CONFIG_VAL(SYS_MALLOC_F_LEN) + li t2, CONFIG_SYS_MALLOC_F_LEN PTR_SUBU \ sp, sp, t2 # reserve space for early malloc and sp, sp, t0 # force 16 byte alignment @@ -63,7 +63,7 @@ blt t0, t1, 1b nop -#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ +#if CONFIG_SYS_MALLOC_F_LEN && \ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset #endif diff --git a/arch/mips/mach-mtmips/mt7621/spl/start.S b/arch/mips/mach-mtmips/mt7621/spl/start.S index 3bd6a989115..a4bc0b7e816 100644 --- a/arch/mips/mach-mtmips/mt7621/spl/start.S +++ b/arch/mips/mach-mtmips/mt7621/spl/start.S @@ -37,9 +37,9 @@ sp, sp, GD_SIZE # reserve space for gd and sp, sp, t0 # force 16 byte alignment move k0, sp # save gd pointer -#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ +#if CONFIG_SYS_MALLOC_F_LEN && \ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) - li t2, CONFIG_VAL(SYS_MALLOC_F_LEN) + li t2, CONFIG_SYS_MALLOC_F_LEN PTR_SUBU \ sp, sp, t2 # reserve space for early malloc and sp, sp, t0 # force 16 byte alignment @@ -54,7 +54,7 @@ blt t0, t1, 1b nop -#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \ +#if CONFIG_SYS_MALLOC_F_LEN && \ !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F) PTR_S sp, GD_MALLOC_BASE(k0) # gd->malloc_base offset #endif diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index 361b975c661..e7534625a21 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -244,14 +244,14 @@ in_flash: cmplw r3, r4 bne 1b -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN -#if CONFIG_VAL(SYS_MALLOC_F_LEN) + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE +#if CONFIG_SYS_MALLOC_F_LEN + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE #error "SYS_MALLOC_F_LEN too large to fit into initial RAM." #endif /* r3 = new stack pointer / pre-reloc malloc area */ - subi r3, r3, CONFIG_VAL(SYS_MALLOC_F_LEN) + subi r3, r3, CONFIG_SYS_MALLOC_F_LEN /* Set pointer to pre-reloc malloc area in GD */ stw r3, GD_MALLOC_BASE(r4) diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index 62afacd1ccf..7b2c044a777 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -341,7 +341,7 @@ l2_disabled: /* Interrupt vectors do not fit in minimal SPL. */ #if !defined(MINIMAL_SPL) /* Setup interrupt vectors */ - lis r1,CONFIG_VAL(SYS_MONITOR_BASE)@h + lis r1,CONFIG_SYS_MONITOR_BASE@h mtspr IVPR,r1 li r4,CriticalInput@l @@ -544,7 +544,7 @@ nexti: mflr r1 /* R1 = our PC */ */ create_tlb1_entry CONFIG_SYS_PPC_E500_DEBUG_TLB, \ 0, BOOKE_PAGESZ_4M, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xffc00000, MAS2_I|MAS2_G, \ + CONFIG_SYS_MONITOR_BASE & 0xffc00000, MAS2_I|MAS2_G, \ 0xffc00000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 @@ -555,8 +555,8 @@ nexti: mflr r1 /* R1 = our PC */ */ create_tlb1_entry CONFIG_SYS_PPC_E500_DEBUG_TLB, \ 0, BOOKE_PAGESZ_256K, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfffc0000, MAS2_I, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfffc0000, MAS3_SX|MAS3_SW|MAS3_SR, \ + CONFIG_SYS_MONITOR_BASE & 0xfffc0000, MAS2_I, \ + CONFIG_SYS_MONITOR_BASE & 0xfffc0000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 #endif #endif @@ -1121,7 +1121,7 @@ create_init_ram_area: /* create a temp mapping in AS=1 to the 4M boot window */ create_tlb1_entry 15, \ 1, BOOKE_PAGESZ_4M, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xffc00000, MAS2_I|MAS2_G, \ + CONFIG_SYS_MONITOR_BASE & 0xffc00000, MAS2_I|MAS2_G, \ 0xffc00000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 @@ -1131,7 +1131,7 @@ create_init_ram_area: */ create_tlb1_entry 15, \ 1, BOOKE_PAGESZ_1M, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \ + CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \ CFG_SYS_PBI_FLASH_WINDOW & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 @@ -1142,24 +1142,24 @@ create_init_ram_area: */ #elif defined(CONFIG_RAMBOOT_PBL) && defined(CONFIG_NXP_ESBC) && \ (!defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)) - /* create a temp mapping in AS = 1 for mapping CONFIG_VAL(SYS_MONITOR_BASE) + /* create a temp mapping in AS = 1 for mapping CONFIG_SYS_MONITOR_BASE * to L3 Address configured by PBL for ISBC code */ create_tlb1_entry 15, \ 1, BOOKE_PAGESZ_1M, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \ + CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \ CFG_SYS_INIT_L3_ADDR & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 #else /* - * create a temp mapping in AS=1 to the 1M CONFIG_VAL(SYS_MONITOR_BASE) space, the main - * image has been relocated to CONFIG_VAL(SYS_MONITOR_BASE) on the second stage. + * create a temp mapping in AS=1 to the 1M CONFIG_SYS_MONITOR_BASE space, the main + * image has been relocated to CONFIG_SYS_MONITOR_BASE on the second stage. */ create_tlb1_entry 15, \ 1, BOOKE_PAGESZ_1M, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \ - CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \ + CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \ + CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \ 0, r6 #endif @@ -1233,13 +1233,13 @@ _start_cont: lis r3,(CFG_SYS_INIT_RAM_ADDR)@h ori r3,r3,((CFG_SYS_INIT_SP_OFFSET-16)&~0xf)@l /* Align to 16 */ -#if CONFIG_VAL(SYS_MALLOC_F_LEN) -#if CONFIG_VAL(SYS_MALLOC_F_LEN) + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE +#if CONFIG_SYS_MALLOC_F_LEN +#if CONFIG_SYS_MALLOC_F_LEN + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE #error "SYS_MALLOC_F_LEN too large to fit into initial RAM." #endif /* Leave 16+ byte for back chain termination and NULL return address */ - subi r3,r3,((CONFIG_VAL(SYS_MALLOC_F_LEN)+16+15)&~0xf) + subi r3,r3,((CONFIG_SYS_MALLOC_F_LEN+16+15)&~0xf) #endif /* End of RAM */ @@ -1253,7 +1253,7 @@ _start_cont: cmplw r4,r3 bne 1b -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN lis r4,SYS_INIT_SP_ADDR@h ori r4,r4,SYS_INIT_SP_ADDR@l @@ -1619,8 +1619,8 @@ relocate_code: GET_GOT #ifndef CONFIG_SPL_SKIP_RELOCATE mr r3,r5 /* Destination Address */ - lis r4,CONFIG_VAL(SYS_MONITOR_BASE)@h /* Source Address */ - ori r4,r4,CONFIG_VAL(SYS_MONITOR_BASE)@l + lis r4,CONFIG_SYS_MONITOR_BASE@h /* Source Address */ + ori r4,r4,CONFIG_SYS_MONITOR_BASE@l lwz r5,GOT(__init_end) sub r5,r5,r4 li r6,CONFIG_SYS_CACHELINE_SIZE /* Cache Line Size */ @@ -1628,7 +1628,7 @@ relocate_code: /* * Fix GOT pointer: * - * New GOT-PTR = (old GOT-PTR - CONFIG_VAL(SYS_MONITOR_BASE)) + Destination Address + * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address * * Offset: */ @@ -1693,7 +1693,7 @@ relocate_code: * initialization, now running from RAM. */ - addi r0,r10,in_ram - CONFIG_VAL(SYS_MONITOR_BASE) + addi r0,r10,in_ram - CONFIG_SYS_MONITOR_BASE /* * As IVPR is going to point RAM address, diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index e0c5db2a522..856dfbb9962 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -534,7 +534,7 @@ int sandbox_main(int argc, char *argv[]) goto err; } -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN gd->malloc_base = CFG_MALLOC_F_ADDR; #endif #if IS_ENABLED(CONFIG_LOG) diff --git a/arch/sh/lib/start.S b/arch/sh/lib/start.S index ddb9aa9f87b..6777429ee29 100644 --- a/arch/sh/lib/start.S +++ b/arch/sh/lib/start.S @@ -53,7 +53,7 @@ _start: mov.l ._gd_init, r13 /* global data */ mov.l ._stack_init, r15 /* stack */ -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN mov.l ._gd_malloc_base, r14 mov.l r15, @r14 #endif @@ -73,7 +73,7 @@ loop: ._bss_start: .long bss_start ._bss_end: .long bss_end ._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE) -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN ._gd_malloc_base: .long (_start - GENERATED_GBL_DATA_SIZE + GD_MALLOC_BASE) #endif ._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16) diff --git a/arch/x86/cpu/apollolake/cpu_common.c b/arch/x86/cpu/apollolake/cpu_common.c index 9a5502617bf..5d7d26b140f 100644 --- a/arch/x86/cpu/apollolake/cpu_common.c +++ b/arch/x86/cpu/apollolake/cpu_common.c @@ -72,7 +72,7 @@ static void pch_uart_init(void) } #ifdef CONFIG_DEBUG_UART - apl_uart_init(PCH_DEV_UART, CONFIG_VAL(DEBUG_UART_BASE)); + apl_uart_init(PCH_DEV_UART, CONFIG_DEBUG_UART_BASE); #endif } diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 15ee65b5354..79236c968ab 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -273,7 +273,7 @@ void board_debug_uart_init(void) setup_early_clocks(); /* done by pin controller driver if not debugging */ - enable_uart_pin_mux(CONFIG_VAL(DEBUG_UART_BASE)); + enable_uart_pin_mux(CONFIG_DEBUG_UART_BASE); } #endif diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index 461ba372417..873db59de9c 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -57,24 +57,24 @@ void board_init_f(ulong bootflag) /* NOTE - code has to be copied out of NAND buffer before * other blocks can be read. */ - relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE); + relocate_code(CONFIG_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE); } void board_init_r(gd_t *gd, ulong dest_addr) { /* Pointer is writable since we allocated a register for it */ - gd = (gd_t *)CONFIG_VAL(GD_ADDR); + gd = (gd_t *)CONFIG_GD_ADDR; struct bd_info *bd; memset(gd, 0, sizeof(gd_t)); - bd = (struct bd_info *)(CONFIG_VAL(GD_ADDR) + sizeof(gd_t)); + bd = (struct bd_info *)(CONFIG_GD_ADDR + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; arch_cpu_init(); get_clocks(); - mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR), - CONFIG_VAL(RELOC_MALLOC_SIZE)); + mem_malloc_init(CONFIG_RELOC_MALLOC_ADDR, + CONFIG_RELOC_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; #ifndef CONFIG_SPL_NAND_BOOT diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 940cf6d7e4d..679e5f6d224 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -69,24 +69,24 @@ void board_init_f(ulong bootflag) /* NOTE - code has to be copied out of NAND buffer before * other blocks can be read. */ - relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE); + relocate_code(CONFIG_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE); } void board_init_r(gd_t *gd, ulong dest_addr) { /* Pointer is writable since we allocated a register for it */ - gd = (gd_t *)CONFIG_VAL(GD_ADDR); + gd = (gd_t *)CONFIG_GD_ADDR; struct bd_info *bd; memset(gd, 0, sizeof(gd_t)); - bd = (struct bd_info *)(CONFIG_VAL(GD_ADDR) + sizeof(gd_t)); + bd = (struct bd_info *)(CONFIG_GD_ADDR + sizeof(gd_t)); memset(bd, 0, sizeof(struct bd_info)); gd->bd = bd; arch_cpu_init(); get_clocks(); - mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR), - CONFIG_VAL(RELOC_MALLOC_SIZE)); + mem_malloc_init(CONFIG_RELOC_MALLOC_ADDR, + CONFIG_RELOC_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; #ifdef CONFIG_SPL_ENV_SUPPORT diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 07ec059437b..9bca5894737 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -106,7 +106,7 @@ int board_init(void) } boot_temp_check(); #endif -#if CONFIG_VAL(SYS_MEM_TOP_HIDE) +#if CONFIG_SYS_MEM_TOP_HIDE /* The last few MB of memory can be reserved for secure firmware */ ulong size = CONFIG_SYS_MEM_TOP_HIDE; diff --git a/boot/image-fit-sig.c b/boot/image-fit-sig.c index 12369896fe3..96e65d559ec 100644 --- a/boot/image-fit-sig.c +++ b/boot/image-fit-sig.c @@ -71,7 +71,7 @@ static int fit_image_setup_verify(struct image_sign_info *info, const char *algo_name; const char *padding_name; - if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) { + if (fdt_totalsize(fit) > CONFIG_FIT_SIGNATURE_MAX_SIZE) { *err_msgp = "Total size too large"; return 1; } diff --git a/boot/vbe_simple_fw.c b/boot/vbe_simple_fw.c index d59a704ddba..00092db76f4 100644 --- a/boot/vbe_simple_fw.c +++ b/boot/vbe_simple_fw.c @@ -80,7 +80,7 @@ int vbe_simple_read_bootflow_fw(struct udevice *dev, struct bootflow *bflow) * Load the FIT into the SPL memory. This is typically a FIT with * external data, so this is quite small, perhaps a few KB. */ - addr = CONFIG_VAL(TEXT_BASE); + addr = CONFIG_TEXT_BASE; buf = map_sysmem(addr, size); num_blks = DIV_ROUND_UP(size, desc->blksz); log_debug("read %lx, %lx blocks to %lx / %p\n", size, num_blks, addr, diff --git a/common/board_f.c b/common/board_f.c index 1f21c3e2ea1..a9334098019 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -356,7 +356,7 @@ static int setup_dest_addr(void) * Ram is setup, size stored in gd !! */ debug("Ram size: %08llX\n", (unsigned long long)gd->ram_size); -#if CONFIG_VAL(SYS_MEM_TOP_HIDE) +#if CONFIG_SYS_MEM_TOP_HIDE /* * Subtract specified amount of memory to hide so that it won't * get "touched" at all by U-Boot. By fixing up gd->ram_size @@ -788,7 +788,7 @@ static int initf_bootstage(void) static int initf_dm(void) { -#if defined(CONFIG_DM) && CONFIG_VAL(SYS_MALLOC_F_LEN) +#if defined(CONFIG_DM) && CONFIG_SYS_MALLOC_F_LEN int ret; bootstage_start(BOOTSTAGE_ID_ACCUM_DM_F, "dm_f"); diff --git a/common/board_r.c b/common/board_r.c index 66a9fd284da..f77db86e4c9 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -198,7 +198,7 @@ static int initr_malloc(void) { ulong malloc_start; -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN debug("Pre-reloc malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); #endif diff --git a/common/bootstage.c b/common/bootstage.c index 326c40f1561..389131647a9 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; enum { - RECORD_COUNT = CONFIG_VAL(BOOTSTAGE_RECORD_COUNT), + RECORD_COUNT = CONFIG_BOOTSTAGE_RECORD_COUNT, }; struct bootstage_record { diff --git a/common/console.c b/common/console.c index 1995b8a996e..8c96bcb0438 100644 --- a/common/console.c +++ b/common/console.c @@ -624,7 +624,7 @@ int tstc(void) #define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL 1 #if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER) -#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ)) +#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ) static void pre_console_putc(const char c) { @@ -633,7 +633,7 @@ static void pre_console_putc(const char c) if (gd->precon_buf_idx < 0) return; - buffer = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ)); + buffer = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ); buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c; @@ -652,15 +652,15 @@ static void pre_console_puts(const char *s) static void print_pre_console_buffer(int flushpoint) { long in = 0, out = 0; - char buf_out[CONFIG_VAL(PRE_CON_BUF_SZ) + 1]; + char buf_out[CONFIG_PRE_CON_BUF_SZ + 1]; char *buf_in; if (IS_ENABLED(CONFIG_SILENT_CONSOLE) && (gd->flags & GD_FLG_SILENT)) return; - buf_in = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ)); - if (gd->precon_buf_idx > CONFIG_VAL(PRE_CON_BUF_SZ)) - in = gd->precon_buf_idx - CONFIG_VAL(PRE_CON_BUF_SZ); + buf_in = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ); + if (gd->precon_buf_idx > CONFIG_PRE_CON_BUF_SZ) + in = gd->precon_buf_idx - CONFIG_PRE_CON_BUF_SZ; while (in < gd->precon_buf_idx) buf_out[out++] = buf_in[CIRC_BUF_IDX(in++)]; diff --git a/common/dlmalloc.c b/common/dlmalloc.c index c0f22d7f02a..f675baaa003 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1305,7 +1305,7 @@ Void_t* mALLOc(bytes) size_t bytes; INTERNAL_SIZE_T nb; -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) return malloc_simple(bytes); #endif @@ -1586,7 +1586,7 @@ void fREe(mem) Void_t* mem; mchunkptr fwd; /* misc temp for linking */ int islr; /* track whether merging with last_remainder */ -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN /* free() is a no-op - all the memory will be freed on relocation */ if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) { VALGRIND_FREELIKE_BLOCK(mem, SIZE_SZ); @@ -1749,7 +1749,7 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; /* realloc of null is supposed to be same as malloc */ if (oldmem == NULL) return mALLOc(bytes); -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) { /* This is harder to support and should not be needed */ panic("pre-reloc realloc() is not supported"); @@ -1971,7 +1971,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; if ((long)bytes < 0) return NULL; -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) { return memalign_simple(alignment, bytes); } @@ -2167,7 +2167,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size; return NULL; else { -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) { memset(mem, 0, sz); return mem; @@ -2469,9 +2469,9 @@ int mALLOPt(param_number, value) int param_number; int value; int initf_malloc(void) { -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN assert(gd->malloc_base); /* Set up by crt0.S */ - gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN); + gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif diff --git a/common/init/board_init.c b/common/init/board_init.c index e8bbb6be74c..20a7e2f649a 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -43,11 +43,11 @@ __weak void board_init_f_init_stack_protection(void) { #if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE) ulong stack_bottom = gd->start_addr_sp - - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); + CONFIG_SIZE_LIMIT_PROVIDE_STACK; /* substact some safety margin (0x20) since stack is in use here */ - memset((void *)stack_bottom, CONFIG_VAL(SYS_STACK_F_CHECK_BYTE), - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK) - 0x20); + memset((void *)stack_bottom, CONFIG_SYS_STACK_F_CHECK_BYTE, + CONFIG_SIZE_LIMIT_PROVIDE_STACK - 0x20); #endif } @@ -79,8 +79,8 @@ ulong board_init_f_alloc_reserve(ulong top) { /* Reserve early malloc arena */ #ifndef CFG_MALLOC_F_ADDR -#if CONFIG_VAL(SYS_MALLOC_F_LEN) - top -= CONFIG_VAL(SYS_MALLOC_F_LEN); +#if CONFIG_SYS_MALLOC_F_LEN + top -= CONFIG_SYS_MALLOC_F_LEN; #endif #endif /* LAST : reserve GD (rounded up to a multiple of 16 bytes) */ @@ -159,7 +159,7 @@ void board_init_f_init_reserve(ulong base) * Use gd as it is now properly set for all architectures. */ -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN /* go down one 'early malloc arena' */ gd->malloc_base = base; #endif diff --git a/common/malloc_simple.c b/common/malloc_simple.c index f77fdd62f39..bbcf31c609e 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -89,5 +89,5 @@ void free_simple(void *ptr) void malloc_simple_info(void) { log_info("malloc_simple: %lx bytes used, %lx remain\n", gd->malloc_ptr, - CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr); + CONFIG_SYS_MALLOC_F_LEN - gd->malloc_ptr); } diff --git a/common/spl/spl.c b/common/spl/spl.c index 3212631a576..2d44c2a25e1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -525,12 +525,12 @@ static int spl_common_init(bool setup_malloc) { int ret; -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN if (setup_malloc) { #ifdef CFG_MALLOC_F_ADDR gd->malloc_base = CFG_MALLOC_F_ADDR; #endif - gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN); + gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; } #endif @@ -877,7 +877,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2) default: debug("Unsupported OS image.. Jumping nevertheless..\n"); } -#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE) +#if CONFIG_SYS_MALLOC_F_LEN && !defined(CONFIG_SYS_SPL_MALLOC_SIZE) debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); #endif @@ -924,17 +924,17 @@ __weak void spl_relocate_stack_check(void) { #if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE) ulong init_sp = gd->start_addr_sp; - ulong stack_bottom = init_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); + ulong stack_bottom = init_sp - CONFIG_SIZE_LIMIT_PROVIDE_STACK; u8 *ptr = (u8 *)stack_bottom; ulong i; - for (i = 0; i < CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); i++) { - if (*ptr != CONFIG_VAL(SYS_STACK_F_CHECK_BYTE)) + for (i = 0; i < CONFIG_SIZE_LIMIT_PROVIDE_STACK; i++) { + if (*ptr != CONFIG_SYS_STACK_F_CHECK_BYTE) break; ptr++; } printf("SPL initial stack usage: %lu bytes\n", - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK) - i); + CONFIG_SIZE_LIMIT_PROVIDE_STACK - i); #endif } @@ -965,7 +965,7 @@ ulong spl_relocate_stack_gd(void) if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)) spl_relocate_stack_check(); -#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN) +#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_SYS_MALLOC_F_LEN if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) { debug("SPL malloc() before relocation used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr, gd->malloc_ptr / 1024); diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index f1a80fbeb81..89eee8702ac 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -229,7 +229,7 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image, { int ret; -#if CONFIG_VAL(SYS_MMCSD_RAW_MODE_ARGS_SECTOR) +#if CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR unsigned long count; count = blk_dread(mmc_get_blk_desc(mmc), diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 55a566402ce..a749a85add0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -135,7 +135,7 @@ void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd) } #endif -#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG +#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_LOGLEVEL >= LOGL_DEBUG const char *mmc_mode_name(enum bus_mode mode) { static const char *const names[] = { diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c index 9e39da7dd24..4435fcf56b9 100644 --- a/drivers/serial/altera_jtag_uart.c +++ b/drivers/serial/altera_jtag_uart.c @@ -134,7 +134,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct altera_jtaguart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + struct altera_jtaguart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE; while (1) { u32 st = readl(®s->control); diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 35920480841..b18be6e2454 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -123,7 +123,7 @@ U_BOOT_DRIVER(altera_uart) = { static inline void _debug_uart_init(void) { - struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE; u32 div; div = (CONFIG_DEBUG_UART_CLOCK / CONFIG_BAUDRATE) - 1; @@ -132,7 +132,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE; while (1) { u32 st = readl(®s->status); diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index 6327a590a69..7d34b293cf3 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -317,14 +317,14 @@ U_BOOT_DRIVER(serial_atmel) = { #ifdef CONFIG_DEBUG_UART_ATMEL static inline void _debug_uart_init(void) { - atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE); + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE; _atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); } static inline void _debug_uart_putc(int ch) { - atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE); + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE; while (!(readl(&usart->csr) & USART3_BIT(TXRDY))) ; diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index ab96cebd4ea..4d39b4cbfa1 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port) static inline void _debug_uart_init(void) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); + struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; int baud_divisor; /* Wait until tx buffer is empty */ @@ -364,7 +364,7 @@ static inline int NS16550_read_baud_divisor(struct ns16550 *com_port) static inline void _debug_uart_putc(int ch) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); + struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) { #ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c index 4f916349762..da06bef97c7 100644 --- a/drivers/serial/serial_ar933x.c +++ b/drivers/serial/serial_ar933x.c @@ -199,7 +199,7 @@ U_BOOT_DRIVER(serial_ar933x) = { static inline void _debug_uart_init(void) { - void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE; u32 val, scale, step; /* @@ -227,7 +227,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int c) { - void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE; u32 data; do { diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c index c2fc8a901e2..707177d00ec 100644 --- a/drivers/serial/serial_arc.c +++ b/drivers/serial/serial_arc.c @@ -137,7 +137,7 @@ U_BOOT_DRIVER(serial_arc) = { static inline void _debug_uart_init(void) { - struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE); + struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE; int arc_console_baud = CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE * 4) - 1; writeb(arc_console_baud & 0xff, ®s->baudl); @@ -146,7 +146,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int c) { - struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE); + struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE; while (!(readb(®s->status) & UART_TXEMPTY)) ; diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c index 2359656a239..f08e91ff3ba 100644 --- a/drivers/serial/serial_bcm6345.c +++ b/drivers/serial/serial_bcm6345.c @@ -269,7 +269,7 @@ U_BOOT_DRIVER(bcm6345_serial) = { #ifdef CONFIG_DEBUG_UART_BCM6345 static inline void _debug_uart_init(void) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; bcm6345_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); } @@ -285,7 +285,7 @@ static inline void wait_xfered(void __iomem *base) static inline void _debug_uart_putc(int ch) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; wait_xfered(base); writel(ch, base + UART_FIFO_REG); diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c index b449e55a650..876a4baa9fc 100644 --- a/drivers/serial/serial_linflexuart.c +++ b/drivers/serial/serial_linflexuart.c @@ -201,14 +201,14 @@ U_BOOT_DRIVER(serial_linflex) = { static inline void _debug_uart_init(void) { - struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE); + struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE; linflex_serial_init_internal(base); } static inline void _debug_uart_putc(int ch) { - struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE); + struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE; /* XXX: Is this OK? Should this use the non-DM version? */ _linflex_serial_putc(base, ch); diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c index d026f5a7a8e..90c370cf611 100644 --- a/drivers/serial/serial_meson.c +++ b/drivers/serial/serial_meson.c @@ -252,7 +252,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct meson_uart *regs = (struct meson_uart *)CONFIG_VAL(DEBUG_UART_BASE); + struct meson_uart *regs = (struct meson_uart *)CONFIG_DEBUG_UART_BASE; while (readl(®s->status) & AML_UART_TX_FULL) ; diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c index 3943ca43e49..3e255a99dcc 100644 --- a/drivers/serial/serial_msm_geni.c +++ b/drivers/serial/serial_msm_geni.c @@ -569,7 +569,7 @@ U_BOOT_DRIVER(serial_msm_geni) = { #ifdef CONFIG_DEBUG_UART_MSM_GENI static struct msm_serial_data init_serial_data = { - .base = CONFIG_VAL(DEBUG_UART_BASE) + .base = CONFIG_DEBUG_UART_BASE }; /* Serial dumb device, to reuse driver code */ @@ -587,7 +587,7 @@ static struct udevice init_dev = { static inline void _debug_uart_init(void) { - phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE); + phys_addr_t base = CONFIG_DEBUG_UART_BASE; geni_serial_init(&init_dev); geni_serial_baud(base, CLK_DIV, CONFIG_BAUDRATE); @@ -596,7 +596,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE); + phys_addr_t base = CONFIG_DEBUG_UART_BASE; writel(DEF_TX_WM, base + SE_GENI_TX_WATERMARK_REG); qcom_geni_serial_setup_tx(base, 1); diff --git a/drivers/serial/serial_mt7620.c b/drivers/serial/serial_mt7620.c index 903ba2dd6ac..a89264b4ddf 100644 --- a/drivers/serial/serial_mt7620.c +++ b/drivers/serial/serial_mt7620.c @@ -220,7 +220,7 @@ static inline void _debug_uart_init(void) { struct mt7620_serial_plat plat; - plat.regs = (void *)CONFIG_VAL(DEBUG_UART_BASE); + plat.regs = (void *)CONFIG_DEBUG_UART_BASE; plat.clock = CONFIG_DEBUG_UART_CLOCK; writel(0, &plat.regs->ier); @@ -233,7 +233,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { struct mt7620_serial_regs __iomem *regs = - (void *)CONFIG_VAL(DEBUG_UART_BASE); + (void *)CONFIG_DEBUG_UART_BASE; while (!(readl(®s->lsr) & UART_LSR_THRE)) ; diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c index a9d1b8280ef..3a939d79281 100644 --- a/drivers/serial/serial_mtk.c +++ b/drivers/serial/serial_mtk.c @@ -439,7 +439,7 @@ static inline void _debug_uart_init(void) { struct mtk_serial_priv priv; - priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE); + priv.regs = (void *) CONFIG_DEBUG_UART_BASE; priv.fixed_clk_rate = CONFIG_DEBUG_UART_CLOCK; writel(0, &priv.regs->ier); @@ -452,7 +452,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { struct mtk_serial_regs __iomem *regs = - (void *) CONFIG_VAL(DEBUG_UART_BASE); + (void *) CONFIG_DEBUG_UART_BASE; while (!(readl(®s->lsr) & UART_LSR_THRE)) ; diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c index b2017c64556..d8035b28ea7 100644 --- a/drivers/serial/serial_mvebu_a3700.c +++ b/drivers/serial/serial_mvebu_a3700.c @@ -321,7 +321,7 @@ U_BOOT_DRIVER(serial_mvebu) = { static inline void _debug_uart_init(void) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; u32 parent_rate, divider; /* reset FIFOs */ @@ -349,7 +349,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; while (readl(base + UART_STATUS_REG) & UART_STATUS_TXFIFO_FULL) ; diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index 7825c89f3b6..5e585a01599 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -385,7 +385,7 @@ U_BOOT_DRIVER(serial_mxc) = { static inline void _debug_uart_init(void) { - struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE); + struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE; _mxc_serial_init(base, false); _mxc_serial_setbrg(base, CONFIG_DEBUG_UART_CLOCK, @@ -394,7 +394,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE); + struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE; while (!(readl(&base->ts) & UTS_TXEMPTY)) schedule(); diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index 3eae2db313e..a53cce012a7 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -66,7 +66,7 @@ static inline int serial_in_shift(void *addr, int shift) static inline void _debug_uart_init(void) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); + struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; int baud_divisor; baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK, @@ -85,7 +85,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); + struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) ; diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c index 3c5d37ce0ab..ccdda9f0334 100644 --- a/drivers/serial/serial_pic32.c +++ b/drivers/serial/serial_pic32.c @@ -187,14 +187,14 @@ U_BOOT_DRIVER(pic32_serial) = { static inline void _debug_uart_init(void) { - void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE); + void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE; pic32_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); } static inline void _debug_uart_putc(int ch) { - writel(ch, CONFIG_VAL(DEBUG_UART_BASE) + U_TXR); + writel(ch, CONFIG_DEBUG_UART_BASE + U_TXR); } DEBUG_UART_FUNCS diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index b3a988cb241..29f362b39e6 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -398,7 +398,7 @@ U_BOOT_DRIVER(serial_pl01x) = { static void _debug_uart_init(void) { #ifndef CONFIG_DEBUG_UART_SKIP_INIT - struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE); + struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE; enum pl01x_type type; if (IS_ENABLED(CONFIG_DEBUG_UART_PL011)) @@ -414,7 +414,7 @@ static void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE); + struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE; while (pl01x_putc(regs, ch) == -EAGAIN) ; diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index 7aeb8c0f8cb..2b465115bda 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -276,7 +276,7 @@ static inline void _debug_uart_init(void) if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT)) return; - struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE); + struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE; s5p_serial_init(uart); #if IS_ENABLED(CONFIG_ARCH_APPLE) @@ -288,7 +288,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE); + struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE; #if IS_ENABLED(CONFIG_ARCH_APPLE) while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL); diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c index c449f3fd02d..a48b0b5b340 100644 --- a/drivers/serial/serial_sifive.c +++ b/drivers/serial/serial_sifive.c @@ -212,7 +212,7 @@ U_BOOT_DRIVER(serial_sifive) = { static inline void _debug_uart_init(void) { struct uart_sifive *regs = - (struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE); + (struct uart_sifive *)CONFIG_DEBUG_UART_BASE; _sifive_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); @@ -222,7 +222,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { struct uart_sifive *regs = - (struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE); + (struct uart_sifive *)CONFIG_DEBUG_UART_BASE; while (_sifive_serial_putc(regs, ch) == -EAGAIN) schedule(); diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c index 37ceca426d2..ad5cac0cdec 100644 --- a/drivers/serial/serial_stm32.c +++ b/drivers/serial/serial_stm32.c @@ -270,7 +270,7 @@ static inline struct stm32_uart_info *_debug_uart_info(void) static inline void _debug_uart_init(void) { - fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE); + fdt_addr_t base = CONFIG_DEBUG_UART_BASE; struct stm32_uart_info *uart_info = _debug_uart_info(); _stm32_serial_init(base, uart_info); @@ -281,7 +281,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int c) { - fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE); + fdt_addr_t base = CONFIG_DEBUG_UART_BASE; struct stm32_uart_info *uart_info = _debug_uart_info(); while (_stm32_serial_putc(base, uart_info, c) == -EAGAIN) diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index b6197da97cc..9780a44d09e 100644 --- a/drivers/serial/serial_xuartlite.c +++ b/drivers/serial/serial_xuartlite.c @@ -143,7 +143,7 @@ U_BOOT_DRIVER(serial_uartlite) = { static inline void _debug_uart_init(void) { - struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE); + struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE; int ret; uart_out32(®s->control, 0); @@ -159,7 +159,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE); + struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE; while (uart_in32(®s->status) & SR_TX_FIFO_FULL) ; diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index 9bb9b7d3b8d..ae74b09fbc9 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -295,7 +295,7 @@ U_BOOT_DRIVER(serial_zynq) = { #ifdef CONFIG_DEBUG_UART_ZYNQ static inline void _debug_uart_init(void) { - struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE); + struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE; _uart_zynq_serial_init(regs); _uart_zynq_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK, @@ -304,7 +304,7 @@ static inline void _debug_uart_init(void) static inline void _debug_uart_putc(int ch) { - struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE); + struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE; while (_uart_zynq_serial_putc(regs, ch) == -EAGAIN) schedule(); diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index c595c72489a..85d8bb2fd79 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -301,7 +301,7 @@ struct global_data { * @timebase_l: low 32 bits of timer */ unsigned int timebase_l; -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN /** * @malloc_base: base address of early malloc() */ diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h index 47329089d50..2dc106b99dd 100644 --- a/include/dm/device_compat.h +++ b/include/dm/device_compat.h @@ -50,7 +50,7 @@ printf(fmt, ##__VA_ARGS__); \ else if (IS_ENABLED(CONFIG_LOG)) \ log(cat, level, fmt, ##__VA_ARGS__); \ - else if (level < CONFIG_VAL(LOGLEVEL)) \ + else if (level < CONFIG_LOGLEVEL) \ printf(fmt, ##__VA_ARGS__); \ }) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index cebce7bb164..0cd29cea708 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -32,10 +32,6 @@ #define __config_enabled(arg1_or_junk, def_val) ___config_enabled(arg1_or_junk 1, def_val) #define ___config_enabled(__ignored, val, ...) val -#define __config_val(cfg) CONFIG_ ## cfg - -#define CONFIG_VAL(option) __config_val(option) - /* * Count number of arguments to a variadic macro. Currently only need * it for 1, 2 or 3 arguments. diff --git a/include/log.h b/include/log.h index e97b62db015..240617dbbdd 100644 --- a/include/log.h +++ b/include/log.h @@ -163,7 +163,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level, * CONFIG_LOG_MAX_LEVEL is not defined. Add a check for this. */ #if IS_ENABLED(CONFIG_LOG) -#define _LOG_MAX_LEVEL CONFIG_VAL(LOG_MAX_LEVEL) +#define _LOG_MAX_LEVEL CONFIG_LOG_MAX_LEVEL #else #define _LOG_MAX_LEVEL LOGL_INFO #endif diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c index 0808cd4b0c1..a5c18888d8a 100644 --- a/lib/asm-offsets.c +++ b/lib/asm-offsets.c @@ -32,7 +32,7 @@ int main(void) DEFINE(GD_FLAGS, offsetof(struct global_data, flags)); -#if CONFIG_VAL(SYS_MALLOC_F_LEN) +#if CONFIG_SYS_MALLOC_F_LEN DEFINE(GD_MALLOC_BASE, offsetof(struct global_data, malloc_base)); #endif diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index 2209410f35b..918b7a48407 100644 --- a/lib/efi/efi_app.c +++ b/lib/efi/efi_app.c @@ -125,7 +125,7 @@ static efi_status_t setup_memory(struct efi_priv *priv) return ret; memset(gd, '\0', sizeof(*gd)); - gd->malloc_base = (ulong)efi_malloc(priv, CONFIG_VAL(SYS_MALLOC_F_LEN), + gd->malloc_base = (ulong)efi_malloc(priv, CONFIG_SYS_MALLOC_F_LEN, &ret); if (!gd->malloc_base) return ret; diff --git a/lib/fdtdec.c b/lib/fdtdec.c index b044bd33826..e8eb38260ec 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1160,7 +1160,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp) { #if IS_ENABLED(CONFIG_MULTI_DTB_FIT_GZIP) ||\ IS_ENABLED(CONFIG_MULTI_DTB_FIT_LZO) - size_t sz_out = CONFIG_VAL(MULTI_DTB_FIT_UNCOMPRESS_SZ); + size_t sz_out = CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ; bool gzip = 0, lzo = 0; ulong sz_in = sz_src; void *dst; @@ -1185,7 +1185,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp) } } else { # if IS_ENABLED(CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA) - dst = (void *)CONFIG_VAL(MULTI_DTB_FIT_USER_DEF_ADDR); + dst = (void *)CONFIG_MULTI_DTB_FIT_USER_DEF_ADDR; # else return -ENOTSUPP; # endif diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 82a3b748b65..1cb76dc8b19 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -482,7 +482,7 @@ static int run_tests(void) CHECKP(buf + 18, out); CHECKP(buf + 22, end); - strcpy(buf, "CONFIG_VAL(MARY)"); + strcpy(buf, "CONFIG_MARY"); out = parse_config_line(buf, &end); CHECKP(buf + 11, out); CHECKP(buf + 15, end); From patchwork Tue Jan 31 15:27:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734955 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=VSJverNt; 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 4P5pwm0drlz23gV for ; Wed, 1 Feb 2023 02:33:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A03E85B41; Tue, 31 Jan 2023 16:29:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VSJverNt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8CF4085AEC; Tue, 31 Jan 2023 16:28:31 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 405F085B09 for ; Tue, 31 Jan 2023 16:28:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12d.google.com with SMTP id m15so1991418ilh.9 for ; Tue, 31 Jan 2023 07:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=tQhk8H2s1OkHbMRzkEd7yw2Z5bROF2qYAKUXSC5eUr0=; b=VSJverNtI0IsePRWdZZa4RsBeekCA3m/lvAFXSxUqi6n1CT/DoILP0ZC2btlmDiagM l87Q676QrH++Wi1UdRMOGSpv7HF/x6s7lHQEspzuTIfwaS9rn/MeYUocKy0M2qF6qQqo jj4zAbxNufsQXvKCrDAciIA5Cn8xoxvSxdBqc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tQhk8H2s1OkHbMRzkEd7yw2Z5bROF2qYAKUXSC5eUr0=; b=UyTuq77F4IrheUdVQMyqE5rbRIo0kkiJdcYH9MuSFr1oMwYsMG49bSinT6abWs46Sf 7vhuiEhCyuOkrpdYNZxRhp64Z5ex8iofbaNX7E/m0wShAWHQr3VLqasM+dgDE4swMC4H h3y5K5SA4S7/g2EPkcvwEx3mWt/NiloCcowJke1fEm8NcollQL/ftGsXpQSTna3tlZWz JloytRnUP33fXuAjmPHcTXaLQuuettiIe0cef7mIN6uGfcpi+MLXSu69zBgH7c+35UDi 0/EdOnCz/W8wHoZ9lbt+D9CUSWkaoCA3kwXeREEBPz9Z8DGXLOXPWICkK//iWfE3GiIU 1NEQ== X-Gm-Message-State: AO0yUKUe7AupJwyveo4YVf/x/+z82cohIfJ+7GuYeoSAonkTv5uBxgGO 84PCXBhb5rDBxwKSw1apKKIjctPQOhBWKp9H X-Google-Smtp-Source: AK7set8aHClByMQmUQa9ejc9c/E53LBd2apHoLAWFV1b+DwUz0MZREK8axiw8+WQ52Wgz2pbkY8BUg== X-Received: by 2002:a92:c544:0:b0:310:f912:5a68 with SMTP id a4-20020a92c544000000b00310f9125a68mr5748173ilj.3.1675178885240; Tue, 31 Jan 2023 07:28:05 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:04 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 31/32] kconfig: Move closer to the Linux version Date: Tue, 31 Jan 2023 08:27:01 -0700 Message-Id: <20230131152702.249197-32-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean This header file originally came from Linux and it has changed a little upstream since. Bring in some of these changes. Note that IS_ENABLED() in U-Boot supports a three-parameter version, so it not equivalent to the Linux version. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 0cd29cea708..162916b2d68 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LINUX_KCONFIG_H #define __LINUX_KCONFIG_H @@ -13,6 +14,21 @@ #include #endif +#define __ARG_PLACEHOLDER_1 0, +#define __take_second_arg(__ignored, val, ...) val + +/* + * The use of "&&" / "||" is limited in certain expressions. + * The following enable to calculate "and" / "or" with macro expansion only. + */ +#define __and(x, y) ___and(x, y) +#define ___and(x, y) ____and(__ARG_PLACEHOLDER_##x, y) +#define ____and(arg1_or_junk, y) __take_second_arg(arg1_or_junk y, 0) + +#define __or(x, y) ___or(x, y) +#define ___or(x, y) ____or(__ARG_PLACEHOLDER_##x, y) +#define ____or(arg1_or_junk, y) __take_second_arg(arg1_or_junk 1, y) + /* * Helper macros to use CONFIG_ options in C/CPP expressions. Note that * these only work with boolean and tristate options. @@ -26,11 +42,9 @@ * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when * the last step cherry picks the 2nd arg, we get a zero. */ -#define __ARG_PLACEHOLDER_1 0, -#define config_enabled(cfg, def_val) _config_enabled(cfg, def_val) -#define _config_enabled(value, def_val) __config_enabled(__ARG_PLACEHOLDER_##value, def_val) -#define __config_enabled(arg1_or_junk, def_val) ___config_enabled(arg1_or_junk 1, def_val) -#define ___config_enabled(__ignored, val, ...) val +#define __is_defined(cfg, def_val) ___is_defined(cfg, def_val) +#define ___is_defined(value, def_val) ____is_defined(__ARG_PLACEHOLDER_##value, def_val) +#define ____is_defined(arg1_or_junk, def_val) __take_second_arg(arg1_or_junk 1, def_val) /* * Count number of arguments to a variadic macro. Currently only need @@ -49,7 +63,7 @@ #define __IS_ENABLED_1(option) __IS_ENABLED_3(option, (1), (0)) #define __IS_ENABLED_2(option, case1) __IS_ENABLED_3(option, case1, ()) #define __IS_ENABLED_3(option, case1, case0) \ - __concat(__unwrap, config_enabled(option, 0)) (case1, case0) + __concat(__unwrap, __is_defined(option, 0)) (case1, case0) /* * IS_ENABLED(CONFIG_FOO) returns 1 if CONFIG_FOO is enabled for the phase being From patchwork Tue Jan 31 15:27:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734960 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 (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=DltCG/yv; 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 4P5pyS0lWqz23gV for ; Wed, 1 Feb 2023 02:34:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D25285B51; Tue, 31 Jan 2023 16:30:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DltCG/yv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF41585AE6; Tue, 31 Jan 2023 16:28:49 +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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 BDA9D85AE2 for ; Tue, 31 Jan 2023 16:28:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id l128so1798920iof.2 for ; Tue, 31 Jan 2023 07:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=CSszZo0R3/fGj+wwh9YOElf0wO4gxUxauG3io5LOMlM=; b=DltCG/yvxGA5di0WGJsR6VKJArbhRGjraQQugCBr2UuM9jvWhJ5XlgdJPK/YDQMJG8 Kl1fdiVXbT7kFVHEJeVA2U+tlijTNg9+e89KjUTVlgOj4+ell6+NeieluhVfqKnmxAvw pIuw9qtciNBNu8Lwl6Ho9MBOzOAwkeY1FFLmU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CSszZo0R3/fGj+wwh9YOElf0wO4gxUxauG3io5LOMlM=; b=h1NljjQQh1S79ezciPgweqjL5Ktyi/w78ioEq2rKGP0EVjnMpLvk5n6/Rc2YMbCrhB b2Jotgs7xsm8mYPwXGRrjzAC8i30Wenq9pEToP/tXFtE91Dc8jPQ0ai9oYmKEAcw9tHQ ymBCq5RaIH+g2D6vHHImia2lOXrK0LT6Kv8OdVrU/3S3JQpXQl6qFIusMbPczhym5+0W kCNN5gck6Nb9tMKoQeSVlJ7k5D1kN5Ez/q2YjjW7h+5i3i2ifIrQteIZ0d6pHBrb2N15 8WdukJC8HxyYOSehxXkZVimbqIhiGPbSRprH/igCgyuLrBdD+qso22IXiUmkZcrUtc8D 9b8Q== X-Gm-Message-State: AO0yUKXv8DuGywgJW9AlCqfaRlrHrak5QMQ/833Ip8P1WPCPSOtybMJy v7G5QY90w4Db9JG6b1CAWMhjXResugW+sRBK X-Google-Smtp-Source: AK7set/z3QwK/zKvIj6VGfCp+wO/hQXBiWRyDE0xIoRVAOzZE2DjbmguwpNT9TjACaV1ydpzCPY53g== X-Received: by 2002:a05:6602:1595:b0:71f:d4fb:d611 with SMTP id e21-20020a056602159500b0071fd4fbd611mr4643613iow.14.1675178886173; Tue, 31 Jan 2023 07:28:06 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:28:05 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 32/32] Makefile: Drop SPL_ and SPL_TPL_ macros Date: Tue, 31 Jan 2023 08:27:02 -0700 Message-Id: <20230131152702.249197-33-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> 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.6 at phobos.denx.de X-Virus-Status: Clean These are not needed anymore with split configs. Drop them. This also drops an incorrect $(SPL_TPL) in arch/powerpc/lib/Makefile Signed-off-by: Simon Glass --- Makefile | 6 +- arch/arm/config.mk | 6 +- arch/arm/cpu/arm920t/Makefile | 2 +- arch/arm/cpu/arm926ejs/Makefile | 2 +- arch/arm/cpu/armv7/Makefile | 2 +- arch/arm/cpu/armv8/Makefile | 6 +- arch/arm/cpu/armv8/fsl-layerscape/Makefile | 2 +- arch/arm/lib/Makefile | 18 +++--- arch/arm/mach-at91/arm926ejs/Makefile | 4 +- arch/arm/mach-omap2/Makefile | 2 +- arch/arm/mach-omap2/am33xx/Makefile | 2 +- arch/arm/mach-orion5x/Makefile | 4 +- arch/arm/mach-rockchip/Makefile | 2 +- arch/arm/mach-stm32mp/Makefile | 2 +- arch/arm/mach-zynqmp/Makefile | 2 +- arch/powerpc/lib/Makefile | 2 +- arch/riscv/lib/Makefile | 16 ++--- arch/x86/Makefile | 8 +-- arch/x86/cpu/Makefile | 20 +++---- arch/x86/cpu/broadwell/Makefile | 10 ++-- arch/x86/cpu/intel_common/Makefile | 14 ++--- arch/x86/cpu/ivybridge/Makefile | 6 +- arch/x86/cpu/qemu/Makefile | 2 +- arch/x86/lib/Makefile | 8 +-- board/bosch/guardian/Makefile | 2 +- board/compulab/common/Makefile | 2 +- board/freescale/common/Makefile | 4 +- board/tcl/sl50/Makefile | 2 +- board/ti/am335x/Makefile | 2 +- board/ti/am43xx/Makefile | 2 +- board/vscom/baltos/Makefile | 2 +- board/xilinx/zynqmp/Makefile | 2 +- boot/Makefile | 52 ++++++++-------- cmd/Makefile | 2 +- common/Makefile | 26 ++++---- common/init/Makefile | 2 +- common/spl/Makefile | 48 +++++++-------- disk/Makefile | 18 +++--- doc/develop/tests_writing.rst | 6 +- drivers/Makefile | 70 +++++++++++----------- drivers/ata/Makefile | 2 +- drivers/block/Makefile | 6 +- drivers/bus/Makefile | 2 +- drivers/cache/Makefile | 2 +- drivers/clk/Makefile | 14 ++--- drivers/clk/imx/Makefile | 18 +++--- drivers/clk/ti/Makefile | 4 +- drivers/core/Makefile | 14 ++--- drivers/ddr/altera/Makefile | 2 +- drivers/dfu/Makefile | 14 ++--- drivers/firmware/Makefile | 2 +- drivers/gpio/Makefile | 10 ++-- drivers/i2c/Makefile | 14 ++--- drivers/input/Makefile | 6 +- drivers/led/Makefile | 2 +- drivers/mailbox/Makefile | 2 +- drivers/misc/Makefile | 22 +++---- drivers/mmc/Makefile | 10 ++-- drivers/mtd/Makefile | 4 +- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/raw/Makefile | 2 +- drivers/mtd/spi/Makefile | 8 +-- drivers/mux/Makefile | 2 +- drivers/phy/Makefile | 6 +- drivers/phy/ti/Makefile | 2 +- drivers/pinctrl/Makefile | 6 +- drivers/power/Makefile | 8 +-- drivers/power/acpi_pmc/Makefile | 2 +- drivers/power/domain/Makefile | 2 +- drivers/power/pmic/Makefile | 30 +++++----- drivers/power/regulator/Makefile | 38 ++++++------ drivers/ram/Makefile | 2 +- drivers/remoteproc/Makefile | 2 +- drivers/rtc/Makefile | 6 +- drivers/scsi/Makefile | 2 +- drivers/serial/Makefile | 4 +- drivers/spi/Makefile | 2 +- drivers/sysreset/Makefile | 6 +- drivers/timer/Makefile | 6 +- drivers/tpm/Makefile | 4 +- drivers/usb/cdns3/Makefile | 4 +- drivers/usb/common/Makefile | 2 +- drivers/usb/dwc3/Makefile | 2 +- drivers/usb/gadget/udc/Makefile | 6 +- drivers/usb/host/Makefile | 6 +- drivers/watchdog/Makefile | 2 +- env/Makefile | 22 +++---- fs/fat/Makefile | 4 +- fs/sandbox/Makefile | 2 +- fs/squashfs/Makefile | 2 +- lib/Makefile | 54 ++++++++--------- lib/acpi/Makefile | 8 +-- lib/aes/Makefile | 2 +- lib/crypto/Makefile | 14 ++--- lib/ecdsa/Makefile | 2 +- lib/libfdt/Makefile | 2 +- lib/rsa/Makefile | 4 +- net/Makefile | 8 +-- scripts/Kbuild.include | 5 -- scripts/Makefile.dts | 2 +- scripts/Makefile.spl | 41 ++++++------- test/Makefile | 20 +++---- test/dm/Makefile | 2 +- test/fuzz/Makefile | 2 +- 104 files changed, 445 insertions(+), 455 deletions(-) diff --git a/Makefile b/Makefile index be5b2f4fe40..f41c4b5920a 100644 --- a/Makefile +++ b/Makefile @@ -824,7 +824,7 @@ KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g) UBOOTINCLUDE := \ -Iinclude \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ - $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \ + $(if $(CONFIG_SYS_THUMB_BUILD), \ $(if $(CONFIG_HAS_THUMB2), \ $(if $(CONFIG_CPU_V7M), \ -I$(srctree)/arch/arm/thumb1/include), \ @@ -858,7 +858,7 @@ libs-y += disk/ libs-y += drivers/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/ -libs-$(CONFIG_$(SPL_)ALTERA_SDRAM) += drivers/ddr/altera/ +libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/ libs-y += drivers/usb/cdns3/ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ @@ -877,7 +877,7 @@ libs-y += drivers/usb/ulpi/ ifdef CONFIG_POST libs-y += post/ endif -libs-$(CONFIG_$(SPL_TPL_)UNIT_TEST) += test/ +libs-$(CONFIG_UNIT_TEST) += test/ libs-$(CONFIG_UT_ENV) += test/env/ libs-$(CONFIG_UT_OPTEE) += test/optee/ libs-$(CONFIG_UT_OVERLAY) += test/overlay/ diff --git a/arch/arm/config.mk b/arch/arm/config.mk index bf781f10262..4e2e1cd729f 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -34,7 +34,7 @@ PLATFORM_ELFFLAGS += -B arm -O elf32-littlearm endif # Choose between ARM/Thumb instruction sets -ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) +ifeq ($(CONFIG_SYS_THUMB_BUILD),y) AFLAGS_IMPLICIT_IT := $(call as-option,-Wa$(comma)-mimplicit-it=always) PF_CPPFLAGS_ARM := $(AFLAGS_IMPLICIT_IT) \ $(call cc-option, -mthumb -mthumb-interwork,\ @@ -47,7 +47,7 @@ PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \ endif # Only test once -ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) +ifeq ($(CONFIG_SYS_THUMB_BUILD),y) archprepare: checkthumb checkgcc6 checkthumb: @@ -110,7 +110,7 @@ LDFLAGS_u-boot += -pie # # http://sourceware.org/bugzilla/show_bug.cgi?id=12532 # -ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y) +ifeq ($(CONFIG_SYS_THUMB_BUILD),y) ifeq ($(GAS_BUG_12532),) export GAS_BUG_12532:=$(shell if [ $(call binutils-version) -lt 0222 ] ; \ then echo y; else echo n; fi) diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile index 5ac3740621c..0b249fe8ce0 100644 --- a/arch/arm/cpu/arm920t/Makefile +++ b/arch/arm/cpu/arm920t/Makefile @@ -9,6 +9,6 @@ obj-y += cpu.o # some files can only build in ARM mode -ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD +ifdef CONFIG_SYS_THUMB_BUILD CFLAGS_cpu.o := -marm endif diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile index 7e7ad4f35d7..66203e5dbef 100644 --- a/arch/arm/cpu/arm926ejs/Makefile +++ b/arch/arm/cpu/arm926ejs/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_ARCH_SUNXI) += sunxi/ # some files can only build in ARM or THUMB2, not THUMB1 -ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD +ifdef CONFIG_SYS_THUMB_BUILD ifndef CONFIG_HAS_THUMB2 CFLAGS_cpu.o := -marm diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 653eef8ad79..e16c306b89b 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -17,7 +17,7 @@ obj-$(CONFIG_EFI_LOADER) += sctlr.o obj-$(CONFIG_ARMV7_NONSEC) += exception_level.o endif -ifneq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),y) +ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y) obj-y += lowlevel_init.o endif diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index bba4f570dbb..4fa54c91d4c 100644 --- a/arch/arm/cpu/armv8/Makefile +++ b/arch/arm/cpu/armv8/Makefile @@ -6,10 +6,10 @@ extra-y := start.o obj-y += cpu.o -ifndef CONFIG_$(SPL_TPL_)TIMER +ifndef CONFIG_TIMER obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o endif -ifndef CONFIG_$(SPL_)SYS_DCACHE_OFF +ifndef CONFIG_SYS_DCACHE_OFF obj-y += cache_v8.o obj-y += cache.o endif @@ -32,7 +32,7 @@ obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o else obj-$(CONFIG_ARCH_SUNXI) += fel_utils.o endif -obj-$(CONFIG_$(SPL_)ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o +obj-$(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_RECOVER_DATA_SECTION) += spl_data.o diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile b/arch/arm/cpu/armv8/fsl-layerscape/Makefile index 598c36ee660..7a480b9764c 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile +++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile @@ -10,7 +10,7 @@ obj-$(CONFIG_MP) += mp.o spintable.o obj-$(CONFIG_OF_LIBFDT) += fdt.o endif obj-$(CONFIG_SPL) += spl.o -obj-$(CONFIG_$(SPL_)FSL_LS_PPA) += ppa.o +obj-$(CONFIG_FSL_LS_PPA) += ppa.o ifneq ($(CONFIG_FSL_LSCH3),) obj-y += fsl_lsch3_speed.o diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 62cf80f3739..f43b82d3b46 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -34,7 +34,7 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o else -obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o +obj-$(CONFIG_FRAMEWORK) += spl.o ifdef CONFIG_SPL_FRAMEWORK obj-$(CONFIG_CMD_BOOTI) += image.o obj-$(CONFIG_CMD_BOOTZ) += zimage.o @@ -42,14 +42,14 @@ endif obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o endif ifdef CONFIG_ARM64 -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset-arm64.o -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy-arm64.o +obj-$(CONFIG_USE_ARCH_MEMSET) += memset-arm64.o +obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy-arm64.o else -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o +obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o +obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o endif -obj-$(CONFIG_$(SPL_TPL_)SYS_L2_PL310) += cache-pl310.o -obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o +obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o +obj-$(CONFIG_SEMIHOSTING) += semihosting.o ifneq ($(filter y,$(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) $(CONFIG_SAVE_PREV_BL_FDT_ADDR)),) obj-y += save_prev_bl_data.o @@ -73,7 +73,7 @@ obj-y += interrupts_64.o else obj-y += interrupts.o endif -ifndef CONFIG_$(SPL_TPL_)SYSRESET +ifndef CONFIG_SYSRESET obj-y += reset.o endif @@ -92,7 +92,7 @@ endif # some files can only build in ARM or THUMB2, not THUMB1 -ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD +ifdef CONFIG_SYS_THUMB_BUILD asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL ifndef CONFIG_HAS_THUMB2 diff --git a/arch/arm/mach-at91/arm926ejs/Makefile b/arch/arm/mach-at91/arm926ejs/Makefile index 902dd3a60e3..4ada807f914 100644 --- a/arch/arm/mach-at91/arm926ejs/Makefile +++ b/arch/arm/mach-at91/arm926ejs/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_SAM9X60) += sam9x60_devices.o obj-$(CONFIG_AT91_EFLASH) += eflash.o obj-y += clock.o obj-y += cpu.o -ifndef CONFIG_$(SPL_TPL_)SYSRESET +ifndef CONFIG_SYSRESET obj-y += reset.o endif ifneq ($(CONFIG_ATMEL_PIT_TIMER),y) @@ -34,7 +34,7 @@ obj-y += lowlevel_init.o endif endif -ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD +ifdef CONFIG_SYS_THUMB_BUILD ifndef CONFIG_HAS_THUMB2 CFLAGS_cache.o := -marm diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index bb01eab80e6..0777a0c9981 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -34,7 +34,7 @@ obj-$(CONFIG_SCSI_AHCI_PLAT) += sata.o endif endif -ifeq ($(CONFIG_$(SPL_TPL_)SYS_DCACHE_OFF),) +ifeq ($(CONFIG_SYS_DCACHE_OFF),) obj-y += omap-cache.o endif diff --git a/arch/arm/mach-omap2/am33xx/Makefile b/arch/arm/mach-omap2/am33xx/Makefile index bf94d345dae..388573d2cd6 100644 --- a/arch/arm/mach-omap2/am33xx/Makefile +++ b/arch/arm/mach-omap2/am33xx/Makefile @@ -12,7 +12,7 @@ endif obj-$(CONFIG_TI816X) += clock_ti816x.o obj-y += sys_info.o obj-y += ddr.o -ifeq ($(CONFIG_TI816X)$(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_TI816X)$(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y += emif4.o endif obj-$(CONFIG_TI816X) += ti816x_emif4.o diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index a8b87f6d710..ee96d5ece99 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile @@ -11,13 +11,13 @@ obj-y = cpu.o obj-y += dram.o obj-y += timer.o -ifndef CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT +ifndef CONFIG_SKIP_LOWLEVEL_INIT obj-y += lowlevel_init.o endif # some files can only build in ARM or THUMB2, not THUMB1 -ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD +ifdef CONFIG_SYS_THUMB_BUILD ifndef CONFIG_HAS_THUMB2 CFLAGS_cpu.o := -marm diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index e3d4a8b42e4..edf2fd46820 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -30,7 +30,7 @@ ifeq ($(CONFIG_TPL_BUILD),) obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o endif -obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram.o +obj-$(CONFIG_RAM) += sdram.o obj-$(CONFIG_ROCKCHIP_PX30) += px30/ obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/ diff --git a/arch/arm/mach-stm32mp/Makefile b/arch/arm/mach-stm32mp/Makefile index a40f8dc25a8..e0b46eb011a 100644 --- a/arch/arm/mach-stm32mp/Makefile +++ b/arch/arm/mach-stm32mp/Makefile @@ -22,5 +22,5 @@ obj-$(CONFIG_ARMV7_PSCI) += psci.o obj-$(CONFIG_TFABOOT) += boot_params.o endif -obj-$(CONFIG_$(SPL_)STM32MP15_PWR) += pwr_regulator.o +obj-$(CONFIG_STM32MP15_PWR) += pwr_regulator.o obj-$(CONFIG_OF_SYSTEM_SETUP) += fdt.o diff --git a/arch/arm/mach-zynqmp/Makefile b/arch/arm/mach-zynqmp/Makefile index bb1830c8462..4f9f6b56a98 100644 --- a/arch/arm/mach-zynqmp/Makefile +++ b/arch/arm/mach-zynqmp/Makefile @@ -8,4 +8,4 @@ obj-y += cpu.o obj-$(CONFIG_MP) += mp.o obj-$(CONFIG_SPL_BUILD) += spl.o handoff.o psu_spl_init.o obj-$(CONFIG_SPL_ZYNQMP_DRAM_ECC_INIT) += ecc_spl_init.o -obj-$(CONFIG_$(SPL_)ZYNQMP_PSU_INIT_ENABLED) += psu_spl_init.o +obj-$(CONFIG_ZYNQMP_PSU_INIT_ENABLED) += psu_spl_init.o diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index bb819dcbb6c..7b84db928e3 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -45,5 +45,5 @@ obj-y += traps.o endif # not minimal ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_$(SPL_TPL)_FRAMEWORK) += spl.o +obj-$(CONFIG_FRAMEWORK) += spl.o endif diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile index e5a81ba7223..f902a4c2fed 100644 --- a/arch/riscv/lib/Makefile +++ b/arch/riscv/lib/Makefile @@ -11,19 +11,19 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o obj-$(CONFIG_CMD_GO) += boot.o obj-y += cache.o obj-$(CONFIG_SIFIVE_CACHE) += sifive_cache.o -ifeq ($(CONFIG_$(SPL_)RISCV_MMODE),y) -obj-$(CONFIG_$(SPL_)SIFIVE_CLINT) += sifive_clint.o +ifeq ($(CONFIG_RISCV_MMODE),y) +obj-$(CONFIG_SIFIVE_CLINT) += sifive_clint.o obj-$(CONFIG_ANDES_PLICSW) += andes_plicsw.o else obj-$(CONFIG_SBI) += sbi.o obj-$(CONFIG_SBI_IPI) += sbi_ipi.o endif obj-y += interrupts.o -ifeq ($(CONFIG_$(SPL_)SYSRESET),) +ifeq ($(CONFIG_SYSRESET),) obj-y += reset.o endif obj-y += setjmp.o -obj-$(CONFIG_$(SPL_)SMP) += smp.o +obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SPL_BUILD) += spl.o obj-y += fdt_fixup.o @@ -39,8 +39,8 @@ extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC) extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC) extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC) -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMMOVE) += memmove.o -obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o +obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o +obj-$(CONFIG_USE_ARCH_MEMMOVE) += memmove.o +obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o -obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o +obj-$(CONFIG_SEMIHOSTING) += semihosting.o diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f1afc74fff8..8bb6c4de156 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0+ ifeq ($(CONFIG_EFI_APP),) -ifdef CONFIG_$(SPL_)X86_64 +ifdef CONFIG_X86_64 head-y := arch/x86/cpu/start64.o else -ifeq ($(CONFIG_$(SPL_TPL_)X86_16BIT_INIT),y) +ifeq ($(CONFIG_X86_16BIT_INIT),y) head-y := arch/x86/cpu/start.o else ifndef CONFIG_SPL @@ -20,8 +20,8 @@ endif endif endif # EFI -head-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += arch/x86/cpu/start16.o -head-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += arch/x86/cpu/resetvec.o +head-$(CONFIG_X86_16BIT_INIT) += arch/x86/cpu/start16.o +head-$(CONFIG_X86_16BIT_INIT) += arch/x86/cpu/resetvec.o libs-y += arch/x86/cpu/ libs-y += arch/x86/lib/ diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index 16e67e3da24..248dd908fc9 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -6,10 +6,10 @@ # (C) Copyright 2002 # Daniel Engström, Omicron Ceti AB, daniel@omicron.se. -ifeq ($(CONFIG_$(SPL_)X86_64),y) +ifeq ($(CONFIG_X86_64),y) extra-y = start64.o else -ifeq ($(CONFIG_$(SPL_TPL_)X86_16BIT_INIT),y) +ifeq ($(CONFIG_X86_16BIT_INIT),y) extra-y = start.o else ifndef CONFIG_SPL @@ -24,14 +24,14 @@ endif endif endif -extra-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += resetvec.o start16.o +extra-$(CONFIG_X86_16BIT_INIT) += resetvec.o start16.o obj-y += cpu.o ifndef CONFIG_TPL_BUILD obj-y += cpu_x86.o endif -ifndef CONFIG_$(SPL_)X86_64 +ifndef CONFIG_X86_64 AFLAGS_REMOVE_call32.o := -mregparm=3 \ $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32) AFLAGS_call32.o := -fpic -fshort-wchar \ @@ -54,23 +54,23 @@ obj-$(CONFIG_INTEL_QUARK) += quark/ obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/ obj-$(CONFIG_INTEL_TANGIER) += tangier/ obj-$(CONFIG_APIC) += lapic.o ioapic.o -obj-$(CONFIG_$(SPL_TPL_)ACPI_GPE) += acpi_gpe.o +obj-$(CONFIG_ACPI_GPE) += acpi_gpe.o obj-$(CONFIG_QFW) += qfw_cpu.o ifndef CONFIG_SYS_COREBOOT -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += irq.o +obj-$(CONFIG_X86_32BIT_INIT) += irq.o endif -ifndef CONFIG_$(SPL_)X86_64 -obj-$(CONFIG_$(SPL_)SMP) += mp_init.o +ifndef CONFIG_X86_64 +obj-$(CONFIG_SMP) += mp_init.o endif obj-y += mtrr.o obj-$(CONFIG_PCI) += pci.o -ifndef CONFIG_$(SPL_)X86_64 +ifndef CONFIG_X86_64 obj-$(CONFIG_SMP) += sipi_vector.o endif obj-y += turbo.o obj-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.o -ifeq ($(CONFIG_$(SPL_)X86_64),y) +ifeq ($(CONFIG_X86_64),y) obj-y += x86_64/ else obj-y += i386/ diff --git a/arch/x86/cpu/broadwell/Makefile b/arch/x86/cpu/broadwell/Makefile index 52d56c65be8..9d63e3ff24d 100644 --- a/arch/x86/cpu/broadwell/Makefile +++ b/arch/x86/cpu/broadwell/Makefile @@ -3,8 +3,8 @@ # Copyright (c) 2016 Google, Inc obj-y += adsp.o -obj-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += cpu.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += cpu_full.o +obj-$(CONFIG_X86_16BIT_INIT) += cpu.o +obj-$(CONFIG_X86_32BIT_INIT) += cpu_full.o ifdef CONFIG_SPL ifndef CONFIG_SPL_BUILD @@ -17,7 +17,7 @@ ifndef CONFIG_SPL_BUILD endif endif -ifeq ($(CONFIG_$(SPL_TPL_)X86_32BIT_INIT),) +ifeq ($(CONFIG_X86_32BIT_INIT),) #obj-y += cpu_from_spl.o endif @@ -28,6 +28,6 @@ obj-y += northbridge.o obj-y += pch.o obj-y += pinctrl_broadwell.o obj-y += power_state.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += refcode.o +obj-$(CONFIG_X86_32BIT_INIT) += refcode.o obj-y += sata.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += sdram.o +obj-$(CONFIG_X86_32BIT_INIT) += sdram.o diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile index 1dc17b45879..caab887b8e6 100644 --- a/arch/x86/cpu/intel_common/Makefile +++ b/arch/x86/cpu/intel_common/Makefile @@ -5,10 +5,10 @@ obj-$(CONFIG_INTEL_ACPIGEN) += acpi.o ifdef CONFIG_HAVE_MRC -obj-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += car.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += me_status.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += report_platform.o -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += mrc.o +obj-$(CONFIG_X86_16BIT_INIT) += car.o +obj-$(CONFIG_X86_32BIT_INIT) += me_status.o +obj-$(CONFIG_X86_32BIT_INIT) += report_platform.o +obj-$(CONFIG_X86_32BIT_INIT) += mrc.o endif ifndef CONFIG_SPL_BUILD @@ -26,10 +26,10 @@ obj-y += cpu.o obj-y += fast_spi.o obj-y += lpc.o obj-y += lpss.o -obj-$(CONFIG_$(SPL_)INTEL_GENERIC_WIFI) += generic_wifi.o +obj-$(CONFIG_INTEL_GENERIC_WIFI) += generic_wifi.o ifndef CONFIG_EFI_APP -obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += microcode.o -ifndef CONFIG_$(SPL_)X86_64 +obj-$(CONFIG_X86_32BIT_INIT) += microcode.o +ifndef CONFIG_X86_64 obj-y += microcode.o endif endif diff --git a/arch/x86/cpu/ivybridge/Makefile b/arch/x86/cpu/ivybridge/Makefile index 716134e9ff3..01e50492f18 100644 --- a/arch/x86/cpu/ivybridge/Makefile +++ b/arch/x86/cpu/ivybridge/Makefile @@ -5,15 +5,15 @@ ifdef CONFIG_HAVE_FSP obj-y += fsp_configs.o ivybridge.o else -obj-$(CONFIG_$(SPL_)X86_32BIT_INIT) += cpu.o +obj-$(CONFIG_X86_32BIT_INIT) += cpu.o obj-y += early_me.o obj-y += lpc.o obj-y += northbridge.o ifndef CONFIG_SPL_BUILD obj-y += sata.o endif -obj-$(CONFIG_$(SPL_)X86_32BIT_INIT) += sdram.o -ifndef CONFIG_$(SPL_)X86_32BIT_INIT +obj-$(CONFIG_X86_32BIT_INIT) += sdram.o +ifndef CONFIG_X86_32BIT_INIT obj-y += sdram_nop.o endif endif diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile index b7dd5bd46c7..a40bea187cf 100644 --- a/arch/x86/cpu/qemu/Makefile +++ b/arch/x86/cpu/qemu/Makefile @@ -2,7 +2,7 @@ # # Copyright (C) 2015, Bin Meng -ifndef CONFIG_$(SPL_)X86_64 +ifndef CONFIG_X86_64 obj-y += car.o endif obj-y += dram.o diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index a6f22441474..bd275fadd89 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -16,7 +16,7 @@ ifndef CONFIG_SPL_BUILD obj-$(CONFIG_CMD_BOOTM) += bootm.o endif obj-y += cmd_boot.o -obj-$(CONFIG_$(SPL_)COREBOOT_SYSINFO) += coreboot/ +obj-$(CONFIG_COREBOOT_SYSINFO) += coreboot/ obj-$(CONFIG_SEABIOS) += coreboot_table.o obj-y += early_cmos.o obj-y += e820.o @@ -24,7 +24,7 @@ obj-y += init_helpers.o obj-y += interrupts.o obj-y += lpc-uclass.o obj-y += mpspec.o -obj-$(CONFIG_$(SPL_TPL_)ACPIGEN) += acpi_nhlt.o +obj-$(CONFIG_ACPIGEN) += acpi_nhlt.o obj-y += northbridge-uclass.o obj-$(CONFIG_I8259_PIC) += i8259.o obj-$(CONFIG_I8254_TIMER) += i8254.o @@ -41,7 +41,7 @@ obj-y += acpi.o obj-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.o ifndef CONFIG_QEMU obj-y += acpigen.o -obj-$(CONFIG_$(SPL_TPL_)GENERATE_ACPI_TABLE) += acpi_table.o +obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o endif obj-y += tables.o ifndef CONFIG_SPL_BUILD @@ -87,7 +87,7 @@ endif ifdef CONFIG_EFI_STUB -ifeq ($(CONFIG_$(SPL_)X86_64),) +ifeq ($(CONFIG_X86_64),) extra-y += $(EFI_CRT0) $(EFI_RELOC) endif diff --git a/board/bosch/guardian/Makefile b/board/bosch/guardian/Makefile index 20cecbfb64e..11625c9dd67 100644 --- a/board/bosch/guardian/Makefile +++ b/board/bosch/guardian/Makefile @@ -5,7 +5,7 @@ # Copyright (C) 2018 Robert Bosch Power Tools GmbH # -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/compulab/common/Makefile b/board/compulab/common/Makefile index 7c8226e6e16..9479e02d3d0 100644 --- a/board/compulab/common/Makefile +++ b/board/compulab/common/Makefile @@ -5,5 +5,5 @@ # Author: Igor Grinberg obj-y += common.o -obj-$(CONFIG_$(SPL_)SYS_I2C_LEGACY) += eeprom.o +obj-$(CONFIG_SYS_I2C_LEGACY) += eeprom.o obj-$(CONFIG_SMC911X) += omap3_smc911x.o diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index b4faf6f9e0a..718a24dac30 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -34,7 +34,7 @@ obj-$(CONFIG_FSL_NGPIXIS) += ngpixis.o endif obj-$(I2C_COMMON) += i2c_common.o obj-$(CONFIG_FSL_USE_PCA9547_MUX) += i2c_mux.o -obj-$(CONFIG_$(SPL_)VID) += vid.o +obj-$(CONFIG_VID) += vid.o obj-$(CONFIG_FSL_QIXIS) += qixis.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o @@ -54,7 +54,7 @@ obj-$(CONFIG_TARGET_MPC8548CDS) += cds_pci_ft.o obj-$(CONFIG_TARGET_P3041DS) += ics307_clk.o obj-$(CONFIG_TARGET_P4080DS) += ics307_clk.o obj-$(CONFIG_TARGET_P5040DS) += ics307_clk.o -ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y) +ifeq ($(CONFIG_POWER_LEGACY),y) obj-$(CONFIG_POWER_PFUZE100) += pfuze.o endif obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze.o diff --git a/board/tcl/sl50/Makefile b/board/tcl/sl50/Makefile index 0ac0ba36cdb..c2977d77787 100644 --- a/board/tcl/sl50/Makefile +++ b/board/tcl/sl50/Makefile @@ -4,7 +4,7 @@ # # Copyright (C) 2015 Toby Churchill Ltd - http://www.toby-churchill.com/ -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/ti/am335x/Makefile b/board/ti/am335x/Makefile index 3ccf66be5bb..c34b9b1dd8a 100644 --- a/board/ti/am335x/Makefile +++ b/board/ti/am335x/Makefile @@ -4,7 +4,7 @@ # # Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/ti/am43xx/Makefile b/board/ti/am43xx/Makefile index 8dc1d89e3ac..60a11d8c04d 100644 --- a/board/ti/am43xx/Makefile +++ b/board/ti/am43xx/Makefile @@ -4,7 +4,7 @@ # # Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/vscom/baltos/Makefile b/board/vscom/baltos/Makefile index 3ccf66be5bb..c34b9b1dd8a 100644 --- a/board/vscom/baltos/Makefile +++ b/board/vscom/baltos/Makefile @@ -4,7 +4,7 @@ # # Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ -ifeq ($(CONFIG_$(SPL_)SKIP_LOWLEVEL_INIT),) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 732f909fc21..1518219acef 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -31,7 +31,7 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/ endif endif -obj-$(CONFIG_$(SPL_)ZYNQMP_PSU_INIT_ENABLED) += $(init-objs) +obj-$(CONFIG_ZYNQMP_PSU_INIT_ENABLED) += $(init-objs) ifdef CONFIG_SPL_BUILD ifneq ($(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE),"") diff --git a/boot/Makefile b/boot/Makefile index 73b5b19816b..625d143a711 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -18,29 +18,29 @@ obj-y += image.o image-board.o obj-$(CONFIG_ANDROID_AB) += android_ab.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootdev-uclass.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootmeth-uclass.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootstd-uclass.o - -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO) += bootmeth_distro.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO_PXE) += bootmeth_pxe.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o -ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL +obj-$(CONFIG_BOOTSTD) += bootdev-uclass.o +obj-$(CONFIG_BOOTSTD) += bootflow.o +obj-$(CONFIG_BOOTSTD) += bootmeth-uclass.o +obj-$(CONFIG_BOOTSTD) += bootstd-uclass.o + +obj-$(CONFIG_BOOTMETH_DISTRO) += bootmeth_distro.o +obj-$(CONFIG_BOOTMETH_DISTRO_PXE) += bootmeth_pxe.o +obj-$(CONFIG_BOOTMETH_EFILOADER) += bootmeth_efi.o +obj-$(CONFIG_BOOTMETH_SANDBOX) += bootmeth_sandbox.o +obj-$(CONFIG_BOOTMETH_SCRIPT) += bootmeth_script.o +ifdef CONFIG_BOOTSTD_FULL obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += bootmeth_efi_mgr.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow_menu.o +obj-$(CONFIG_BOOTSTD) += bootflow_menu.o endif -obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o -obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += fdt_region.o -obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o -obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o -obj-$(CONFIG_$(SPL_TPL_)IMAGE_PRE_LOAD) += image-pre-load.o -obj-$(CONFIG_$(SPL_TPL_)IMAGE_SIGN_INFO) += image-sig.o -obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-fit-sig.o -obj-$(CONFIG_$(SPL_TPL_)FIT_CIPHER) += image-cipher.o +obj-$(CONFIG_OF_LIBFDT) += image-fdt.o +obj-$(CONFIG_FIT_SIGNATURE) += fdt_region.o +obj-$(CONFIG_FIT) += image-fit.o +obj-$(CONFIG_MULTI_DTB_FIT) += boot_fit.o common_fit.o +obj-$(CONFIG_IMAGE_PRE_LOAD) += image-pre-load.o +obj-$(CONFIG_IMAGE_SIGN_INFO) += image-sig.o +obj-$(CONFIG_FIT_SIGNATURE) += image-fit-sig.o +obj-$(CONFIG_FIT_CIPHER) += image-cipher.o obj-$(CONFIG_CMD_ADTIMG) += image-android-dt.o @@ -48,10 +48,10 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o endif -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += expo.o scene.o scene_menu.o +obj-$(CONFIG_BOOTMETH_VBE) += expo.o scene.o scene_menu.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE) += vbe.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_REQUEST) += vbe_request.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE) += vbe_simple.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE_FW) += vbe_simple_fw.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_VBE_SIMPLE_OS) += vbe_simple_os.o +obj-$(CONFIG_BOOTMETH_VBE) += vbe.o +obj-$(CONFIG_BOOTMETH_VBE_REQUEST) += vbe_request.o +obj-$(CONFIG_BOOTMETH_VBE_SIMPLE) += vbe_simple.o +obj-$(CONFIG_BOOTMETH_VBE_SIMPLE_FW) += vbe_simple_fw.o +obj-$(CONFIG_BOOTMETH_VBE_SIMPLE_OS) += vbe_simple_os.o diff --git a/cmd/Makefile b/cmd/Makefile index b6888a52f49..cee56a16f18 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -227,7 +227,7 @@ obj-$(CONFIG_X86) += x86/ obj-$(CONFIG_ARCH_MVEBU) += mvebu/ endif # !CONFIG_SPL_BUILD -obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o +obj-$(CONFIG_CMD_TLV_EEPROM) += tlv_eeprom.o # core command obj-y += nvedit.o diff --git a/common/Makefile b/common/Makefile index 252e9656dfd..56d734892ef 100644 --- a/common/Makefile +++ b/common/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o obj-$(CONFIG_DISPLAY_BOARDINFO_LATE) += board_info.o obj-$(CONFIG_FDT_SIMPLEFB) += fdt_simplefb.o -obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_OF_LIBFDT) += fdt_support.o obj-$(CONFIG_MII) += miiphyutil.o obj-$(CONFIG_CMD_MII) += miiphyutil.o obj-$(CONFIG_PHYLIB) += miiphyutil.o @@ -43,15 +43,15 @@ obj-$(CONFIG_CMDLINE) += cli_getch.o cli_readline.o cli_simple.o endif # !CONFIG_SPL_BUILD -obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o -obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o +obj-$(CONFIG_BOOTSTAGE) += bootstage.o +obj-$(CONFIG_BLOBLIST) += bloblist.o ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_DFU obj-$(CONFIG_DFU_OVER_USB) += dfu.o endif obj-$(CONFIG_SPL_NET) += miiphyutil.o -obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o +obj-$(CONFIG_OF_LIBFDT) += fdt_support.o obj-$(CONFIG_SPL_USB_HOST) += usb.o usb_hub.o obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o @@ -76,15 +76,15 @@ endif # CONFIG_SPL_BUILD obj-$(CONFIG_CROS_EC) += cros_ec.o obj-y += dlmalloc.o ifdef CONFIG_SYS_MALLOC_F -ifneq ($(CONFIG_$(SPL_TPL_)SYS_MALLOC_F_LEN),0) +ifneq ($(CONFIG_SYS_MALLOC_F_LEN),0) obj-y += malloc_simple.o endif endif obj-$(CONFIG_CYCLIC) += cyclic.o -obj-$(CONFIG_$(SPL_TPL_)EVENT) += event.o +obj-$(CONFIG_EVENT) += event.o -obj-$(CONFIG_$(SPL_TPL_)HASH) += hash.o +obj-$(CONFIG_HASH) += hash.o obj-$(CONFIG_IO_TRACE) += iotrace.o obj-y += memsize.o obj-y += stdio.o @@ -98,15 +98,15 @@ obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_getch.o cli_simple.o cli_readline.o obj-$(CONFIG_STM32MP1_DDR_INTERACTIVE) += cli_getch.o cli_simple.o cli_readline.o obj-$(CONFIG_DFU_OVER_USB) += dfu.o obj-y += command.o -obj-$(CONFIG_$(SPL_TPL_)LOG) += log.o -obj-$(CONFIG_$(SPL_TPL_)LOG_CONSOLE) += log_console.o -obj-$(CONFIG_$(SPL_TPL_)LOG_SYSLOG) += log_syslog.o +obj-$(CONFIG_LOG) += log.o +obj-$(CONFIG_LOG_CONSOLE) += log_console.o +obj-$(CONFIG_LOG_SYSLOG) += log_syslog.o obj-y += s_record.o obj-$(CONFIG_CMD_LOADB) += xyzModem.o -obj-$(CONFIG_$(SPL_TPL_)YMODEM_SUPPORT) += xyzModem.o +obj-$(CONFIG_YMODEM_SUPPORT) += xyzModem.o -obj-$(CONFIG_$(SPL_TPL_)AVB_VERIFY) += avb_verify.o -obj-$(CONFIG_$(SPL_TPL_)STACKPROTECTOR) += stackprot.o +obj-$(CONFIG_AVB_VERIFY) += avb_verify.o +obj-$(CONFIG_STACKPROTECTOR) += stackprot.o obj-$(CONFIG_SCP03) += scp03.o obj-$(CONFIG_QFW) += qfw.o diff --git a/common/init/Makefile b/common/init/Makefile index 853b56d1e57..c505a64bd7d 100644 --- a/common/init/Makefile +++ b/common/init/Makefile @@ -5,4 +5,4 @@ # obj-y += board_init.o -obj-$(CONFIG_$(SPL_TPL_)HANDOFF) += handoff.o +obj-$(CONFIG_HANDOFF) += handoff.o diff --git a/common/spl/Makefile b/common/spl/Makefile index 13db3df9933..0f1d7d6d28f 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -7,30 +7,30 @@ # ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o -obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o -obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o -obj-$(CONFIG_$(SPL_TPL_)LEGACY_IMAGE_FORMAT) += spl_legacy.o -obj-$(CONFIG_$(SPL_TPL_)NOR_SUPPORT) += spl_nor.o -obj-$(CONFIG_$(SPL_TPL_)XIP_SUPPORT) += spl_xip.o -obj-$(CONFIG_$(SPL_TPL_)YMODEM_SUPPORT) += spl_ymodem.o +obj-$(CONFIG_FRAMEWORK) += spl.o +obj-$(CONFIG_BOOTROM_SUPPORT) += spl_bootrom.o +obj-$(CONFIG_LOAD_FIT) += spl_fit.o +obj-$(CONFIG_LEGACY_IMAGE_FORMAT) += spl_legacy.o +obj-$(CONFIG_NOR_SUPPORT) += spl_nor.o +obj-$(CONFIG_XIP_SUPPORT) += spl_xip.o +obj-$(CONFIG_YMODEM_SUPPORT) += spl_ymodem.o ifndef CONFIG_SPL_UBI -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += spl_nand.o -obj-$(CONFIG_$(SPL_TPL_)ONENAND_SUPPORT) += spl_onenand.o +obj-$(CONFIG_NAND_SUPPORT) += spl_nand.o +obj-$(CONFIG_ONENAND_SUPPORT) += spl_onenand.o endif -obj-$(CONFIG_$(SPL_TPL_)UBI) += spl_ubi.o -obj-$(CONFIG_$(SPL_TPL_)NET) += spl_net.o -obj-$(CONFIG_$(SPL_TPL_)MMC) += spl_mmc.o -obj-$(CONFIG_$(SPL_TPL_)ATF) += spl_atf.o -obj-$(CONFIG_$(SPL_TPL_)OPTEE_IMAGE) += spl_optee.o -obj-$(CONFIG_$(SPL_TPL_)OPENSBI) += spl_opensbi.o -obj-$(CONFIG_$(SPL_TPL_)USB_STORAGE) += spl_usb.o -obj-$(CONFIG_$(SPL_TPL_)FS_FAT) += spl_fat.o -obj-$(CONFIG_$(SPL_TPL_)FS_EXT4) += spl_ext.o -obj-$(CONFIG_$(SPL_TPL_)SATA) += spl_sata.o -obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += spl_semihosting.o -obj-$(CONFIG_$(SPL_TPL_)DFU) += spl_dfu.o -obj-$(CONFIG_$(SPL_TPL_)SPI_LOAD) += spl_spi.o -obj-$(CONFIG_$(SPL_TPL_)RAM_SUPPORT) += spl_ram.o -obj-$(CONFIG_$(SPL_TPL_)USB_SDP_SUPPORT) += spl_sdp.o +obj-$(CONFIG_UBI) += spl_ubi.o +obj-$(CONFIG_NET) += spl_net.o +obj-$(CONFIG_MMC) += spl_mmc.o +obj-$(CONFIG_ATF) += spl_atf.o +obj-$(CONFIG_OPTEE_IMAGE) += spl_optee.o +obj-$(CONFIG_OPENSBI) += spl_opensbi.o +obj-$(CONFIG_USB_STORAGE) += spl_usb.o +obj-$(CONFIG_FS_FAT) += spl_fat.o +obj-$(CONFIG_FS_EXT4) += spl_ext.o +obj-$(CONFIG_SATA) += spl_sata.o +obj-$(CONFIG_SEMIHOSTING) += spl_semihosting.o +obj-$(CONFIG_DFU) += spl_dfu.o +obj-$(CONFIG_SPI_LOAD) += spl_spi.o +obj-$(CONFIG_RAM_SUPPORT) += spl_ram.o +obj-$(CONFIG_USB_SDP_SUPPORT) += spl_sdp.o endif diff --git a/disk/Makefile b/disk/Makefile index 45588cf66e4..23073ded732 100644 --- a/disk/Makefile +++ b/disk/Makefile @@ -5,16 +5,16 @@ #ccflags-y += -DET_DEBUG -DDEBUG -obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += part.o -ifdef CONFIG_$(SPL_TPL_)BLK -obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += disk-uclass.o +obj-$(CONFIG_PARTITIONS) += part.o +ifdef CONFIG_BLK +obj-$(CONFIG_PARTITIONS) += disk-uclass.o endif # Must have BLK or SPL_LEGACY_BLOCK to support partitions -ifneq ($(CONFIG_$(SPL_TPL_)BLK),$(CONFIG_SPL_LEGACY_BLOCK),) -obj-$(CONFIG_$(SPL_TPL_)MAC_PARTITION) += part_mac.o -obj-$(CONFIG_$(SPL_TPL_)DOS_PARTITION) += part_dos.o -obj-$(CONFIG_$(SPL_TPL_)ISO_PARTITION) += part_iso.o -obj-$(CONFIG_$(SPL_TPL_)AMIGA_PARTITION) += part_amiga.o -obj-$(CONFIG_$(SPL_TPL_)EFI_PARTITION) += part_efi.o +ifneq ($(CONFIG_BLK),$(CONFIG_SPL_LEGACY_BLOCK),) +obj-$(CONFIG_MAC_PARTITION) += part_mac.o +obj-$(CONFIG_DOS_PARTITION) += part_dos.o +obj-$(CONFIG_ISO_PARTITION) += part_iso.o +obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o +obj-$(CONFIG_EFI_PARTITION) += part_efi.o endif diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index bb1145da268..a0275b4e843 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -320,15 +320,15 @@ to control that. Finally, add the test to the build by adding to the Makefile in the same directory:: - obj-$(CONFIG_$(SPL_)CMDLINE) += wibble.o + obj-$(CONFIG_CMDLINE) += wibble.o Note that CMDLINE is never enabled in SPL, so this test will only be present in U-Boot proper. See below for how to do SPL tests. As before, you can add an extra Kconfig check if needed:: - ifneq ($(CONFIG_$(SPL_)WIBBLE),) - obj-$(CONFIG_$(SPL_)CMDLINE) += wibble.o + ifneq ($(CONFIG_WIBBLE),) + obj-$(CONFIG_CMDLINE) += wibble.o endif diff --git a/drivers/Makefile b/drivers/Makefile index 20497aa2ac9..92869d4109e 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,42 +1,42 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-$(CONFIG_$(SPL_TPL_)BLK) += block/ -obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/ -obj-$(CONFIG_$(SPL_TPL_)BUTTON) += button/ -obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache/ -obj-$(CONFIG_$(SPL_TPL_)CLK) += clk/ -obj-$(CONFIG_$(SPL_TPL_)DM) += core/ -obj-$(CONFIG_$(SPL_TPL_)DMA) += dma/ -obj-$(CONFIG_$(SPL_TPL_)DMA_LEGACY) += dma/ -obj-$(CONFIG_$(SPL_TPL_)DFU) += dfu/ -obj-$(CONFIG_$(SPL_TPL_)GPIO) += gpio/ -obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC) += misc/ -obj-$(CONFIG_$(SPL_TPL_)SYSRESET) += sysreset/ -obj-$(CONFIG_$(SPL_TPL_)FIRMWARE) +=firmware/ -obj-$(CONFIG_$(SPL_TPL_)I2C) += i2c/ -obj-$(CONFIG_$(SPL_TPL_)INPUT) += input/ -obj-$(CONFIG_$(SPL_TPL_)LED) += led/ -obj-$(CONFIG_$(SPL_TPL_)MMC) += mmc/ +obj-$(CONFIG_BLK) += block/ +obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/ +obj-$(CONFIG_BUTTON) += button/ +obj-$(CONFIG_CACHE) += cache/ +obj-$(CONFIG_CLK) += clk/ +obj-$(CONFIG_DM) += core/ +obj-$(CONFIG_DMA) += dma/ +obj-$(CONFIG_DMA_LEGACY) += dma/ +obj-$(CONFIG_DFU) += dfu/ +obj-$(CONFIG_GPIO) += gpio/ +obj-$(CONFIG_DRIVERS_MISC) += misc/ +obj-$(CONFIG_SYSRESET) += sysreset/ +obj-$(CONFIG_FIRMWARE) +=firmware/ +obj-$(CONFIG_I2C) += i2c/ +obj-$(CONFIG_INPUT) += input/ +obj-$(CONFIG_LED) += led/ +obj-$(CONFIG_MMC) += mmc/ obj-y += mtd/ obj-$(CONFIG_MULTIPLEXER) += mux/ -obj-$(CONFIG_$(SPL_TPL_)ETH) += net/ -obj-$(CONFIG_$(SPL_TPL_)PCH) += pch/ -obj-$(CONFIG_$(SPL_TPL_)PCI) += pci/ -obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/ -obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/ -obj-$(CONFIG_$(SPL_TPL_)POWER) += power/ -obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/ -obj-$(CONFIG_$(SPL_TPL_)RTC) += rtc/ -obj-$(CONFIG_$(SPL_TPL_)SERIAL) += serial/ -obj-$(CONFIG_$(SPL_TPL_)SPI) += spi/ -obj-$(CONFIG_$(SPL_TPL_)TIMER) += timer/ -obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/ -obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/ -obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/ -obj-$(CONFIG_$(SPL_)SYSINFO) += sysinfo/ -obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ +obj-$(CONFIG_ETH) += net/ +obj-$(CONFIG_PCH) += pch/ +obj-$(CONFIG_PCI) += pci/ +obj-$(CONFIG_PHY) += phy/ +obj-$(CONFIG_PINCTRL) += pinctrl/ +obj-$(CONFIG_POWER) += power/ +obj-$(CONFIG_RAM) += ram/ +obj-$(CONFIG_RTC) += rtc/ +obj-$(CONFIG_SERIAL) += serial/ +obj-$(CONFIG_SPI) += spi/ +obj-$(CONFIG_TIMER) += timer/ +obj-$(CONFIG_VIRTIO) += virtio/ +obj-$(CONFIG_DM_MAILBOX) += mailbox/ +obj-$(CONFIG_REMOTEPROC) += remoteproc/ +obj-$(CONFIG_SYSINFO) += sysinfo/ +obj-$(CONFIG_TPM) += tpm/ obj-$(CONFIG_XEN) += xen/ -obj-$(CONFIG_$(SPL_)FPGA) += fpga/ +obj-$(CONFIG_FPGA) += fpga/ obj-y += bus/ ifndef CONFIG_TPL_BUILD @@ -48,7 +48,7 @@ obj-$(CONFIG_SPL_CRYPTO) += crypto/ obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR) += ddr/fsl/ obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/ obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ -obj-$(CONFIG_$(SPL_)ALTERA_SDRAM) += ddr/altera/ +obj-$(CONFIG_ALTERA_SDRAM) += ddr/altera/ obj-$(CONFIG_ARCH_IMX8M) += ddr/imx/imx8m/ obj-$(CONFIG_IMX8ULP_DRAM) += ddr/imx/imx8ulp/ obj-$(CONFIG_ARCH_IMX9) += ddr/imx/imx9/ diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 6e30180b8b4..0258505eef8 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile @@ -5,7 +5,7 @@ obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o obj-$(CONFIG_AHCI) += ahci-uclass.o -obj-$(CONFIG_$(SPL_)AHCI_PCI) += ahci-pci.o +obj-$(CONFIG_AHCI_PCI) += ahci-pci.o obj-$(CONFIG_SCSI_AHCI) += ahci.o obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o obj-$(CONFIG_FSL_SATA) += fsl_sata.o diff --git a/drivers/block/Makefile b/drivers/block/Makefile index f12447d78d8..7cb2dd06f3a 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -3,9 +3,9 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)BLK) += blk-uclass.o +obj-$(CONFIG_BLK) += blk-uclass.o -ifndef CONFIG_$(SPL_)BLK +ifndef CONFIG_BLK obj-$(CONFIG_SPL_LEGACY_BLOCK) += blk_legacy.o endif @@ -13,7 +13,7 @@ ifndef CONFIG_SPL_BUILD obj-$(CONFIG_IDE) += ide.o endif obj-$(CONFIG_SANDBOX) += sandbox.o host-uclass.o host_dev.o -obj-$(CONFIG_$(SPL_TPL_)BLOCK_CACHE) += blkcache.o +obj-$(CONFIG_BLOCK_CACHE) += blkcache.o obj-$(CONFIG_EFI_MEDIA) += efi-media-uclass.o obj-$(CONFIG_EFI_MEDIA_SANDBOX) += sb_efi_media.o diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 0802b9666bf..34963997dc1 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -8,4 +8,4 @@ obj-$(CONFIG_TI_PWMSS) += ti-pwmss.o obj-$(CONFIG_UNIPHIER_SYSTEM_BUS) += uniphier-system-bus.o endif -obj-$(CONFIG_$(SPL_)TI_SYSC) += ti-sysc.o +obj-$(CONFIG_TI_SYSC) += ti-sysc.o diff --git a/drivers/cache/Makefile b/drivers/cache/Makefile index ad765774e32..c023fffbca2 100644 --- a/drivers/cache/Makefile +++ b/drivers/cache/Makefile @@ -1,5 +1,5 @@ -obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache-uclass.o +obj-$(CONFIG_CACHE) += cache-uclass.o obj-$(CONFIG_SANDBOX) += sandbox_cache.o obj-$(CONFIG_L2X0_CACHE) += cache-l2x0.o obj-$(CONFIG_NCORE_CACHE) += cache-ncore.o diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index c274cda77c6..6fb73cb1517 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -4,18 +4,18 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # -obj-$(CONFIG_$(SPL_TPL_)CLK) += clk-uclass.o -obj-$(CONFIG_$(SPL_TPL_)CLK) += clk_fixed_rate.o -obj-$(CONFIG_$(SPL_TPL_)CLK) += clk_fixed_factor.o -obj-$(CONFIG_$(SPL_TPL_)CLK_CCF) += clk.o clk-divider.o clk-mux.o clk-gate.o -obj-$(CONFIG_$(SPL_TPL_)CLK_CCF) += clk-fixed-factor.o -obj-$(CONFIG_$(SPL_TPL_)CLK_COMPOSITE_CCF) += clk-composite.o +obj-$(CONFIG_CLK) += clk-uclass.o +obj-$(CONFIG_CLK) += clk_fixed_rate.o +obj-$(CONFIG_CLK) += clk_fixed_factor.o +obj-$(CONFIG_CLK_CCF) += clk.o clk-divider.o clk-mux.o clk-gate.o +obj-$(CONFIG_CLK_CCF) += clk-fixed-factor.o +obj-$(CONFIG_CLK_COMPOSITE_CCF) += clk-composite.o obj-y += analogbits/ obj-y += imx/ obj-y += tegra/ obj-y += ti/ -obj-$(CONFIG_$(SPL_TPL_)CLK_INTEL) += intel/ +obj-$(CONFIG_CLK_INTEL) += intel/ obj-$(CONFIG_ARCH_ASPEED) += aspeed/ obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ obj-$(CONFIG_ARCH_MESON) += meson/ diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index b9c197f952e..07a1db718b2 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -2,23 +2,23 @@ # # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_$(SPL_TPL_)CLK_CCF) += clk-gate2.o clk-pllv3.o clk-pfd.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMX6Q) += clk-imx6q.o +obj-$(CONFIG_CLK_CCF) += clk-gate2.o clk-pllv3.o clk-pfd.o +obj-$(CONFIG_CLK_IMX6Q) += clk-imx6q.o obj-$(CONFIG_CLK_IMX8) += clk-imx8.o ifdef CONFIG_CLK_IMX8 obj-$(CONFIG_IMX8QXP) += clk-imx8qxp.o obj-$(CONFIG_IMX8QM) += clk-imx8qm.o endif -obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MM) += clk-imx8mm.o clk-pll14xx.o \ +obj-$(CONFIG_CLK_IMX8MM) += clk-imx8mm.o clk-pll14xx.o \ clk-composite-8m.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MN) += clk-imx8mn.o clk-pll14xx.o \ +obj-$(CONFIG_CLK_IMX8MN) += clk-imx8mn.o clk-pll14xx.o \ clk-composite-8m.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MP) += clk-imx8mp.o clk-pll14xx.o \ +obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o clk-pll14xx.o \ clk-composite-8m.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMX8MQ) += clk-imx8mq.o clk-pll14xx.o \ +obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o clk-pll14xx.o \ clk-composite-8m.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMXRT1020) += clk-imxrt1020.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMXRT1050) += clk-imxrt1050.o -obj-$(CONFIG_$(SPL_TPL_)CLK_IMXRT1170) += clk-imxrt1170.o +obj-$(CONFIG_CLK_IMXRT1020) += clk-imxrt1020.o +obj-$(CONFIG_CLK_IMXRT1050) += clk-imxrt1050.o +obj-$(CONFIG_CLK_IMXRT1170) += clk-imxrt1170.o diff --git a/drivers/clk/ti/Makefile b/drivers/clk/ti/Makefile index 07aa9a53e08..03784dfefd4 100644 --- a/drivers/clk/ti/Makefile +++ b/drivers/clk/ti/Makefile @@ -11,5 +11,5 @@ obj-$(CONFIG_CLK_TI_DIVIDER) += clk-divider.o obj-$(CONFIG_CLK_TI_GATE) += clk-gate.o obj-$(CONFIG_CLK_TI_MUX) += clk-mux.o obj-$(CONFIG_CLK_TI_SCI) += clk-sci.o -obj-$(CONFIG_$(SPL_TPL_)CLK_K3_PLL) += clk-k3-pll.o -obj-$(CONFIG_$(SPL_TPL_)CLK_K3) += clk-k3.o +obj-$(CONFIG_CLK_K3_PLL) += clk-k3-pll.o +obj-$(CONFIG_CLK_K3) += clk-k3.o diff --git a/drivers/core/Makefile b/drivers/core/Makefile index bce0a3f65cb..fc636f5e30f 100644 --- a/drivers/core/Makefile +++ b/drivers/core/Makefile @@ -3,15 +3,15 @@ # Copyright (c) 2013 Google, Inc obj-y += device.o fdtaddr.o lists.o root.o uclass.o util.o tag.o -obj-$(CONFIG_$(SPL_TPL_)ACPIGEN) += acpi.o -obj-$(CONFIG_$(SPL_TPL_)DEVRES) += devres.o -obj-$(CONFIG_$(SPL_TPL_)DM_DEVICE_REMOVE) += device-remove.o -obj-$(CONFIG_$(SPL_)SIMPLE_BUS) += simple-bus.o +obj-$(CONFIG_ACPIGEN) += acpi.o +obj-$(CONFIG_DEVRES) += devres.o +obj-$(CONFIG_DM_DEVICE_REMOVE) += device-remove.o +obj-$(CONFIG_SIMPLE_BUS) += simple-bus.o obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o obj-$(CONFIG_DM) += dump.o -obj-$(CONFIG_$(SPL_TPL_)REGMAP) += regmap.o -obj-$(CONFIG_$(SPL_TPL_)SYSCON) += syscon-uclass.o -obj-$(CONFIG_$(SPL_)OF_LIVE) += of_access.o of_addr.o +obj-$(CONFIG_REGMAP) += regmap.o +obj-$(CONFIG_SYSCON) += syscon-uclass.o +obj-$(CONFIG_OF_LIVE) += of_access.o of_addr.o ifndef CONFIG_DM_DEV_READ_INLINE obj-$(CONFIG_OF_CONTROL) += read.o endif diff --git a/drivers/ddr/altera/Makefile b/drivers/ddr/altera/Makefile index 9fa5d85a27e..d25b4d460e8 100644 --- a/drivers/ddr/altera/Makefile +++ b/drivers/ddr/altera/Makefile @@ -6,7 +6,7 @@ # (C) Copyright 2010, Thomas Chou # Copyright (C) 2014-2021 Altera Corporation -ifdef CONFIG_$(SPL_)ALTERA_SDRAM +ifdef CONFIG_ALTERA_SDRAM obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += sdram_gen5.o sequencer.o obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += sdram_arria10.o obj-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += sdram_soc64.o sdram_s10.o diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile index df88f4be59a..41a7df20ad0 100644 --- a/drivers/dfu/Makefile +++ b/drivers/dfu/Makefile @@ -3,11 +3,11 @@ # Copyright (C) 2012 Samsung Electronics # Lukasz Majewski -obj-$(CONFIG_$(SPL_)DFU) += dfu.o -obj-$(CONFIG_$(SPL_)DFU_MMC) += dfu_mmc.o -obj-$(CONFIG_$(SPL_)DFU_MTD) += dfu_mtd.o -obj-$(CONFIG_$(SPL_)DFU_NAND) += dfu_nand.o -obj-$(CONFIG_$(SPL_)DFU_RAM) += dfu_ram.o -obj-$(CONFIG_$(SPL_)DFU_SF) += dfu_sf.o -obj-$(CONFIG_$(SPL_)DFU_WRITE_ALT) += dfu_alt.o +obj-$(CONFIG_DFU) += dfu.o +obj-$(CONFIG_DFU_MMC) += dfu_mmc.o +obj-$(CONFIG_DFU_MTD) += dfu_mtd.o +obj-$(CONFIG_DFU_NAND) += dfu_nand.o +obj-$(CONFIG_DFU_RAM) += dfu_ram.o +obj-$(CONFIG_DFU_SF) += dfu_sf.o +obj-$(CONFIG_DFU_WRITE_ALT) += dfu_alt.o obj-$(CONFIG_DFU_VIRT) += dfu_virt.o diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile index 7ce83d72bd3..ca7af1a2c56 100644 --- a/drivers/firmware/Makefile +++ b/drivers/firmware/Makefile @@ -1,5 +1,5 @@ obj-$(CONFIG_FIRMWARE) += firmware-uclass.o -obj-$(CONFIG_$(SPL_)ARM_PSCI_FW) += psci.o +obj-$(CONFIG_ARM_PSCI_FW) += psci.o obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o obj-$(CONFIG_SANDBOX) += firmware-sandbox.o obj-$(CONFIG_ZYNQMP_FIRMWARE) += firmware-zynqmp.o diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index fcd136367ac..23996424856 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -8,9 +8,9 @@ obj-$(CONFIG_DWAPB_GPIO) += dwapb_gpio.o obj-$(CONFIG_AXP_GPIO) += axp_gpio.o obj-$(CONFIG_DM_74X164) += 74x164_gpio.o endif -obj-$(CONFIG_$(SPL_TPL_)DM_GPIO) += gpio-uclass.o +obj-$(CONFIG_DM_GPIO) += gpio-uclass.o -obj-$(CONFIG_$(SPL_)DM_PCA953X) += pca953x_gpio.o +obj-$(CONFIG_DM_PCA953X) += pca953x_gpio.o obj-$(CONFIG_ASPEED_GPIO) += gpio-aspeed.o obj-$(CONFIG_AT91_GPIO) += at91_gpio.o @@ -57,8 +57,8 @@ obj-$(CONFIG_PIC32_GPIO) += pic32_gpio.o obj-$(CONFIG_OCTEON_GPIO) += octeon_gpio.o obj-$(CONFIG_MVEBU_GPIO) += mvebu_gpio.o obj-$(CONFIG_MSM_GPIO) += msm_gpio.o -obj-$(CONFIG_$(SPL_)PCF8575_GPIO) += pcf8575_gpio.o -obj-$(CONFIG_$(SPL_TPL_)QCOM_PMIC_GPIO) += qcom_pmic_gpio.o +obj-$(CONFIG_PCF8575_GPIO) += pcf8575_gpio.o +obj-$(CONFIG_QCOM_PMIC_GPIO) += qcom_pmic_gpio.o obj-$(CONFIG_MT7620_GPIO) += mt7620_gpio.o obj-$(CONFIG_MT7621_GPIO) += mt7621_gpio.o obj-$(CONFIG_MSCC_SGPIO) += mscc_sgpio.o @@ -69,6 +69,6 @@ obj-$(CONFIG_MAX7320_GPIO) += max7320_gpio.o obj-$(CONFIG_SL28CPLD_GPIO) += sl28cpld-gpio.o obj-$(CONFIG_ZYNQMP_GPIO_MODEPIN) += zynqmp_gpio_modepin.o obj-$(CONFIG_SLG7XL45106_I2C_GPO) += gpio_slg7xl45106.o -obj-$(CONFIG_$(SPL_TPL_)TURRIS_OMNIA_MCU) += turris_omnia_mcu.o +obj-$(CONFIG_TURRIS_OMNIA_MCU) += turris_omnia_mcu.o obj-$(CONFIG_FTGPIO010) += ftgpio010.o obj-$(CONFIG_ADP5585_GPIO) += adp5585_gpio.o diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index cde0597290c..2a873023b6b 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -2,15 +2,15 @@ # # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_)DM_I2C) += i2c-uclass.o +obj-$(CONFIG_DM_I2C) += i2c-uclass.o ifdef CONFIG_ACPIGEN -obj-$(CONFIG_$(SPL_)DM_I2C) += acpi_i2c.o +obj-$(CONFIG_DM_I2C) += acpi_i2c.o endif -obj-$(CONFIG_$(SPL_)DM_I2C_GPIO) += i2c-gpio.o -obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o -obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o +obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o +obj-$(CONFIG_I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o +obj-$(CONFIG_I2C_CROS_EC_LDO) += cros_ec_ldo.o -obj-$(CONFIG_$(SPL_)SYS_I2C_LEGACY) += i2c_core.o +obj-$(CONFIG_SYS_I2C_LEGACY) += i2c_core.o obj-$(CONFIG_SYS_I2C_ASPEED) += ast_i2c.o obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o @@ -55,4 +55,4 @@ obj-$(CONFIG_SYS_I2C_VERSATILE) += i2c-versatile.o obj-$(CONFIG_SYS_I2C_XILINX_XIIC) += xilinx_xiic.o obj-$(CONFIG_TEGRA186_BPMP_I2C) += tegra186_bpmp_i2c.o -obj-$(CONFIG_$(SPL_)I2C_MUX) += muxes/ +obj-$(CONFIG_I2C_MUX) += muxes/ diff --git a/drivers/input/Makefile b/drivers/input/Makefile index 11868e7584c..dd1c5574132 100644 --- a/drivers/input/Makefile +++ b/drivers/input/Makefile @@ -3,9 +3,9 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)CROS_EC_KEYB) += cros_ec_keyb.o -obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += key_matrix.o -obj-$(CONFIG_$(SPL_TPL_)DM_KEYBOARD) += input.o keyboard-uclass.o +obj-$(CONFIG_CROS_EC_KEYB) += cros_ec_keyb.o +obj-$(CONFIG_OF_CONTROL) += key_matrix.o +obj-$(CONFIG_DM_KEYBOARD) += input.o keyboard-uclass.o ifndef CONFIG_SPL_BUILD diff --git a/drivers/led/Makefile b/drivers/led/Makefile index 49ae91961d5..d02308454b1 100644 --- a/drivers/led/Makefile +++ b/drivers/led/Makefile @@ -9,5 +9,5 @@ obj-$(CONFIG_LED_BCM6358) += led_bcm6358.o obj-$(CONFIG_LED_BCM6753) += led_bcm6753.o obj-$(CONFIG_LED_BCM6858) += led_bcm6858.o obj-$(CONFIG_LED_PWM) += led_pwm.o -obj-$(CONFIG_$(SPL_)LED_GPIO) += led_gpio.o +obj-$(CONFIG_LED_GPIO) += led_gpio.o obj-$(CONFIG_LED_CORTINA) += led_cortina.o diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile index 59e8d0de93c..06cba702be7 100644 --- a/drivers/mailbox/Makefile +++ b/drivers/mailbox/Makefile @@ -3,7 +3,7 @@ # Copyright (c) 2016, NVIDIA CORPORATION. # -obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox-uclass.o +obj-$(CONFIG_DM_MAILBOX) += mailbox-uclass.o obj-$(CONFIG_APPLE_MBOX) += apple-mbox.o obj-$(CONFIG_SANDBOX_MBOX) += sandbox-mbox.o obj-$(CONFIG_SANDBOX_MBOX) += sandbox-mbox-test.o diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 3b792f2a14c..6b642a6826d 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -3,12 +3,12 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)MISC) += misc-uclass.o -obj-$(CONFIG_$(SPL_TPL_)NVMEM) += nvmem.o +obj-$(CONFIG_MISC) += misc-uclass.o +obj-$(CONFIG_NVMEM) += nvmem.o -obj-$(CONFIG_$(SPL_TPL_)CROS_EC) += cros_ec.o -obj-$(CONFIG_$(SPL_TPL_)CROS_EC_SANDBOX) += cros_ec_sandbox.o -obj-$(CONFIG_$(SPL_TPL_)CROS_EC_LPC) += cros_ec_lpc.o +obj-$(CONFIG_CROS_EC) += cros_ec.o +obj-$(CONFIG_CROS_EC_SANDBOX) += cros_ec_sandbox.o +obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_SANDBOX) += sandbox_adder.o @@ -18,7 +18,7 @@ obj-$(CONFIG_SANDBOX) += p2sb_sandbox.o p2sb_emul.o obj-$(CONFIG_SANDBOX) += swap_case.o endif -ifdef CONFIG_$(SPL_)DM_I2C +ifdef CONFIG_DM_I2C ifndef CONFIG_SPL_BUILD obj-$(CONFIG_SANDBOX) += i2c_eeprom_emul.o obj-$(CONFIG_USB_HUB_USB251XB) += usb251xb.o @@ -37,29 +37,29 @@ obj-$(CONFIG_FSL_DEVICE_DISABLE) += fsl_devdis.o obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_FSL_IIM) += fsl_iim.o obj-$(CONFIG_FSL_SEC_MON) += fsl_sec_mon.o -obj-$(CONFIG_$(SPL_)FS_LOADER) += fs_loader.o +obj-$(CONFIG_FS_LOADER) += fs_loader.o obj-$(CONFIG_GATEWORKS_SC) += gsc.o obj-$(CONFIG_GDSYS_IOEP) += gdsys_ioep.o obj-$(CONFIG_GDSYS_RXAUI_CTRL) += gdsys_rxaui_ctrl.o obj-$(CONFIG_GDSYS_SOC) += gdsys_soc.o obj-$(CONFIG_IRQ) += irq-uclass.o obj-$(CONFIG_SANDBOX) += irq_sandbox.o irq_sandbox_test.o -obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o +obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o obj-$(CONFIG_IHS_FPGA) += ihs_fpga.o obj-$(CONFIG_IMX8) += imx8/ obj-$(CONFIG_IMX_SENTINEL) += sentinel/ obj-$(CONFIG_LED_STATUS) += status_led.o obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o -obj-$(CONFIG_$(SPL_TPL_)LS2_SFP) += ls2_sfp.o -obj-$(CONFIG_$(SPL_)MXC_OCOTP) += mxc_ocotp.o +obj-$(CONFIG_LS2_SFP) += ls2_sfp.o +obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o obj-$(CONFIG_NPCM_OTP) += npcm_otp.o obj-$(CONFIG_NPCM_HOST) += npcm_host_intf.o obj-$(CONFIG_NUVOTON_NCT6102D) += nuvoton_nct6102d.o obj-$(CONFIG_P2SB) += p2sb-uclass.o obj-$(CONFIG_PCA9551_LED) += pca9551_led.o -obj-$(CONFIG_$(SPL_)PWRSEQ) += pwrseq-uclass.o +obj-$(CONFIG_PWRSEQ) += pwrseq-uclass.o ifdef CONFIG_QFW obj-y += qfw.o obj-$(CONFIG_QFW_PIO) += qfw_pio.o diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index 3dc757108d5..704d3181214 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -4,17 +4,17 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y += mmc.o -obj-$(CONFIG_$(SPL_)DM_MMC) += mmc-uclass.o +obj-$(CONFIG_DM_MMC) += mmc-uclass.o -ifdef CONFIG_$(SPL_TPL_)DM_MMC -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += mmc_bootdev.o +ifdef CONFIG_DM_MMC +obj-$(CONFIG_BOOTSTD) += mmc_bootdev.o endif -obj-$(CONFIG_$(SPL_TPL_)MMC_WRITE) += mmc_write.o +obj-$(CONFIG_MMC_WRITE) += mmc_write.o obj-$(CONFIG_MMC_PWRSEQ) += mmc-pwrseq.o obj-$(CONFIG_MMC_SDHCI_ADMA_HELPERS) += sdhci-adma.o -ifndef CONFIG_$(SPL_)BLK +ifndef CONFIG_BLK obj-y += mmc_legacy.o endif diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 3a78590aaaa..813e4fabee8 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -32,9 +32,9 @@ else ifneq ($(mtd-y),) obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd.o endif -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += nand/ +obj-$(CONFIG_NAND_SUPPORT) += nand/ obj-$(CONFIG_SPL_ONENAND_SUPPORT) += onenand/ -obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += spi/ +obj-$(CONFIG_SPI_FLASH_SUPPORT) += spi/ obj-$(CONFIG_SPL_UBI) += ubispl/ endif diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 96e186600a1..e69eea87582 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -6,5 +6,5 @@ obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o obj-$(CONFIG_MTD_RAW_NAND) += raw/ obj-$(CONFIG_MTD_SPI_NAND) += spi/ else -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += raw/ +obj-$(CONFIG_NAND_SUPPORT) += raw/ endif diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index add2b4cf655..cc2ee566926 100644 --- a/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile @@ -18,7 +18,7 @@ obj-$(CONFIG_SPL_NAND_BASE) += nand_base.o nand_amd.o nand_hynix.o \ nand_macronix.o nand_micron.o \ nand_samsung.o nand_toshiba.o obj-$(CONFIG_SPL_NAND_IDENT) += nand_ids.o nand_timings.o -obj-$(CONFIG_$(SPL_TPL_)NAND_INIT) += nand.o +obj-$(CONFIG_NAND_INIT) += nand.o ifeq ($(CONFIG_SPL_ENV_SUPPORT),y) obj-$(CONFIG_ENV_IS_IN_NAND) += nand_util.o endif diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 409395382f5..54943f9fe16 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -3,12 +3,12 @@ # (C) Copyright 2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)DM_SPI_FLASH) += sf-uclass.o +obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o spi-nor-y := sf_probe.o spi-nor-ids.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o -ifeq ($(CONFIG_$(SPL_TPL_)SPI_FLASH_TINY),y) +ifeq ($(CONFIG_SPI_FLASH_TINY),y) spi-nor-y += spi-nor-tiny.o else spi-nor-y += spi-nor-core.o @@ -19,6 +19,6 @@ endif obj-$(CONFIG_SPI_FLASH) += spi-nor.o obj-$(CONFIG_SPI_FLASH_DATAFLASH) += sf_dataflash.o -obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_MTD) += sf_mtd.o +obj-$(CONFIG_SPI_FLASH_MTD) += sf_mtd.o obj-$(CONFIG_SPI_FLASH_SANDBOX) += sandbox.o -obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_SPI_FLASH) += sf_bootdev.o +obj-$(CONFIG_BOOTDEV_SPI_FLASH) += sf_bootdev.o diff --git a/drivers/mux/Makefile b/drivers/mux/Makefile index d4e24789d33..92d33bde48f 100644 --- a/drivers/mux/Makefile +++ b/drivers/mux/Makefile @@ -4,4 +4,4 @@ # Jean-Jacques Hiblot obj-$(CONFIG_MULTIPLEXER) += mux-uclass.o -obj-$(CONFIG_$(SPL_)MUX_MMIO) += mmio.o +obj-$(CONFIG_MUX_MMIO) += mmio.o diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile index a3b9f3c5b18..a7c318ece61 100644 --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@ -8,8 +8,8 @@ obj-y += marvell/ obj-y += rockchip/ obj-y += socionext/ -obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o -obj-$(CONFIG_$(SPL_)NOP_PHY) += nop-phy.o +obj-$(CONFIG_PHY) += phy-uclass.o +obj-$(CONFIG_NOP_PHY) += nop-phy.o obj-$(CONFIG_MIPI_DPHY_HELPERS) += phy-core-mipi-dphy.o obj-$(CONFIG_AB8500_USB_PHY) += phy-ab8500-usb.o obj-$(CONFIG_BCM6318_USBH_PHY) += bcm6318-usbh-phy.o @@ -18,7 +18,7 @@ obj-$(CONFIG_BCM6358_USBH_PHY) += bcm6358-usbh-phy.o obj-$(CONFIG_BCM6368_USBH_PHY) += bcm6368-usbh-phy.o obj-$(CONFIG_BCM_SR_PCIE_PHY) += phy-bcm-sr-pcie.o obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o -obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o +obj-$(CONFIG_PIPE3_PHY) += ti-pipe3-phy.o obj-$(CONFIG_AM654_PHY) += phy-ti-am654.o obj-$(CONFIG_STI_USB_PHY) += sti_usb_phy.o obj-$(CONFIG_PHY_RCAR_GEN2) += phy-rcar-gen2.o diff --git a/drivers/phy/ti/Makefile b/drivers/phy/ti/Makefile index 873ddbf0363..647a9a7bd7a 100644 --- a/drivers/phy/ti/Makefile +++ b/drivers/phy/ti/Makefile @@ -1 +1 @@ -obj-$(CONFIG_$(SPL_)PHY_J721E_WIZ) += phy-j721e-wiz.o +obj-$(CONFIG_PHY_J721E_WIZ) += phy-j721e-wiz.o diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 3b167d099fc..7c5838502ad 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -1,13 +1,13 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y += pinctrl-uclass.o -obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC) += pinctrl-generic.o +obj-$(CONFIG_PINCTRL_GENERIC) += pinctrl-generic.o obj-$(CONFIG_PINCTRL_APPLE) += pinctrl-apple.o obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o obj-y += nxp/ -obj-$(CONFIG_$(SPL_)PINCTRL_ROCKCHIP) += rockchip/ +obj-$(CONFIG_PINCTRL_ROCKCHIP) += rockchip/ obj-$(CONFIG_ARCH_ASPEED) += aspeed/ obj-$(CONFIG_ARCH_ATH79) += ath79/ obj-$(CONFIG_PINCTRL_INTEL) += intel/ @@ -29,6 +29,6 @@ obj-$(CONFIG_PINCTRL_QE) += pinctrl-qe-io.o obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o obj-$(CONFIG_PINCTRL_STI) += pinctrl-sti.o obj-$(CONFIG_PINCTRL_STM32) += pinctrl_stm32.o -obj-$(CONFIG_$(SPL_)PINCTRL_STMFX) += pinctrl-stmfx.o +obj-$(CONFIG_PINCTRL_STMFX) += pinctrl-stmfx.o obj-y += broadcom/ obj-$(CONFIG_PINCTRL_ZYNQMP) += pinctrl-zynqmp.o diff --git a/drivers/power/Makefile b/drivers/power/Makefile index ba64b2c5938..dcce4e3c592 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -3,8 +3,8 @@ # Copyright (c) 2009 Wind River Systems, Inc. # Tom Rix -obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += acpi_pmc/ -obj-$(CONFIG_$(SPL_TPL_)POWER_DOMAIN) += domain/ +obj-$(CONFIG_ACPI_PMC) += acpi_pmc/ +obj-$(CONFIG_POWER_DOMAIN) += domain/ obj-y += pmic/ obj-y += regulator/ @@ -20,9 +20,9 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o obj-$(CONFIG_TWL4030_POWER) += twl4030.o obj-$(CONFIG_TWL6030_POWER) += twl6030.o obj-$(CONFIG_PALMAS_POWER) += palmas.o -obj-$(CONFIG_$(SPL_TPL_)POWER_LEGACY) += power_core.o +obj-$(CONFIG_POWER_LEGACY) += power_core.o obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o -obj-$(CONFIG_$(SPL_TPL_)POWER_I2C) += power_i2c.o +obj-$(CONFIG_POWER_I2C) += power_i2c.o obj-$(CONFIG_POWER_SPI) += power_spi.o obj-$(CONFIG_POWER_MT6323) += mt6323.o diff --git a/drivers/power/acpi_pmc/Makefile b/drivers/power/acpi_pmc/Makefile index 0db52a65824..36aee3bd720 100644 --- a/drivers/power/acpi_pmc/Makefile +++ b/drivers/power/acpi_pmc/Makefile @@ -3,4 +3,4 @@ # Copyright 2019 Google LLC obj-y += acpi-pmc-uclass.o -obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC_SANDBOX) += sandbox.o pmc_emul.o +obj-$(CONFIG_ACPI_PMC_SANDBOX) += sandbox.o pmc_emul.o diff --git a/drivers/power/domain/Makefile b/drivers/power/domain/Makefile index e6244776216..81e4e82a6a1 100644 --- a/drivers/power/domain/Makefile +++ b/drivers/power/domain/Makefile @@ -3,7 +3,7 @@ # Copyright (c) 2016, NVIDIA CORPORATION. # -obj-$(CONFIG_$(SPL_)POWER_DOMAIN) += power-domain-uclass.o +obj-$(CONFIG_POWER_DOMAIN) += power-domain-uclass.o obj-$(CONFIG_APPLE_PMGR_POWER_DOMAIN) += apple-pmgr.o obj-$(CONFIG_BCM6328_POWER_DOMAIN) += bcm6328-power-domain.o obj-$(CONFIG_IMX8_POWER_DOMAIN) += imx8-power-domain-legacy.o imx8-power-domain.o diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index 0b3b3d62d0e..2fc93bb07b5 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -3,39 +3,39 @@ # Copyright (C) 2012 Samsung Electronics # Lukasz Majewski -obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o -obj-$(CONFIG_$(SPL_)DM_PMIC_FAN53555) += fan53555.o -obj-$(CONFIG_$(SPL_)DM_PMIC_DA9063) += da9063.o +obj-$(CONFIG_DM_PMIC) += pmic-uclass.o +obj-$(CONFIG_DM_PMIC_FAN53555) += fan53555.o +obj-$(CONFIG_DM_PMIC_DA9063) += da9063.o obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o obj-$(CONFIG_DM_PMIC_MAX8998) += max8998.o obj-$(CONFIG_DM_PMIC_MC34708) += mc34708.o -obj-$(CONFIG_$(SPL_)DM_PMIC_BD71837) += bd71837.o -obj-$(CONFIG_$(SPL_)DM_PMIC_MP5416) += mp5416.o -obj-$(CONFIG_$(SPL_)DM_PMIC_PFUZE100) += pfuze100.o -obj-$(CONFIG_$(SPL_)DM_PMIC_PCA9450) += pca9450.o +obj-$(CONFIG_DM_PMIC_BD71837) += bd71837.o +obj-$(CONFIG_DM_PMIC_MP5416) += mp5416.o +obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze100.o +obj-$(CONFIG_DM_PMIC_PCA9450) += pca9450.o obj-$(CONFIG_PMIC_S2MPS11) += s2mps11.o obj-$(CONFIG_DM_PMIC_SANDBOX) += sandbox.o i2c_pmic_emul.o obj-$(CONFIG_PMIC_AB8500) += ab8500.o obj-$(CONFIG_PMIC_ACT8846) += act8846.o obj-$(CONFIG_PMIC_AS3722) += as3722.o as3722_gpio.o -obj-$(CONFIG_$(SPL_)PMIC_AXP) += axp.o +obj-$(CONFIG_PMIC_AXP) += axp.o obj-$(CONFIG_PMIC_MAX8997) += max8997.o obj-$(CONFIG_PMIC_QCOM) += pmic_qcom.o -obj-$(CONFIG_$(SPL_TPL_)PMIC_RK8XX) += rk8xx.o -obj-$(CONFIG_$(SPL_)PMIC_RN5T567) += rn5t567.o +obj-$(CONFIG_PMIC_RK8XX) += rk8xx.o +obj-$(CONFIG_PMIC_RN5T567) += rn5t567.o obj-$(CONFIG_PMIC_TPS65090) += tps65090.o obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o obj-$(CONFIG_DM_PMIC_TPS65910) += pmic_tps65910_dm.o -obj-$(CONFIG_$(SPL_)PMIC_PALMAS) += palmas.o -obj-$(CONFIG_$(SPL_)PMIC_LP873X) += lp873x.o -obj-$(CONFIG_$(SPL_)PMIC_LP87565) += lp87565.o +obj-$(CONFIG_PMIC_PALMAS) += palmas.o +obj-$(CONFIG_PMIC_LP873X) += lp873x.o +obj-$(CONFIG_PMIC_LP87565) += lp87565.o obj-$(CONFIG_PMIC_STPMIC1) += stpmic1.o obj-$(CONFIG_PMIC_TPS65217) += pmic_tps65217.o obj-$(CONFIG_PMIC_TPS65219) += tps65219.o obj-$(CONFIG_PMIC_TPS65941) += tps65941.o obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o -ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y) +ifeq ($(CONFIG_POWER_LEGACY),y) obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o obj-$(CONFIG_POWER_PCA9450) += pmic_pca9450.o obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o @@ -44,5 +44,5 @@ obj-$(CONFIG_POWER_HI6553) += pmic_hi6553.o obj-$(CONFIG_POWER_MC34VR500) += pmic_mc34vr500.o endif -obj-$(CONFIG_$(SPL_)POWER_TPS62362) += pmic_tps62362.o +obj-$(CONFIG_POWER_TPS62362) += pmic_tps62362.o obj-$(CONFIG_SPL_POWER_TPS65910) += pmic_tps65910.o diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile index 2d97e1033a8..f90a28921f3 100644 --- a/drivers/power/regulator/Makefile +++ b/drivers/power/regulator/Makefile @@ -4,35 +4,35 @@ # Przemyslaw Marczak # -obj-$(CONFIG_$(SPL_)DM_REGULATOR) += regulator-uclass.o +obj-$(CONFIG_DM_REGULATOR) += regulator-uclass.o obj-$(CONFIG_REGULATOR_ACT8846) += act8846.o obj-$(CONFIG_REGULATOR_AS3722) += as3722_regulator.o -obj-$(CONFIG_$(SPL_)REGULATOR_AXP) += axp_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_DA9063) += da9063.o +obj-$(CONFIG_REGULATOR_AXP) += axp_regulator.o +obj-$(CONFIG_DM_REGULATOR_DA9063) += da9063.o obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o obj-$(CONFIG_DM_REGULATOR_NPCM8XX) += npcm8xx_regulator.o -obj-$(CONFIG_$(SPL_)DM_PMIC_PFUZE100) += pfuze100.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_BD71837) += bd71837.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_PCA9450) += pca9450.o -obj-$(CONFIG_$(SPL_)REGULATOR_PWM) += pwm_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_FAN53555) += fan53555.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_COMMON) += regulator_common.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_FIXED) += fixed.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_GPIO) += gpio-regulator.o -obj-$(CONFIG_$(SPL_TPL_)REGULATOR_RK8XX) += rk8xx.o +obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze100.o +obj-$(CONFIG_DM_REGULATOR_BD71837) += bd71837.o +obj-$(CONFIG_DM_REGULATOR_PCA9450) += pca9450.o +obj-$(CONFIG_REGULATOR_PWM) += pwm_regulator.o +obj-$(CONFIG_DM_REGULATOR_FAN53555) += fan53555.o +obj-$(CONFIG_DM_REGULATOR_COMMON) += regulator_common.o +obj-$(CONFIG_DM_REGULATOR_FIXED) += fixed.o +obj-$(CONFIG_DM_REGULATOR_GPIO) += gpio-regulator.o +obj-$(CONFIG_REGULATOR_RK8XX) += rk8xx.o obj-$(CONFIG_DM_REGULATOR_S2MPS11) += s2mps11_regulator.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o obj-$(CONFIG_REGULATOR_TPS65090) += tps65090_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_PALMAS) += palmas_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_PBIAS) += pbias_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_LP873X) += lp873x_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_LP87565) += lp87565_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o +obj-$(CONFIG_DM_REGULATOR_PALMAS) += palmas_regulator.o +obj-$(CONFIG_DM_REGULATOR_PBIAS) += pbias_regulator.o +obj-$(CONFIG_DM_REGULATOR_LP873X) += lp873x_regulator.o +obj-$(CONFIG_DM_REGULATOR_LP87565) += lp87565_regulator.o +obj-$(CONFIG_DM_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_DM_REGULATOR_TPS65910) += tps65910_regulator.o obj-$(CONFIG_DM_REGULATOR_TPS62360) += tps62360_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_STPMIC1) += stpmic1.o +obj-$(CONFIG_DM_REGULATOR_STPMIC1) += stpmic1.o obj-$(CONFIG_DM_REGULATOR_TPS65941) += tps65941_regulator.o obj-$(CONFIG_DM_REGULATOR_SCMI) += scmi_regulator.o -obj-$(CONFIG_$(SPL_)DM_REGULATOR_ANATOP) += anatop_regulator.o +obj-$(CONFIG_DM_REGULATOR_ANATOP) += anatop_regulator.o obj-$(CONFIG_DM_REGULATOR_TPS65219) += tps65219_regulator.o diff --git a/drivers/ram/Makefile b/drivers/ram/Makefile index 83948e2c43e..5979b5d42c0 100644 --- a/drivers/ram/Makefile +++ b/drivers/ram/Makefile @@ -3,7 +3,7 @@ # Copyright (c) 2015 Google, Inc # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # -obj-$(CONFIG_$(SPL_TPL_)DM) += ram-uclass.o +obj-$(CONFIG_DM) += ram-uclass.o obj-$(CONFIG_MPC83XX_SDRAM) += mpc83xx_sdram.o obj-$(CONFIG_SANDBOX) += sandbox_ram.o obj-$(CONFIG_STM32MP1_DDR) += stm32mp1/ diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile index fbe9c172bc0..00422806639 100644 --- a/drivers/remoteproc/Makefile +++ b/drivers/remoteproc/Makefile @@ -4,7 +4,7 @@ # Texas Instruments Incorporated - http://www.ti.com/ # -obj-$(CONFIG_$(SPL_)REMOTEPROC) += rproc-uclass.o rproc-elf-loader.o +obj-$(CONFIG_REMOTEPROC) += rproc-uclass.o rproc-elf-loader.o # Remote proc drivers - Please keep this list alphabetically sorted. obj-$(CONFIG_K3_SYSTEM_CONTROLLER) += k3_system_controller.o diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index b6c9029c8f0..4d1cac6d321 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -4,7 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. #ccflags-y += -DDEBUG -obj-$(CONFIG_$(SPL_TPL_)DM_RTC) += rtc-uclass.o +obj-$(CONFIG_DM_RTC) += rtc-uclass.o obj-$(CONFIG_RTC_ARMADA38X) += armada38x.o obj-$(CONFIG_RTC_DAVINCI) += davinci.o @@ -16,7 +16,7 @@ obj-$(CONFIG_RTC_DS3231) += ds3231.o obj-$(CONFIG_RTC_DS3232) += ds3232.o obj-$(CONFIG_RTC_EMULATION) += emul_rtc.o obj-$(CONFIG_RTC_HT1380) += ht1380.o -obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += i2c_rtc_emul.o +obj-$(CONFIG_RTC_SANDBOX) += i2c_rtc_emul.o obj-$(CONFIG_RTC_ISL1208) += isl1208.o obj-$(CONFIG_RTC_M41T62) += m41t62.o obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o @@ -35,6 +35,6 @@ obj-$(CONFIG_RTC_RX8025) += rx8025.o obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o obj-$(CONFIG_RTC_S35392A) += s35392a.o obj-$(CONFIG_RTC_STM32) += stm32_rtc.o -obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += sandbox_rtc.o +obj-$(CONFIG_RTC_SANDBOX) += sandbox_rtc.o obj-$(CONFIG_RTC_ABX80X) += abx80x.o obj-$(CONFIG_RTC_ZYNQMP) += zynqmp_rtc.o diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index d8d6de59090..288f60b40fa 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -9,7 +9,7 @@ obj-$(CONFIG_SCSI) += scsi.o ifdef CONFIG_SCSI ifdef CONFIG_DM_SCSI -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += scsi_bootdev.o +obj-$(CONFIG_BOOTSTD) += scsi_bootdev.o endif endif diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 01fef3f323b..5eaa024acb5 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -3,7 +3,7 @@ # (C) Copyright 2006-2009 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -ifeq ($(CONFIG_$(SPL_TPL_)DM_SERIAL),y) +ifeq ($(CONFIG_DM_SERIAL),y) obj-y += serial-uclass.o else obj-y += serial.o @@ -11,7 +11,7 @@ endif obj-$(CONFIG_PL01X_SERIAL) += serial_pl01x.o obj-$(CONFIG_PL011_SERIAL) += serial_pl01x.o -obj-$(CONFIG_$(SPL_)SYS_NS16550_SERIAL) += serial_ns16550.o +obj-$(CONFIG_SYS_NS16550_SERIAL) += serial_ns16550.o obj-$(CONFIG_ALTERA_UART) += altera_uart.o obj-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 95dba9ac455..3dc8d9eb3fe 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -4,7 +4,7 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # There are many options which enable SPI, so make this library available -ifdef CONFIG_$(SPL_TPL_)DM_SPI +ifdef CONFIG_DM_SPI obj-y += spi-uclass.o obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o obj-$(CONFIG_CADENCE_OSPI_VERSAL) += cadence_ospi_versal.o diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile index 40c876764af..754d1441777 100644 --- a/drivers/sysreset/Makefile +++ b/drivers/sysreset/Makefile @@ -2,7 +2,7 @@ # # (C) Copyright 2016 Cadence Design Systems Inc. -obj-$(CONFIG_$(SPL_TPL_)SYSRESET) += sysreset-uclass.o +obj-$(CONFIG_SYSRESET) += sysreset-uclass.o obj-$(CONFIG_ARCH_ASPEED) += sysreset_ast.o obj-$(CONFIG_ARCH_ROCKCHIP) += sysreset_rockchip.o obj-$(CONFIG_ARCH_STI) += sysreset_sti.o @@ -20,6 +20,6 @@ obj-$(CONFIG_SYSRESET_TI_SCI) += sysreset-ti-sci.o obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o obj-$(CONFIG_SYSRESET_RESETCTL) += sysreset_resetctl.o -obj-$(CONFIG_$(SPL_TPL_)SYSRESET_AT91) += sysreset_at91.o -obj-$(CONFIG_$(SPL_TPL_)SYSRESET_X86) += sysreset_x86.o +obj-$(CONFIG_SYSRESET_AT91) += sysreset_at91.o +obj-$(CONFIG_SYSRESET_X86) += sysreset_x86.o obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index 6470fd54266..869988855ad 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -9,8 +9,8 @@ obj-$(CONFIG_ARC_TIMER) += arc_timer.o obj-$(CONFIG_ARM_TWD_TIMER) += arm_twd_timer.o obj-$(CONFIG_AST_TIMER) += ast_timer.o obj-$(CONFIG_ATCPIT100_TIMER) += atcpit100_timer.o -obj-$(CONFIG_$(SPL_)ATMEL_PIT_TIMER) += atmel_pit_timer.o -obj-$(CONFIG_$(SPL_)ATMEL_TCB_TIMER) += atmel_tcb_timer.o +obj-$(CONFIG_ATMEL_PIT_TIMER) += atmel_pit_timer.o +obj-$(CONFIG_ATMEL_TCB_TIMER) += atmel_tcb_timer.o obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence-ttc.o obj-$(CONFIG_DESIGNWARE_APB_TIMER) += dw-apb-timer.o obj-$(CONFIG_GXP_TIMER) += gxp-timer.o @@ -24,7 +24,7 @@ obj-$(CONFIG_RISCV_TIMER) += riscv_timer.o obj-$(CONFIG_ROCKCHIP_TIMER) += rockchip_timer.o obj-$(CONFIG_SANDBOX_TIMER) += sandbox_timer.o obj-$(CONFIG_SP804_TIMER) += sp804_timer.o -obj-$(CONFIG_$(SPL_)SIFIVE_CLINT) += sifive_clint_timer.o +obj-$(CONFIG_SIFIVE_CLINT) += sifive_clint_timer.o obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o obj-$(CONFIG_STM32_TIMER) += stm32_timer.o obj-$(CONFIG_X86_TSC_TIMER) += tsc_timer.o diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile index 9540fd7fe78..8616cae2583 100644 --- a/drivers/tpm/Makefile +++ b/drivers/tpm/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. -obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm-uclass.o +obj-$(CONFIG_TPM) += tpm-uclass.o obj-$(CONFIG_TPM_ATMEL_TWI) += tpm_atmel_twi.o obj-$(CONFIG_TPM_TIS_INFINEON) += tpm_tis_infineon.o @@ -10,7 +10,7 @@ obj-$(CONFIG_TPM_TIS_SANDBOX) += tpm_tis_sandbox.o sandbox_common.o obj-$(CONFIG_TPM_ST33ZP24_I2C) += tpm_tis_st33zp24_i2c.o obj-$(CONFIG_TPM_ST33ZP24_SPI) += tpm_tis_st33zp24_spi.o -obj-$(CONFIG_$(SPL_TPL_)TPM2_CR50_I2C) += cr50_i2c.o +obj-$(CONFIG_TPM2_CR50_I2C) += cr50_i2c.o obj-$(CONFIG_TPM2_TIS_SANDBOX) += tpm2_tis_sandbox.o sandbox_common.o obj-$(CONFIG_TPM2_TIS_SPI) += tpm2_tis_core.o tpm2_tis_spi.o obj-$(CONFIG_TPM2_TIS_I2C) += tpm2_tis_core.o tpm2_tis_i2c.o diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile index 18d7190755d..f48d59749e2 100644 --- a/drivers/usb/cdns3/Makefile +++ b/drivers/usb/cdns3/Makefile @@ -4,8 +4,8 @@ cdns3-y := core.o drd.o obj-$(CONFIG_USB_CDNS3) += cdns3.o -cdns3-$(CONFIG_$(SPL_)USB_CDNS3_GADGET) += gadget.o ep0.o +cdns3-$(CONFIG_USB_CDNS3_GADGET) += gadget.o ep0.o -cdns3-$(CONFIG_$(SPL_)USB_CDNS3_HOST) += host.o +cdns3-$(CONFIG_USB_CDNS3_HOST) += host.o obj-$(CONFIG_USB_CDNS3_TI) += cdns3-ti.o diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile index 2e9353b76a6..07bac48a169 100644 --- a/drivers/usb/common/Makefile +++ b/drivers/usb/common/Makefile @@ -3,7 +3,7 @@ # (C) Copyright 2016 Freescale Semiconductor, Inc. # -obj-$(CONFIG_$(SPL_)DM_USB) += common.o +obj-$(CONFIG_DM_USB) += common.o obj-$(CONFIG_USB_ISP1760) += usb_urb.o obj-$(CONFIG_USB_MUSB_HOST) += usb_urb.o obj-$(CONFIG_USB_MUSB_GADGET) += usb_urb.o diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 97b4f7191ca..0dd1ba87cd9 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -9,7 +9,7 @@ obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o obj-$(CONFIG_USB_DWC3_MESON_G12A) += dwc3-meson-g12a.o obj-$(CONFIG_USB_DWC3_MESON_GXL) += dwc3-meson-gxl.o -obj-$(CONFIG_$(SPL_)USB_DWC3_GENERIC) += dwc3-generic.o +obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_LAYERSCAPE) += dwc3-layerscape.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile index 95dbf0c82ee..a554ef66a79 100644 --- a/drivers/usb/gadget/udc/Makefile +++ b/drivers/usb/gadget/udc/Makefile @@ -2,9 +2,9 @@ # # USB peripheral controller drivers -ifndef CONFIG_$(SPL_)DM_USB_GADGET +ifndef CONFIG_DM_USB_GADGET obj-$(CONFIG_USB_DWC3_GADGET) += udc-core.o endif -obj-$(CONFIG_$(SPL_)DM_USB_GADGET) += udc-core.o -obj-$(CONFIG_$(SPL_)DM) += udc-uclass.o +obj-$(CONFIG_DM_USB_GADGET) += udc-core.o +obj-$(CONFIG_DM) += udc-uclass.o diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 8dad36f9369..27bb49acbeb 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -3,13 +3,13 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -ifdef CONFIG_$(SPL_)DM_USB +ifdef CONFIG_DM_USB obj-y += usb-uclass.o obj-$(CONFIG_SANDBOX) += usb-sandbox.o endif -ifdef CONFIG_$(SPL_TPL_)USB_STORAGE -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += usb_bootdev.o +ifdef CONFIG_USB_STORAGE +obj-$(CONFIG_BOOTSTD) += usb_bootdev.o endif # ohci diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 699aff3fb36..d30228c35d3 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -14,7 +14,7 @@ obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o -obj-$(CONFIG_$(SPL_TPL_)WDT) += wdt-uclass.o +obj-$(CONFIG_WDT) += wdt-uclass.o obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o obj-$(CONFIG_WDT_ALARM_SANDBOX) += sandbox_alarm-wdt.o obj-$(CONFIG_WDT_APPLE) += apple_wdt.o diff --git a/env/Makefile b/env/Makefile index 673b979fdfa..1cd4407fe45 100644 --- a/env/Makefile +++ b/env/Makefile @@ -3,10 +3,10 @@ # (C) Copyright 2004-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += common.o -obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += env.o -obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += attr.o -obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += flags.o +obj-$(CONFIG_ENV_SUPPORT) += common.o +obj-$(CONFIG_ENV_SUPPORT) += env.o +obj-$(CONFIG_ENV_SUPPORT) += attr.o +obj-$(CONFIG_ENV_SUPPORT) += flags.o ifndef CONFIG_SPL_BUILD obj-y += callback.o @@ -20,12 +20,12 @@ obj-$(CONFIG_ENV_IS_IN_REMOTE) += remote.o obj-$(CONFIG_ENV_IS_IN_UBI) += ubi.o endif -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_NOWHERE) += nowhere.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_MMC) += mmc.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FAT) += fat.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_EXT4) += ext4.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_NAND) += nand.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_SPI_FLASH) += sf.o -obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FLASH) += flash.o +obj-$(CONFIG_ENV_IS_NOWHERE) += nowhere.o +obj-$(CONFIG_ENV_IS_IN_MMC) += mmc.o +obj-$(CONFIG_ENV_IS_IN_FAT) += fat.o +obj-$(CONFIG_ENV_IS_IN_EXT4) += ext4.o +obj-$(CONFIG_ENV_IS_IN_NAND) += nand.o +obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += sf.o +obj-$(CONFIG_ENV_IS_IN_FLASH) += flash.o CFLAGS_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null) diff --git a/fs/fat/Makefile b/fs/fat/Makefile index f84efaccc75..1596f0361e6 100644 --- a/fs/fat/Makefile +++ b/fs/fat/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_$(SPL_)FS_FAT) = fat.o -obj-$(CONFIG_$(SPL_)FAT_WRITE) = fat_write.o +obj-$(CONFIG_FS_FAT) = fat.o +obj-$(CONFIG_FAT_WRITE) = fat_write.o diff --git a/fs/sandbox/Makefile b/fs/sandbox/Makefile index 880d59dd693..81fa5dc83e4 100644 --- a/fs/sandbox/Makefile +++ b/fs/sandbox/Makefile @@ -9,4 +9,4 @@ # Pavel Bartusek, Sysgo Real-Time Solutions AG, pba@sysgo.de obj-y := sandboxfs.o -obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += host_bootdev.o +obj-$(CONFIG_BOOTSTD) += host_bootdev.o diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile index ba66ee821c2..8ecb088c91e 100644 --- a/fs/squashfs/Makefile +++ b/fs/squashfs/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_$(SPL_)FS_SQUASHFS) = sqfs.o \ +obj-$(CONFIG_FS_SQUASHFS) = sqfs.o \ sqfs_inode.o \ sqfs_dir.o \ sqfs_decompressor.o diff --git a/lib/Makefile b/lib/Makefile index a282e40258c..1355b7ab94d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -20,7 +20,7 @@ obj-$(CONFIG_OPTEE_LIB) += optee/ obj-$(CONFIG_AES) += aes.o obj-$(CONFIG_AES) += aes/ -obj-$(CONFIG_$(SPL_TPL_)BINMAN_FDT) += binman.o +obj-$(CONFIG_BINMAN_FDT) += binman.o ifndef API_BUILD ifneq ($(CONFIG_CHARSET),) @@ -55,46 +55,46 @@ obj-$(CONFIG_BITREVERSE) += bitrev.o obj-y += list_sort.o endif -obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm-common.o -ifeq ($(CONFIG_$(SPL_TPL_)TPM),y) +obj-$(CONFIG_TPM) += tpm-common.o +ifeq ($(CONFIG_TPM),y) obj-$(CONFIG_TPM) += tpm_api.o obj-$(CONFIG_TPM_V1) += tpm-v1.o obj-$(CONFIG_TPM_V2) += tpm-v2.o endif -obj-$(CONFIG_$(SPL_TPL_)CRC8) += crc8.o +obj-$(CONFIG_CRC8) += crc8.o obj-y += crypto/ -obj-$(CONFIG_$(SPL_TPL_)GENERATE_ACPI_TABLE) += acpi/ -obj-$(CONFIG_$(SPL_)MD5) += md5.o +obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi/ +obj-$(CONFIG_MD5) += md5.o obj-$(CONFIG_ECDSA) += ecdsa/ -obj-$(CONFIG_$(SPL_)RSA) += rsa/ +obj-$(CONFIG_RSA) += rsa/ obj-$(CONFIG_HASH) += hash-checksum.o obj-$(CONFIG_BLAKE2) += blake2/blake2b.o obj-$(CONFIG_SHA1) += sha1.o obj-$(CONFIG_SHA256) += sha256.o obj-$(CONFIG_SHA512) += sha512.o obj-$(CONFIG_CRYPT_PW) += crypt/ -obj-$(CONFIG_$(SPL_)ASN1_DECODER) += asn1_decoder.o +obj-$(CONFIG_ASN1_DECODER) += asn1_decoder.o -obj-$(CONFIG_$(SPL_)ZLIB) += zlib/ -obj-$(CONFIG_$(SPL_)ZSTD) += zstd/ -obj-$(CONFIG_$(SPL_)GZIP) += gunzip.o -obj-$(CONFIG_$(SPL_)LZO) += lzo/ -obj-$(CONFIG_$(SPL_)LZMA) += lzma/ -obj-$(CONFIG_$(SPL_)LZ4) += lz4_wrapper.o +obj-$(CONFIG_ZLIB) += zlib/ +obj-$(CONFIG_ZSTD) += zstd/ +obj-$(CONFIG_GZIP) += gunzip.o +obj-$(CONFIG_LZO) += lzo/ +obj-$(CONFIG_LZMA) += lzma/ +obj-$(CONFIG_LZ4) += lz4_wrapper.o -obj-$(CONFIG_$(SPL_)LIB_RATIONAL) += rational.o +obj-$(CONFIG_LIB_RATIONAL) += rational.o obj-$(CONFIG_LIBAVB) += libavb/ -obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ -obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o +obj-$(CONFIG_OF_LIBFDT) += libfdt/ +obj-$(CONFIG_OF_REAL) += fdtdec_common.o fdtdec.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o -obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o +obj-$(CONFIG_HASH) += crc16-ccitt.o obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o obj-y += net_utils.o endif @@ -106,11 +106,11 @@ obj-y += display_options.o CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"') obj-$(CONFIG_BCH) += bch.o obj-$(CONFIG_MMC_SPI) += crc7.o -obj-$(CONFIG_$(SPL_TPL_)CRC32) += crc32.o +obj-$(CONFIG_CRC32) += crc32.o obj-$(CONFIG_CRC32C) += crc32c.o obj-y += ctype.o obj-y += div64.o -obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdtdec.o fdtdec_common.o +obj-$(CONFIG_OF_LIBFDT) += fdtdec.o fdtdec_common.o obj-y += hang.o obj-y += linux_compat.o obj-y += linux_string.o @@ -127,27 +127,27 @@ obj-$(CONFIG_LIB_UUID) += uuid.o obj-$(CONFIG_LIB_RAND) += rand.o obj-y += panic.o -ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y) +ifeq ($(CONFIG_BUILD),y) # SPL U-Boot may use full-printf, tiny-printf or none at all -ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF -obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o +ifdef CONFIG_USE_TINY_PRINTF +obj-$(CONFIG_SPRINTF) += tiny-printf.o else -obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o +obj-$(CONFIG_SPRINTF) += vsprintf.o endif -obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o +obj-$(CONFIG_STRTO) += strto.o else # Main U-Boot always uses the full printf support obj-y += vsprintf.o strto.o obj-$(CONFIG_SSCANF) += sscanf.o endif -obj-$(CONFIG_$(SPL_)OID_REGISTRY) += oid_registry.o +obj-$(CONFIG_OID_REGISTRY) += oid_registry.o obj-y += abuf.o obj-y += date.o obj-y += rtc-lib.o obj-$(CONFIG_LIB_ELF) += elf.o -obj-$(CONFIG_$(SPL_TPL_)SEMIHOSTING) += semihosting.o +obj-$(CONFIG_SEMIHOSTING) += semihosting.o # # Build a fast OID lookup registry from include/linux/oid_registry.h diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile index 956b5a0d726..6ee363aa66b 100644 --- a/lib/acpi/Makefile +++ b/lib/acpi/Makefile @@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_$(SPL_)ACPIGEN) += acpigen.o -obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_device.o -obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_dp.o -obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o +obj-$(CONFIG_ACPIGEN) += acpigen.o +obj-$(CONFIG_ACPIGEN) += acpi_device.o +obj-$(CONFIG_ACPIGEN) += acpi_dp.o +obj-$(CONFIG_ACPIGEN) += acpi_table.o obj-y += acpi_writer.o # With QEMU the ACPI tables come from there, not from U-Boot diff --git a/lib/aes/Makefile b/lib/aes/Makefile index daed52a713b..f908ce1df21 100644 --- a/lib/aes/Makefile +++ b/lib/aes/Makefile @@ -2,4 +2,4 @@ # # Copyright (c) 2019, Softathome -obj-$(CONFIG_$(SPL_)FIT_CIPHER) += aes-decrypt.o +obj-$(CONFIG_FIT_CIPHER) += aes-decrypt.o diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile index bec1bc95a65..3f65b02ede2 100644 --- a/lib/crypto/Makefile +++ b/lib/crypto/Makefile @@ -3,16 +3,16 @@ # Makefile for asymmetric cryptographic keys # -obj-$(CONFIG_$(SPL_)ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o +obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys.o asymmetric_keys-y := asymmetric_type.o -obj-$(CONFIG_$(SPL_)ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o +obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o # # RSA public key parser # -obj-$(CONFIG_$(SPL_)RSA_PUBLIC_KEY_PARSER) += rsa_public_key.o +obj-$(CONFIG_RSA_PUBLIC_KEY_PARSER) += rsa_public_key.o rsa_public_key-y := \ rsapubkey.asn1.o \ rsa_helper.o @@ -30,7 +30,7 @@ endif # # X.509 Certificate handling # -obj-$(CONFIG_$(SPL_)X509_CERTIFICATE_PARSER) += x509_key_parser.o +obj-$(CONFIG_X509_CERTIFICATE_PARSER) += x509_key_parser.o x509_key_parser-y := \ x509.asn1.o \ x509_akid.asn1.o \ @@ -47,11 +47,11 @@ $(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h # # PKCS#7 message handling # -obj-$(CONFIG_$(SPL_)PKCS7_MESSAGE_PARSER) += pkcs7_message.o +obj-$(CONFIG_PKCS7_MESSAGE_PARSER) += pkcs7_message.o pkcs7_message-y := \ pkcs7.asn1.o \ pkcs7_parser.o -obj-$(CONFIG_$(SPL_)PKCS7_VERIFY) += pkcs7_verify.o +obj-$(CONFIG_PKCS7_VERIFY) += pkcs7_verify.o $(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h @@ -59,7 +59,7 @@ $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h # # Signed PE binary-wrapped key handling # -obj-$(CONFIG_$(SPL_)MSCODE_PARSER) += mscode.o +obj-$(CONFIG_MSCODE_PARSER) += mscode.o mscode-y := \ mscode_parser.o \ diff --git a/lib/ecdsa/Makefile b/lib/ecdsa/Makefile index 771d6d3135b..bf08a036737 100644 --- a/lib/ecdsa/Makefile +++ b/lib/ecdsa/Makefile @@ -1 +1 @@ -obj-$(CONFIG_$(SPL_)ECDSA_VERIFY) += ecdsa-verify.o +obj-$(CONFIG_ECDSA_VERIFY) += ecdsa-verify.o diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile index 1fe50ecbe52..e80b8b99554 100644 --- a/lib/libfdt/Makefile +++ b/lib/libfdt/Makefile @@ -16,4 +16,4 @@ obj-y += \ obj-$(CONFIG_OF_LIBFDT_OVERLAY) += fdt_overlay.o ccflags-y := -I$(srctree)/scripts/dtc/libfdt \ - -DFDT_ASSUME_MASK=$(CONFIG_$(SPL_TPL_)OF_LIBFDT_ASSUME_MASK) + -DFDT_ASSUME_MASK=$(CONFIG_OF_LIBFDT_ASSUME_MASK) diff --git a/lib/rsa/Makefile b/lib/rsa/Makefile index c9ac72c1e26..5ac56228ac7 100644 --- a/lib/rsa/Makefile +++ b/lib/rsa/Makefile @@ -5,6 +5,6 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_$(SPL_TPL_)RSA_VERIFY) += rsa-verify.o -obj-$(CONFIG_$(SPL_TPL_)RSA_VERIFY_WITH_PKEY) += rsa-keyprop.o +obj-$(CONFIG_RSA_VERIFY) += rsa-verify.o +obj-$(CONFIG_RSA_VERIFY_WITH_PKEY) += rsa-keyprop.o obj-$(CONFIG_RSA_SOFTWARE_EXP) += rsa-mod-exp.o diff --git a/net/Makefile b/net/Makefile index bea000b2067..9e115f5a1d5 100644 --- a/net/Makefile +++ b/net/Makefile @@ -10,14 +10,14 @@ obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_DM_DSA) += dsa-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o -obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o +obj-$(CONFIG_DM_ETH) += eth-uclass.o +obj-$(CONFIG_BOOTDEV_ETH) += eth_bootdev.o obj-$(CONFIG_DM_MDIO) += mdio-uclass.o obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o +obj-$(CONFIG_DM_ETH) += eth_common.o obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o obj-$(CONFIG_IPV6) += ndisc.o -obj-$(CONFIG_$(SPL_)DM_ETH) += net.o +obj-$(CONFIG_DM_ETH) += net.o obj-$(CONFIG_IPV6) += net6.o obj-$(CONFIG_CMD_NFS) += nfs.o obj-$(CONFIG_CMD_PING) += ping.o diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index b7668694101..66390240d19 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -319,8 +319,3 @@ endif # do not delete intermediate files automatically .SECONDARY: - -# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in -# Makefiles -SPL_ := -SPL_TPL_ := diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts index 2561025da82..8fac12fccbe 100644 --- a/scripts/Makefile.dts +++ b/scripts/Makefile.dts @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0+ -dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_$(SPL_)OF_LIST))) +dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_OF_LIST))) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 3009a8b0d4b..634b59c071f 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -54,11 +54,6 @@ endif export SPL_NAME -# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in -# Makefiles -SPL_ := -SPL_TPL_ := - ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl) $(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL) endif @@ -78,7 +73,7 @@ include $(srctree)/scripts/Makefile.lib KBUILD_CFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections -ifeq ($(CONFIG_$(SPL_TPL_)STACKPROTECTOR),y) +ifeq ($(CONFIG_STACKPROTECTOR),y) KBUILD_CFLAGS += -fstack-protector-strong else KBUILD_CFLAGS += -fno-stack-protector @@ -102,8 +97,8 @@ endif libs-y += common/init/ # Special handling for a few options which support SPL/TPL/VPL -libs-$(CONFIG_$(SPL_TPL_)LIBCOMMON_SUPPORT) += boot/ common/ cmd/ env/ -libs-$(CONFIG_$(SPL_TPL_)LIBGENERIC_SUPPORT) += lib/ +libs-$(CONFIG_LIBCOMMON_SUPPORT) += boot/ common/ cmd/ env/ +libs-$(CONFIG_LIBGENERIC_SUPPORT) += lib/ ifdef CONFIG_SPL_FRAMEWORK libs-$(CONFIG_PARTITIONS) += disk/ endif @@ -116,7 +111,7 @@ libs-y += dts/ libs-y += fs/ libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ libs-$(CONFIG_SPL_NET) += net/ -libs-$(CONFIG_$(SPL_TPL_)UNIT_TEST) += test/ +libs-$(CONFIG_UNIT_TEST) += test/ head-y := $(addprefix $(obj)/,$(head-y)) libs-y := $(addprefix $(obj)/,$(libs-y)) @@ -132,12 +127,12 @@ endif u-boot-spl-init := $(head-y) u-boot-spl-main := $(libs-y) -ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA +ifdef CONFIG_OF_PLATDATA platdata-hdr := include/generated/dt-structs-gen.h include/generated/dt-decl.h platdata-inst := $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o platdata-noinst := $(obj)/dts/dt-plat.o -ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA_INST +ifdef CONFIG_OF_PLATDATA_INST u-boot-spl-platdata := $(platdata-inst) u-boot-spl-old-platdata := $(platdata-noinst) else @@ -154,9 +149,9 @@ endif # OF_PLATDATA # Linker Script # First test whether there's a linker-script for the specific stage defined... -ifneq ($(CONFIG_$(SPL_TPL_)LDSCRIPT),) +ifneq ($(CONFIG_LDSCRIPT),) # need to strip off double quotes -LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_$(SPL_TPL_)LDSCRIPT:"%"=%)) +LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_LDSCRIPT:"%"=%)) else # ...then fall back to the generic SPL linker-script ifneq ($(CONFIG_SPL_LDSCRIPT),) @@ -190,11 +185,11 @@ LDPPFLAGS += \ # Turn various CONFIG symbols into IMAGE symbols for easy reuse of # the scripts between SPL, TPL and VPL. -ifneq ($(CONFIG_$(SPL_TPL_)MAX_SIZE),0x0) -LDPPFLAGS += -DIMAGE_MAX_SIZE=$(CONFIG_$(SPL_TPL_)MAX_SIZE) +ifneq ($(CONFIG_MAX_SIZE),0x0) +LDPPFLAGS += -DIMAGE_MAX_SIZE=$(CONFIG_MAX_SIZE) endif -ifneq ($(CONFIG_$(SPL_TPL_)TEXT_BASE),) -LDPPFLAGS += -DIMAGE_TEXT_BASE=$(CONFIG_$(SPL_TPL_)TEXT_BASE) +ifneq ($(CONFIG_TEXT_BASE),) +LDPPFLAGS += -DIMAGE_TEXT_BASE=$(CONFIG_TEXT_BASE) endif MKIMAGEOUTPUT ?= /dev/null @@ -308,7 +303,7 @@ endif # - OF_REAL is enabled # - we have either OF_SEPARATE or OF_HOSTFILE build_dtb := -ifneq ($(CONFIG_$(SPL_TPL_)OF_REAL),) +ifneq ($(CONFIG_OF_REAL),) ifeq ($(CONFIG_OF_SEPARATE)$(CONFIG_SANDBOX),y) build_dtb := y endif @@ -316,7 +311,7 @@ endif ifneq ($(build_dtb),) $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin \ - $(if $(CONFIG_$(SPL_TPL_)SEPARATE_BSS),,$(obj)/$(SPL_BIN)-pad.bin) \ + $(if $(CONFIG_SEPARATE_BSS),,$(obj)/$(SPL_BIN)-pad.bin) \ $(FINAL_DTB_CONTAINER) FORCE $(call if_changed,cat) @@ -340,7 +335,7 @@ pythonpath = PYTHONPATH=scripts/dtc/pylibfdt DTOC_ARGS := $(pythonpath) $(srctree)/tools/dtoc/dtoc \ -d $(obj)/$(SPL_BIN).dtb -p $(SPL_NAME) -ifneq ($(CONFIG_$(SPL_TPL_)OF_PLATDATA_INST),) +ifneq ($(CONFIG_OF_PLATDATA_INST),) DTOC_ARGS += -i endif @@ -380,7 +375,7 @@ quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \ - $(if $(CONFIG_$(SPL_TPL_)X86_16BIT_INIT),-R .start16 -R .resetvec) + $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) $(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE $(call if_changed,objcopy) @@ -409,8 +404,8 @@ LDFLAGS_$(SPL_BIN) += $(call ld-option, --no-dynamic-linker) LDFLAGS_$(SPL_BIN) += --build-id=none # Pick the best match (e.g. SPL_TEXT_BASE for SPL, TPL_TEXT_BASE for TPL) -ifneq ($(CONFIG_$(SPL_TPL_)TEXT_BASE),) -LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_$(SPL_TPL_)TEXT_BASE) +ifneq ($(CONFIG_TEXT_BASE),) +LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_TEXT_BASE) endif ifdef CONFIG_TARGET_SOCFPGA_ARRIA10 diff --git a/test/Makefile b/test/Makefile index 178773647a8..96dab0f01b9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -7,21 +7,21 @@ ifdef CONFIG_SPL_LOAD_FIT obj-$(CONFIG_SANDBOX) += image/ endif -ifneq ($(CONFIG_$(SPL_)BLOBLIST),) -obj-$(CONFIG_$(SPL_)CMDLINE) += bloblist.o -obj-$(CONFIG_$(SPL_)CMDLINE) += bootm.o +ifneq ($(CONFIG_BLOBLIST),) +obj-$(CONFIG_CMDLINE) += bloblist.o +obj-$(CONFIG_CMDLINE) += bootm.o endif -obj-$(CONFIG_$(SPL_)CMDLINE) += cmd/ -obj-$(CONFIG_$(SPL_)CMDLINE) += cmd_ut.o -obj-$(CONFIG_$(SPL_)CMDLINE) += command_ut.o -obj-$(CONFIG_$(SPL_)UT_COMPRESSION) += compression.o +obj-$(CONFIG_CMDLINE) += cmd/ +obj-$(CONFIG_CMDLINE) += cmd_ut.o +obj-$(CONFIG_CMDLINE) += command_ut.o +obj-$(CONFIG_UT_COMPRESSION) += compression.o obj-y += dm/ obj-$(CONFIG_FUZZ) += fuzz/ ifndef CONFIG_SANDBOX_VPL obj-$(CONFIG_UNIT_TEST) += lib/ endif -obj-$(CONFIG_$(SPL_)CMDLINE) += print_ut.o -obj-$(CONFIG_$(SPL_)CMDLINE) += str_ut.o +obj-$(CONFIG_CMDLINE) += print_ut.o +obj-$(CONFIG_CMDLINE) += str_ut.o obj-$(CONFIG_UT_TIME) += time_ut.o obj-y += ut.o @@ -29,5 +29,5 @@ ifeq ($(CONFIG_SPL_BUILD),) obj-$(CONFIG_UNIT_TEST) += boot/ obj-$(CONFIG_UNIT_TEST) += common/ obj-y += log/ -obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o +obj-$(CONFIG_UT_UNICODE) += unicode_ut.o endif diff --git a/test/dm/Makefile b/test/dm/Makefile index 7a79b6e1a25..340a556a324 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -36,7 +36,7 @@ obj-$(CONFIG_CLK) += clk.o clk_ccf.o obj-$(CONFIG_CPU) += cpu.o obj-$(CONFIG_CROS_EC) += cros_ec.o obj-$(CONFIG_PWM_CROS_EC) += cros_ec_pwm.o -obj-$(CONFIG_$(SPL_TPL_)DEVRES) += devres.o +obj-$(CONFIG_DEVRES) += devres.o obj-$(CONFIG_DMA) += dma.o obj-$(CONFIG_VIDEO_MIPI_DSI) += dsi_host.o obj-$(CONFIG_DM_DSA) += dsa.o diff --git a/test/fuzz/Makefile b/test/fuzz/Makefile index 663b79ce80b..4a9b647bbc0 100644 --- a/test/fuzz/Makefile +++ b/test/fuzz/Makefile @@ -4,5 +4,5 @@ # Written by Andrew Scull # -obj-$(CONFIG_$(SPL_)CMDLINE) += cmd_fuzz.o +obj-$(CONFIG_CMDLINE) += cmd_fuzz.o obj-$(CONFIG_VIRTIO_SANDBOX) += virtio.o