All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, "Rafał Miłecki" <zajec5@gmail.com>,
	"Joachim Eastwood" <manabian@gmail.com>,
	"Ezequiel Garcia" <ezequiel@vanguardiasur.com.ar>,
	"Han Xu" <han.xu@freescale.com>
Subject: Re: [RFT PATCH 1/4] mtd: fsl-quadspi: use automatic spi-nor detection
Date: Fri, 14 Aug 2015 01:54:47 +0200	[thread overview]
Message-ID: <201508140154.47179.marex@denx.de> (raw)
In-Reply-To: <20150813232447.GJ60523@google.com>

On Friday, August 14, 2015 at 01:24:47 AM, Brian Norris wrote:
> On Fri, Aug 14, 2015 at 01:09:14AM +0200, Marek Vasut wrote:
> > This is something I don't quite understand. So we have a SPI NOR
> > controller, which as it's own struct device instance.
> 
> Right.
> 
> > This controller can have multiple SPI NORs on it. Each SPI NOR has it's
> > own struct spi_nor instance and struct mtd_info instance, right?
> 
> Right.
> 
> > But, all of the SPI NORs share the same struct device as the controller.
> > Do I understand that correctly ?
> 
> Mostly yes. But your next statement doesn't quite follow in my mind, so
> maybe you've missed something.

I think maybe, just maybe, I should've asked this in an entirely separate
thread, sorry.

> There is typically a single platform device (and associated struct
> device) that represents the fsl-quadspi controller.
> 
> (Pedantic side point: each MTD actually creates one or more struct
> device objects; one for the master MTD, and one for each partition that
> might be created. But I don't think you're asking about these struct
> device's.)

Right.

> But none of this is super-relevant to this patch; I'm not talking about
> struct devices (think kobjects, Linux driver model), I'm dealing with
> struct device_node (think device tree, of_*() APIs, etc.).
> 
> Now, each flash connected to the controller has its own device_node. All
> this patch is saying is that we don't need to know much about that node;
> as long as it responds to the READ ID command properly, spi_nor_scan()
> can autodetect it.

Right.

> > Does that make sense to NOT allocate a new
> > struct device for each of the SPI NORs ?
> 
> I don't quite see how this question relates. Are you suggesting that we
> should be using fewer *device_node* structs? That would involve
> rewriting the device tree, I believe.
> 
> Or perhaps I've misunderstood your train of thought.

Sorry, I should've asked about this in a separate thread.

Best regards,
Marek Vasut

  reply	other threads:[~2015-08-14  0:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 22:46 [RFT PATCH 0/4] mtd: spi-nor: code refactoring and layering Brian Norris
2015-08-13 22:46 ` [RFT PATCH 1/4] mtd: fsl-quadspi: use automatic spi-nor detection Brian Norris
2015-08-13 23:09   ` Marek Vasut
2015-08-13 23:24     ` Brian Norris
2015-08-13 23:54       ` Marek Vasut [this message]
2015-08-14  5:40       ` Michal Suchanek
2015-08-18  2:56         ` Brian Norris
2015-08-18  3:15           ` Han Xu
2015-08-18  8:09             ` Huang Shijie
2015-09-01 18:41               ` Brian Norris
2015-09-01 23:40   ` Han Xu
2015-09-01 23:54     ` Brian Norris
2015-08-13 22:46 ` [RFT PATCH 2/4] mtd: spi-nor: assign mtd->priv in spi_nor_scan() Brian Norris
2015-08-14 14:48   ` Joachim Eastwood
2015-08-13 22:46 ` [RFT PATCH 3/4] mtd: spi-nor: add forward declaration for mtd_info Brian Norris
2015-08-14 14:49   ` Joachim Eastwood
2015-08-13 22:46 ` [RFT PATCH 4/4] mtd: spi-nor: embed struct mtd_info within struct spi_nor Brian Norris
2015-08-14 14:52   ` Joachim Eastwood

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=201508140154.47179.marex@denx.de \
    --to=marex@denx.de \
    --cc=computersforpeace@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=han.xu@freescale.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=manabian@gmail.com \
    --cc=zajec5@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.