Skip to contentSkip to conversation

fat: Define MAX_CLUSTSIZE only if not defined in config

PATCH New Michal Simek 3 participants 3 messages Apr 25, 2014 – May 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fat: Define MAX_CLUSTSIZE only if not defined in config

From: Siva Durga Prasad Paladugu <[email protected]>

Define MAX_CLUSTSIZE only if not defined in board specific config file as this size can be decreased to save memory in some memory constrained cases.

---

 include/fat.h | 2 ++
 1 file changed, 2 insertions(+)
include/fat.h +2 -0
index c8eb7cc..1213060 100644
@@ -18,7 +18,9 @@
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */
 #define PREFETCH_BLOCKS		2
 
+#ifndef MAX_CLUSTSIZE
 #define MAX_CLUSTSIZE	65536
+#endif
 #define DIRENTSPERBLOCK	(mydata->sect_size / sizeof(dir_entry))
 #define DIRENTSPERCLUST	((mydata->clust_size * mydata->sect_size) / \
 			 sizeof(dir_entry))

--
1.8.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140425/20b22cc3/attachment.pgp>

#1 lore raw

PATCH 1/1 fat: Define MAX_CLUSTSIZE only if not defined in config

Hi Tom,

Quoted 28 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Define MAX_CLUSTSIZE only if not defined in board specific config file as this size can be decreased to save memory in some memory constrained cases.

---

 include/fat.h | 2 ++
 1 file changed, 2 insertions(+)
include/fat.h +2 -1
index c8eb7cc..1213060 100644
@@ -18,7 +18,9 @@
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */
 #define PREFETCH_BLOCKS		2
 
+#ifndef MAX_CLUSTSIZE
 #define MAX_CLUSTSIZE	65536
+#endif
 #define DIRENTSPERBLOCK	(mydata->sect_size / sizeof(dir_entry))
 #define DIRENTSPERCLUST	((mydata->clust_size * mydata->sect_size) / \
 			 sizeof(dir_entry))
--
Quoted 2 lines

1.8.2.3

Any problem with this patch?

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140506/92a9e1bb/attachment.pgp>
#2 lore raw

PATCH 1/1 fat: Define MAX_CLUSTSIZE only if not defined in config

In reply to Michal Simek
Quoted 18 lines · Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Define MAX_CLUSTSIZE only if not defined in board specific config file as this size can be decreased to save memory in some memory constrained cases.

---

 include/fat.h | 2 ++
 1 file changed, 2 insertions(+)
include/fat.h +0 -0
index c8eb7cc..1213060 100644

include/fat.h line 26

Quoted 9 lines
include/fat.h +2 -0
@@ -18,7 +18,9 @@
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */
 #define PREFETCH_BLOCKS		2
 
+#ifndef MAX_CLUSTSIZE
 #define MAX_CLUSTSIZE	65536
+#endif
 #define DIRENTSPERBLOCK	(mydata->sect_size / sizeof(dir_entry))
 #define DIRENTSPERCLUST	((mydata->clust_size * mydata->sect_size) / \
 			 sizeof(dir_entry))

Sorry for the delay. This should be CONFIG_FS_FAT_MAX_CLUSTSIZE and documented in the README.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140512/aa3e467d/attachment.pgp>