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: 519671 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp1129337imj; Thu, 25 Nov 2021 09:05:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxUCWj47aLBJWOYKTMWhm2+L7YS40g6t30HU4c4zqo4a+wh+DAa5R6iacZqNRB9hQm9Sty X-Received: by 2002:aa7:dc07:: with SMTP id b7mr40447061edu.327.1637859935553; Thu, 25 Nov 2021 09:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637859935; cv=none; d=google.com; s=arc-20160816; b=z/seTzmDYvr7KqBJ8LGCEz7Bc1UwfQAeT//dOFxetiPkYqVJhJBDjEzv0xhYWt8l3v we28s0bRVpQJAzQf8ma62069HSzGkuvJ5Wc7+++6m5CEZSEfLZivlRMpuA8nd0LLrdng +vTxg38IcdNppqLWTIXThdy5GGPB0oY/xvXTWcKw5KYY7I0GM8wcbd6z3QLqv+YPtNx/ iE3TsnA+M75Cj4/QIt09TkSDl3k3xEzGaoWYlmi97pudUazV0P1+FVwYUJRqtzU14iH4 Ycs8rNTPDmqaSDZymdSBxgZqYLm/FA9N2QsyJfDZillUaEnr7c7fRh/0kNTfmHEWgpu3 3wZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=mCe2k5C0FCJDW/hGDxg/izd2+wYjexkewawiOP5GbNo=; b=yx7YuiaWkHwReeFQSV008n/LDl+3ZIm7t4eb1jAEzZIxi6yJfUFEsB4KDZaBFuaBpJ dgOJ1rtCqsUs0Lql4s6Yw9TEpb5JQYNhvGNBg24sjN8bU2aSZvoNTuBKVlQ5ahg71z9e ZZTYLXLJ8ndmAqTQcNjSDvVoqzxUeyZdx6XdNWKhEqPksIZy6QNpcoIgOaVZVP4kr2Ec O86C51+lFCGZOhRLJ2jnMeU0xkIW9/o7vQtdWqJ9JiYEc/dZZMBUiuuzHqg5oNLkFXfZ /9FghUgcNQ2M1xlIxVn9u+vC8DPdauLHFISogLa07jtk9CSfzawLpbECJPMoksF0qaEz QAwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L5WZbJH1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id f12si10146269edd.293.2021.11.25.09.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 09:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L5WZbJH1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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