All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Jingoo Han <jingoohan1@gmail.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Vidya Sagar <vidyas@nvidia.com>,
	Manikanta Maddireddy <mmaddireddy@nvidia.com>,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] PCI: designware: don't hard-code DBI/ATU offset
Date: Thu, 15 Nov 2018 10:24:10 -0800	[thread overview]
Message-ID: <8a004998-095c-b7a9-0b41-bf6a61f2380d@wwwdotorg.org> (raw)
In-Reply-To: <3f4797f3-5477-a31f-9292-ac89c21533fd@synopsys.com>

On 11/14/18 9:33 PM, Gustavo Pimentel wrote:
> Hi Stephen,
> 
> On 14/11/2018 04:31, Stephen Warren wrote:
>> On 11/12/18 9:19 PM, Gustavo Pimentel wrote:
>>> Hi Stephen,
>>>
>>> I'd suggest to change the designware on the patch name by dwc and use another
>>> description for the patch instead of don't hard-code DBI/ATU offset.
>>
>> What issue do you see with the patch description? I believe it's
>> correct/accurate. Perhaps the confusion is due to the question you
>> raised below; see my answer there.
>>
>>> On 12/11/2018 22:57, Stephen Warren wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> The DWC PCIe core contains various separate register spaces: DBI, DBI2,
>>>> ATU, DMA, etc. The relationship between the addresses of these register
>>>> spaces is entirely determined by the implementation of the IP block, not
>>>> by the IP block design itself. Hence, the DWC driver must not make
>>>> assumptions that one register space can be accessed at a fixed offset from
>>>> any other register space. To avoid such assumptions, introduce an
>>>> explicit/separate register pointer for the ATU register space. In
>>>> particular, the current assumption is not valid for NVIDIA's T194 SoC.
>>>
>>> If I understood this patch correctly, you basically replace the dbi_base offset
>>> by atu_base offset that still depends of dbi_base offset.
>>
>> That's not what the patch does.
>>
>> The patch leaves most DBI accesses still using dbi_base, but updates
>> just a few accesses to use atu_base. Thus, after the patch, all accesses
>> use the correct base address for the register being accessed.
>>
>> There is a default value supplied for atu_base, which does indeed depend
>> on dbi_base. This maintains backwards compatibility, so that all the
>> existing drivers don't need to be updated to explicitly set atu_base,
>> and will continue to use the existing offset between DBI and ATU base.
> 
> I think we're talking about the same thing, but with different terms.
> 
>> In the future, we'll send a driver for the NVIDIA Tegra SoC which does
>> explicitly set atu_base to a non-default value.
> 
> That's what I wanted to know. Because otherwise this patch was just to turn the
> code more readable.

So it sounds like I've addressed your questions? If so, is the next step
for you to ack the patch and Bjorn to apply it? Thanks!

  reply	other threads:[~2018-11-15 18:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 22:57 [PATCH] PCI: designware: don't hard-code DBI/ATU offset Stephen Warren
2018-11-13  5:19 ` Gustavo Pimentel
2018-11-14  4:31   ` Stephen Warren
2018-11-15  5:33     ` Gustavo Pimentel
2018-11-15 18:24       ` Stephen Warren [this message]
2018-11-20  9:41         ` Kishon Vijay Abraham I
2018-11-20 16:26           ` Stephen Warren
2018-11-20 17:44         ` Gustavo Pimentel

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=8a004998-095c-b7a9-0b41-bf6a61f2380d@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=bhelgaas@google.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=jingoohan1@gmail.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mmaddireddy@nvidia.com \
    --cc=swarren@nvidia.com \
    --cc=vidyas@nvidia.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.