public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/2] common: Generic firmware loader for file system
Date: Wed, 13 Dec 2017 04:38:12 +0000	[thread overview]
Message-ID: <1513139890.3124.0.camel@intel.com> (raw)
In-Reply-To: <20171212151256.36ce996f@karo-electronics.de>

On Sel, 2017-12-12 at 15:12 +0100, Lothar Waßmann wrote:
> Hi,
> 
> On Tue, 12 Dec 2017 19:56:17 +0800 tien.fong.chee at intel.com wrote:
> > 
> > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > 
> > This is file system generic loader which can be used to load
> > the file image from the storage into target such as memory.
> > The consumer driver would then use this loader to program whatever,
> > ie. the FPGA device.
> > 
> > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > ---
> >  common/Makefile     |   1 +
> >  common/fs_loader.c  | 305
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  include/fs_loader.h |  33 ++++++
> >  3 files changed, 339 insertions(+)
> >  create mode 100644 common/fs_loader.c
> >  create mode 100644 include/fs_loader.h
> > 
> [...]
> > 
> > diff --git a/include/fs_loader.h b/include/fs_loader.h
> > new file mode 100644
> > index 0000000..35a6b5b
> > --- /dev/null
> > +++ b/include/fs_loader.h
> > @@ -0,0 +1,33 @@
> > +/*
> > + * Copyright (C) 2017 Intel Corporation <www.intel.com>
> > + *
> > + * SPDX-License-Identifier:    GPL-2.0
> > + */
> > +#ifndef _FS_LOADER_H_
> > +#define _FS_LOADER_H_
> > +
> > +#include <linux/types.h>
> > +
> > +struct firmware_priv {
> > +	const char *name;	/* Filename */
> > +	u32 offset;		/* Offset of reading a file */
> > +};
> > 
> This is private to the firmware loader and should be declared locally
> in the source file. That's the whole point of being 'private'.
> You could have different firmware loaders with different requirements
> for their private data, thus there is no use in defining this
> globally.
> 
Okay, i will move this declaration to source file. Any comments to the
source file?
> > 
> > +
> > +struct firmware {
> > +	size_t size;		/* Size of a file */
> > +	const u8 *data;		/* Buffer for file */
> > +	void *priv;		/* Firmware loader private
> > fields */
> > +};
> > +
> 
> Lothar Waßmann

  reply	other threads:[~2017-12-13  4:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 11:56 [U-Boot] [PATCH v3 0/2] Generic firmware loader tien.fong.chee at intel.com
2017-12-12 11:56 ` [U-Boot] [PATCH v3 1/2] spl: Remove static declaration on spl_mmc_find_device function tien.fong.chee at intel.com
2017-12-12 11:56 ` [U-Boot] [PATCH v3 2/2] common: Generic firmware loader for file system tien.fong.chee at intel.com
2017-12-12 14:12   ` Lothar Waßmann
2017-12-13  4:38     ` Chee, Tien Fong [this message]
2017-12-13 10:18   ` Prabhakar Kushwaha
2017-12-13 10:55     ` Lukasz Majewski
2017-12-14  7:10       ` Chee, Tien Fong
2017-12-12 15:51 ` [U-Boot] [PATCH v3 0/2] Generic firmware loader Marek Vasut
2017-12-13  4:39   ` Chee, Tien Fong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513139890.3124.0.camel@intel.com \
    --to=tien.fong.chee@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox