From patchwork Fri Sep 17 16:17:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529483 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=GHzd+ZYv; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zdz5xYzz9sVw for ; Sat, 18 Sep 2021 02:18:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B6C68322E; Fri, 17 Sep 2021 18:18:20 +0200 (CEST) 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="GHzd+ZYv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C05F83246; Fri, 17 Sep 2021 18:17:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B4F6283223 for ; Fri, 17 Sep 2021 18:17:49 +0200 (CEST) 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-wr1-x42e.google.com with SMTP id q11so16043712wrr.9 for ; Fri, 17 Sep 2021 09:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RKcdrsOvL/GLk/Jr04PgOPRd2l684+vlKmsPbP2OFYc=; b=GHzd+ZYvLPYXhEWJgDPZlKzIgxT/2J2bYsTGRg/HCMh/PdsglHR1pq0Ijg+Ilr3Sdc tSpehovYztVgGnVzoYVf9hDUHIW9YTY2HB4eiPovWy0be7mbJfIsAIhktxH5PeP5QUEz Lklb3fpwWpiehLtqlTHEnuT6mRfR/P2Br9IFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RKcdrsOvL/GLk/Jr04PgOPRd2l684+vlKmsPbP2OFYc=; b=wYod4LBN2z4rr59EbT0hgSa+nr7BKOD7YEiap4JT85fWF4Qr74/16J7YjEEaOCbmHk BcUZVedTYcARbUtcpp+CMaVzbszNoa/mH5KlAIGWbXkv8uIjzOM0E4A5rpS9SJFWubOS j+1bk7lieT5cpmLzRrnWHY8DkRNFRhF5brHJP82G/kmuLpgVBZAPdPoEjcLl/fYarRD4 0HMGzhTl1+n16Z2aXAEP1mMhI5uZkuLo0NddBp4fmx4JcWKglT0Mx+3lJ3X+fd57WLSq jZdV4sRHOQDvQQroSLKuMb1SmcIFRLf6S8p0TSNWYSmZCrlSITBFazidmhtpp9Vovaiu wWPA== X-Gm-Message-State: AOAM532NoeJOMnO1uk5uAUI7cPme6/aaFilfruY8ULzI9+ypb02wJ8aG mG9//yMyYuRIgXkdHfr99obwMBgsV9QgQS74 X-Google-Smtp-Source: ABdhPJzgyobBl76MtducwwLbl0u5kbjMi83WvVBva6DD6N4hTvStNmzVAngdq79b2znxBIkfFrZ6wQ== X-Received: by 2002:adf:e50c:: with SMTP id j12mr13331183wrm.356.1631895468918; Fri, 17 Sep 2021 09:17:48 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:48 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass , Joe Hershberger Subject: [PATCH 01/17] env: Avoid checking ENV_IS_IN when env disabled Date: Fri, 17 Sep 2021 10:17:24 -0600 Message-Id: <20210917161741.1275871-2-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 ddc715b4f91..1c8d49646e5 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -62,11 +62,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 Fri Sep 17 16:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529482 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=ez3qd4Ls; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zdp0rWWz9sVw for ; Sat, 18 Sep 2021 02:18:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3933883252; Fri, 17 Sep 2021 18:18:04 +0200 (CEST) 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="ez3qd4Ls"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 71B2683245; Fri, 17 Sep 2021 18:17:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 32D5883227 for ; Fri, 17 Sep 2021 18:17:51 +0200 (CEST) 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-wr1-x436.google.com with SMTP id u15so16049437wru.6 for ; Fri, 17 Sep 2021 09:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hFj0O6+u82wVs+KJ5YK/4+6wdnInAyNP1CUbr8d25Pc=; b=ez3qd4LsF1g1QDU695vHX25Josy9XoOTv0o0CVN4uwkytVCdR/jhfERgcJ924j9QKi L4kNy1LCrcC3qzZSWVDHZwupNvXsDh6PkC+P2pUZXIiX0+z+e9eiPmbtq5/GBARJ3Js3 uxMsUX0G/euKHH/S/lNxk7IATEeZb9bxRYZZo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hFj0O6+u82wVs+KJ5YK/4+6wdnInAyNP1CUbr8d25Pc=; b=uK2bUWTJvNkZr+sjtvz8Dc3FwkFrjWY6Kd6PpbSYh1E1z2MzmloNO27e6RDGFN3sy6 NVTuWjpaEFVKGytNB/scM3iMMkkbWPyBjoMM92vnQsYWBObwsoG9AZcDaSkPraR8Hyye RijqyBXDfggEIS4zNJe/uO4AcHIP9uYgBzK9YiH1HmXHRYXPAIAEELMtmtVv09M1xSsf 1o2umAxYBAbTQvLtUPLf+BU0ID8R1sAhYn6A9xLkXzWa0kWT9czO5UDbL+GwWl26fosE Yp4Mj2Ng+IW+lmfT2LcXO7uN8AJgc8U6zD+w3CuQYaunAn3NMOoZblX4WTnf4TmFvnF2 irUg== X-Gm-Message-State: AOAM531HcUJTJ5pRtySne94zm6wZcTdtOizQzOz+9kK+46qpkj6WSzEA eBw6cGMXoQ1ZiudjByQjAub5/TYfkFONPLqQ X-Google-Smtp-Source: ABdhPJzqeX2Yf1TXPHq9lgG4NVM5hVbk3xHVdz2xYoIoCuTzh2bjLqDLTzoQ5mFwisFd75LNXnqGqg== X-Received: by 2002:a5d:6d8e:: with SMTP id l14mr13066087wrs.26.1631895470063; Fri, 17 Sep 2021 09:17:50 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass , Bin Meng Subject: [PATCH 02/17] x86: Fix qemu condition for arch_cpu_init() Date: Fri, 17 Sep 2021 10:17:25 -0600 Message-Id: <20210917161741.1275871-3-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This is written incorrectly, since SPL_ should not be used with the CONFIG_IS_ENABLED macro. Fix it by dropping the prefix and inverting the logic, which produces the same result as now. Signed-off-by: Simon Glass --- arch/x86/cpu/qemu/qemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index e54082df7f9..274978c023b 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -97,7 +97,7 @@ static void qemu_chipset_init(void) } } -#if !CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) +#if CONFIG_IS_ENABLED(X86_32BIT_INIT) int arch_cpu_init(void) { post_code(POST_CPU_INIT); From patchwork Fri Sep 17 16:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529485 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=eJI2oRzc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zfR47Vkz9sVw for ; Sat, 18 Sep 2021 02:18:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9415B83260; Fri, 17 Sep 2021 18:18:40 +0200 (CEST) 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="eJI2oRzc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FF6B83244; Fri, 17 Sep 2021 18:18:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 4B6E183231 for ; Fri, 17 Sep 2021 18:17:52 +0200 (CEST) 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-wm1-x336.google.com with SMTP id e26so7769083wmk.2 for ; Fri, 17 Sep 2021 09:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qfw+t6Izw2vSdC75SFdy7IIdd85pXvzKU+hUO0FiiKw=; b=eJI2oRzcTFIXwi8I/Bg2bNpkxJgQ6s+GBaxIxGDlMmgd5QXzFu0PddCXCKj1g6KDqB +CmpoI2EINEBTvrCrN14VEd/ahHes3A0nn9+Al8HodybqPXeBXf/LqnT0kJ3Ar/ua3Hf sbVSki2HorL03HGFwrE68sh6z14tSOV5q9FA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qfw+t6Izw2vSdC75SFdy7IIdd85pXvzKU+hUO0FiiKw=; b=MRfqcgTlQdhmPvpwniSTLnFHaVq3JVX/2y70uxxuFTjlRWQKStNidNsXfnLc2ei59s t/eBQWIJ/3EOsc77xOOn8BZsd6vGdFqEC+nyPCjpNSjGFkH9n5KfjbL+BFzF4xwSRD3s aDo7n+cTIK/XFd1aP49hmObbpn4GRK1NrON5JW1v15TRX47JT0vwZ/PJsLJSRHEEnEwu y1eJvXuv5PUhV95yZZGl0AroYt7aYqxSTey81Ol0msCr7CLDRAjS8Dfp0UBYvJADOZdb N/VjGEWli+BNq/Z6apRNZzoBr1MUK+pVXFyIKI9+ype9Lr/QoceSBaXaq8rEDK+BBRgw HqMg== X-Gm-Message-State: AOAM533LAMM+Y9WYsLRQe/GsXG/bRzMLsbpcd+waukx89lfsWr+lAcKj 7+q6GAMHVORqFgqlOPbdssifJ2WcvqoY4Ij9 X-Google-Smtp-Source: ABdhPJxVYYxC+jG4o8c0UTtI/iKWsvZ9ng2dUVE3jOFUSRLq4H0qxe9Dk8gdwL7KhhhVCKgTU75pTQ== X-Received: by 2002:a1c:c918:: with SMTP id f24mr15875841wmb.61.1631895471486; Fri, 17 Sep 2021 09:17:51 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:51 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 03/17] acpi: Add a Kconfig for SPL Date: Fri, 17 Sep 2021 10:17:26 -0600 Message-Id: <20210917161741.1275871-4-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building ACPI for SPL. But with the new split configs this does not work. Add a separate Kconfig instead. Signed-off-by: Simon Glass --- drivers/core/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 9ae188c1dfc..4c2aeb8bce5 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -332,6 +332,11 @@ config ACPIGEN things like generating device-specific tables and returning the ACPI name of a device. +config SPL_ACPIGEN + def_bool n + help + Dummy option to ensure that ACPI tables are not generated in SPL. + config BOUNCE_BUFFER bool "Include bounce buffer API" help From patchwork Fri Sep 17 16:17:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529484 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=IEL0mFeQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zfC2dWYz9sVw for ; Sat, 18 Sep 2021 02:18:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CB2083246; Fri, 17 Sep 2021 18:18:34 +0200 (CEST) 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="IEL0mFeQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 725F28325A; Fri, 17 Sep 2021 18:18:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FEB28312C for ; Fri, 17 Sep 2021 18:17:53 +0200 (CEST) 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-wr1-x42b.google.com with SMTP id i23so16085822wrb.2 for ; Fri, 17 Sep 2021 09:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4ep6Z7kmgn8RZ+vjtpAfakabCQlo0ePYCtGnajwPWkQ=; b=IEL0mFeQh3Q6DTK15yfXY6pguaeEzmBd+OaGOY8/HxSPAh2lTqnXU4nQFC4JBauUAg bQ7MmXhzyPKTpWiUEGBXq3KVLoS3D14SU6F08IJrg0NorKjHnyZFhoiyxr+EvzaDcRUV CkK4AvEOEnuNxc4H9S4CX59xjeYaFozJ8YJwE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4ep6Z7kmgn8RZ+vjtpAfakabCQlo0ePYCtGnajwPWkQ=; b=4sqZ/acAmumekPSVI39PCIziJrbIqU+Za3OkInidGPqJ8rBUg2h0LaTty0J4fjYplg PX071QF3rKkOwftIUK1mLRFJ/6NDmVusltcvDD32dtBf1qhhGqpaShOgjDwfXMXE4sf0 YjpuhZ4GuxYkmwDOWGZcihqSF4qeCF3HWJ742tAPa60TiNHq+BiNn9EkI+Kl2Iu0WHLn nlX8i7HQZ3ugoTsEYGhIoyP6j76o1XvQwSq6cKcAzbWY3dsuTxjeW4Ii+MVdAPUHgntM Ouye24qa8rYsk3R6F7x63ivi9+B85UCXP/0wsLFbibC9rjcGcfm6I8RVrZRkGAdcm6HV igzQ== X-Gm-Message-State: AOAM533PK0qoUoBj89JG5xzwy2gVPnZQpoWKPKkcJgJjxOTlVulK8EUO KV49FifbQ7D88WeP+5CG0Zk4j9h5oz/aFzFJ X-Google-Smtp-Source: ABdhPJykBH1iquxgP+n8c8tZf8k3o1VGJN3AUP5U5X6NT6b1sCyWGuxpSjwnUVfmOr4bQ4GXy0ELzg== X-Received: by 2002:a05:6000:184e:: with SMTP id c14mr11252173wri.242.1631895472473; Fri, 17 Sep 2021 09:17:52 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:52 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 04/17] cmd: Add an SPL Kconfig for CMDLINE and HUSH Date: Fri, 17 Sep 2021 10:17:27 -0600 Message-Id: <20210917161741.1275871-5-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 3a857b3f6e2..f469739a5fe 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 Fri Sep 17 16:17:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529488 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=V7Qop0tD; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zfj14d7z9sVw for ; Sat, 18 Sep 2021 02:19:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18A6383221; Fri, 17 Sep 2021 18:18:44 +0200 (CEST) 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="V7Qop0tD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2EC9B83222; Fri, 17 Sep 2021 18:18:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 820DE83222 for ; Fri, 17 Sep 2021 18:17:54 +0200 (CEST) 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-wm1-x331.google.com with SMTP id 140so7806928wma.0 for ; Fri, 17 Sep 2021 09:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/+WF8MqvuegeIprykl0/ptNmvac2uupvGLcyp30SNhA=; b=V7Qop0tDGnNipCIcaZCv+R376IRxapTnng7nHUm0AUNfzg1Q+3lpCc23OhQk50Kaao XmZvaDRAzxQ0e60DxssSoOzH5B9mrw2/e7buC4uBoXNq626soBajuQOOpGMuVARn3XEc 1Nx5UuHesiV83CYpcj5/E3Oxstmbdjir6C8io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/+WF8MqvuegeIprykl0/ptNmvac2uupvGLcyp30SNhA=; b=EyvoPzX6d+44EiRh2rAX87rjBteke6OV1PXv0mrudDz7dNIEalJcSc4jPSNFwxSJDt nOyAvJ+LDYsAFplZ7/wO1f7ZqEtZe5J3eC+meO6GfrghhRA6ZYH7lQwn8fZKDplh3G/Q +jmsYM3ENsfFpTK1i8YgfuC7ymt5KSHsqWwzOzL8nvrfBAFCDTCN6pxhXkbRqGy2FlD1 HIm60LOnZez119AKOWQcLtRzLwH/FhvIO7jQMdsauIFHI7iOgczxHm8KiyTJrZytB6vl 5ZvltEkOyPeeUdJjloYKW7dAycJG09gA50zmsAfUytjEqAw1x8PA96eMeB1FLWR73qgq NPfw== X-Gm-Message-State: AOAM5305fP4aay7SkaN40EpbAMrcUjTSlDnoGVdSl217cs/gkfO8u9Hb ofYsocvAWaFeOPtoU+VQyuXNo1tUJNPKkJvT X-Google-Smtp-Source: ABdhPJztGy/fByqJU7nfPPrzCENgaBJGnb5Jcelcd3kKT0kPkVMLSy7AQg8ChsAEcIWZoC5FHiDCvQ== X-Received: by 2002:a1c:7e12:: with SMTP id z18mr16449999wmc.60.1631895473674; Fri, 17 Sep 2021 09:17:53 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:53 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 05/17] cros_ec: Add SPL Kconfigs for cros_ec features Date: Fri, 17 Sep 2021 10:17:28 -0600 Message-Id: <20210917161741.1275871-6-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 63d03a3cebf..4c3a084b4f8 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -57,6 +57,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 @@ -71,6 +76,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 Fri Sep 17 16:17:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529490 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=K0NxkMhH; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zg94Qkqz9sVw for ; Sat, 18 Sep 2021 02:19:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9D17C8324B; Fri, 17 Sep 2021 18:18:54 +0200 (CEST) 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="K0NxkMhH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A3598322E; Fri, 17 Sep 2021 18:18:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 C20CD8323E for ; Fri, 17 Sep 2021 18:17:55 +0200 (CEST) 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-wm1-x334.google.com with SMTP id d207-20020a1c1dd8000000b00307e2d1ec1aso7256623wmd.5 for ; Fri, 17 Sep 2021 09:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+9vATUXOW2FW3meK+rNMeZD/sAuwN+OsVoj9wsk6r3o=; b=K0NxkMhH1zKjmfadzinkoRiJpd3FIKAqdDxPPCInmfPWZP3THH1eSO2q7Nn4Agti2o bsrfo4UV89/vTgBIkklXe73pW7OqOfZ9yqUaK9n1uAD/PRwRgm6EEGlSEULakWSHHn5e CW1fsTfimwX6hM9xvbJH+c6STgYyaH7tDRhzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+9vATUXOW2FW3meK+rNMeZD/sAuwN+OsVoj9wsk6r3o=; b=EIbQ6hQa4cJeHrZkhUOKGT+fjMLyE/BJxp4H/eX5aetRIbhkwgI7vbp1cE51IGTvEo e2js94I8+x1LdwTsE0vAV4qYM+xC7K1T1RUfBxPqdN1C/9geyS46rDU3IXg7iN9OpmF7 F5/2AZFV3lsd6N0lFaLYk67Nj3dV3/GwyTGRD07/4U6e88mFXyJp1r7g/WlOLX28H5ql SJGIcH+66WZ0XUywiBiG7cUZyBDTe+MgUFnBVo0mBGhLyYsrGG2niEZwH3O/O84uRPzd Y9LNeSE2ayU2FAbd2VoZidD9BIYYNo1AWF4s5TSkFr5qS2qYkiQaIEvnU/Qr0AW2j+97 KQ0A== X-Gm-Message-State: AOAM5328MEvKqmNa8sY8ipr+38UV5Xzn7WxKTGyBMGoikiPi74EPe1oe CiL9qPANUv2vMbbwEsbhgK+aAh1xaTIJa7DG X-Google-Smtp-Source: ABdhPJx1RK4lrXlB0bqgP8ttwx5F9BCpd5vOVGaZWrALmZtaAzThVCeDcMDz9LUIkLyCpmpnUpeSNg== X-Received: by 2002:a1c:4486:: with SMTP id r128mr11277551wma.8.1631895474889; Fri, 17 Sep 2021 09:17:54 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass , Lukasz Majewski Subject: [PATCH 06/17] power: Add SPL Kconfig for sandbox pmc emulator Date: Fri, 17 Sep 2021 10:17:29 -0600 Message-Id: <20210917161741.1275871-7-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building the emulator for SPL. But with the new split configs this does not work. Add a separate Kconfig instead. Signed-off-by: Simon Glass --- drivers/power/acpi_pmc/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/power/acpi_pmc/Kconfig b/drivers/power/acpi_pmc/Kconfig index fcd50e36cad..d3f363b0dcf 100644 --- a/drivers/power/acpi_pmc/Kconfig +++ b/drivers/power/acpi_pmc/Kconfig @@ -32,3 +32,8 @@ config ACPI_PMC_SANDBOX the uclass logic can be tested. You can use the 'pmc' command to access information from the driver. It uses I/O access to read from the PMC. + +config SPL_ACPI_PMC_SANDBOX + def_bool n + help + Dummy option to ensure that this feature is not enabled in SPL. From patchwork Fri Sep 17 16:17:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529489 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=TKoCEpso; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zfx3Srjz9sW4 for ; Sat, 18 Sep 2021 02:19:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AF5E98323F; Fri, 17 Sep 2021 18:18:50 +0200 (CEST) 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="TKoCEpso"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E34BF83246; Fri, 17 Sep 2021 18:18:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 DACA083248 for ; Fri, 17 Sep 2021 18:17:56 +0200 (CEST) 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-wm1-x330.google.com with SMTP id i3so7759039wmq.3 for ; Fri, 17 Sep 2021 09:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KE1/9cPBvNWcpyRPHR5ez1GnEr6mVQVtyz/fJNGoHzI=; b=TKoCEpso9Xm1bhCpb6gg2PRClG5oFmy6+P8gEuPHuk5CWJbvdewUZD0weGRYNF49ch 0k53aLKdM4SDtv+LAz3GRSnNFKvqk6caZcNZBDkyY+VMrZFIPnDYe2u1D8KBASBaJAuV Nv8WJ1ILtD9jX+wawFil5QACGHJ0Mbw5akpTw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KE1/9cPBvNWcpyRPHR5ez1GnEr6mVQVtyz/fJNGoHzI=; b=oG/ksArDZcLPoB2PG29RqdrDLtDM1L9JgE5ReF3ZK/ZT+VhaidUyvRP3W+lFFYqow6 TbnEBLirAWsNZBkKVZYrjnSMloPxcZEdMWnCjQNotK991lhsVyBHcp4FLHJyl+isRVh5 ArKNVbzbEGa2PqXIf7Cg/y83uqFG/uxHyvsUxELe5MmvFJPW9gbBR0VYq9sUwbp4tUq+ EkcMGvDcTZYi2ere5zowXGId/nhnAN1/TU9pYvWcJshz6qdEFEmK3WCBbKeeH+sseISK 2qDknvtXJFXB4SF9EuR4Pln3UIIjiEr+c2oNtCUmhW6iRktAB8Z44xyVt+G2cfjJ55Ky upSw== X-Gm-Message-State: AOAM532IHUa1ulUZOa/rVdpo9+8UGjx7ovaOnX1XncRPqBZ5ixpTpHwC ZETKOCDKQ5WDQ2AMIydmUZKYy0JXbGgBu6G5 X-Google-Smtp-Source: ABdhPJyuKmVy1VosWC1C6eLYAYOSPFyesuaU6YBKhuxu6b/dz5u61brg8x62HBcWXJ8Pvyw8+RXXbA== X-Received: by 2002:a05:600c:510a:: with SMTP id o10mr16066720wms.81.1631895476005; Fri, 17 Sep 2021 09:17:56 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:55 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 07/17] test: Add SPL Kconfig for compression tests Date: Fri, 17 Sep 2021 10:17:30 -0600 Message-Id: <20210917161741.1275871-8-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building these tests for SPL. But with the new split configs this does not work. Add a separate Kconfig instead. Signed-off-by: Simon Glass --- test/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Kconfig b/test/Kconfig index e15ba239eb3..52d85ca78a2 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -69,6 +69,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 Fri Sep 17 16:17:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529491 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=JaNu2dR0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zgQ1Qscz9sVw for ; Sat, 18 Sep 2021 02:19:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A3ACA83282; Fri, 17 Sep 2021 18:18:59 +0200 (CEST) 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="JaNu2dR0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A2A6A83224; Fri, 17 Sep 2021 18:18:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 000FD8324B for ; Fri, 17 Sep 2021 18:17:57 +0200 (CEST) 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-wm1-x330.google.com with SMTP id e26so7769275wmk.2 for ; Fri, 17 Sep 2021 09:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dy95oP4ekL9Ha4G37x++nMPxZvC45dira8+cg+AYwjo=; b=JaNu2dR0CULxy2FBMplVAEVlyJD2r6rIfQ2U/WxPYPU91fHyPpJ+sG9qUH2yRCYvN/ GwxBDBT5wxwnK+9nL710VDqIRKfWhV1nYirdLqV5/I6xPlAYlNNnWcmTQiYcnilrqkvp Y/XOt6X9CX86KnvegL63k9zx8ZaQ4qSkGHSEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dy95oP4ekL9Ha4G37x++nMPxZvC45dira8+cg+AYwjo=; b=WJhOEsXjl3Yxu8f4ueen6t/7cm56Zt+VzcGlQJl5WqUlM+/ANkLfidBXZbrD4Kk+6P 8v4uGKUtYEr+UrA8AiWsOqRFLIZgKVRnbf1tIwDIBW74KyX/bGNbPNAvec4AmyrBD2Dl nIyp9zI77IaLm3353F/CLo4YU2C6aMUMiCLr6LQtaU42vr0tCHfOln9Y4dunD6bZUYhP aQ7IWgMO7gQuJ13CksgFT8D1ocpo3OhaaBtHRNtfaaOvkDQdirM4lliNiV3K2KIXpc0C CYnJRNPBDKCuTDH1wXHg0jJvSYtW4WakztFrPxst/VmHPVL36q+riJDcLOC4vk72f3E7 X5Sw== X-Gm-Message-State: AOAM531aDQ+R/opzDIGdc7GtbeNfdNOz0DKKZiG5lhqTbUFYP3aYbz9b EdgAHplVvg3NcaL7API35OkJ/XVi432aNIXo X-Google-Smtp-Source: ABdhPJzDcIjGDjTSVrnbAnTqVqokwO02Wee0CqGMD/wxK3uSTO4KwJpU2yebjROPJqbES4Q/mFzARg== X-Received: by 2002:a7b:cb45:: with SMTP id v5mr15531916wmj.184.1631895477213; Fri, 17 Sep 2021 09:17:57 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 08/17] sandbox: Enable MISC support for the SPL build Date: Fri, 17 Sep 2021 10:17:31 -0600 Message-Id: <20210917161741.1275871-9-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present this is always enabled in SPL by virtue of the Makefile condition, which ignores SPL. Add the required config to tidy this up, so it will works with split configs. Signed-off-by: Simon Glass --- configs/sandbox_noinst_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig index 88443f5ab27..b1f3737bb01 100644 --- a/configs/sandbox_noinst_defconfig +++ b/configs/sandbox_noinst_defconfig @@ -131,6 +131,7 @@ CONFIG_LED_GPIO=y CONFIG_DM_MAILBOX=y CONFIG_SANDBOX_MBOX=y CONFIG_MISC=y +CONFIG_SPL_MISC=y CONFIG_CROS_EC=y CONFIG_CROS_EC_I2C=y CONFIG_CROS_EC_LPC=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index 77dd83cf6fd..1e54edf66ac 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -133,6 +133,7 @@ CONFIG_LED_GPIO=y CONFIG_DM_MAILBOX=y CONFIG_SANDBOX_MBOX=y CONFIG_MISC=y +CONFIG_SPL_MISC=y CONFIG_CROS_EC=y CONFIG_CROS_EC_I2C=y CONFIG_CROS_EC_LPC=y From patchwork Fri Sep 17 16:17:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529492 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=bLR9EGlH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zgg1s3Kz9sVw for ; Sat, 18 Sep 2021 02:19:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F4898327E; Fri, 17 Sep 2021 18:19:06 +0200 (CEST) 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="bLR9EGlH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB2EA83222; Fri, 17 Sep 2021 18:18:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 16CD983255 for ; Fri, 17 Sep 2021 18:17:59 +0200 (CEST) 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-wr1-x42b.google.com with SMTP id u15so16050188wru.6 for ; Fri, 17 Sep 2021 09:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VwQ4h1RvOxlaZWcLvq03ad1bU+HR2aH1F8UiqL4pLxA=; b=bLR9EGlHvqNpU07ffprnPOSsytdIa5ybcOKMTWp/gvCYoDhq/B8Llr+gQrz8JduyRs glPWGJgU/ncxR5JebxB1ZxxynKv/oVpzwb3j4U1ID+YKIMjX35JchTff6XNnvG1sa4ZF yUs/2j0Ls5H3jSsCau4UPTNqESRAFQF5Zs9SU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VwQ4h1RvOxlaZWcLvq03ad1bU+HR2aH1F8UiqL4pLxA=; b=HNRq0KMXvidnuLk4blKEC1E/g07Q7GcnSSqxNpMpGEo7cElZZFC4uKAZKj1nNmOxmu 2FGR968yjrJZ4Q3Ym1wUYrAMSE7antnskyE6PNeSLl1qz7XrA4M1ZsKfCIfoxEzNiofg iz2RQ3iSS6oiU9O5pLv3A8qxCq5gmJBWI4wIwEi6YRE+6fonc8IPgySPV4E8SHOv9c2R kFQfNRZucQ+Gqx6STbZyDPCzcy5CzwT4mTcnddU168Cp63qee+fCRCZ+Zj7W9qy4/Jjp J6JfRG1M13s73hvd2ltqtUjh2Gr6Eohko0FVBZr+T2l5wjaj3knWNYtG6LZsSgPZoElo 0+MA== X-Gm-Message-State: AOAM532BD6yTPSzQJlUcHU/BzF7jiQKWw9gpDClUtbl1IwP/YuQIrkuy LCi2A1iGihdZy3hNQXTX+ceLSLkKMxyqVbEY X-Google-Smtp-Source: ABdhPJwqEOFl6imS79KrG65iud9O36ez+1rF0NaRkIiwXNEb2gIjAfJyQdqf/g9zpC5HtjMMHRelIQ== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr13032467wrw.122.1631895478346; Fri, 17 Sep 2021 09:17:58 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 09/17] serial: Tidy up the Makefile condition for DM_SERIAL Date: Fri, 17 Sep 2021 10:17:32 -0600 Message-Id: <20210917161741.1275871-10-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean There is no need to check for SPL/TPL build again as the 'ifdef' above does this already. Drop it, so that the build rule works with split configs. Signed-off-by: Simon Glass --- drivers/serial/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 3cbea8156f8..4b723faf79b 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -5,7 +5,7 @@ ifdef CONFIG_SPL_BUILD -ifeq ($(CONFIG_$(SPL_TPL_)BUILD)$(CONFIG_$(SPL_TPL_)DM_SERIAL),yy) +ifeq ($(CONFIG_$(SPL_TPL_)DM_SERIAL),y) obj-y += serial-uclass.o else obj-y += serial.o From patchwork Fri Sep 17 16:17:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529496 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=CpwoiMJJ; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zhd5BSFz9sVw for ; Sat, 18 Sep 2021 02:20:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6A8983296; Fri, 17 Sep 2021 18:19:45 +0200 (CEST) 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="CpwoiMJJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C81E883223; Fri, 17 Sep 2021 18:18:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 5C9D283221 for ; Fri, 17 Sep 2021 18:18:00 +0200 (CEST) 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-wr1-x42c.google.com with SMTP id g16so16048253wrb.3 for ; Fri, 17 Sep 2021 09:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DusockvPoEoMscGbhpHKdF0TbGj9MYJhkOPvYLxr0G4=; b=CpwoiMJJ+V1ytREmWA+O2WrFsndjlX10uRgzVaAeGmvnii2ZKI/RVMqdpAPe/taHYf Mdo8B8wFnhA+uVP4wCDen/Bf7unF9bml5ZIiaouTARPs/eBL3ONMQlbBHtdkk5uBwGOM KlB7m3+wWAtYxUfcjnR+riYYaz+cjmz7vcYts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DusockvPoEoMscGbhpHKdF0TbGj9MYJhkOPvYLxr0G4=; b=8LR6gMgC2CVmUka92N+GKZO+b08y25TAZlmjHhUwJz/cfdJl0FIQaTU9vETdDTRsfw vqUBU4dt7VZL3Or4z2QbqUNeTJEUO5QWGNxDd5uZVFqhvEWVuSMiYYe5UJF6mU+YCXV5 0WFQvFb+KKYq5eCLsQvbPQrYw13t1uTH6Q2p47LnjIxOS5WQVQ5azM7tZfhYw0B0jA8u XG2suFvZEpXpHp8VfNEnLTX3DivLuPg1DbJ2IOgV8YrttUAvvsiKdcr3LHCXF/U8tt4y BvlIcL1LWrhRW3KvQ3q0R2/gixJv7y6K8djZNC6WQnFCcRFAeRerVjS78Y2XJiGBsbim CvYA== X-Gm-Message-State: AOAM530hM3ljSSeLR3BW18anfOlphEOYUeWbg++18bhRrYMw71MC2ZPZ K62f8dYkyGYLR2vrq7e6wSBAQpEiQT/s7lIh X-Google-Smtp-Source: ABdhPJzQ0uml8T+L3RAJVR1z5nseYIP9rnej28H3icHOpZYwT3M0HpTrg7zTp8+g5H/3L61bN6mLIw== X-Received: by 2002:a5d:4d0d:: with SMTP id z13mr13316524wrt.267.1631895479327; Fri, 17 Sep 2021 09:17:59 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 10/17] virtio: Add SPL Kconfig for virtio Date: Fri, 17 Sep 2021 10:17:33 -0600 Message-Id: <20210917161741.1275871-11-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean At present we rely on this not existing to avoid building virtio for SPL. But with the new split configs this does not work. Add a separate Kconfig instead. Signed-off-by: Simon Glass --- drivers/virtio/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 863c3fbe029..2ac98edff58 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -22,6 +22,12 @@ config VIRTIO This option is selected by any driver which implements the virtio transport, such as CONFIG_VIRTIO_MMIO or CONFIG_VIRTIO_PCI. +config SPL_VIRTIO + bool + help + This option is selected by any driver which implements the virtio + transport, such as CONFIG_VIRTIO_MMIO or CONFIG_VIRTIO_PCI. + config VIRTIO_MMIO bool "Platform bus driver for memory mapped virtio devices" select VIRTIO From patchwork Fri Sep 17 16:17:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529494 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=XVoBeB8l; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zhD68Wbz9sW4 for ; Sat, 18 Sep 2021 02:20:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C52F5832AD; Fri, 17 Sep 2021 18:19:15 +0200 (CEST) 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="XVoBeB8l"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 382658328E; Fri, 17 Sep 2021 18:18:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 5E4FD8324A for ; Fri, 17 Sep 2021 18:18:01 +0200 (CEST) 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-wr1-x42a.google.com with SMTP id w17so7888511wrv.10 for ; Fri, 17 Sep 2021 09:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bgwvJ0JiahuSZkatMYlE3OedmrY9v8y1TY3mJE2y+eM=; b=XVoBeB8lg4RYfJ9VI6y3QDUDC2w5rsCNymHu0VGMW6tQZfl+WVTh8sNu5DCfySJ/qg dHgzyvTTkZZBJj5uGo3qpMPu763J4fzgy909iD55GD2c2vuAC1xPb0CZOKvdvVx1DxXG YbFB34vfTw08xbWkCWxWeSnFrpTcuuGxkVZII= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bgwvJ0JiahuSZkatMYlE3OedmrY9v8y1TY3mJE2y+eM=; b=d1nMnGvEqp75EiZG3IzzZhrdMAA9bVHGxI5HrTm3KpGPElv6JsySqZnKMrZQsHNQzk r1YaB0L8rhDcLPaSm/FqGNqWwvk/cv/F505nGgwR84DGJEFzTf8HsXaLLefyJznmwpN1 sMHyCrjbnlifkmz6qawA+vlIP47DUjxWsSSwbkIzlMTdcWG/R1BvZmyi/JOgld5VBldY 8L7C+1132ljkgpqR0rezSJMnU+uXAHha6NZvIUOczWIi7C3LylxYb5z+PKkutdOLS35V e4oe2hoPKyoRXf5m0dSfPlC4pLW+4nnn22kb5RxPzdp8SCfr7DkOmGDUR2tms4LdCDvg FTVA== X-Gm-Message-State: AOAM530kKYBG1GH0MUJkMJEmxL9h/izv01FR0Nj9Kb7+Q59AtCP5GP2i BIlIbyqB2dsxH4aTwl3MYqZRn/chZH95/viC X-Google-Smtp-Source: ABdhPJyPttUlkGJNDDrDB2aUAcRyr8WVGylmy7OIzk64vZen1GaJy6V3zSHX1kIBXj4kXPVkuCqOvw== X-Received: by 2002:adf:ef07:: with SMTP id e7mr13293275wro.56.1631895480349; Fri, 17 Sep 2021 09:18:00 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:17:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 11/17] kconfig: Refactor code into separate writer functions Date: Fri, 17 Sep 2021 10:17:34 -0600 Message-Id: <20210917161741.1275871-12-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 Fri Sep 17 16:17:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529499 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=IQl4ywCe; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zjH6ySCz9sVw for ; Sat, 18 Sep 2021 02:21:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BFFA832CA; Fri, 17 Sep 2021 18:20:00 +0200 (CEST) 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="IQl4ywCe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 408F883246; Fri, 17 Sep 2021 18:18:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1915A831FD for ; Fri, 17 Sep 2021 18:18:03 +0200 (CEST) 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-wr1-x42e.google.com with SMTP id w17so7888632wrv.10 for ; Fri, 17 Sep 2021 09:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VXgRloAy5ECXQEaaZMSe07bSUIbr0fjjf2TjR+bYJ/0=; b=IQl4ywCeEAYBxOV/KFkJzXN29N5/Q6lZPJYzLXUxjRXCT4Fuj5lLpBlS4dmfaL/d93 gsm+1HCD4TsfuFj5rzVk2SWwS9eISb8HtkyFyX5lSLqbL4udS+CnO9LmOkOLJuygEzmR iP6pxlfTQMjdL/1bEnH1Azfhw2ccf7JeG4U/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VXgRloAy5ECXQEaaZMSe07bSUIbr0fjjf2TjR+bYJ/0=; b=szdPeqBg22HHbGtOZ4t1OHwDOHX0fdlfM8ZQy3oMQ4CGCq7c80+HImVMepR4w+Ohax tqd8+XpMpwR0RrEi1NTBNvXPIYSua7Jx0s7kSlMOMtWpbT5aCaWyfPUp5HlJve1VbmyO P/U4Q/6hj/zCvroh13uJfYVyM094i+J0kvS9OFTMP7zh3aCie/EXAViIz6g7WNCiFBtD 90Zox68NI74cQjn6ds58NQz0k0SLZBBdAzgNN+CEkhCEtMC+CdrfUmAaa9NYo+rCo1uX OXrSeVU3iLzi8WQTwDdKvSpK4Y59Taum+muai+/kMTPP/lU2RZvYVBohXn+qd6jDxHJ4 L6bw== X-Gm-Message-State: AOAM531AECkS9AS6vEF7ggTV+XDxHMrEPBQl+6bIRYYvJc8i0O38GE6f MygQLqNG8H7F1hUAyTP3z8hwBnjJyr3gd1Xh X-Google-Smtp-Source: ABdhPJzsKDm1AIi4dnpdV3a9dV2dysoo/91LFTHLkKvA6aNzSNeG73mV+u75bj7mgclEj1RmXF+OAA== X-Received: by 2002:a05:6000:1b8d:: with SMTP id r13mr13358003wru.230.1631895481870; Fri, 17 Sep 2021 09:18:01 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:01 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 12/17] kconfig: Support writing separate SPL files Date: Fri, 17 Sep 2021 10:17:35 -0600 Message-Id: <20210917161741.1275871-13-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 | 4 + scripts/kconfig/confdata.c | 229 ++++++++++++++++++++++++++++++++++++- 2 files changed, 231 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 376f796f674..0104180817e 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -684,6 +684,10 @@ int main(int ac, char **av) break; } + /* U-Boot: Mark SPL symbols */ + if (sync_kconfig) + conf_mark_spl_symbols(); + 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..5b6bf927a7a 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 2 + +/* + * 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"}; + /* return true if 'path' exists, false otherwise */ static bool is_present(const char *path) { @@ -571,11 +580,77 @@ 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 */ + 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; +} + +/* + * Kconfig configuration printer for SPL + * + * 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; + + print_makefile_sym(fp, name, sym->type, value, false); + print_makefile_sym(fp, sym->name, sym->type, value, false); +} + +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 +726,35 @@ 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 (!(sym->flags & (SYMBOL_SPL | SYMBOL_HAS_SPL))) { + /* This symbol cannot be used by CONFIG_IS_ENABLED() */ + fprintf(fp, "#define %s%s_nospl 1\n", CONFIG_, name); + } + + print_header_sym(fp, name, sym->type, value); + 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 +1131,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 +1159,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 +1215,22 @@ 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++) { + conf_write_symbol(out_spl[spl], sym, + &spl_kconfig_printer_cb, + (void *)(long)spl); + + 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 +1240,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 +1506,48 @@ 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; + else + sym->flags |= SYMBOL_SPL_ONLY; + } + } +} + From patchwork Fri Sep 17 16:17:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529493 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=ZpngYqn9; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zgw0Cljz9sVw for ; Sat, 18 Sep 2021 02:20:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 928B38329D; Fri, 17 Sep 2021 18:19:10 +0200 (CEST) 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="ZpngYqn9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 537B783222; Fri, 17 Sep 2021 18:18:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 1597C8325E for ; Fri, 17 Sep 2021 18:18:04 +0200 (CEST) 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-wm1-x329.google.com with SMTP id e26so7769503wmk.2 for ; Fri, 17 Sep 2021 09:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fa/IjOFOHXKq5wEz4w2N3Ye6B9FM5qrzpxkh5Al1tYU=; b=ZpngYqn9HyATCTM0LWlC0+u0lMKkEnrkNwfK5azISug6dIcWCIA7wVKwRUdmon1Cmv yPF8O1vbh16z2m4t4BtFMt+kMYw3MqOKZdfMEQrcuMGhkHcvkW+uYeOW08IriYOTP40z EmgaRs1cHhfHFRXa2d4XEmy07J9/gTZvKk5SY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fa/IjOFOHXKq5wEz4w2N3Ye6B9FM5qrzpxkh5Al1tYU=; b=A++ayUMV5IjtBDG1x2sRo/uuGvE8NO82zOTVJIG8VfjGf2wyHkhuHEMpCGAQI2wcvQ 0oP3BhUMWd4GG8H00K133fMp+sjqMV193uLbSXr1ZkNsxNkaGqPWQfKxtBO+DZdvIObi GLISI8cyjtxJcDHpSNi086nZBfdrLfaD4YJE60Lwk3G/eBiz/OaJSQCHhonmFXklkEAd AvFKpV+jgJrQdHNn++y0cBoE1bu9uaoSMq5Gn79MupBwn1ljeBw4R8b1DVTAC/TgFHUr 8VDHBrlgB+FnoizAupKTe4kvwLJyPpxLHdy0DXGEz8dSQ4WeQPp/H/fPf4CWCLlJFEzi Dfww== X-Gm-Message-State: AOAM530cWnFBuFED18VN8tYvu3YlXDdSa5erXEnJVPH8Fe5zMDR4eHGS hF36ToYqRrXACx2bfprN+UKoHJEQSmbiSuCS X-Google-Smtp-Source: ABdhPJyjuliM6yAtYYIvtFjb2vLnS8XHhBlBQWdXcCaHg0W63qsIrxXwaeucM5xp8ymZkMmXUypd2A== X-Received: by 2002:a1c:2705:: with SMTP id n5mr15820884wmn.176.1631895483097; Fri, 17 Sep 2021 09:18:03 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 13/17] Makefile: Include the config for the phase being built Date: Fri, 17 Sep 2021 10:17:36 -0600 Message-Id: <20210917161741.1275871-14-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 | 10 +++++++++- scripts/Makefile.spl | 8 +++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3014788e14e..0bf846b5640 100644 --- a/Makefile +++ b/Makefile @@ -581,8 +581,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_SPL_BUILD +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif +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 5df8f61aa58..aaa960b51ce 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -40,9 +40,17 @@ 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),spl) +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif + -include $(prefix)/include/autoconf.mk include scripts/Makefile.uncmd_spl diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 25a3e7fa52e..02dd85b8e1c 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -19,9 +19,15 @@ _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 +-include include/config/auto_spl.conf +endif + UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD From patchwork Fri Sep 17 16:17:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529495 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=ShA7zTMr; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zhP5Swxz9sVw for ; Sat, 18 Sep 2021 02:20:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B63F83238; Fri, 17 Sep 2021 18:19:42 +0200 (CEST) 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="ShA7zTMr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3000883224; Fri, 17 Sep 2021 18:18:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 45AF483261 for ; Fri, 17 Sep 2021 18:18:05 +0200 (CEST) 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-wr1-x431.google.com with SMTP id i23so16086701wrb.2 for ; Fri, 17 Sep 2021 09:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BpI7yxzt9wFrCPpIvN2WTogG5kwJq7qFKAWTvRX0bOo=; b=ShA7zTMruukBKYUSl4nhHGd3v/I5EzUF3fam6HlTHl1X/cChaKAARd7o1cl+xl9Xe8 cwKWuSsSzrgeZlQ8X/TD65EdRFemTnjboCOHxVbUxui3Ru/LK6DEvgx49rF38HFPSy1q t703sIGN1JaaNw5nYhzFTORZZBYj2N0U3lzkU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BpI7yxzt9wFrCPpIvN2WTogG5kwJq7qFKAWTvRX0bOo=; b=cWwcFSlLdwGe6Jd8gJz9iNxLRJA/BOMeAjzVC38IxsEe2lmPfU1L6d9HL2U6uDAf/T Eikovtly7NvDchUsIL4AIL8p/Ufsn0U6nf0k3oBu6+TIQrveaEjfySgMeoBtO40RiW25 Yp4i9sfTAV+othVMo5AakSEyG7FtjY9RKM3odscz+kQN/AbzC38Wn+q9rkPsxl47drbz 0DrIdYVbV/3VV0dcO0DV0oGA6+z0zTQ15Kvq5ed1IH6Q0STpIKhZ2b5GTNvsgaScUEE7 tr5t7mWvWDGXJLi7MAFK714/WeQTcZgT/DUxdhKYS209XfEy23OuKs6utvcLxgOveUy8 smaA== X-Gm-Message-State: AOAM530OZVfxqJCWzigUQ1PzXWYcDGmc/t5QsE8j5Or8f8FDrVu6g26D aSajr/IyclFBb3IRgDpvD5NFxulXSyHApvQK X-Google-Smtp-Source: ABdhPJynQJSNVl7L2bAtx5vt9p5kfaIw3aduvewjQF5H/EJIO1WqIzlOvRD8VTu81rhCt4j0302PiA== X-Received: by 2002:a05:6000:1090:: with SMTP id y16mr348718wrw.208.1631895484366; Fri, 17 Sep 2021 09:18:04 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 14/17] Makefile: Use empty SPL_ and SPL_TPL_ vars Date: Fri, 17 Sep 2021 10:17:37 -0600 Message-Id: <20210917161741.1275871-15-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 | 17 +++++++++++++---- scripts/Makefile.spl | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index a745cc4fccd..90444d38f89 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -319,14 +319,23 @@ endif # do not delete intermediate files automatically .SECONDARY: +# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in +# Makefiles + +# For compatibility with ad-hoc CONFIG options, provide xSPL_ and xSPL_TPL_ +# which maintain the old behaviour. The is just for illustration purposes, +# since it is better to wait until all CONFIGs are migrated. ifdef CONFIG_SPL_BUILD -SPL_ := SPL_ +xSPL_ := SPL_ ifeq ($(CONFIG_TPL_BUILD),y) -SPL_TPL_ := TPL_ +xSPL_TPL_ := TPL_ else -SPL_TPL_ := SPL_ +xSPL_TPL_ := SPL_ endif else +xSPL_ := +xSPL_TPL_ := +endif + SPL_ := SPL_TPL_ := -endif diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 02dd85b8e1c..a6705efcf07 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -45,17 +45,26 @@ endif export SPL_NAME +# The SPL_ and SPL_TPL_ vars resolve to nothing so they can be used in +# Makefiles + +# For compatibility with ad-hoc CONFIG options, provide xSPL_ and xSPL_TPL_ +# which maintain the old behaviour. The is just for illustration purposes, +# since it is better to wait until all CONFIGs are migrated. ifdef CONFIG_SPL_BUILD -SPL_ := SPL_ +xSPL_ := SPL_ ifeq ($(CONFIG_TPL_BUILD),y) -SPL_TPL_ := TPL_ +xSPL_TPL_ := TPL_ else -SPL_TPL_ := SPL_ +xSPL_TPL_ := SPL_ endif else +xSPL_ := +xSPL_TPL_ := +endif + SPL_ := SPL_TPL_ := -endif ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl) $(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL) From patchwork Fri Sep 17 16:17:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529500 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=YKoxF7pK; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zjX0HC2z9sW4 for ; Sat, 18 Sep 2021 02:21:36 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 12E19832D0; Fri, 17 Sep 2021 18:20:13 +0200 (CEST) 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="YKoxF7pK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C856183224; Fri, 17 Sep 2021 18:18:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 873E383267 for ; Fri, 17 Sep 2021 18:18:06 +0200 (CEST) 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-wr1-x42c.google.com with SMTP id t8so16059803wrq.4 for ; Fri, 17 Sep 2021 09:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fJf+l6HUiT4fQvC2dhbnrNmfsF1EX4UTmQGKzvbUwfo=; b=YKoxF7pKJbP1XnoimuOKV1ueWfuXOCNoKoLe9im1JmyBDFMQm5JnT4HlQD9eSlg6nb 6woBvYAswEc3P1rR67ssKEQ6AjmbD+etcJOh0nt8HmBoOhMkyUK47pOJwve6DFv9TrqN Ce/0IK4GleTty8IW4fARqo4xcZtbEntSrTDVE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fJf+l6HUiT4fQvC2dhbnrNmfsF1EX4UTmQGKzvbUwfo=; b=e1oPeqxBpUg0qsPxiOPNWbZoMrN3WhNEDVuMhAtlUnNqDqYresmqKLA2H23DFF5uqV tmR3x5234hUCNnZiVuiGL7B8HkQfrRy8Laplh+kNv3OsjIkZFda9u7lOdiqtMoHXnGiN z+TSR5iF6cae1dqgVxHXXnrqvjWxLChr9ilvtQknrhqle1+XqPUFCZ12eLyFLifnPBK7 vwk1gyz5pEfkTMaSMBSWNqi8moczlDko3NW8rXjFUiC5pTru6MKbTNeoIyfczNAxz+AF pQRZtKU2Vpr//FleuZyLfvEXuLDdxV3HCveEA/zSOUeK96ybBFZqhvDGZPMPqb4aGSil dOHw== X-Gm-Message-State: AOAM533xUd155riILucGWELxHtCkXoJ/qXusg4Rg2ieRoKsE8w7q6imt 8g3ItZLwEQ1sfcgmkCNTw4SA13d/MxE6bfmx X-Google-Smtp-Source: ABdhPJzS9XdQvqo7jHAAtKdsQFRGpqC73XUgyAHRdGxpOgQHhr5T5nXf/RgHf3930ZRrT3dc+/DRKQ== X-Received: by 2002:a05:6000:181:: with SMTP id p1mr13418903wrx.247.1631895485574; Fri, 17 Sep 2021 09:18:05 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 15/17] Makefile: Support ad-hoc COMFIX_SPL_IMAGE_SIZE et al Date: Fri, 17 Sep 2021 10:17:38 -0600 Message-Id: <20210917161741.1275871-16-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Ad-hoc CONFIGs are not supported by the new split-config mechanism. Use the provided work-around for these symbols, just to show the mechanism. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index a6705efcf07..8baf8478f64 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -198,11 +198,11 @@ LDPPFLAGS += \ # Turn various CONFIG symbols into IMAGE symbols for easy reuse of # the scripts between SPL and TPL. -ifneq ($(CONFIG_$(SPL_TPL_)MAX_SIZE),) -LDPPFLAGS += -DIMAGE_MAX_SIZE=$(CONFIG_$(SPL_TPL_)MAX_SIZE) +ifneq ($(CONFIG_$(xSPL_TPL_)MAX_SIZE),) +LDPPFLAGS += -DIMAGE_MAX_SIZE=$(CONFIG_$(xSPL_TPL_)MAX_SIZE) endif -ifneq ($(CONFIG_$(SPL_TPL_)TEXT_BASE),) -LDPPFLAGS += -DIMAGE_TEXT_BASE=$(CONFIG_$(SPL_TPL_)TEXT_BASE) +ifneq ($(CONFIG_$(xSPL_TPL_)TEXT_BASE),) +LDPPFLAGS += -DIMAGE_TEXT_BASE=$(CONFIG_$(xSPL_TPL_)TEXT_BASE) endif MKIMAGEOUTPUT ?= /dev/null From patchwork Fri Sep 17 16:17:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529497 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=VDC2Wz4i; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zhr6F1rz9sVw for ; Sat, 18 Sep 2021 02:21:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9CF07832C7; Fri, 17 Sep 2021 18:19:49 +0200 (CEST) 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="VDC2Wz4i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 41DE88320D; Fri, 17 Sep 2021 18:18:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 9C66E83270 for ; Fri, 17 Sep 2021 18:18:07 +0200 (CEST) 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-wr1-x429.google.com with SMTP id u15so16050778wru.6 for ; Fri, 17 Sep 2021 09:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aVx83BgrXAUXUYtyzDB0nQajWWUcPjvAYvlmv6ckgXw=; b=VDC2Wz4iqpjSodaDdDeeH3CR6eE0DhB+80nJ0xoCFgLJAIPgqkkmcB3p2DFh1108vy +AKwA/lET4y5J+fxjPN8m4PDbebpDJ4KNjIl1pzA2Kx15lKgIAtAT0LoNeE3oBNKPxhg NAyB49H5x/7bo/SN1a+T7N/Y478z9NUe9xshw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aVx83BgrXAUXUYtyzDB0nQajWWUcPjvAYvlmv6ckgXw=; b=Mhe8lmyH13j9yN4jPcb0l0hVbrjVnPKQtjGwb4I00oaemH/OiLHxcIK0mg5cgE40nq R08cht/9FAZudNyjpO4sc7ev/xb4OphW61t+wyuzv5mqaWa608MpXOClk3Ewir8klaQj jeQo/7ja7X9D4EmeixOJZHR/uUElKAVGKftFkpFCaW97tgKjhfN1QvXnIAoVnvUeZeuL Uati4CDNQ8oqDDyiLRuYTzd1YO/dKLnoKRRDWmmjvDThW5GSEtRkrE3yWBcFO5/b26mL +9Zn325mkz2L501Prew7jZBOQPTjiXLzCmc3bH+4DkLgjLJQ0uufgv5wJ9WLXS0SM+6z KAXw== X-Gm-Message-State: AOAM5301VS56wzcTSOoVU6ou3r9dl0t1OYTzKiN/tDWkTgOLOsycTSD1 GakuhyZwLD4FCYYnQplUQG5LJCGf6dGYBzas X-Google-Smtp-Source: ABdhPJy1G2eGB1f7KWcuGLE5PgbuX4GTBSXCD4K31zUQXxmjSFFkW46pXSsTFv52vvGbffE3ar8PgQ== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr13033402wrw.122.1631895486759; Fri, 17 Sep 2021 09:18:06 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 16/17] kconfig: Update CONFIG_IS_ENABLED() for split files Date: Fri, 17 Sep 2021 10:17:39 -0600 Message-Id: <20210917161741.1275871-17-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 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 | 87 ++++++++++++----------------------------- 1 file changed, 24 insertions(+), 63 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index d109ed3119e..e6b0f238ec4 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -1,7 +1,13 @@ #ifndef __LINUX_KCONFIG_H #define __LINUX_KCONFIG_H +#ifdef CONFIG_TPL_BUILD +#include +#elif defined(CONFIG_SPL_BUILD) +#include +#else #include +#endif /* * Helper macros to use CONFIG_ options in C/CPP expressions. Note that @@ -31,29 +37,29 @@ (config_enabled(option)) /* - * U-Boot add-on: Helper macros to reference to different macros - * (CONFIG_ or CONFIG_SPL_ prefixed), depending on the build context. + * 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. */ -#if defined(CONFIG_TPL_BUILD) -#define _CONFIG_PREFIX TPL_ -#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 +#define __config_is_enabled(cfg) (IS_ENABLED(CONFIG_ ## cfg ## _nospl) ? \ + !IS_ENABLED(CONFIG_SPL_BUILD) : \ + config_enabled(CONFIG_ ## cfg)) /* - * CONFIG_VAL(FOO) evaluates to the value of - * 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_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. */ -#define CONFIG_VAL(option) config_val(option) +#define CONFIG_IS_ENABLED(option) __config_is_enabled(option) + +#define __config_val(cfg) CONFIG_ ## cfg + +#define CONFIG_VAL(option) __config_val(option) /* * Count number of arguments to a variadic macro. Currently only need @@ -62,49 +68,4 @@ #define __arg6(a1, a2, a3, a4, a5, a6, ...) a6 #define __count_args(...) __arg6(dummy, ##__VA_ARGS__, 4, 3, 2, 1, 0) -#define __concat(a, b) ___concat(a, b) -#define ___concat(a, b) a ## b - -#define __unwrap(...) __VA_ARGS__ -#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) \ - __concat(__unwrap, config_enabled(CONFIG_VAL(option))) (case1, case0) - -/* - * CONFIG_IS_ENABLED(FOO) expands to - * 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, (abc)) expands to - * 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. - * - * CONFIG_IS_ENABLED(FOO, (abc), (def)) expands to - * 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. - * - * 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"},)) - * - * which adds an entry to the array being defined if CONFIG_ACME (or - * CONFIG_SPL_ACME/CONFIG_TPL_ACME, depending on build context) is - * set, and nothing otherwise. - */ - -#define CONFIG_IS_ENABLED(option, ...) \ - __concat(__CONFIG_IS_ENABLED_, __count_args(option, ##__VA_ARGS__)) (option, ##__VA_ARGS__) - - #endif /* __LINUX_KCONFIG_H */ From patchwork Fri Sep 17 16:17:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529498 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: 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=DGiprITN; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zj459DHz9sVw for ; Sat, 18 Sep 2021 02:21:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 212EC832CE; Fri, 17 Sep 2021 18:19:52 +0200 (CEST) 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="DGiprITN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D940283224; Fri, 17 Sep 2021 18:18:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 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-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 C93A98328D for ; Fri, 17 Sep 2021 18:18:08 +0200 (CEST) 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-wr1-x434.google.com with SMTP id d6so15990285wrc.11 for ; Fri, 17 Sep 2021 09:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xyd3QmeaLqfCWAh13SnncyeM5fTjn8ErhSlENABwfhE=; b=DGiprITNZI0wJZRhrIjVQbapX5+21CyxQ5RE6BggxBJWsl0N45HVngBbLWIG2Hh6SW w5KLZY1dvj9Ob1+ceHm4D4biso7hidISDpEhmQLVOMi5xfdCvkEEiWqUcfdPhA97Z0xZ i37136UiWjlZYdgTVAf6EZelhwnyAcjNokCu8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xyd3QmeaLqfCWAh13SnncyeM5fTjn8ErhSlENABwfhE=; b=zJ6qEldfz2g2ogXImqqnaj7VL201lHNx9lqHJNMIc0QMIoLi4mNWqh6pbNGqFvTGe4 tzKny//o6RikuEmZgChHMT0aOCOUbdpLFZCtk1FkJO2nQpfn8o83aMyS3Ip1FvxbYmP5 3SHKVPxnKetvwj4+D93seV0bt1a7EtAEIt7vTYK3Jn2P/smm1UN3xoMQ1BzW6izfsqmO /TC+IRVLo82+6SxYUnMO0DcCUkQ1Tj4zo2tiLY3OTSi8sNB6TLx0+HxJDzbQZ0Vo90bF CcLEPIFPhu1uxtNLc/hrxx3QJg8n21jdnYF/qrkUKM5dllS0uBXB1KtlfVfGsirV5GV2 +Cnw== X-Gm-Message-State: AOAM530+WgnWycqF1/BYF9g9BM5SsFBWkyRTj56vjxR6MyifbYEO8W7R NV9fByA8uN5teYNRvU7+GrIqsoS/ZRb27AE8 X-Google-Smtp-Source: ABdhPJzjNgyr4HRqOOsIkDxoxpUZ7tNgNUZXij1c4oQL7q/jYmfVsDcfjTNafPwL9T3j4uxFvmkLnA== X-Received: by 2002:a5d:448d:: with SMTP id j13mr12871238wrq.212.1631895487760; Fri, 17 Sep 2021 09:18:07 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:07 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 17/17] kconfig: Add a new CONFIG() macro Date: Fri, 17 Sep 2021 10:17:40 -0600 Message-Id: <20210917161741.1275871-18-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean It is annoying to have to use IS_ENABLED() and CONFIG_IS_ENABLED(), depending on whether the option being checked has an SPL version. Also we use #ifdef CONFIG_xxx and #if defined(CONFIG_xxx) in some contexts. It would be nice to use a single style consistenty. Add a CONFIG() macro to this end, to check configuration. The argument is the Kconfig name to check, excluding any SPL_/TPL_ prefix, for example: CONFIG(DM) CONFIG(CMD_MISC) CONFIG(OF_PLATDATA) This is just for illustration, but it should be possible to drop IS_ENABLED() and CONFIG_IS_ENABLED(), once migration of ad-hoc CONFIG is complete. The use of #ifdef and defined() can be updated also. Signed-off-by: Simon Glass --- include/linux/kconfig.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index e6b0f238ec4..401341275fe 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -28,14 +28,6 @@ #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0) #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)) - /* * 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 @@ -51,11 +43,11 @@ config_enabled(CONFIG_ ## cfg)) /* - * CONFIG_IS_ENABLED(FOO) returns 1 if CONFIG_FOO is enabled for the phase being + * CONFIG(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. */ -#define CONFIG_IS_ENABLED(option) __config_is_enabled(option) +#define CONFIG(option) __config_is_enabled(option) #define __config_val(cfg) CONFIG_ ## cfg