From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org"
<B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
"pawel.moll-5wv7dgnIgG8@public.gmane.org"
<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"mark.rutland-5wv7dgnIgG8@public.gmane.org"
<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org"
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
"Mingkai.Hu-KZfg59tc24xl57MIdRCFDg@public.gmane.org"
<Mingkai.Hu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: [PATCH 2/2] spi/fsl-lib: Get the SPI controller bus number from DTS
Date: Mon, 17 Mar 2014 13:01:09 +0000 [thread overview]
Message-ID: <20140317130109.GE11706@sirena.org.uk> (raw)
In-Reply-To: <c4b28b01b2f544ca9d264eaee2542257-ufbTtyGzTTTk7ZsBhlipOOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2218 bytes --]
On Mon, Mar 17, 2014 at 05:11:11AM +0000, B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > On Fri, Mar 14, 2014 at 05:35:57PM +0800, Hou Zhiqiang wrote:
> > > Get the spi_master's bus_num from DTS to make the spi_master's name
> > > static. So "mtdparts=spi.bus_num.chip_select:..." in cmdline can be
> > > used to asign mtd partions of spi flash.
> > If we are going to do this it shouldn't be device specific (it should be
> > done in the framework since nothing is specific to the controller there)
> > but I'm not convinced that we should be doing it - this is all very Linux
> > specific.
> This patch just assign a bus number to the controller. It is driver's
> responsibility to distribute a bus number to spi_master and the definition
> of bus_num is used to distinguish controllers. So, it is specific for the
> controller and doesn't affect the framework.
You are adding a property to specify a bus number. There is no reason
why such a property should be specific to a single controller, every
controller in every system has a bus number assigned to it so if we have
a way to specify one controller via the device tree we should have a way
to specify it for all.
> > The DT already has support for specifying flash layouts, can't those be
> > used (for example via chosen if they're not fixed for the board)? Or if
> > it's just picking the correct filesystem then UUIDs and labels are the
> > standard way to do things.
> The DT specifying flash layouts is ok. There is another way to make the
> flash layouts using command line, but it is not safe because of the dynamic
> bus_num. It is not the reason that the way of DT is supported flash layouts,
> to live the other way unsafe, right?
This sounds to me like we need a better way of talking about flash
device names on the Linux command line rather than a way to fix the bus
number - for example, being able to refer to them using a fixed property
like the physical address. Being able to refer to devices via an alias
assigned in the DT would also be useful (and more readable), I think
there may already be a mechanism for doing that which would need to be
plumbed in but I'm not 100% sure.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-03-17 13:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 9:35 [PATCH 1/2] powerpc/85xx: Add a property bus-num for espi controller Hou Zhiqiang
[not found] ` <1394789757-40732-1-git-send-email-B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-03-14 9:35 ` [PATCH 2/2] spi/fsl-lib: Get the SPI controller bus number from DTS Hou Zhiqiang
[not found] ` <1394789757-40732-2-git-send-email-B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-03-14 19:19 ` Mark Brown
[not found] ` <20140314191922.GA366-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-03-17 5:11 ` B48286-KZfg59tc24xl57MIdRCFDg
[not found] ` <c4b28b01b2f544ca9d264eaee2542257-ufbTtyGzTTTk7ZsBhlipOOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-03-17 13:01 ` Mark Brown [this message]
[not found] ` <20140317130109.GE11706-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-03-18 7:40 ` B48286-KZfg59tc24xl57MIdRCFDg
[not found] ` <9186860716f446f9a5773e7e47d39114-ufbTtyGzTTTk7ZsBhlipOOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-03-18 8:55 ` Geert Uytterhoeven
[not found] ` <CAMuHMdWHSVPDZ9q9rw0FZqNrR+E0q9pQcYLRiseopoM-K-5svg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-18 9:34 ` B48286-KZfg59tc24xl57MIdRCFDg
[not found] ` <01e4d20dc3d94e2f8f7252225932c774-ufbTtyGzTTTk7ZsBhlipOOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-03-18 22:08 ` Scott Wood
[not found] ` <1395180522.12479.214.camel-88ow+0ZRuxG2UiBs7uKeOtHuzzzSOjJt@public.gmane.org>
2014-03-19 2:49 ` B48286-KZfg59tc24xl57MIdRCFDg
[not found] ` <83b4fe0227144d3f89543dfa92399dcd-ufbTtyGzTTTk7ZsBhlipOOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-03-19 3:04 ` Scott Wood
2014-03-19 10:37 ` Mark Brown
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=20140317130109.GE11706@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=Mingkai.Hu-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).