linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pcie designware question
@ 2013-12-19 22:01 Karicheri, Muralidharan
  2013-12-19 22:57 ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Karicheri, Muralidharan @ 2013-12-19 22:01 UTC (permalink / raw)
  To: linux-pci@vger.kernel.org

Hi,

I am working to port my pcie driver to pcie-designware core driver. The pcie sub system
 on our platform  has 32 OUTBOUND regions and 2 INBOUND regions. In my current driver,
I use internal memory map of CPU to access the RC's config/application space as well EP's
config space. a 4K range is available to access the EP's config space. To allow write/read to
the EP's config space, the driver basically write the bus, device and function number to the
 application CFG_SETUP register and then access the corresponding EP's config register.

I have reviewed the designware.c code and the glue logic driver pci-exynos.c and couldn't
understand few things.

1. Our pcie ss is based on designware core and following addresses are not listed in our IP's
 data manual. Where is defined? It does show the rest of the offsets defined in
 drivers/pci/host/designware.c and 

#define PCIE_ATU_VIEWPORT               0x900
#define PCIE_ATU_REGION_INBOUND         (0x1 << 31)
#define PCIE_ATU_REGION_OUTBOUND        (0x0 << 31)
#define PCIE_ATU_REGION_INDEX1          (0x1 << 0)
#define PCIE_ATU_REGION_INDEX0          (0x0 << 0)
#define PCIE_ATU_CR1                    0x904
#define PCIE_ATU_TYPE_MEM               (0x0 << 0)
#define PCIE_ATU_TYPE_IO                (0x2 << 0)
#define PCIE_ATU_TYPE_CFG0              (0x4 << 0)
#define PCIE_ATU_TYPE_CFG1              (0x5 << 0)
#define PCIE_ATU_CR2                    0x908
#define PCIE_ATU_ENABLE                 (0x1 << 31)
#define PCIE_ATU_BAR_MODE_ENABLE        (0x1 << 30)
#define PCIE_ATU_LOWER_BASE             0x90C
#define PCIE_ATU_UPPER_BASE             0x910
#define PCIE_ATU_LIMIT                  0x914
#define PCIE_ATU_LOWER_TARGET           0x918
#define PCIE_ATU_BUS(x)                 (((x) & 0xff) << 24)
#define PCIE_ATU_DEV(x)                 (((x) & 0x1f) << 19)
#define PCIE_ATU_FUNC(x)                (((x) & 0x7) << 16)
#define PCIE_ATU_UPPER_TARGET           0x91C

2. My understanding is that the designware core currently support 2 OUTBOUND regions
and 2 INBOUND regions. Is this true? Is there a plan to support more than 2?
3. Is there a documentation explaining how the ATU handling code is designed? Basically
as I can't find ATU specific registers defined in the ss spec, I am not able to understand
this code. I do see the application space in our ss spec defining OUTBOUND INDEX/OFFSET
register to configure OUTBOUND regions and IB registers to define the INBOUND region.

4. What is the base address variable used to access RC's application register space? dbi_base
in struct pcie_port ? Also I am assuming this is used for accessing this space from internal
CPU bus and cfg0_base and cfg1_base for accessing it from pci bus. Is this right?

I am trying to figure this out myself, but if someone could explain these, that will be great!

Thanks.

Murali Karicheri
Linux Kernel, Software Development



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pcie designware question
  2013-12-19 22:01 pcie designware question Karicheri, Muralidharan
