]> git.sur5r.net Git - u-boot/commitdiff
fat: Define MAX_CLUSTSIZE using CONFIG_FS_FAT_MAX_CLUSTSIZE
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Mon, 26 May 2014 13:48:37 +0000 (19:18 +0530)
committerTom Rini <trini@ti.com>
Thu, 5 Jun 2014 18:44:56 +0000 (14:44 -0400)
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 <sivadur@xilinx.com>
Acked-by: Michal Simek <monstr@monstr.eu>
README
include/fat.h

diff --git a/README b/README
index 6edb2e75be87e104ce707430abdb137863d0a211..256d6ecc65a09c008bdd8a431fbec1aea37e7ac5 100644 (file)
--- a/README
+++ b/README
@@ -1637,6 +1637,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
 
index 81d9790420d8057d0a8e3d1f5e22a6474c89cccd..63cf78779bd585d18516519593f4e86455bdf68c 100644 (file)
 #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))