From patchwork Tue Aug 11 17:23:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1343390 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.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=KdetVtGc; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BR07969dvz9sTX for ; Wed, 12 Aug 2020 03:24:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC79381E6F; Tue, 11 Aug 2020 19:23: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=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="KdetVtGc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 64F3E821B7; Tue, 11 Aug 2020 19:23:53 +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.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) (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 95A77819E8 for ; Tue, 11 Aug 2020 19:23: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=sjg@chromium.org Received: by mail-ot1-x341.google.com with SMTP id z18so10708359otk.6 for ; Tue, 11 Aug 2020 10:23:50 -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=BqFlKbvmVd1JEZLErTWeCl6F3NwgW1wld1LzNtDPWd8=; b=KdetVtGcp9RcDQtuwuKHxfPG++ehSxjF+jdqO22EkHFtXFwX0FioZ9O35RLzWs8BTx uyjyJ4eujkLEzhwktwdHRS9g4B1dLE5lq108tVWjNW0k7JkLlIGJrIXsstmQSsWvt8D1 iMbBOWx6dj8YQ+eDYc0hkn3KonulrA/Jso488= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BqFlKbvmVd1JEZLErTWeCl6F3NwgW1wld1LzNtDPWd8=; b=TsG+erpI5OpchzZZNA49sXzGjhoZ5Z3iER+xV/OsxvtAjTxbnh1Gm5mcyx+re4iaqC HXFwLxb1kfCyHHHIW46xJnc4vueuZqP5KwfpmWHGQy9Wsp111gED+zzZ0xrAsuY2txi6 vx2KQOaTNQt48jwbURiCair38gBmpQZFiSpxDm4+zSz+clmsZ02sfcbEg+9MSLyTdKwg VHsmPxwgaoFa+iD07ZkV5aFoc0xP+dDJX/JGGOW4OjhTDbEGT0hWZBqnKUfjNnA11dJS 6ar7TVx3U1AuW3kAZ/KmLL5fgxNzfr9I6+xOsGsVquDZGVpFU/fw4M9HnQ9hu9M2m7Gm rGDw== X-Gm-Message-State: AOAM530SKL9p716rXtyU/jCgF3bp8Im+xB8da5SajpW0w1bVI1v1/TC1 CtZkNgOuaRHYXvifXD0VWqlKS4LvNghuRw== X-Google-Smtp-Source: ABdhPJz9wryWZr0qLpkTdGCcdOYqVM2dUiFTINEYFP1i10QkM++n8Yrj64jJLA9+CiJyiFbnB/sTRQ== X-Received: by 2002:a9d:7499:: with SMTP id t25mr6244979otk.103.1597166629251; Tue, 11 Aug 2020 10:23:49 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id y15sm1551193oto.60.2020.08.11.10.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 10:23:48 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v2 3/8] Convert CONFIG_SYS_DEVICE_NULLDEV to Kconfig Date: Tue, 11 Aug 2020 11:23:36 -0600 Message-Id: <20200811172342.508792-3-sjg@chromium.org> X-Mailer: git-send-email 2.28.0.236.gb10cc79966-goog In-Reply-To: <20200811172342.508792-2-sjg@chromium.org> References: <20200811172342.508792-2-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.102.3 at phobos.denx.de X-Virus-Status: Clean This converts the following to Kconfig: CONFIG_SYS_DEVICE_NULLDEV Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig | 16 ++++++++++++++++ configs/M5249EVB_defconfig | 1 + configs/colibri_pxa270_defconfig | 1 + doc/README.silent | 2 +- include/configs/M5249EVB.h | 2 -- include/configs/colibri_pxa270.h | 2 -- scripts/config_whitelist.txt | 1 - 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/common/Kconfig b/common/Kconfig index 62d78c5bd73..5a6d0e0e79b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -635,6 +635,22 @@ config SYS_STDIO_DEREGISTER removed (for example a USB keyboard) then this option can be enabled to ensure this is handled correctly. +config SPL_SYS_STDIO_DEREGISTER + bool "Allow deregistering stdio devices in SPL" + help + Generally there is no need to deregister stdio devices since they + are never deactivated. But if a stdio device is used which can be + removed (for example a USB keyboard) then this option can be + enabled to ensure this is handled correctly. This is very rarely + needed in SPL. + +config SYS_DEVICE_NULLDEV + bool "Enable a null device for stdio" + help + Enable creation of a "nulldev" stdio device. This allows silent + operation of the console by setting stdout to "nulldev". Enable + this to use a serial console under board control. + endmenu menu "Logging" diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig index d4871c60c70..8f8a4a6bad5 100644 --- a/configs/M5249EVB_defconfig +++ b/configs/M5249EVB_defconfig @@ -5,6 +5,7 @@ CONFIG_ENV_SECT_SIZE=0x2000 CONFIG_TARGET_M5249EVB=y CONFIG_DEFAULT_DEVICE_TREE="M5249EVB" CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_SYS_DEVICE_NULLDEV=y # CONFIG_DISPLAY_BOARDINFO is not set # CONFIG_CMDLINE_EDITING is not set # CONFIG_AUTOBOOT is not set diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig index 89e05608423..2865730b8ff 100644 --- a/configs/colibri_pxa270_defconfig +++ b/configs/colibri_pxa270_defconfig @@ -10,6 +10,7 @@ CONFIG_ENV_SECT_SIZE=0x40000 CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200" +CONFIG_SYS_DEVICE_NULLDEV=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_CMDLINE_EDITING is not set diff --git a/doc/README.silent b/doc/README.silent index 6d90a0ec403..00288e03b01 100644 --- a/doc/README.silent +++ b/doc/README.silent @@ -19,7 +19,7 @@ The following actions are taken if "silent" is set at boot time: - When the console devices have been initialized, "stdout" and "stderr" are set to "nulldev", so subsequent messages are suppressed automatically. Make sure to enable "nulldev" by - #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file. + enabling CONFIG_SYS_DEVICE_NULLDEV in your board defconfig file. - When booting a linux kernel, the "bootargs" are fixed up so that the argument "console=" will be in the command line, no matter how diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h index de7132940c1..1a1a1107654 100644 --- a/include/configs/M5249EVB.h +++ b/include/configs/M5249EVB.h @@ -31,8 +31,6 @@ */ #undef CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ - #define CONFIG_SYS_LOAD_ADDR 0x200000 /* default load address */ /* diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 4686b8946e3..3dedcdaad28 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -69,8 +69,6 @@ #define CONFIG_BOOTP_BOOTFILESIZE #endif -#define CONFIG_SYS_DEVICE_NULLDEV 1 - /* * Clock Configuration */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 5c6790bd8df..14d5e4c1757 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2117,7 +2117,6 @@ CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS CONFIG_SYS_DEFAULT_VIDEO_MODE CONFIG_SYS_DEF_EEPROM_ADDR -CONFIG_SYS_DEVICE_NULLDEV CONFIG_SYS_DFU_DATA_BUF_SIZE CONFIG_SYS_DFU_MAX_FILE_SIZE CONFIG_SYS_DIAG_ADDR