@ 2013-12-19 22:57 ` Bjorn Helgaas
  2013-12-19 23:38   ` Karicheri, Muralidharan
  2013-12-20  4:21   ` Mohit KUMAR DCG
  0 siblings, 2 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2013-12-19 22:57 UTC (permalink / raw)
  To: Karicheri, Muralidharan
  Cc: linux-pci@vger.kernel.org, Mohit Kumar, Jingoo Han

[+cc Mohit, Jingoo]

On Thu, Dec 19, 2013 at 3:01 PM, Karicheri, Muralidharan
<m-karicheri2@ti.com> wrote:
> Hi,
>
> I am working to port my pcie driver to pcie-designware core driver. The pcie sub system
>  on our platform  has 32 OUTBOUND regions and 2 INBOUND regions. In my current driver,
> I use internal memory map of CPU to access the RC's config/application space as well EP's
> config space. a 4K range is available to access the EP's config space. To allow write/read to
> the EP's config space, the driver basically write the bus, device and function number to the
>  application CFG_SETUP register and then access the corresponding EP's config register.
>
> I have reviewed the designware.c code and the glue logic driver pci-exynos.c and couldn't
> understand few things.
>
> 1. Our pcie ss is based on designware core and following addresses are not listed in our IP's
>  data manual. Where is defined? It does show the rest of the offsets defined in
>  drivers/pci/host/designware.c and
>
> #define PCIE_ATU_VIEWPORT               0x900
> #define PCIE_ATU_REGION_INBOUND         (0x1 << 31)
> #define PCIE_ATU_REGION_OUTBOUND        (0x0 << 31)
> #define PCIE_ATU_REGION_INDEX1          (0x1 << 0)
> #define PCIE_ATU_REGION_INDEX0          (0x0 << 0)
> #define PCIE_ATU_CR1                    0x904
> #define PCIE_ATU_TYPE_MEM               (0x0 << 0)
> #define PCIE_ATU_TYPE_IO                (0x2 << 0)
> #define PCIE_ATU_TYPE_CFG0              (0x4 << 0)
> #define PCIE_ATU_TYPE_CFG1              (0x5 << 0)
> #define PCIE_ATU_CR2                    0x908
> #define PCIE_ATU_ENABLE                 (0x1 << 31)
> #define PCIE_ATU_BAR_MODE_ENABLE        (0x1 << 30)
> #define PCIE_ATU_LOWER_BASE             0x90C
> #define PCIE_ATU_UPPER_BASE             0x910
> #define PCIE_ATU_LIMIT                  0x914
> #define PCIE_ATU_LOWER_TARGET           0x918
> #define PCIE_ATU_BUS(x)                 (((x) & 0xff) << 24)
> #define PCIE_ATU_DEV(x)                 (((x) & 0x1f) << 19)
> #define PCIE_ATU_FUNC(x)                (((x) & 0x7) << 16)
> #define PCIE_ATU_UPPER_TARGET           0x91C
>
> 2. My understanding is that the designware core currently support 2 OUTBOUND regions
> and 2 INBOUND regions. Is this true? Is there a plan to support more than 2?
> 3. Is there a documentation explaining how the ATU handling code is designed? Basically
> as I can't find ATU specific registers defined in the ss spec, I am not able to understand
> this code. I do see the application space in our ss spec defining OUTBOUND INDEX/OFFSET
> register to configure OUTBOUND regions and IB registers to define the INBOUND region.
>
> 4. What is the base address variable used to access RC's application register space? dbi_base
> in struct pcie_port ? Also I am assuming this is used for accessing this space from internal
> CPU bus and cfg0_base and cfg1_base for accessing it from pci bus. Is this right?
>
> I am trying to figure this out myself, but if someone could explain these, that will be great!
>
> Thanks.
>
> Murali Karicheri
> Linux Kernel, Software Development
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: pcie designware question
  2013-12-19 22:57 ` Bjorn Helgaas
@ 2013-12-19 23:38   ` Karicheri, Muralidharan
  2013-12-20  4:21   ` Mohit KUMAR DCG
  1 sibling, 0 replies; 8+ messages in thread
From: Karicheri, Muralidharan @ 2013-12-19 23:38 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci@vger.kernel.org, Mohit Kumar, Jingoo Han

