From patchwork Mon May 26 13:48:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Durga Prasad Paladugu X-Patchwork-Id: 352523 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 3609A14007D for ; Mon, 26 May 2014 23:49:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AC654B67E; Mon, 26 May 2014 15:49:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 4NhGY5pV-LQm; Mon, 26 May 2014 15:49:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6393B4B68E; Mon, 26 May 2014 15:49:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47D8F4B68E for ; Mon, 26 May 2014 15:49:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 e8LcFyC1Lqyq for ; Mon, 26 May 2014 15:48:58 +0200 (CEST) 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 na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0243.outbound.protection.outlook.com [207.46.163.243]) by theia.denx.de (Postfix) with ESMTPS id 7624E4B67E for ; Mon, 26 May 2014 15:48:54 +0200 (CEST) Received: from BN1BFFO11FD055.protection.gbl (10.58.144.32) by BN1BFFO11HUB012.protection.gbl (10.58.144.159) with Microsoft SMTP Server (TLS) id 15.0.949.9; Mon, 26 May 2014 13:48:51 +0000 Received: from xsj-gw1 (149.199.60.83) by BN1BFFO11FD055.mail.protection.outlook.com (10.58.145.10) with Microsoft SMTP Server id 15.0.949.9 via Frontend Transport; Mon, 26 May 2014 13:48:51 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1WovGk-0002mA-Fe; Mon, 26 May 2014 06:48:50 -0700 From: Siva Durga Prasad Paladugu To: , Date: Mon, 26 May 2014 19:18:37 +0530 X-Mailer: git-send-email 1.7.4 X-RCIS-Action: ALLOW Message-ID: <57c596df-747c-452b-b08a-3b8711a78590@BN1BFFO11FD055.protection.gbl> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(438001)(199002)(189002)(83072002)(31696002)(53416003)(50226001)(92566001)(4396001)(31966008)(92726001)(74662001)(21056001)(99396002)(74502001)(50986999)(87936001)(86362001)(77156001)(64706001)(50466002)(62966002)(44976005)(47776003)(70736001)(83322001)(19580395003)(79102001)(81342001)(80022001)(19580405001)(77982001)(76482001)(20776003)(104016001)(89996001)(85852003)(46102001)(33646001)(74316001)(48376002)(102836001)(81542001)(87286001)(23106003); DIR:OUT; SFP:; SCL:1; SRVR:BN1BFFO11HUB012; H:xsj-gw1; FPR:; MLV:sfv; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: xilinx.onmicrosoft.com X-Forefront-PRVS: 02234DBFF6 Received-SPF: Pass (: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=; client-ip=149.199.60.83; helo=xsj-gw1; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=siva.durga.paladugu@xilinx.com; Cc: michals@xilinx.com, Siva Durga Prasad Paladugu Subject: [U-Boot] [PATCH v3] fat: Define MAX_CLUSTSIZE using CONFIG_FS_FAT_MAX_CLUSTSIZE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Define the MAX_CLUSTSIZE to default of 65536 only if CONFIG_FS_FAT_MAX_CLUSTSIZE is not defined. This option has been provided to save memory in some memory constrained cases. Signed-off-by: Siva Durga Prasad Paladugu Acked-by: Michal Simek --- Changes in v3: -Used CONFIG_FS_FAT_MAX_CLUSTSIZE to define MAX_CLUSTSIZE as per review comment. Changes in v2: -Defined CONFIG_FS_FAT_MAX_CLUSTSIZE and documented as per review comment. README | 6 ++++++ include/fat.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/README b/README index 5f89552..2f2aba3 100644 --- a/README +++ b/README @@ -1613,6 +1613,12 @@ CBFS (Coreboot Filesystem) support filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls and cbfsload. +- FAT(File Allocation Table) filesystem cluster size: + CONFIG_FS_FAT_MAX_CLUSTSIZE + + Define the max cluster size for fat operations else + a default value of 65536 will be defined. + - Keyboard Support: CONFIG_ISA_KEYBOARD diff --git a/include/fat.h b/include/fat.h index 81d9790..63cf787 100644 --- a/include/fat.h +++ b/include/fat.h @@ -18,7 +18,11 @@ #define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */ #define PREFETCH_BLOCKS 2 -#define MAX_CLUSTSIZE 65536 +#ifndef CONFIG_FS_FAT_MAX_CLUSTSIZE +#define CONFIG_FS_FAT_MAX_CLUSTSIZE 65536 +#endif +#define MAX_CLUSTSIZE CONFIG_FS_FAT_MAX_CLUSTSIZE + #define DIRENTSPERBLOCK (mydata->sect_size / sizeof(dir_entry)) #define DIRENTSPERCLUST ((mydata->clust_size * mydata->sect_size) / \ sizeof(dir_entry))