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 v2 3/3] common: Generic loader for file system
Date: Mon, 11 Jun 2018 05:01:59 +0000	[thread overview]
Message-ID: <1528693318.9950.5.camel@intel.com> (raw)
In-Reply-To: <0115d042-8f5d-45ff-5605-7343b051db12@denx.de>

On Thu, 2018-06-07 at 12:29 +0200, Marek Vasut wrote:
> On 06/07/2018 12:11 PM, Chee, Tien Fong wrote:
> > 
> > On Thu, 2018-06-07 at 11:50 +0200, Marek Vasut wrote:
> > > 
> > > On 06/07/2018 11:45 AM, Chee, Tien Fong wrote:
> > > > 
> > > > 
> > > > On Thu, 2018-06-07 at 10:41 +0200, Marek Vasut wrote:
> > > > > 
> > > > > 
> > > > > On 06/07/2018 10:36 AM, Chee, Tien Fong wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Thu, 2018-06-07 at 08:51 +0200, Marek Vasut wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On 06/07/2018 06:04 AM, Chee, Tien Fong wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Wed, 2018-06-06 at 10:39 +0200, Marek Vasut wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > On 05/24/2018 07:04 AM, 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
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > ---
> > > > > > > > > [...]
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > +static int fs_loader_probe(struct udevice *dev)
> > > > > > > > > > +{
> > > > > > > > > > +	return 0;
> > > > > > > > > > +};
> > > > > > > > > > +
> > > > > > > > > > +static const struct udevice_id fs_loader_ids[] = {
> > > > > > > > > > +	{ .compatible = "fs_loader"},
> > > > > > > > > Why exactly is there a DT compatible for a firmware
> > > > > > > > > loader?
> > > > > > > > > 
> > > > > > > > Correct me if i'm wrong, this is required to look the
> > > > > > > > platform
> > > > > > > > data
> > > > > > > > from DTS, right? Details of DTS in patch 2.
> > > > > > > How so ? The FW loader should behave as a library for
> > > > > > > other
> > > > > > > drivers
> > > > > > > to
> > > > > > > use, not like a driver.
> > > > > > > 
> > > > > > The fs_loader node in DTS just provide a way for user to
> > > > > > tell
> > > > > > the
> > > > > > firmware loader what storage device and default partition
> > > > > > to
> > > > > > load
> > > > > > data
> > > > > > from. Default partition can be overriden through the
> > > > > > variable
> > > > > > environment.
> > > > > So that's sitting in the chosen node ? But why do you need to
> > > > > match
> > > > > on it ?
> > > > > 
> > > > This is new device tree binding for firmware loader called
> > > > fs_loader
> > > > node. firmware loader need to know where is the storage device
> > > > it
> > > > need
> > > > to load from. Those storage device would be defined in
> > > > fs_loader
> > > > node.
> > > This is a configuration. You do not need (new) a DT compatible
> > > for
> > > that.
> > > So why is the DT compatible even needed in the FW loader at all ?
> > > 
> > I thought DT compatible is used by driver to find the fs_loader
> > node in
> > DTS. May be i am wrong.
> There should be no FW loader in the DTS. Why would there be one ?
> 
 I added DTS support for user to define storage type and default
partition. So you want me to remove the DTS?
Removing the DTS, then user can only set storage type and partition
through dev instance. So, this design OK for you?
> > 
> > > 
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > Caller/other drivers can create different firmware loader
> > > > > > instance
> > > > > > based on different fs_loader node(different storage device)
> > > > > > for
> > > > > > their
> > > > > > loading purpose.
> > > > > They can, but that could be done even without the DT
> > > > > compatible.
> > > > > 
> > > > Yes, once you get dev, you can set the storage type and
> > > > partiiton
> > > > attributes through accessing dev->platdata.
> > > Can you show me the DT patch needed for this to work ?
> > > 
> > I can send you the patches separately, but this driver is designed
> > to
> > work with/without DT.
> This is not a driver though, it should be a library (or so) for
> drivers
> to use.
> 
Yes, this is designed for other drivers to use.
> > 
> > > 
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > Why this cannot be used by other driver?
> > > > > I don't understand the question.
> > > > > 
> > > > I means why u say this firmware loader cannot be used by other
> > > > drivers.
> > > > I have tested with FPGA Manager driver(as caller).
> > > It must be used by other drivers, that is the point.
> > > 
> > yes, it can be used by FPGA manager driver.
> > 
> 

  reply	other threads:[~2018-06-11  5:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24  5:04 [U-Boot] [PATCH v2 0/3] Generic file system firmware loader DM tien.fong.chee at intel.com
2018-05-24  5:04 ` [U-Boot] [PATCH v2 1/3] doc: Add new doc for file system firmware loader driver model tien.fong.chee at intel.com
2018-05-24  5:04 ` [U-Boot] [PATCH v2 2/3] doc: dtbinding: Add file system firmware loader binding document tien.fong.chee at intel.com
2018-05-24  5:04 ` [U-Boot] [PATCH v2 3/3] common: Generic loader for file system tien.fong.chee at intel.com
2018-06-06  8:39   ` Marek Vasut
2018-06-07  4:04     ` Chee, Tien Fong
2018-06-07  6:51       ` Marek Vasut
2018-06-07  8:36         ` Chee, Tien Fong
2018-06-07  8:41           ` Marek Vasut
2018-06-07  9:45             ` Chee, Tien Fong
2018-06-07  9:50               ` Marek Vasut
2018-06-07 10:11                 ` Chee, Tien Fong
2018-06-07 10:29                   ` Marek Vasut
2018-06-11  5:01                     ` Chee, Tien Fong [this message]
2018-06-11  9:39                       ` Marek Vasut
2018-06-11 11:53                         ` Chee, Tien Fong
2018-06-11 11:55                           ` Marek Vasut
2018-06-11 12:42                             ` Chee, Tien Fong
2018-06-11 13:38                               ` Marek Vasut
2018-06-11 13:55                                 ` Chee, Tien Fong
2018-06-11 14:03                                   ` Marek Vasut
2018-06-11 14:13                                     ` Chee, Tien Fong
2018-06-11 14:15                                       ` Marek Vasut
2018-06-11 19:38                                         ` Simon Glass
2018-06-12  4:25                                           ` Chee, Tien Fong
2018-06-06  5:26 ` [U-Boot] [PATCH v2 0/3] Generic file system firmware loader DM 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=1528693318.9950.5.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