devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
To: Thomas Petazzoni
	<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
	Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Tawfik Bayouk <tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Eran Ben-Avi <benavi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Nadav Haklai <nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Maen Suleiman <maen-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Shadi Ammouri <shadi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Subject: Re: [PATCH 24/32] pci: PCIe driver for Marvell Armada 370/XP systems
Date: Sun, 10 Mar 2013 08:33:08 -1000	[thread overview]
Message-ID: <513CD1E4.6050408@firmworks.com> (raw)
In-Reply-To: <20130310160615.14ba099c@skate>

On 3/10/2013 5:06 AM, Thomas Petazzoni wrote:
> Dear Mitch Bradley,
> 
> On Sat, 09 Mar 2013 19:04:51 -1000, Mitch Bradley wrote:
>  
>> As stated in my recent reply to Jason, I thing the correct property is
>> "ranges".  "Ranges" translates mappable child address space addresses
>> into parent addresses, and that is exactly what is going on.  A specific
>> subset of config addresses is mappable into parent MMIO space.
> 
> The PCI configuration space is *not* mapped in the MMIO space on
> Marvell hardware. In the MMIO space of each PCIe interface, there are
> many registers, only *two* of which are dedicated to accessing the PCI
> configuration space:
> 
>  * One register to set the offset in the PCI configuration space.
> 
>  * One register to read or write a value in the PCI configuration, at
>    the offset specified in the first register.
> 
> See the implementation of mvebu_pcie_hw_rd_conf() and
> mvebu_pcie_hw_wr_conf() in the driver.
> 
> So really, the values specified in the reg = <...> property are *not*
> the PCI configuration spaces mapped in the MMIO space. They represent a
> bunch of per PCIe interface registers used to configure them, get the
> status of the link... and access, through an indirect mechanism, the
> PCI configuration space.
> 
> Does this helps?

I agree that PCI config space accesses to *downstream* devices is via an
indirect-access register pair.

The question is, does that indirect-access mechanism apply also to the
internal config headers for the root port bridges?

According to section 20.15 of the MV78230 functional spec that I am
looking at, the configuration header registers are mapped to the
internal memory space.  That section is unclear about whether those
registers are CPU-accessible via indirect-access config transactions.
When the PCIe hardware is configured for endpoint mode, the internal
headers can be accessed via PCIe config transactions from an external
port, but in root complex mode, the possibility of indirect access from
the CPU is not mentioned.

The manual is a little vague in some respects, but it does say quite
clearly that MMIO access to the root port bridge config header is
possible, and it lists the MMIO addresses thereof (section A.10).

So we all agree that access to external (downstream) config registers is
via the indirect register pair.  The unclear thing is whether the
internal config registers for the root port bridges can be indirectly
accessed.

Do we have empirical evidence that indirect-access works to the internal
root port bridge config headers?