Pi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+RnJvbTogQmpvcm4gSGVsZ2FhcyBbbWFpbHRv
OmJoZWxnYWFzQGdvb2dsZS5jb21dDQo+U2VudDogVGh1cnNkYXksIERlY2VtYmVyIDE5LCAyMDEz
IDU6NTggUE0NCj5UbzogS2FyaWNoZXJpLCBNdXJhbGlkaGFyYW4NCj5DYzogbGludXgtcGNpQHZn
ZXIua2VybmVsLm9yZzsgTW9oaXQgS3VtYXI7IEppbmdvbyBIYW4NCj5TdWJqZWN0OiBSZTogcGNp
ZSBkZXNpZ253YXJlIHF1ZXN0aW9uDQo+DQo+WytjYyBNb2hpdCwgSmluZ29vXQ0KPg0KQmpvcm4s
DQoNClRoYW5rcyBmb3IgZm9yd2FyZGluZyB0aGlzIHRvIGV4cGVydHMuDQoNCk11cmFsaQ0KPk9u
IFRodSwgRGVjIDE5LCAyMDEzIGF0IDM6MDEgUE0sIEthcmljaGVyaSwgTXVyYWxpZGhhcmFuIDxt
LWthcmljaGVyaTJAdGkuY29tPiB3cm90ZToNCj4+IEhpLA0KPj4NCj4+IEkgYW0gd29ya2luZyB0
byBwb3J0IG15IHBjaWUgZHJpdmVyIHRvIHBjaWUtZGVzaWdud2FyZSBjb3JlIGRyaXZlci4NCj4+
IFRoZSBwY2llIHN1YiBzeXN0ZW0gIG9uIG91ciBwbGF0Zm9ybSAgaGFzIDMyIE9VVEJPVU5EIHJl
Z2lvbnMgYW5kIDINCj4+IElOQk9V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w reply	[flat|nested] 8+ messages in thread

* RE: pcie designware question
  2013-12-19 22:57 ` Bjorn Helgaas
  2013-12-19 23:38   ` Karicheri, Muralidharan
@ 2013-12-20  4:21   ` Mohit KUMAR DCG
  2013-12-20 15:42     ` Murali Karicheri
  2013-12-20 16:20     ` Murali Karicheri
  1 sibling, 2 replies; 8+ messages in thread
From: Mohit KUMAR DCG @ 2013-12-20  4:21 UTC (permalink / raw)
  To: Bjorn Helgaas, Karicheri, Muralidharan
  Cc: linux-pci@vger.kernel.org, Jingoo Han

SGVsbG8gTXVyYWxpLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IEJq
b3JuIEhlbGdhYXMgW21haWx0bzpiaGVsZ2Fhc0Bnb29nbGUuY29tXQ0KPiBTZW50OiBGcmlkYXks
IERlY2VtYmVyIDIwLCAyMDEzIDQ6MjggQU0NCj4gVG86IEthcmljaGVyaSwgTXVyYWxpZGhhcmFu
DQo+IENjOiBsaW51eC1wY2lAdmdlci5rZXJuZWwub3JnOyBNb2hpdCBLVU1BUiBEQ0c7IEppbmdv
byBIYW4NCj4gU3ViamVjdDogUmU6IHBjaWUgZGVzaWdud2FyZSBxdWVzdGlvbg0KPiANCj4gWytj
YyBNb2hpdCwgSmluZ29vXQ0KPiANCj4gT24gVGh1LCBEZWMgMTksIDIwMTMgYXQgMzowMSBQTSwg
S2FyaWNoZXJpLCBNdXJhbGlkaGFyYW4gPG0tDQo+IGthcmljaGVyaTJAdGkuY29tPiB3cm90ZToN
Cj4gPiBIaSwNCj4gPg0KPiA+IEkgYW0gd29ya2luZyB0byBwb3J0IG15IHBjaWUgZHJpdmVyIHRv
IHBjaWUtZGVzaWdud2FyZSBjb3JlIGRyaXZlci4NCj4gPiBUaGUgcGNpZSBzdWIgc3lzdGVtICBv
biBvdXIgcGxhdGZvcm0gIGhhcyAzMiBPVVRCT1VORCByZWdpb25zIGFuZCAyDQo+ID4gSU5CT1VO
RCByZWdpb25zLiB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vbWVv
bmUgY291bGQgZXhwbGFpbiB0aGVzZSwNCj4gdGhhdCB3aWxsIGJlIGdyZWF0IQ0KPiA+DQo+ID4g
VGhhbmtzLg0KPiA+DQo+ID4gTXVyYWxpIEthcmljaGVyaQ0KPiA+IExpbnV4IEtlcm5lbCwgU29m
dHdhcmUgRGV2ZWxvcG1lbnQNCj4gPg0KPiA+DQo+ID4gLS0NCj4gPiBUbyB1bnN1YnNjcmliZSBm
cm9tIHRoaXMgbGlzdDogc2VuZCB0aGUgbGluZSAidW5zdWJzY3JpYmUgbGludXgtcGNpIg0KPiA+
IGluIHRoZSBib2R5IG9mIGEgbWVzc2FnZSB0byBtYWpvcmRvbW9Admdlci5rZXJuZWwub3JnIE1v
cmUNCj4gbWFqb3Jkb21vDQo+ID4gaW5mbyBhdCAgaHR0cDovL3ZnZXIua2VybmVsLm9yZy9tYWpv
cmRvbW8taW5mby5odG1sDQo=

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pcie designware question
  2013-12-20  4:21   ` Mohit KUMAR DCG
