summaryrefslogtreecommitdiff
path: root/include/fat.h
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-08-19 09:37:46 +0000
committerWolfgang Denk <wd@denx.de>2011-10-01 21:52:19 +0200
commit025421eab453fd41a3cc14a0fc48115b0dc4c287 (patch)
treeedea3f18319116fc6320b90617844a40f35ce842 /include/fat.h
parent40e219165bcdf450cc69976fa129f2ef9889973a (diff)
downloadu-boot-imx-025421eab453fd41a3cc14a0fc48115b0dc4c287.zip
u-boot-imx-025421eab453fd41a3cc14a0fc48115b0dc4c287.tar.gz
u-boot-imx-025421eab453fd41a3cc14a0fc48115b0dc4c287.tar.bz2
fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS
Currently in do_fat_read() when reading FAT sectors, we have to divide down LINEAR_PREFETCH_SIZE by the sector size, whereas it's defined as 2 sectors worth of bytes. In order to avoid redundant multiplication/division, introduce #define PREFETCH_BLOCKS instead of #define LINEAR_PREFETCH_SIZE. Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
Diffstat (limited to 'include/fat.h')
-rw-r--r--include/fat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fat.h b/include/fat.h
index c2465d2..15dbf10 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -33,7 +33,7 @@
/* Maximum Long File Name length supported here is 128 UTF-16 code units */
#define VFAT_MAXLEN_BYTES 256 /* Maximum LFN buffer in bytes */
#define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */
-#define LINEAR_PREFETCH_SIZE (mydata->sect_size*2) /* Prefetch buffer size */
+#define PREFETCH_BLOCKS 2
#define MAX_CLUSTSIZE 65536
#define DIRENTSPERBLOCK (mydata->sect_size / sizeof(dir_entry))