> 
> Thanks,
> 
> Thomas
> 

      reply	other threads:[~2013-03-10 18:33 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1360686546-24277-1-git-send-email-thomas.petazzoni@free-electrons.com>
     [not found] ` <1360686546-24277-25-git-send-email-thomas.petazzoni@free-electrons.com>
     [not found]   ` <20130212223511.GB31555@obsidianresearch.com>
     [not found]     ` <20130306105441.4d24033e@skate>
     [not found]       ` <20130306121118.GA17079@avionic-0098.mockup.avionic-design.de>
     [not found]         ` <20130306180946.GA2433@obsidianresearch.com>
     [not found]           ` <20130307080832.GD3451@avionic-0098.mockup.avionic-design.de>
     [not found]             ` <20130307174955.GC20840@obsidianresearch.com>
     [not found]               ` <20130307194830.GA1811@avionic-0098.mockup.avionic-design.de>
     [not found]                 ` <20130307200235.GB20695@obsidianresearch.com>
     [not found]                   ` <20130307200235.GB20695-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-07 20:47                     ` [PATCH 24/32] pci: PCIe driver for Marvell Armada 370/XP systems Thierry Reding
2013-03-08  0:05                       ` Rob Herring
2013-03-08  7:14                         ` Thierry Reding
2013-03-08 16:52                           ` Jason Gunthorpe
2013-03-08 19:12                             ` Thierry Reding
     [not found]                               ` <20130308191227.GA6551-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-03-08 19:43                                 ` Mitch Bradley
2013-03-08 20:02                                   ` Jason Gunthorpe
     [not found]                                     ` <20130308200245.GC29435-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-08 20:13                                       ` Thierry Reding
2013-03-10 15:09                                         ` Thomas Petazzoni
2013-03-11  8:08                                           ` Thierry Reding
2013-03-08 23:46                                       ` Mitch Bradley
2013-03-09  1:31                                         ` Jason Gunthorpe
     [not found]                                           ` <20130309013152.GA3883-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-10  4:52                                             ` Mitch Bradley
2013-03-10  6:55                                               ` Jason Gunthorpe
     [not found]                                                 ` <20130310065539.GA14704-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-11  5:46                                                   ` Mitch Bradley
     [not found]                                                     ` <513D6F9C.9000100-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2013-03-11  7:46                                                       ` Thierry Reding
     [not found]                                                         ` <20130311074615.GA6365-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-03-11 18:04                                                           ` Mitch Bradley
2013-03-11 18:23                                                             ` Jason Gunthorpe
     [not found]                                                               ` <20130311182339.GB10992-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-11 19:49                                                                 ` Mitch Bradley
2013-03-11 18:15                                                     ` Jason Gunthorpe
     [not found]                                                       ` <20130311181554.GA10992-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-11 21:50                                                         ` Mitch Bradley
2013-03-11 23:25                                                           ` Jason Gunthorpe
     [not found]                                                             ` <20130311232516.GA13873-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-11 23:38                                                               ` Mitch Bradley
     [not found]                                                                 ` <513E6AFE.3090304-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2013-03-12  7:08                                                                   ` Thierry Reding
2013-03-12 15:57                                                                     ` Jason Gunthorpe
2013-03-12 20:38                                                                       ` Thierry Reding
2013-03-12 21:03                                                                         ` Jason Gunthorpe
2013-03-12 21:30                                                                           ` Thierry Reding
2013-03-12 22:08                                                                             ` Jason Gunthorpe
2013-03-12 23:25                                                                               ` Mitch Bradley
2013-03-13  8:18                                                                               ` Thierry Reding
2013-03-13 17:02                                                                                 ` Jason Gunthorpe
     [not found]                                                                                   ` <20130313170205.GB24042-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-03-13 19:26                                                                                     ` Thierry Reding
2013-03-13 19:59                                                                                       ` Jason Gunthorpe
2013-03-13 20:54                                                                                         ` Thierry Reding
2013-03-13 20:58                                                                                       ` Mitch Bradley
2013-03-13 21:33                                                                                         ` Thierry Reding
2013-03-13 22:48                                                                                           ` Mitch Bradley
2013-03-14  0:43                                                                                             ` Rob Herring
2013-03-14  1:20                                                                                               ` Mitch Bradley
2013-03-14  7:11                                                                                             ` Thierry Reding
2013-03-14  4:56                                                                                           ` Stephen Warren
     [not found]                                                                                         ` <5140E85A.3040900-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2013-03-13 22:02                                                                                           ` Thierry Reding
2013-03-13 22:21                                                                                             ` Jason Gunthorpe
2013-03-14  9:01                                                                                               ` Thierry Reding
2013-03-14 17:25                                                                                                 ` Jason Gunthorpe
2013-03-14 20:38                                                                                                   ` Thierry Reding
2013-03-14 21:05                                                                                                     ` Jason Gunthorpe
2013-03-14 21:10                                                                                                     ` Mitch Bradley
2013-03-14 21:09                                                                                                   ` Thierry Reding
2013-03-14 21:29                                                                                                     ` Jason Gunthorpe
2013-03-14 21:37                                                                                                       ` Thierry Reding
2013-03-13 22:22                                                                                         ` Jason Gunthorpe
2013-03-09  8:58                               ` Thomas Petazzoni
2013-03-08 23:12                           ` Rob Herring
     [not found]                             ` <513A7044.1020700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-09 11:10                               ` Thierry Reding
2013-03-10  5:04                               ` Mitch Bradley
2013-03-10 15:06                                 ` Thomas Petazzoni
2013-03-10 18:33                                   ` Mitch Bradley [this message]

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=513CD1E4.6050408@firmworks.com \
    --to=wmb-d5eqfidgl7eakbo8gow8eq@public.gmane.org \
    --cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=andrew-g2DYL2Zd6BY@public.gmane.org \
    --cc=benavi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maen-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=shadi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@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).