linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pratyush.anand@st.com (Pratyush Anand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V7 02/17] SPEAr13xx: Add PCIe host controller base driver support.
Date: Wed, 27 Apr 2011 12:22:49 +0530	[thread overview]
Message-ID: <4DB7BD41.50108@st.com> (raw)
In-Reply-To: <201104172219.01493.arnd@arndb.de>

On 4/18/2011 1:49 AM, Arnd Bergmann wrote:
> On Wednesday 13 April 2011, pratyush wrote:
>>> Other vendors are likely to have the same IP, but none of the code here
>>> is written to be common. In light of recent discussions this would be a
>>> good candidate to avoid future duplication.
>>>
>>> It doesn't appear that pcie.c contains much SPEAr specific code. The few
>>> defines and structs that are could be passed in. Some comments below.
>>>
>>
>> Yes, this driver is for an PCIe host which uses Synopsys IP. But 
>> SPEAr specific wrapper has been used heavily in the code.
>> Synopsis provides some signal which can be interfaced to registers
>> for CPU access. This interface can be different for different vendor.
>> All the application registers are SPEAr specific representation
>> and may not be same for other vendor.
>> So all accesses for app_reg in the code may not be similar in other 
>> implementation. 
>>
>> ...
> 
> But they could also be the same in another implementation, right?
> 
> I would suggest in general to make the code as generic as easily possible
> and put it into an appropriate location for sharing, but not spending

Our next SOC has new revision of Synopsys PCIe Controller, which has more
generic application interface registers. I am planning to divide code for
this new SOC, so that it would be easily usable if someone has same controller.
What could be the best location for shared code?

Regards
Pratyush

> too much effort on making it more generic than needed.
> 
> The next port that needs a variant of the code can then modify the
> driver accordingly to add the necessary differences and ways to
> detect them.
> 
> 	Arnd
> .
> 

  reply	other threads:[~2011-04-27  6:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1298977728.git.viresh.kumar@st.com>
2011-03-23  4:52 ` [PATCH V7 02/17] SPEAr13xx: Add PCIe host controller base driver support Viresh Kumar
2011-03-23  8:28   ` Arnd Bergmann
2011-04-11 12:26     ` pratyush
2011-04-11 15:22       ` Arnd Bergmann
2011-04-13 12:11         ` pratyush
2011-04-12 15:32   ` Rob Herring
2011-04-13 12:25     ` pratyush
2011-04-17 20:19       ` Arnd Bergmann
2011-04-27  6:52         ` Pratyush Anand [this message]
2011-04-27  9:03           ` Arnd Bergmann

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=4DB7BD41.50108@st.com \
    --to=pratyush.anand@st.com \
    --cc=linux-arm-kernel@lists.infradead.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).