@ 2013-12-20 15:42     ` Murali Karicheri
  2013-12-20 16:20     ` Murali Karicheri
  1 sibling, 0 replies; 8+ messages in thread
From: Murali Karicheri @ 2013-12-20 15:42 UTC (permalink / raw)
  To: Mohit KUMAR DCG; +Cc: Bjorn Helgaas, linux-pci@vger.kernel.org, Jingoo Han

On 12/19/2013 11:21 PM, Mohit KUMAR DCG wrote:
> Hello Murali,
>
>> ---> Cut <-----
>>> I have reviewed the designware.c code and the glue logic driver
>>> pci-exynos.c and couldn't understand few things.
>>>
>>> 1. Our pcie ss is based on designware core and following addresses are
>>> not listed in our IP's  data manual. Where is defined? It does show
>>> the rest of the offsets defined in  drivers/pci/host/designware.c and
>>>
>>> #define PCIE_ATU_VIEWPORT               0x900
>>> #define PCIE_ATU_REGION_INBOUND         (0x1 << 31)
>>> #define PCIE_ATU_REGION_OUTBOUND        (0x0 << 31)
>>> #define PCIE_ATU_REGION_INDEX1          (0x1 << 0)
>>> #define PCIE_ATU_REGION_INDEX0          (0x0 << 0)
>>> #define PCIE_ATU_CR1                    0x904
>>> #define PCIE_ATU_TYPE_MEM               (0x0 << 0)
>>> #define PCIE_ATU_TYPE_IO                (0x2 << 0)
>>> #define PCIE_ATU_TYPE_CFG0              (0x4 << 0)
>>> #define PCIE_ATU_TYPE_CFG1              (0x5 << 0)
>>> #define PCIE_ATU_CR2                    0x908
>>> #define PCIE_ATU_ENABLE                 (0x1 << 31)
>>> #define PCIE_ATU_BAR_MODE_ENABLE        (0x1 << 30)
>>> #define PCIE_ATU_LOWER_BASE             0x90C
>>> #define PCIE_ATU_UPPER_BASE             0x910
>>> #define PCIE_ATU_LIMIT                  0x914
>>> #define PCIE_ATU_LOWER_TARGET           0x918
>>> #define PCIE_ATU_BUS(x)                 (((x) & 0xff) << 24)
>>> #define PCIE_ATU_DEV(x)                 (((x) & 0x1f) << 19)
>>> #define PCIE_ATU_FUNC(x)                (((x) & 0x7) << 16)
>>> #define PCIE_ATU_UPPER_TARGET           0x91C
> - These are Synopsys specific port logic registers. You can find these registers at offset 0x200
>   under port logic registers section in Synpsys PCIe DM.  There can be minor difference in the name
> convention as it is called 'iATU Viewport Register' in controller version3.70 and 'iATU Index Register'
>   in version 4.11.
> By the way which version of IP manual you are referring?
Mohit,

