* [U-Boot] [PATCH v2] fat: Define MAX_CLUSTSIZE only if not defined in config
@ 2014-05-26 10:29 Siva Durga Prasad Paladugu
2014-05-26 11:48 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Siva Durga Prasad Paladugu @ 2014-05-26 10:29 UTC (permalink / raw)
To: u-boot
Define the MAX_CLUSTSIZE to default of 65536 only if
CONFIG_FS_FAT_MAX_CLUSTSIZE is not defined in board
specific config file.
Also please define your own MAX_CLUSTSIZE value if
CONFIG_FS_FAT_MAX_CLUSTSIZE is defined.
This option has been provided to save memory in some
memory constrained cases.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
---
Changes in v2:
-Defined CONFIG_FS_FAT_MAX_CLUSTSIZE and documented as
per review comment.
README | 7 +++++++
include/fat.h | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/README b/README
index 5f89552..0d947cb 100644
--- a/README
+++ b/README
@@ -1613,6 +1613,13 @@ CBFS (Coreboot Filesystem) support
filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls
and cbfsload.
+- FAT(File Allocation Table) filesystem write/read buffer size:
+ CONFIG_FS_FAT_MAX_CLUSTSIZE
+
+ If this macro is not defined then the default MAX_CLUSTSIZE
+ is defined with 65536 else specify your own MAX_CLUSTSSIZE
+ value.
+
- Keyboard Support:
CONFIG_ISA_KEYBOARD
diff --git a/include/fat.h b/include/fat.h
index 81d9790..8b67851 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -18,7 +18,9 @@
#define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */
#define PREFETCH_BLOCKS 2
+#ifndef CONFIG_FS_FAT_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.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2] fat: Define MAX_CLUSTSIZE only if not defined in config
2014-05-26 10:29 [U-Boot] [PATCH v2] fat: Define MAX_CLUSTSIZE only if not defined in config Siva Durga Prasad Paladugu
@ 2014-05-26 11:48 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2014-05-26 11:48 UTC (permalink / raw)
To: u-boot
On 05/26/2014 12:29 PM, Siva Durga Prasad Paladugu wrote:
> Define the MAX_CLUSTSIZE to default of 65536 only if
> CONFIG_FS_FAT_MAX_CLUSTSIZE is not defined in board
> specific config file.
> Also please define your own MAX_CLUSTSIZE value if
> CONFIG_FS_FAT_MAX_CLUSTSIZE is defined.
> This option has been provided to save memory in some
> memory constrained cases.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> ---
>
> Changes in v2:
> -Defined CONFIG_FS_FAT_MAX_CLUSTSIZE and documented as
> per review comment.
>
> README | 7 +++++++
> include/fat.h | 2 ++
> 2 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/README b/README
> index 5f89552..0d947cb 100644
> --- a/README
> +++ b/README
> @@ -1613,6 +1613,13 @@ CBFS (Coreboot Filesystem) support
> filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls
> and cbfsload.
>
> +- FAT(File Allocation Table) filesystem write/read buffer size:
> + CONFIG_FS_FAT_MAX_CLUSTSIZE
> +
> + If this macro is not defined then the default MAX_CLUSTSIZE
> + is defined with 65536 else specify your own MAX_CLUSTSSIZE
> + value.
> +
> - Keyboard Support:
> CONFIG_ISA_KEYBOARD
>
> diff --git a/include/fat.h b/include/fat.h
> index 81d9790..8b67851 100644
> --- a/include/fat.h
> +++ b/include/fat.h
> @@ -18,7 +18,9 @@
> #define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */
> #define PREFETCH_BLOCKS 2
>
> +#ifndef CONFIG_FS_FAT_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))
>
CONFIG_FS_FAT_MAX_CLUSTSIZE is not used anywhere.
This should be the solution.
#ifndef CONFIG_FS_FAT_MAX_CLUSTSIZE
#define CONFIG_FS_FAT_MAX_CLUSTSIZE 65536
#endif
#define MAX_CLUSTSIZE CONFIG_FS_FAT_MAX_CLUSTSIZE
Please send v3.
Thanks,
Michal
--
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/20140526/ef11a568/attachment.pgp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-26 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 10:29 [U-Boot] [PATCH v2] fat: Define MAX_CLUSTSIZE only if not defined in config Siva Durga Prasad Paladugu
2014-05-26 11:48 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox