common: Generic firmware loader for file system
PATCH v4 6/20 common: Generic firmware loader for file system
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality which is reusable by any specific driver file system firmware loader. Specific driver file system firmware loader handling can be defined with both weak function fsloader_preprocess and fs_loading.
--- common/Makefile | 7 +- common/splash_source.c | 110 +++++++++++++++++++++++++------- configs/socfpga_arria10_defconfig | 2 + include/configs/socfpga_arria10_socdk.h | 3 + include/splash.h | 3 + 5 files changed, 99 insertions(+), 26 deletions(-)
common/Makefile +4 -3
@@ -47,8 +47,6 @@ obj-$(CONFIG_MTD_NOR_FLASH) += flash.o obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o obj-$(CONFIG_I2C_EDID) += edid.o obj-$(CONFIG_KALLSYMS) += kallsyms.o -obj-y += splash.o -obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o ifndef CONFIG_DM_VIDEO obj-$(CONFIG_LCD) += lcd.o lcd_console.o endif
@@ -102,7 +100,6 @@ endif obj-y += image.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o -obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o obj-$(CONFIG_IO_TRACE) += iotrace.o
@@ -130,3 +127,7 @@ obj-$(CONFIG_CMD_DFU) += dfu.o obj-y += command.o obj-y += s_record.o obj-y += xyzModem.o + +obj-y += splash.o +obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o +obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
common/splash_source.c +87 -23
159 lines not on this page · raw message
configs/socfpga_arria10_defconfig +2 -0
@@ -7,6 +7,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_FIT=y +CONFIG_SPL_FIT=y CONFIG_SPL=y CONFIG_SPL_FPGA_SUPPORT=y CONFIG_CMD_BOOTZ=y
include/configs/socfpga_arria10_socdk.h +3 -0
@@ -47,6 +47,9 @@*/ #define CONFIG_SYS_MAX_FLASH_BANKS 1 +/* Generic FS loader */ +#define CONFIG_SPLASH_SOURCE +/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>
include/splash.h +3 -0
@@ -59,6 +59,9 @@ static inline int splash_source_load(struct splash_location *locations,#endif int splash_screen_prepare (void ); +int splash_select_fs_dev (struct splash_location *location); +int splash_load_fs (struct splash_location *location,void *file_info, +u32 bmp_load_addr,size_t bsize);#ifdef CONFIG_SPLASH_SCREEN_ALIGN void splash_get_pos (int *x,int *y);
Signature · 1 line
2.2.0
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 8 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality which is reusable by any specific driver file system firmware loader. Specific driver file system firmware loader handling can be defined with both weak function
fsloader_preprocessandfs_loading.Signed-off-by Tien Fong Chee <[email protected]>
Why did you put everything into splash_source.c ? If this is supposed to be a generic loader, I'm sure not everyone would want to enable splash screen support to get generic firmware loader support.
The API should looks more like the linux firmware API.
Quoted 248 lines
--- common/Makefile | 7 +- common/splash_source.c | 110 +++++++++++++++++++++++++------- configs/socfpga_arria10_defconfig | 2 + include/configs/socfpga_arria10_socdk.h | 3 + include/splash.h | 3 + 5 files changed, 99 insertions(+), 26 deletions(-)common/Makefile +4
-3@@ -47,8 +47,6 @@ obj-$(CONFIG_MTD_NOR_FLASH) += flash.o obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o obj-$(CONFIG_I2C_EDID) += edid.o obj-$(CONFIG_KALLSYMS) += kallsyms.o -obj-y += splash.o -obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o ifndef CONFIG_DM_VIDEO obj-$(CONFIG_LCD) += lcd.o lcd_console.o endif@@ -102,7 +100,6 @@ endif obj-y += image.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o -obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o obj-$(CONFIG_IO_TRACE) += iotrace.o@@ -130,3 +127,7 @@ obj-$(CONFIG_CMD_DFU) += dfu.o obj-y += command.o obj-y += s_record.o obj-y += xyzModem.o + +obj-y += splash.o +obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o +obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.ocommon/splash_source.c +87
-23@@ -109,7 +109,7 @@ splash_address_too_high:return -EFAULT ; } -static int splash_select_fs_dev (struct splash_location *location) +int splash_select_fs_dev (struct splash_location *location) {int res;@@ -140,6 +140,7 @@ static int splash_select_fs_dev(struct splash_location *location)return res; } +#ifndef CONFIG_SPL_BUILD #ifdef CONFIG_USB_STORAGE static int splash_init_usb(void) {@@ -175,6 +176,7 @@ static inline int splash_init_sata(void)return -ENOSYS ; }#endif +#endif #ifdef CONFIG_CMD_UBIFS static int splash_mount_ubifs (struct splash_location *location)@@ -213,22 +215,99 @@ static inline int splash_umount_ubifs(void)#define SPLASH_SOURCE_DEFAULT_FILE_NAME "splash.bmp" -static int splash_load_fs (struct splash_location *location,u32 bmp_load_addr) +/** +* fsloader_preprocess - Any prepocessing before calling filesystem loader. +* +* @locations: An array of supported splash locations. +* @file_info: Description and attributes to the image. +* Could be structure pointer, and any type pointer. +* @filename: Image filename in flashes. +* @bmp_load_addr: Target memory location image loaded to. +* +* @return: If 0, processing is succesfull. Filename pointer contains +* valid filename. +* If -ve, processing is failed. +*/ +__weak int fsloader_preprocess (struct splash_location *location, +void *file_info,char **filename, +u32 bmp_load_addr) {int res =0 ;loff_t bmp_size; -loff_t actread;char *splash_file; - splash_file =env_get ("splashfile" ); + splash_file =env_get ((char *)file_info); +if (!splash_file) splash_file =SPLASH_SOURCE_DEFAULT_FILE_NAME ; + res =splash_select_fs_dev (location); +if (res) { +error ("Error : Failed to select FS device\n" ); +return -EPERM ; + } + + res =fs_size (splash_file, &bmp_size); +if (res) { +error ("Error (%d): cannot determine file size\n" , res); +return -ENOENT ; + } + +if ((u32 )bmp_load_addr + bmp_size >= gd->start_addr_sp) { +error ("Error: splashimage address too high. Data overwrites " ); +error ("U-Boot and/or placed beyond DRAM boundaries.\n" ); + res = -EFAULT ; +return -EFAULT ; + } + + *filename = splash_file; + +return res; +} + +/** +* fs_loading - This place is for implementing whaterver blob + whatever +* specific driver to the HW such as program raw binary file to +* FPGA. +* +* @locations: An array of supported splash locations. +* @file_info: Description and attributes to the image. +* Could be structure pointer, and any type pointer. +* @filename: Image filename in flashes. +* @bmp_load_addr: Target memory location image loaded to. +* @bsize: Size of target memory location. +* +* @return: If 0, loading is succesfull. Filename pointer contains +* valid filename. +* If non-zero, loading is failed. +*/ +__weak int fs_loading (struct splash_location *location,void *file_info, +char *filename,u32 bmp_load_addr,size_t bsize) +{ +loff_t actread; + +return fs_read (filename, (u32 )bmp_load_addr,0 ,0 , &actread); +} + +int splash_load_fs (struct splash_location *location,void *file_info, +u32 bmp_load_addr,size_t bsize) +{ +int res =0 ; +char *splash_file =NULL ; + + res =fsloader_preprocess (location, file_info, &splash_file, + bmp_load_addr); + +if (res) + goto out; + +#ifndef CONFIG_SPL_BUILD if (location->storage ==SPLASH_STORAGE_USB ) res =splash_init_usb ();if (location->storage ==SPLASH_STORAGE_SATA ) res =splash_init_sata (); +#endif if (location->ubivol !=NULL ) res =splash_mount_ubifs (location);@@ -236,24 +315,8 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr)if (res)return res; - res =splash_select_fs_dev (location); -if (res) - goto out; - - res =fs_size (splash_file, &bmp_size); -if (res) { -printf ("Error (%d): cannot determine file size\n" , res); - goto out; - } - -if (bmp_load_addr + bmp_size >= gd->start_addr_sp) { -printf ("Error: splashimage address too high. Data overwrites U-Boot and/or placed beyond DRAM boundaries.\n" ); - res = -EFAULT ; - goto out; - } - -splash_select_fs_dev (location); - res =fs_read (splash_file, bmp_load_addr,0 ,0 , &actread); + res =fs_loading (location, file_info, splash_file, bmp_load_addr, + bsize); out:if (location->ubivol !=NULL )@@ -405,7 +468,8 @@ int splash_source_load(struct splash_location *locations, uint size)if (splash_location->flags ==SPLASH_STORAGE_RAW )return splash_load_raw (splash_location, bmp_load_addr);else if (splash_location->flags ==SPLASH_STORAGE_FS ) -return splash_load_fs (splash_location, bmp_load_addr); +return splash_load_fs (splash_location,"splashfile" , + bmp_load_addr,0 );#ifdef CONFIG_FIT else if (splash_location->flags == SPLASH_STORAGE_FIT) return splash_load_fit(splash_location, bmp_load_addr);configs/socfpga_arria10_defconfig +2
-0@@ -7,6 +7,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc" CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" +CONFIG_FIT=y +CONFIG_SPL_FIT=y CONFIG_SPL=y CONFIG_SPL_FPGA_SUPPORT=y CONFIG_CMD_BOOTZ=yinclude/configs/socfpga_arria10_socdk.h +3
-0@@ -47,6 +47,9 @@*/ #define CONFIG_SYS_MAX_FLASH_BANKS 1 +/* Generic FS loader */ +#define CONFIG_SPLASH_SOURCE +/* The rest of the configuration is shared */ #include <configs/socfpga_common.h> include/splash.h +3
-0@@ -59,6 +59,9 @@ static inline int splash_source_load(struct splash_location *locations,#endif int splash_screen_prepare (void ); +int splash_select_fs_dev (struct splash_location *location); +int splash_load_fs (struct splash_location *location,void *file_info, +u32 bmp_load_addr,size_t bsize);#ifdef CONFIG_SPLASH_SCREEN_ALIGN void splash_get_pos (int *x,int *y);
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 11 lines · Marek Vasut
Quoted 10 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined with both weak functionfsloader_preprocessandfs_loading.
Quoted 9 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Why did you put everything into
splash_source.c? If this is supposed to
be a generic loader, I'm sure not everyone would want to enable splash
screen support to get generic firmware loader support.The API should looks more like the linux firmware API.
Initially, i created the new file called loadfs.c, which contains common codes and generic fs firmware loader. I plan to replace fs loader in splash_source.c at seperate patchset.
Then, i changed the codes directly on splash_source.c based on your comment. May be i misunderstood your meaning.
Quoted 287 lines
Quoted 286 lines
---
common/Makefile | 7 +-
common/splash_source.c | 110
+++++++++++++++++++++++++-------
configs/socfpga_arria10_defconfig | 2 +
include/configs/socfpga_arria10_socdk.h | 3 +
include/splash.h | 3 +5 files changed, 99 insertions(+), 26 deletions(-)common/Makefile +0
-0@@ -47,8 +47,6 @@ obj-$(CONFIG_MTD_NOR_FLASH) += flash.oobj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
obj-$(CONFIG_I2C_EDID) += edid.o
obj-$(CONFIG_KALLSYMS) += kallsyms.ocommon/Makefile +0
-2-obj-y += splash.o -obj-$(CONFIG_SPLASH_SOURCE) += splash_source.oifndef
CONFIG_DM_VIDEO
obj-$(CONFIG_LCD) += lcd.o lcd_console.o
endifcommon/Makefile +0
-0@@ -102,7 +100,6 @@ endifobj-y += image.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o -obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o obj-$(CONFIG_IO_TRACE) += iotrace.o
common/Makefile +0
-0@@ -130,3 +127,7 @@ obj-$(CONFIG_CMD_DFU) += dfu.oobj-y += command.o
obj-y += s_record.o
obj-y += xyzModem.ocommon/Makefile +4
-0+ +obj-y += splash.o +obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o +obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.ocommon/splash_source.c +0
-0@@ -109,7 +109,7 @@ splash_address_too_high: return -EFAULT; }common/splash_source.c +1
-1-static int splash_select_fs_dev (struct splash_location *location) +int splash_select_fs_dev (struct splash_location *location){
int res;common/splash_source.c +0
-0@@ -140,6 +140,7 @@ static int splash_select_fs_dev(struct splash_location *location) return res; }
+#ifndefCONFIG_SPL_BUILD
#ifdefCONFIG_USB_STORAGE
static intsplash_init_usb(void)
{common/splash_source.c +1
-0@@ -175,6 +176,7 @@ static inline int splash_init_sata(void) return -ENOSYS; } #endif +#endif
#ifdefCONFIG_CMD_UBIFS
static intsplash_mount_ubifs(struct splash_location *location)common/splash_source.c +0
-0@@ -213,22 +215,99 @@ static inline int splash_umount_ubifs(void)
#defineSPLASH_SOURCE_DEFAULT_FILE_NAME"splash.bmp
"
-static intsplash_load_fs(struct splash_location *location, u32 bmp_load_addr)
+/**
+ *fsloader_preprocess- Any prepocessing before calling filesystem loader.
+ *
+ * @locations: An array of supported splash
locations.
+ * @file_info: Description and attributes to the
image.
+ * Could be structure pointer, and any type
pointer.
+ * @filename: Image filename in flashes.
+ * @bmp_load_addr: Target memory location image loaded to.
+ *
+ * @return: If 0, processing is succesfull. Filename
pointer contains
+ * valid filename.
+ * If -ve, processing is failed.
+ */common/splash_source.c +3
-0+__weak int fsloader_preprocess (struct splash_location *location, + void *file_info, char **filename, + u32 bmp_load_addr){
int res = 0;
loff_tbmp_size;common/splash_source.c +0
-1-loff_t actread;char
*splash_file;common/splash_source.c +2
-1- splash_file =env_get ("splashfile" ); + splash_file =env_get ((char *)file_info); +if (!splash_file)
splash_file=SPLASH_SOURCE_DEFAULT_FILE_NAME;common/splash_source.c +9
-0+ res =splash_select_fs_dev (location); +if (res) { +error ("Error : Failed to select FS device\n" ); +return -EPERM ; + } + + res =fs_size (splash_file, &bmp_size); +if (res) { + error("Error (%d): cannot determine file size\n",res);
common/splash_source.c +5
-0+return -ENOENT ; + } + +if ((u32 )bmp_load_addr + bmp_size >= gd->start_addr_sp) { + error("Error: splashimage address too high. Dataoverwrites ");
common/splash_source.c +1
-0+ error("U-Boot and/or placed beyond DRAMboundaries.\n");
common/splash_source.c +11
-0+ res = -EFAULT ; +return -EFAULT ; + } + + *filename = splash_file; + +return res; +} + +/** +* fs_loading - This place is for implementing whaterver blob + whatever
+ * specific driver to the HW such as program raw
binary file to
+ * FPGA.
+ *
+ * @locations: An array of supported splash
locations.
+ * @file_info: Description and attributes to the
image.
+ * Could be structure pointer, and any type
pointer.
+ * @filename: Image filename in flashes.
+ * @bmp_load_addr: Target memory location image loaded to.
+ * @bsize: Size of target memory location.
+ *
+ * @return: If 0, loading is succesfull. Filename pointer
contains
+ * valid filename.
+ * If non-zero, loading is failed.
+ */
+__weak int fs_loading(structsplash_location*location, void*file_info,common/splash_source.c +1
-0+ char *filename, u32 bmp_load_addr, size_tbsize)
common/splash_source.c +4
-0+{ +loff_t actread; + + return fs_read(filename, (u32)bmp_load_addr, 0, 0,&actread);
common/splash_source.c +3
-0+} + +int splash_load_fs(struct splash_location *location, void
*file_info,common/splash_source.c +6
-0+ u32 bmp_load_addr, size_t bsize) +{ +int res =0 ; +char *splash_file =NULL ; + + res = fsloader_preprocess(location, file_info,
&splash_file,common/splash_source.c +6
-0+ bmp_load_addr); + +if (res) + goto out; + +#ifndef CONFIG_SPL_BUILD if (
location->storage==SPLASH_STORAGE_USB) res =splash_init_usb();
if (location->storage==SPLASH_STORAGE_SATA) res =splash_init_sata(); +#endif
if (location->ubivol!= NULL)
res =splash_mount_ubifs(location);common/splash_source.c +0
-0@@ -236,24 +315,8 @@ static int splash_load_fs(struct splash_location *location, u32 bmp_load_addr) if (res) return res;common/splash_source.c +0
-7- res =splash_select_fs_dev (location); -if (res) - goto out; - - res =fs_size (splash_file, &bmp_size); -if (res) { - printf("Error (%d): cannot determine file size\n",res);
common/splash_source.c +0
-5- goto out; - } - -if (bmp_load_addr + bmp_size >= gd->start_addr_sp) { - printf("Error: splashimage address too high. Dataoverwrites U-Boot and/or placed beyond DRAM boundaries.\n");
common/splash_source.c +1
-6- res = -EFAULT ; - goto out; - } - -splash_select_fs_dev (location); - res =fs_read (splash_file, bmp_load_addr,0 ,0 , &actread); + res = fs_loading(location, file_info, splash_file,
bmp_load_addr,common/splash_source.c +1
-0+ bsize);
out:
if (location->ubivol!= NULL)common/splash_source.c +1
-1@@ -405,7 +468,8 @@ int splash_source_load(struct splash_location *locations, uint size) if (splash_location->flags == SPLASH_STORAGE_RAW) return splash_load_raw(splash_location, bmp_load_addr); else if (splash_location->flags == SPLASH_STORAGE_FS) -return splash_load_fs (splash_location, bmp_load_addr); + return splash_load_fs(splash_location,"splashfile",
common/splash_source.c +1
-0+ bmp_load_addr, 0);#ifdef
CONFIG_FIT
else if (splash_location->flags==SPLASH_STORAGE_FIT) returnsplash_load_fit(splash_location, bmp_load_addr);configs/socfpga_arria10_defconfig +0
-0@@ -7,6 +7,8 @@
CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"CONFIG_USE_BOOTARGS=yCONFIG_BOOTARGS="console=ttyS0,115200"CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb"configs/socfpga_arria10_defconfig +2
-0+CONFIG_FIT=y +CONFIG_SPL_FIT=yCONFIG_SPL=y
CONFIG_SPL_FPGA_SUPPORT=y
CONFIG_CMD_BOOTZ=yinclude/configs/socfpga_arria10_socdk.h +0
-0@@ -47,6 +47,9 @@*/ #define CONFIG_SYS_MAX_FLASH_BANKS 1include/configs/socfpga_arria10_socdk.h +3
-0+/* Generic FS loader */ +#define CONFIG_SPLASH_SOURCE +/* The rest of the configuration is shared */
#include <configs/socfpga_common.h>include/splash.h +0
-0@@ -59,6 +59,9 @@ static inline int splash_source_load(struct splash_location *locations, #endif
intsplash_screen_prepare(void);include/splash.h +2
-0+int splash_select_fs_dev (struct splash_location *location); +int splash_load_fs(struct splash_location *location, void
*file_info,include/splash.h +1
-0+ u32 bmp_load_addr, size_t bsize);
#ifdefCONFIG_SPLASH_SCREEN_ALIGN
voidsplash_get_pos(int *x, int *y);
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 19 lines · Tien Fong
Quoted 18 lines · Marek Vasut
Quoted 11 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined with both weak functionfsloader_preprocessandfs_loading.Signed-off-by Tien Fong Chee <[email protected]>Why did you put everything into
splash_source.c? If this is supposed to
be a generic loader, I'm sure not everyone would want to enable splash
screen support to get generic firmware loader support.
Quoted 5 lines
Quoted 2 lines
The API should looks more like the linux firmware API.
Initially, i created the new file called
loadfs.c, which contains common codes and generic fs firmware loader. I plan to replace fs loader insplash_source.cat seperate patchset.
No.
Quoted 2 lines
Then, i changed the codes directly on
splash_source.cbased on your comment. May be i misunderstood your meaning.
I would never suggest such a thing, sorry. This should be done properly from the getgo, with proper API and in a separate file. All the consumers should be converted to that API.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 33 lines · Marek Vasut
Quoted 24 lines · Tien Fong
Quoted 22 lines · Marek Vasut
Quoted 12 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined
with both weak functionfsloader_preprocessandfs_loading.Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Why did you put everything into
splash_source.c? If this is supposed
to
be a generic loader, I'm sure not everyone would want to enable splash
screen support to get generic firmware loader support.Quoted 5 lines
Quoted 2 lines
The API should looks more like the linux firmware API.
Initially, i created the new file called
loadfs.c, which contains common codes and generic fs firmware loader. I plan to replace fs loader insplash_source.cat seperate patchset.No.
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
Then, i changed the codes directly on
splash_source.cbased on your comment. May be i misunderstood your meaning.I would never suggest such a thing, sorry. This should be done properly
from the getgo, with proper API and in a separate file. All the consumers should be converted to that API.
Okay, that means what i did in ver3 is what you say. Just i included the generic firmware loader into series because this is required by fpga loadfs, then i plan to convert splash_loader to use it at later separate patchset.
Chee
PATCH v4 6/20 common: Generic firmware loader for file system
In reply to Marek VasutQuoted 33 lines · Marek Vasut
Quoted 24 lines · Tien Fong
Quoted 22 lines · Marek Vasut
Quoted 12 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined
with both weak functionfsloader_preprocessandfs_loading.Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Why did you put everything into
splash_source.c? If this is supposed
to
be a generic loader, I'm sure not everyone would want to enable splash
screen support to get generic firmware loader support.Quoted 5 lines
Quoted 2 lines
The API should looks more like the linux firmware API.
Initially, i created the new file called
loadfs.c, which contains common codes and generic fs firmware loader. I plan to replace fs loader insplash_source.cat seperate patchset.No.
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
Then, i changed the codes directly on
splash_source.cbased on your comment. May be i misunderstood your meaning.I would never suggest such a thing, sorry. This should be done properly
from the getgo, with proper API and in a separate file. All the consumers should be converted to that API.
I will send out separate patchset for generic firmware loader and then switching splash_source.c to use it. Once generic firmware loader is accepted, i will resend current series in ver5 based on accepted generic firmware loader. In the means time, you can help me to review current series which patch is not related to fpga loadfs.
Thanks.
PATCH v4 6/20 common: Generic firmware loader for file system
In reply to tien.fong.chee at intel.comQuoted 8 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality which is reusable by any specific driver file system firmware loader. Specific driver file system firmware loader handling can be defined with both weak function
fsloader_preprocessandfs_loading.Signed-off-by Tien Fong Chee <[email protected]>
Note that this should be sent separately from the SoCFPGA stuff.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 11 lines · Marek Vasut
Quoted 10 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined with both weak functionfsloader_preprocessandfs_loading.
Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Note that this should be sent separately from the SoCFPGA stuff.
This patch separate from SoCFPGA stuff. But, it is required by later patch. FPGA loadfs implemented based on this patch.
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 12 lines · Tien Fong
Quoted 11 lines · Marek Vasut
Quoted 10 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined with both weak functionfsloader_preprocessandfs_loading.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Note that this should be sent separately from the SoCFPGA stuff.
This patch separate from SoCFPGA stuff. But, it is required by later patch. FPGA loadfs implemented based on this patch.
You can note that in the cover letter.
Signature · 2 lines
Best regards, Marek Vasut
Chee
PATCH v4 6/20 common: Generic firmware loader for file system
Quoted 17 lines · Marek Vasut
Quoted 16 lines · Tien Fong
Quoted 14 lines · Marek Vasut
Quoted 12 lines · tien.fong.chee at intel.com
From: Tien Fong Chee <[email protected]>
Generic firmware loader framework contains some common functionality
which is reusable by any specific driver file system firmware loader.
Specific driver file system firmware loader handling can be defined
with both weak functionfsloader_preprocessandfs_loading.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Tien Fong Chee <[email protected]>Note that this should be sent separately from the SoCFPGA stuff.
This patch separate from SoCFPGA stuff. But, it is required by later
patch. FPGA loadfs implemented based on this patch.You can note that in the cover letter.
Okay.