From patchwork Wed Aug 23 20:58:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 805173 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xd0Dr50vvz9t38 for ; Thu, 24 Aug 2017 07:00:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 81448C21E7E; Wed, 23 Aug 2017 20:59:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7BA13C21E44; Wed, 23 Aug 2017 20:59:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D31D3C21DAD; Wed, 23 Aug 2017 20:59:21 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 87D06C21C97 for ; Wed, 23 Aug 2017 20:59:21 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 82D9B209D7; Wed, 23 Aug 2017 22:59:20 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.free-electrons.com (Postfix) with ESMTPSA id 36029209C7; Wed, 23 Aug 2017 22:59:10 +0200 (CEST) From: Thomas Petazzoni To: u-boot@lists.denx.de Date: Wed, 23 Aug 2017 22:58:59 +0200 Message-Id: <20170823205906.20933-2-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170823205906.20933-1-thomas.petazzoni@free-electrons.com> References: <20170823205906.20933-1-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [U-Boot] [PATCH 1/8] include/config_fallbacks.h: add default for CONFIG_SYS_CBSIZE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" CONFIG_SYS_CBSIZE contains the buffer size for input for the console. The vast majority of platforms define them to some reasonable value (256, 512 or 1024 bytes), and it is quite annoying to repeat this definition for all platforms while it isn't really HW-related. Therefore, let's provide a sane fallback value in config_fallbacks.h, so that platforms can rely on it instead of having to explicitly define it. We use 1024 when KGDB is enabled, and 256 otherwise, which is what the majority of the platforms are doing. Signed-off-by: Thomas Petazzoni Reviewed-by: Tom Rini --- include/config_fallbacks.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 961a83d..f9461f0 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -71,6 +71,15 @@ #define CONFIG_LIB_RAND #endif +/* Console I/O Buffer Size */ +#ifndef CONFIG_SYS_CBSIZE +#if defined(CONFIG_CMD_KGDB) +#define CONFIG_SYS_CBSIZE 1024 +#else +#define CONFIG_SYS_CBSIZE 256 +#endif +#endif + #ifndef CONFIG_SYS_PBSIZE #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + 128) #endif