xilffs: Added Read_Only option.

This patch modifies .mld and .tcl files to provide the
Read_Only option to the user. By default this option
is false.

Signed-off-by: P L Sai Krishna <lakshmis@xilinx.com>
This commit is contained in:
P L Sai Krishna 2015-07-01 10:51:37 +05:30 committed by Nava kishore Manne
parent 746db5f257
commit d2fc5aa4ab
2 changed files with 5 additions and 0 deletions

View file

@ -50,5 +50,6 @@ BEGIN LIBRARY xilffs
OPTION NAME = xilffs; OPTION NAME = xilffs;
PARAM name = fs_interface, desc = "Enables file system with selected interface. Enter 1 for SD.", type = int, default = 1; PARAM name = fs_interface, desc = "Enables file system with selected interface. Enter 1 for SD.", type = int, default = 1;
PARAM name = enable_mmc, desc = "Enables MMC support if true. If false, SD is enabled.", type = bool, default = false; PARAM name = enable_mmc, desc = "Enables MMC support if true. If false, SD is enabled.", type = bool, default = false;
PARAM name = read_only, desc = "Enables the file system in Read_Only mode if true. ZynqMP fsbl will set this to true", type = bool, default = false;
END LIBRARY END LIBRARY

View file

@ -108,6 +108,7 @@ proc xgen_opts_file {libhandle} {
puts $file_handle "/* Xilinx FAT File System Library (XilFFs) User Settings */" puts $file_handle "/* Xilinx FAT File System Library (XilFFs) User Settings */"
set fs_interface [common::get_property CONFIG.fs_interface $libhandle] set fs_interface [common::get_property CONFIG.fs_interface $libhandle]
set enable_mmc [common::get_property CONFIG.enable_mmc $libhandle] set enable_mmc [common::get_property CONFIG.enable_mmc $libhandle]
set read_only [common::get_property CONFIG.read_only $libhandle]
# Checking if SD with FATFS is enabled. # Checking if SD with FATFS is enabled.
# This can be expanded to add more interfaces. # This can be expanded to add more interfaces.
@ -118,6 +119,9 @@ proc xgen_opts_file {libhandle} {
if {$periph == "ps7_sdio" || $periph == "psu_sd"} { if {$periph == "ps7_sdio" || $periph == "psu_sd"} {
if {$fs_interface == 1} { if {$fs_interface == 1} {
puts $file_handle "\#define FILE_SYSTEM_INTERFACE_SD" puts $file_handle "\#define FILE_SYSTEM_INTERFACE_SD"
if {$read_only == true} {
puts $file_handle "\#define FILE_SYSTEM_READ_ONLY"
}
} else { } else {
error "ERROR: Invalid interface selected \n" error "ERROR: Invalid interface selected \n"
} }