From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Tue, 3 May 2016 14:58:38 +0200 Subject: [U-Boot] [PATCH v4 3/3] spl: Support loading a FIT from FAT FS In-Reply-To: <1462266311-27515-4-git-send-email-lokeshvutla@ti.com> References: <1462266311-27515-1-git-send-email-lokeshvutla@ti.com> <1462266311-27515-4-git-send-email-lokeshvutla@ti.com> Message-ID: <5728A07E.3070402@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3.5.2016 11:05, Lokesh Vutla wrote: > Detect a FIT when loading from a FAT File system and handle it using the > new FIT SPL support. > > Signed-off-by: Lokesh Vutla > --- > common/spl/spl_fat.c | 31 +++++++++++++++++++++++++++++-- > 1 file changed, 29 insertions(+), 2 deletions(-) > > diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c > index d761b26..3788e4d 100644 > --- a/common/spl/spl_fat.c > +++ b/common/spl/spl_fat.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > > static int fat_registered; > > @@ -39,6 +40,20 @@ static int spl_register_fat_device(struct blk_desc *block_dev, int partition) > return err; > } > > +static ulong spl_fit_read(struct spl_load_info *load, ulong file_offset, > + ulong size, void *buf) > +{ > + loff_t actread; > + int ret; > + char *filename = (char *)load->priv; > + > + ret = fat_read_file(filename, buf, file_offset, size, &actread); > + if (ret) > + return ret; > + else you can remove this else. Thanks, Michal