All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <danielwa@cisco.com>
To: Scott Wood <scott.wood@nxp.com>,
	Raghav Dogra <raghav.dogra@nxp.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Jaiprakash Singh <b44839@freescale.com>,
	Scott Wood <scottwood@freescale.com>,
	Lijun Pan <Lijun.Pan@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>
Subject: Re: t1040 IFC flash driver Extended Chip Select
Date: Thu, 7 Jul 2016 13:52:12 -0700	[thread overview]
Message-ID: <577EC0FC.8020304@cisco.com> (raw)
In-Reply-To: <DB5PR0401MB1928FF35ABE36D8E07BAA079913B0@DB5PR0401MB1928.eurprd04.prod.outlook.com>

On 07/07/2016 01:34 PM, Scott Wood wrote:
> On 07/07/2016 02:44 PM, Daniel Walker wrote:
>> It seems natual that if cspr is in the device tree, you would also want
>> cspr_ext because both are used to identify the device. The fact that
>> it's missing to me is strange. As I said in my prior email, even if
>> uboot sets those, you could have cases when it's wrong. Why would I not
>> be able to simply change the device tree to correct it ?
> CSPR is not in the device tree.  The physical address of each chipselect
> is in the device tree (via the ranges property on the IFC node) and that
> covers both the address portion of CSPR, and CSPR_EXT.
>
> What I do see missing from the driver is using CSPR_EXT to match the
> device, most likely because the initial IFC version didn't have
> CSPR_EXT.  Fixing that doesn't require a device tree change.

Ok ..

>
>>>>> The information that is missing from the device tree, that currently
>>>>> must come from boot software programming the registers, is the various
>>>>> attributes that get programmed in CSPR/CSOR.
>>>>>
>>>> Like I said mine doesn't do this, so it's required that it be set in an
>>>> alternative way. The only alternative we have currently is adding some
>>>> code to manually set the values but it's not ideal (and not upstreamable).
>>> I wouldn't have a problem merging code in a platform board file that
>>> writes a single register that a hard-to-update bootloader forgot to write.
>> I can submit it to you, but I would much prefer a general solution that
>> others can use without having to create board files. Our goal has been
>> to reduce board files as much as possible, do you not agree with that?
> I do agree that board files are not ideal, but they're still a
> reasonable place to put board-specific quirks.
>
> I don't want to put a half-measure into the main driver and pretend it's
> a general solution.  If the driver is to set the address, it should also
> set the rest of CSPR/CSOR, which requires that information to be added
> to the device tree.  If you want to propose the latter I have no problem
> with that, as long as compatibility is maintained.

I suspect that add the usage of cspr_ext into the driver would fix the 
issue we have. It reads like you would find that acceptable ?

I'm not really stuck on a particular device tree solution, but it was 
what we initial though of.

So you would support adding usage of of_address_to_resource to set the 
cspr and cspr_ext in the driver ?

Daniel

  reply	other threads:[~2016-07-07 20:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 20:23 t1040 IFC flash driver Extended Chip Select Daniel Walker
2016-07-07  0:57 ` Scott Wood
2016-07-07 15:48   ` Daniel Walker
2016-07-07 19:26     ` Scott Wood
2016-07-07 19:44       ` Daniel Walker
2016-07-07 20:34         ` Scott Wood
2016-07-07 20:52           ` Daniel Walker [this message]
2016-07-07 21:23             ` Scott Wood
2016-07-07 21:49               ` Daniel Walker
2016-07-07 21:59                 ` Scott Wood
2016-07-07 22:01                   ` Daniel Walker
2016-07-07 22:37                     ` Scott Wood
2016-07-07 23:48                       ` Daniel Walker
2016-07-09  1:12                         ` Scott Wood
2016-07-11 16:36                           ` Daniel Walker
2016-07-11 16:55                             ` Scott Wood
2016-07-11 17:10                               ` Daniel Walker
2016-07-11 18:27                                 ` Scott Wood

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=577EC0FC.8020304@cisco.com \
    --to=danielwa@cisco.com \
    --cc=Lijun.Pan@freescale.com \
    --cc=b44839@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=raghav.dogra@nxp.com \
    --cc=scott.wood@nxp.com \
    --cc=scottwood@freescale.com \
    --cc=xe-kernel@external.cisco.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.