Devicetree
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: Detlev Zundel <dzu-ynQEQJNshbs@public.gmane.org>,
	Markus Fischer <markus.fischer.ec-Jj5Fu8i2Z9Q@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Michael Weiss <michael.weiss-Jj5Fu8i2Z9Q@public.gmane.org>,
	linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	Wolfgang Grandegger <wg-ynQEQJNshbs@public.gmane.org>
Subject: Re: [PATCH v3 2/2] powerpc/mpc5121: add initial support for PDM360NG  board
Date: Tue, 27 Jul 2010 19:28:56 +0200	[thread overview]
Message-ID: <20100727192856.63edc8e0@wker> (raw)
In-Reply-To: <AANLkTika=KeKcaY_FF8tN5Fy-H+cozjZsGObXoQhKiVh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, 27 Jul 2010 10:58:33 -0600
Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
...
> >> > +               spi@11900 {
> >> > +                       compatible = "fsl,mpc5121-psc-spi", "fsl,mpc5121-psc";
> >> > +                       cell-index = <9>;
> >>
> >> Try to drop the cell-index properties.  They are almost always misused.
> >
> > Removing cell-index would require changing the spi driver's probe.
> > Currently cell-index is used to set spi bus number. What could be used
> > for bus enumeration instead? Is it okay to use part of the spi node
> > address? e.g. obtaining the offset 0x11900, masking out the unrelated
> > bits and shifting by 8 would deliver unique index 9 for PSC9 in SPI
> > mode. This would work for all 12 PSC SPI controllers of mpc5121.
> 
> Does the spi bus number really matter?  The device tree context gives
> you a firm association between spi masters and devices which doesn't
> require assigning a specific bus number.  The core spi code can
> dynamically assign a bus number for the bus by setting bus_num to -1.

The bus number is used in the mpc5121 psc spi driver to obtain correct
clock for PSC in question (0 to 11) and to enable the PSC clock at probe
time. Therefore using dynamically assigned bus number would require another
change to the spi driver.

...
> > This requires fixing the mpc5121 psc spi driver to create spi child
> > nodes of the spi master node. I have already send the appropriate
> > patch to spi-devel list, but it is not the right approach to call
> > of_register_spi_devices() in each driver.
> 
> It's not wrong; but it isn't ideal either.
> 
> > Do you plan to fix it in
> > core spi code in v2.6.36?
> 
> Apparently I no longer have to because you've gone ahead and done it
> for me anyway.  :-)  I'll take a look at that patch and send you my
> comments.

Okay, thanks,
Anatolij

  parent reply	other threads:[~2010-07-27 17:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1272659448-23302-1-git-send-email-agust@denx.de>
     [not found] ` <1272659448-23302-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-04-30 20:30   ` [PATCH 2/2] powerpc/mpc5121: add initial support for PDM360NG board Anatolij Gustschin
     [not found]     ` <1272659448-23302-2-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-05-02 14:54       ` Grant Likely
2010-05-03  9:22         ` Anatolij Gustschin
     [not found]         ` <g2tfa686aa41005020754t46934f13hbd5c75a6b7668a54-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-05-03 16:34           ` Scott Wood
     [not found]             ` <4BDEFB13.5060407-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2010-05-19 21:27               ` Grant Likely
2010-05-19 21:37                 ` Scott Wood
     [not found]                   ` <4BF45A1F.70100-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2010-05-19 21:47                     ` Grant Likely
     [not found]                       ` <AANLkTinxuFz3SSLZtF3yGYtRN8nsW8_6EDiqzmJilYE9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-22 21:39                         ` Scott Wood
2010-05-03 10:23       ` [PATCH v2 " Anatolij Gustschin
     [not found]         ` <1272882222-12253-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-07-23 13:49           ` [PATCH v3 " Anatolij Gustschin
     [not found]             ` <1279892973-24110-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2010-07-25  7:42               ` Grant Likely
     [not found]                 ` <AANLkTi=Ee6HR+Ux0g4V1+81DXUmsO=UDhi6jWsDgGchv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27 10:36                   ` Anatolij Gustschin
2010-07-27 16:58                     ` Grant Likely
     [not found]                       ` <AANLkTika=KeKcaY_FF8tN5Fy-H+cozjZsGObXoQhKiVh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27 17:28                         ` Anatolij Gustschin [this message]
2010-07-27 17:43                           ` Grant Likely
2010-07-27 21:26               ` [PATCH v4 " Anatolij Gustschin

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=20100727192856.63edc8e0@wker \
    --to=agust-ynqeqjnshbs@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dzu-ynQEQJNshbs@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=markus.fischer.ec-Jj5Fu8i2Z9Q@public.gmane.org \
    --cc=michael.weiss-Jj5Fu8i2Z9Q@public.gmane.org \
    --cc=wg-ynQEQJNshbs@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