Thanks for the reply. I will check with my hardware team. The device 
spec seem to miss this info or this is
not applicable for our PCIE SS.

> -----> Cut <-----
>>> 4. What is the base address variable used to access RC's application
>>> register space? dbi_base in struct pcie_port ? Also I am assuming this
>>> is used for accessing this space from internal CPU bus and cfg0_base and
>> cfg1_base for accessing it from pci bus. Is this right?
> - DBI Space: This space is used to read/write own PCI Configuration Header,
>   Capability and Port Logic (PL) Registers
>   ELBI space: These are completely platform (Spear/Exynosys ...) specific application registers.
> Configuration/IO/Memory space: These addresses can be used in viewport programming to
>   generate different type of outbound transaction.
>
> Regards
> Mohit
Does the core driver use 1 to 1 mapping or  use real address translation?
In the description below by glue driver, I mean the driver for platform
specific wrapper around the designware PCIE core and core driver is the
designware driver.

The PCIE ss in our documentation has application registers at
offset 0x0 of the PCIE cfg memory map of the CPU, 0x1000 is the RC's
config space and 0x2000 is the EP's config space and 0x3000 is the
Downstream IO space. The CPU base address of config space is
0x21800000.The PCIE data space of the DBI is at address 0x50000000
(256M). Each config space is having a size of 4K (0x1000). How do I
setup the DT bindings for this? If there is a mail thread that already
discussed this, please send me a link.

 From your response, I gather dbi_base should be pointing to the RC's
io mapped config space base address (0x21801000). The code in
core driver is assigning cfg0_base to the io mapped address of DT's
configuration space CPU address and cfg1_base to cfg0_base + size/2.

So I need to pass the base of RC's CPU address to CPU address of
the configuration space in DT binding. So EP's CPU address will be mapped
to 0x21802000 assuming a size of 0x2000. Also I need to handle the
application register base internal to my glue driver. Does the following
make sense?


/* Configuration space */
ranges = <0x00000800 0 0x21801000 0x50000000 0 0x0002000
/* downstream I/O */
0x81000000 0 00x50002000 0 0x0010000
/* non-prefetchable memory */
0x82000000 0 0x50012000 0x50012000 0 0xffef000>;

Also For interrupt handling (MSI and Legacy), there is part of the code
to be implemented in the glue driver and part is already in designware
core driver. Is this correct assumption? In our implementation, there
are 4 Host IRQ lines for A,B,C and D interrupt lines and 8 MSI IRQ lines
each multiplexing 4 of the MSI vectors. This code seems to be specific
to the glue driver.

Is there an example DT binding to do this mapping?

Thanks

Murali


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pcie designware question
  2013-12-20  4:21   ` Mohit KUMAR DCG
  2013-12-20 15:42     ` Murali Karicheri
@ 2013-12-20 16:20     ` Murali Karicheri
  2014-01-08  6:55       ` Pratyush Anand
  1 sibling, 1 reply; 8+ messages in thread
From: Murali Karicheri @ 2013-12-20 16:20 UTC (permalink / raw)
  To: Mohit KUMAR DCG; +Cc: Bjorn Helgaas, linux-pci@vger.kernel.org, Jingoo Han

