From patchwork Sun Nov 20 14:07:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1706885 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=QiHmSLbH; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NFXkH3VNWz23lt for ; Mon, 21 Nov 2022 01:20:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B91485341; Sun, 20 Nov 2022 15:14:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="QiHmSLbH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 325B58548E; Sun, 20 Nov 2022 15:12:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 9D684853A9 for ; Sun, 20 Nov 2022 15:09:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x731.google.com with SMTP id z1so6527612qkl.9 for ; Sun, 20 Nov 2022 06:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uHzMCZMbNaKvfcrUAE5xzgV8acyZ0ATa1g9ssLFgLY8=; b=QiHmSLbHj8GohSxhebsVpkLTvkiJtQzpVehDOWfmlhUCdHE3B3pv17BubH81A18IEQ ZMpeeYSmofgU4aLlOKP/+0BVZ4NAGHApazU3CFpA516MRQenP7W5lknSJ1g36GPWBo6M wjheHzyy7KU0HIRJKS/PHbAFVD11oamjpcDW0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uHzMCZMbNaKvfcrUAE5xzgV8acyZ0ATa1g9ssLFgLY8=; b=3Fyn48Q0pa8ZfpFNPhWCss9BcqavQcpoDb5Dj1rBm5yEJN1mQdhQasG4W2LDb+X2of hjpZW6hJq0XTTdoNH5UNWJvxf0nEpEWwuVm2btVl2s0J49P1L8yyv67kOr9EU8OAxrAJ tqhhoo01SYMgoCEb/d+ZF0/Axuzy+bIgWWV0FlAuvGLCFQJq5jTowmSE1eLphR58w24i kOjPHUIwu0ZmMfJ5XF3TrrpVcYv0L1L2D86eWRnlFnWhUbH/2NPRughOfRCezp6/2EvS 2fp9VaGv4IeWNHYc+YUkf+xFVdQm/YRhBB6KON5bTEuFKaA9PWQQJfBqsEmJFWUIkz3f oDSQ== X-Gm-Message-State: ANoB5plcdhWeGUlpB+fw0XOl3o24d4vHqEuFy6G99B/ITes/Tp/R64mf Tllpwl+4+nKO+GSL/3Bz6fEYCP9cTM1ofg== X-Google-Smtp-Source: AA0mqf5wTK9lIXiAe/mBb5qUUOWgqX/l5nXtAwVFKo5j1HnZ5cImWIaWXnzavJbbpbHRbgi4QUgBDA== X-Received: by 2002:a05:620a:a52:b0:6ec:5107:82fe with SMTP id j18-20020a05620a0a5200b006ec510782femr12992783qka.151.1668953347600; Sun, 20 Nov 2022 06:09:07 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-29a0-035f-b06a-235e.res6.spectrum.com. [2603:6081:7b00:6400:29a0:35f:b06a:235e]) by smtp.gmail.com with ESMTPSA id bk23-20020a05620a1a1700b006ce580c2663sm6387502qkb.35.2022.11.20.06.09.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 06:09:07 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PoC 169/241] global: Migrate CONFIG_SANDBOX_SPI_MAX_CS to CFG Date: Sun, 20 Nov 2022 09:07:59 -0500 Message-Id: <20221120140829.3057894-60-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221120140829.3057894-1-trini@konsulko.com> References: <20221120135520.3057773-4-trini@konsulko.com> <20221120140829.3057894-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Tom Rini --- arch/sandbox/include/asm/config.h | 4 ++-- arch/sandbox/include/asm/state.h | 2 +- drivers/spi/sandbox_spi.c | 2 +- scripts/config_whitelist.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/sandbox/include/asm/config.h b/arch/sandbox/include/asm/config.h index 36833987330c..2ffe94f10bc8 100644 --- a/arch/sandbox/include/asm/config.h +++ b/arch/sandbox/include/asm/config.h @@ -12,8 +12,8 @@ #ifndef CFG_SANDBOX_SPI_MAX_BUS #define CFG_SANDBOX_SPI_MAX_BUS 1 #endif -#ifndef CONFIG_SANDBOX_SPI_MAX_CS -#define CONFIG_SANDBOX_SPI_MAX_CS 10 +#ifndef CFG_SANDBOX_SPI_MAX_CS +#define CFG_SANDBOX_SPI_MAX_CS 10 #endif #endif diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index ada85be5cb1a..e99a7d04e8da 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -99,7 +99,7 @@ struct sandbox_state { /* Pointer to information for each SPI bus/cs */ struct sandbox_spi_info spi[CFG_SANDBOX_SPI_MAX_BUS] - [CONFIG_SANDBOX_SPI_MAX_CS]; + [CFG_SANDBOX_SPI_MAX_CS]; /* Information about Watchdog */ struct sandbox_wdt_info wdt; diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c index 0c645904da14..0065a5c65755 100644 --- a/drivers/spi/sandbox_spi.c +++ b/drivers/spi/sandbox_spi.c @@ -90,7 +90,7 @@ static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen, busnum = dev_seq(bus); cs = spi_chip_select(slave); if (busnum >= CFG_SANDBOX_SPI_MAX_BUS || - cs >= CONFIG_SANDBOX_SPI_MAX_CS) { + cs >= CFG_SANDBOX_SPI_MAX_CS) { printf("%s: busnum=%u, cs=%u: out of range\n", __func__, busnum, cs); return -ENOENT; diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 815d8f8f12ba..7af096ee8f63 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -178,7 +178,7 @@ CFG_ROCKCHIP_SDHCI_MAX_FREQ CFG_ROOTPATH CFG_SANDBOX_ARCH CFG_SANDBOX_SPI_MAX_BUS -CONFIG_SANDBOX_SPI_MAX_CS +CFG_SANDBOX_SPI_MAX_CS CONFIG_SAR2_REG CONFIG_SAR_REG CONFIG_SCIF_A