From patchwork Thu Nov 25 17:16:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 1559827 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=L5WZbJH1; 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4J0PQT5n3xz9s5P for ; Fri, 26 Nov 2021 04:05:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7027283679; Thu, 25 Nov 2021 18:05:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="L5WZbJH1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4FF4835A1; Thu, 25 Nov 2021 18:05:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 E05B4835EA for ; Thu, 25 Nov 2021 18:05:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=loic.poulain@linaro.org Received: by mail-wr1-x42c.google.com with SMTP id j3so13082491wrp.1 for ; Thu, 25 Nov 2021 09:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mCe2k5C0FCJDW/hGDxg/izd2+wYjexkewawiOP5GbNo=; b=L5WZbJH1tuv4xsT5pC3gA+nmmWLP3g/3M0CX2Lxb0yKEnWNSAYp3p73eBekDIcWugY MB3dsh3tpLkb6+vxnXWe1kXz6Nrut0cqPcAA7eXCzoaTW0JwLkDbuUA76hzBZSSRE8x3 /8H3UPP6oZ0Hvog/NEmQ8l7usL5SMQGCuuH2WoEQOhPYmimnsBT9zeeYDUShHUPCv3tB 6oVgRRlLL9akTCSXHtsErqV2k1MqWD7wmhqWN0itq376mFWcKTXEnhJiBOzaah5Ne81e yIwfF9R7k7y7txfAsijuH0uVfgzHCqJ+ZXPzZQC5841OHDYs+3mA5ylXed7fncuQeI8w p+6Q== 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; bh=mCe2k5C0FCJDW/hGDxg/izd2+wYjexkewawiOP5GbNo=; b=PIREK4vXMGd5rJsQ5PS+W8kvfXuLng7YAUtnokEMYEODKvXDtuOQrg9aJxtVNQI8sE hpaZovFK7IjD6UkMoSX1LIPuC7A+nK4sgLv3NercVno/y87wrQ8jbug0uKly+x8lwbfA dAUn56yV1GlRQzR9ZXUwJ98Lj7hl2LGAwWEvmDjv4un+6nN0699zACnVcJPV6bIBSAly bW6DuigAARmakfIlGzWbtLXungUio3jqg9EID8pQgbdtsaQ4gDbB8AsrtCBw+WLAFV24 3OE/l7CbaSF4yO4BwfzQOU1cCcYN2ZO/dUkJj4MAxg3/YTJB6iqNHocdT5tMEm+NWbRB quMA== X-Gm-Message-State: AOAM532mxECTY6EJ37CS1dPqJv4vr9UBtxgTv6IXiBkOGcs+5rm06ERh y0Q5n4Q0O9FLsMqcWkXsNYeKpA== X-Google-Smtp-Source: ABdhPJwbH8NwejLN5WSNbbqwDveF8ipTarBeKW3uqzqNzSw7ljBO527GYFb90IiwZrDsfbvGA7zScA== X-Received: by 2002:a5d:6d86:: with SMTP id l6mr8068952wrs.304.1637859909622; Thu, 25 Nov 2021 09:05:09 -0800 (PST) Received: from localhost.localdomain ([88.160.176.23]) by smtp.gmail.com with ESMTPSA id 8sm7815499wmg.24.2021.11.25.09.05.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Nov 2021 09:05:09 -0800 (PST) From: Loic Poulain To: marex@denx.de Cc: u-boot@lists.denx.de, pali@kernel.org, Loic Poulain Subject: [PATCH v3 1/2] lib/circbuf: Make circbuf selectable symbol Date: Thu, 25 Nov 2021 18:16:14 +0100 Message-Id: <1637860575-19237-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 currenly only used from usbtty driver but make it properly selectable via Kconfig symbol, for future usage. Signed-off-by: Loic Poulain --- v2: no change v3: add symbol description lib/Kconfig | 3 +++ lib/Makefile | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig b/lib/Kconfig index c535147..4c6ac2b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -290,6 +290,9 @@ config TRACE_EARLY_ADDR the size is too small then the message which says the amount of early data being coped will the the same as the +config CIRCBUF + bool "Enable circular buffer support" + source lib/dhry/Kconfig menu "Security support" diff --git a/lib/Makefile b/lib/Makefile index 8ba745f..4daeee2 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -29,7 +29,13 @@ ifneq ($(CONFIG_CHARSET),) obj-y += charset.o endif endif -obj-$(CONFIG_USB_TTY) += circbuf.o + +ifdef CONFIG_USB_TTY +obj-y += circbuf.o +else +obj-$(CONFIG_CIRCBUF) += circbuf.o +endif + obj-y += crc8.o obj-y += crc16.o obj-$(CONFIG_ERRNO_STR) += errno_str.o