On 12/19/2013 11:21 PM, Mohit KUMAR DCG wrote:
>>> I have reviewed the designware.c code and the glue logic driver
>>> pci-exynos.c and couldn't understand few things.
>>>
>>> 1. Our pcie ss is based on designware core and following addresses are
>>> not listed in our IP's  data manual. Where is defined? It does show
>>> the rest of the offsets defined in  drivers/pci/host/designware.c and
>>>
>>> #define PCIE_ATU_VIEWPORT               0x900
>>> #define PCIE_ATU_REGION_INBOUND         (0x1 << 31)
>>> #define PCIE_ATU_REGION_OUTBOUND        (0x0 << 31)
>>> #define PCIE_ATU_REGION_INDEX1          (0x1 << 0)
>>> #define PCIE_ATU_REGION_INDEX0          (0x0 << 0)
>>> #define PCIE_ATU_CR1                    0x904
>>> #define PCIE_ATU_TYPE_MEM               (0x0 << 0)
>>> #define PCIE_ATU_TYPE_IO                (0x2 << 0)
>>> #define PCIE_ATU_TYPE_CFG0              (0x4 << 0)
>>> #define PCIE_ATU_TYPE_CFG1              (0x5 << 0)
>>> #define PCIE_ATU_CR2                    0x908
>>> #define PCIE_ATU_ENABLE                 (0x1 << 31)
>>> #define PCIE_ATU_BAR_MODE_ENABLE        (0x1 << 30)
>>> #define PCIE_ATU_LOWER_BASE             0x90C
>>> #define PCIE_ATU_UPPER_BASE             0x910
>>> #define PCIE_ATU_LIMIT                  0x914
>>> #define PCIE_ATU_LOWER_TARGET           0x918
>>> #define PCIE_ATU_BUS(x)                 (((x) & 0xff) << 24)
>>> #define PCIE_ATU_DEV(x)                 (((x) & 0x1f) << 19)
>>> #define PCIE_ATU_FUNC(x)                (((x) & 0x7) << 16)
>>> #define PCIE_ATU_UPPER_TARGET           0x91C
> - These are Synopsys specific port logic registers. You can find these registers at offset 0x200
>   under port logic registers section in Synpsys PCIe DM.  There can be minor difference in the name
> convention as it is called 'iATU Viewport Register' in controller version3.70 and 'iATU Index Register'
>   in version 4.11.
> By the way which version of IP manual you are referring?
>
>
Mohit,

I have checked with our hardware team and they confirmed that ATU 
registers are not implemented in our PCIE
SS. So we need to have  a way to disable this in the core driver so 
that  we can handle it in our glue layer driver.
But this will be a regression on the existing driver. How do we handle this?

Murali



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: pcie designware question
  2013-12-20 16:20     ` Murali Karicheri
@ 2014-01-08  6:55       ` Pratyush Anand
  2014-01-08 15:48         ` Karicheri, Muralidharan
  0 siblings, 1 reply; 8+ messages in thread
From: Pratyush Anand @ 2014-01-08  6:55 UTC (permalink / raw)
  To: Murali Karicheri
  Cc: Mohit KUMAR DCG, Bjorn Helgaas, linux-pci@vger.kernel.org,
	Jingoo Han

On Sat, Dec 21, 2013 at 12:20:29AM +0800, Murali Karicheri wrote:
> On 12/19/2013 11:21 PM, Mohit KUMAR DCG wrote:
> >>> I have reviewed the designware.c code and the glue logic driver
> >>> pci-exynos.c and couldn't understand few things.
> >>>
> >>> 1. Our pcie ss is based on designware core and following addresses are
> >>> not listed in our IP's  data manual. Where is defined? It does show
> >>> the rest of the offsets defined in  drivers/pci/host/designware.c and
> >>>
> >>> #define PCIE_ATU_VIEWPORT               0x900
> >>> #define PCIE_ATU_REGION_INBOUND         (0x1 << 31)
> >>> #define PCIE_ATU_REGION_OUTBOUND        (0x0 << 31)
> >>> #define PCIE_ATU_REGION_INDEX1          (0x1 << 0)
> >>> #define PCIE_ATU_REGION_INDEX0          (0x0 << 0)
> >>> #define PCIE_ATU_CR1                    0x904
> >>> #define PCIE_ATU_TYPE_MEM               (0x0 << 0)
> >>> #define PCIE_ATU_TYPE_IO                (0x2 << 0)
> >>> #define PCIE_ATU_TYPE_CFG0              (0x4 << 0)
> >>> #define PCIE_ATU_TYPE_CFG1              (0x5 << 0)
> >>> #define PCIE_ATU_CR2                    0x908
> >>> #define PCIE_ATU_ENABLE                 (0x1 << 31)
> >>> #define PCIE_ATU_BAR_MODE_ENABLE        (0x1 << 30)
> >>> #define PCIE_ATU_LOWER_BASE             0x90C
> >>> #define PCIE_ATU_UPPER_BASE             0x910
> >>> #define PCIE_ATU_LIMIT                  0x914
> >>> #define PCIE_ATU_LOWER_TARGET           0x918
> >>> #define PCIE_ATU_BUS(x)                 (((x) & 0xff) << 24)
> >>> #define PCIE_ATU_DEV(x)                 (((x) & 0x1f) << 19)
> >>> #define PCIE_ATU_FUNC(x)                (((x) & 0x7) << 16)
> >>> #define PCIE_ATU_UPPER_TARGET           0x91C
> > - These are Synopsys specific port logic registers. You can find these registers at offset 0x200
> >   under port logic registers section in Synpsys PCIe DM.  There can be minor difference in the name
> > convention as it is called 'iATU Viewport Register' in controller version3.70 and 'iATU Index Register'
> >   in version 4.11.
> > By the way which version of IP manual you are referring?
> >
> >
> Mohit,
> 
> I have checked with our hardware team and they confirmed that ATU 
> registers are not implemented in our PCIE

Which PCIe designware IP version you are using? At least since version 3.71
support of viewport is available in IP. Older version was handling
address translation using side band signals implemented through
vendor specific application registers. May be your case is also
similar.

> SS. So we need to have  a way to disable this in the core driver so 
> that  we can handle it in our glue layer driver.
> But this will be a regression on the existing driver. How do we handle this?

May be you can add rd/wr_other_conf in struct pcie_host_ops. 
Change designware driver to handle vendor specific rd/wr_other_conf,
if it exists, else use generic rd/wr_other_conf.

In your vendor specific rd/wr_other_conf handler you can implement
translation using your application registers.

Regards
Pratyush
> 
> Murali
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: pcie designware question
  2014-01-08  6:55       ` Pratyush Anand
