From patchwork Mon Mar 21 01:45:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Nelson X-Patchwork-Id: 599943 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qSzFF3t9Gz9s5l for ; Mon, 21 Mar 2016 12:46:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F1F4A76E5; Mon, 21 Mar 2016 02:46:03 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6f8cceFIcyD7; Mon, 21 Mar 2016 02:46:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79EB5A76ED; Mon, 21 Mar 2016 02:45:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F0DD6A7505 for ; Mon, 21 Mar 2016 02:45:46 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xQmH23ifq6m3 for ; Mon, 21 Mar 2016 02:45:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from fed1rmfepo103.cox.net (fed1rmfepo103.cox.net [68.230.241.145]) by theia.denx.de (Postfix) with ESMTP id 48F32A74E9 for ; Mon, 21 Mar 2016 02:45:43 +0100 (CET) Received: from fed1rmimpo210.cox.net ([68.230.241.161]) by fed1rmfepo103.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20160321014542.MCKB17588.fed1rmfepo103.cox.net@fed1rmimpo210.cox.net> for ; Sun, 20 Mar 2016 21:45:42 -0400 Received: from localhost.localdomain ([98.165.107.234]) by fed1rmimpo210.cox.net with cox id YRlg1s00553Tyga01RlhVC; Sun, 20 Mar 2016 21:45:42 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020205.56EF5246.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.1 cv=P+Oa/n0u c=1 sm=1 tr=0 a=mmedTQiI2PtWY+RDxZIZmw==:117 a=mmedTQiI2PtWY+RDxZIZmw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=9_1hYV8uAAAA:8 a=-MF8-sodzlOJGPo6aHgA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (CRAM-MD5) smtp.auth=eric.a.nelson@cox.net From: Eric Nelson To: u-boot@lists.denx.de, ioan.nicu.ext@nsn.com, swarren@wwwdotorg.org, trini@konsulko.com, sjg@chromium.org Date: Sun, 20 Mar 2016 18:45:26 -0700 Message-Id: <1458524727-4643-3-git-send-email-eric@nelint.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1458524727-4643-1-git-send-email-eric@nelint.com> References: <1458524727-4643-1-git-send-email-eric@nelint.com> Cc: marex@denx.de Subject: [U-Boot] [RFC V2 PATCH 2/3] block: add Kconfig options for [CMD_]BLOCK_CACHE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" Allow the selection of CONFIG_BLOCK_CACHE, CONFIG_CMD_BLOCK_CACHE using menuconfig. Signed-off-by: Eric Nelson --- drivers/block/Kconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index f35c4d4..6529efb 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -18,3 +18,22 @@ config DISK types can use this, such as AHCI/SATA. It does not provide any standard operations at present. The block device interface has not been converted to driver model. + +config BLOCK_CACHE + bool "Use block device cache" + default n + help + This option enables a disk-block cache for all block devices. + This is most useful when accessing filesystems under U-Boot since + it will prevent repeated reads from directory structures. + +config CMD_BLOCK_CACHE + bool "Include block device cache control command (blkcache)" + depends on BLOCK_CACHE + default y if BLOCK_CACHE + help + Enable the blkcache command, which can be used to control the + operation of the cache functions. + This is most useful when fine-tuning the operation of the cache + during development, but also allows the cache to be disabled when + it might hurt performance (e.g. when using the ums command).