Skip to content

Commit e46d8a1

Browse files
ngboonkhainashif
authored andcommitted
fat_fs: Add support for the "win" variable alignment in FATFS struct
This is to support Sypnosys Designware SDMMC controller read and write operation where the buffer address is needed to be 16bytes and 512bytes aligned. Adding macro FS_FATFS_WINDOW_ALIGNMENT to align the "win" variable address in FATFS struct. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
1 parent 67f6b43 commit e46d8a1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

subsys/fs/Kconfig.fatfs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,19 @@ config FS_FATFS_MAX_SS
129129
range 512 4096
130130
default 512
131131

132+
config FS_FATFS_WINDOW_ALIGNMENT
133+
int "Memory alignment for the member \"win\" in FATFS"
134+
default 1
135+
help
136+
Specifies alignment, in bytes of FAT FS window buffer that is
137+
used for device's read/write operations. MMC controllers may
138+
require read/write buffer to start at memory address with
139+
specific alignment, for example 16 or 512 bytes, the value
140+
provided here is used as such alignment. Note that the window
141+
buffer is internal element of FATFS structure, which means
142+
that, in worst scenario, value provided here may cause FATFS
143+
structure to have size of twice the value
144+
132145
endmenu
133146

134147
endif # FAT_FILESYSTEM_ELM

0 commit comments

Comments
 (0)