@ 2014-01-08 15:48         ` Karicheri, Muralidharan
  0 siblings, 0 replies; 8+ messages in thread
From: Karicheri, Muralidharan @ 2014-01-08 15:48 UTC (permalink / raw)
  To: Pratyush Anand
  Cc: Mohit KUMAR DCG, Bjorn Helgaas, linux-pci@vger.kernel.org,
	Jingoo Han

>> Mohit,
>>
>> I have checked with our hardware team and they confirmed that ATU
>> registers are not implemented in our PCIE
>
>Which PCIe designware IP version you are using? At least since version 3.71 support of
>viewport is available in IP. Older version was handling address translation using side band
>signals implemented through vendor specific application registers. May be your case is also
>similar.
>
Pratyush,

Thanks for responding.

Is there a register that I can poke to know the IP version. I have asked this to our
hardware folks to know the version. I guess it is older than 3.71.

>> SS. So we need to have  a way to disable this in the core driver so
>> that  we can handle it in our glue layer driver.
>> But this will be a regression on the existing driver. How do we handle this?
>
>May be you can add rd/wr_other_conf in struct pcie_host_ops.
>Change designware driver to handle vendor specific rd/wr_other_conf, if it exists, else use
>generic rd/wr_other_conf.
>
Yes, that is indeed what I did to solve this. I will be sending a patch for this once
my driver is tested.

Murali
>In your vendor specific rd/wr_other_conf handler you can implement translation using your
>application registers.
>
>Regards
>Pratyush
>>
>> Murali
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci"
>> in the body of a message to majordomo@vger.kernel.org More majordomo
>> info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-08 15:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 22:01 pcie designware question Karicheri, Muralidharan
2013-12-19 22:57 ` Bjorn Helgaas
2013-12-19 23:38   ` Karicheri, Muralidharan
2013-12-20  4:21   ` Mohit KUMAR DCG
2013-12-20 15:42     ` Murali Karicheri
2013-12-20 16:20     ` Murali Karicheri
2014-01-08  6:55       ` Pratyush Anand
2014-01-08 15:48         ` Karicheri, Muralidharan

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).