linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@st.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mohit KUMAR DCG <Mohit.KUMAR@st.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Viresh Kumar <viresh.linux@gmail.com>,
	spear-devel <spear-devel@list.st.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH V3 7/8] pcie: SPEAr13xx: Add designware pcie support
Date: Fri, 31 Jan 2014 10:14:46 +0530	[thread overview]
Message-ID: <20140131044446.GE2618@pratyush-vbox> (raw)
In-Reply-To: <201401301444.57541.arnd@arndb.de>

On Thu, Jan 30, 2014 at 09:44:57PM +0800, Arnd Bergmann wrote:
> On Thursday 30 January 2014, Arnd Bergmann wrote:
> > > +             pcie0: pcie@b1000000 {
> > > +                     compatible = "st,spear1340-pcie", "snps,dw-pcie";
> > > +                     reg = <0xb1000000 0x4000>;
> > > +                     interrupts = <0 68 0x4>;
> > > +                     pcie_is_gen1 = <0>;
> > > +                     num-lanes = <1>;
> > > +                     phys = <&miphy0 1 0>;
> > > +                     phy-names = "pcie-phy";
> > > +                     #address-cells = <3>;
> > > +                     #size-cells = <2>;
> > > +                     device_type = "pci";
> > > +                     ranges = <0x00000800 0 0x80000000 0x80000000 0 0x00020000   /* configuration space */
> > > +                             0x81000000 0 0   0x80020000 0 0x00010000   /* downstream I/O */
> > > +                             0x82000000 0 0x80030000 0xc0030000 0 0x0ffd0000>; /* non-prefetchable memory */
> > > +                     status = "disabled";
> > > +             };
> > 
> > Shouldn't there be more than one interrupt? Normally each root port has
> > four legacy IRQs, in order to support bridge devices.
> > 
> 
> Sorry, my mistake: I was thinking of the interrupt map for legacy IRQs.
> The interrupt here is used only for the integrated MSI controller, right?

yes.

> That seems fine from the DT bindings perspective but raises two other
> questions:
> 
> 1. Are you not lacking an interrupt-map property to enable legacy IntA
>    IRQs?

As current pcie-designeware driver is not supporting legacy IntA IRQs,
so we left it.

> 
> 2. If the MSI controller is integrated in the pcie host controller,
>    does that maintain the PCIe ordering guarantees between inbound
>    DMA and MSI, or is it possible that the <0 68 0x4> IRQ gets
>    raised at the CPU before the the DMA transfer becomes visible to
>    the CPU in main memory?

If the system does not guarantee it, then won't be it a bug in the
hardware?
In our case, there is no separate interrupt for DMA completion. (I do
not know if other system does have DMA interrupt). We have only one
interrupt and when it is received SW will look into main memory (MSI
address) for MSI data. If DMA transfer is yet not complete, then SW ll
read junk data and which will be  a bug.

We have never seen any erroneous behaviour with MSI interrupt.

Regards
Pratyush
> 
> 	Arnd

  reply	other threads:[~2014-01-31  4:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 10:48 [PATCH V3 0/8] PCI:Add SPEAr13xx PCie support Mohit Kumar
2014-01-30 10:48 ` [PATCH V3 7/8] pcie: SPEAr13xx: Add designware pcie support Mohit Kumar
2014-01-30 13:34   ` Arnd Bergmann
2014-01-30 13:44     ` Arnd Bergmann
2014-01-31  4:44       ` Pratyush Anand [this message]
2014-01-31 19:01         ` Arnd Bergmann
2014-02-01  6:32           ` Pratyush Anand
2014-02-03  0:06             ` Jingoo Han
2014-01-31  4:24     ` Pratyush Anand
2014-01-31 15:29       ` Arnd Bergmann
2014-01-30 10:48 ` [PATCH V3 8/8] MAINTAINERS: Add ST SPEAr13xx PCIe driver maintainer Mohit Kumar
2014-02-03  0:08   ` Jingoo Han

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=20140131044446.GE2618@pratyush-vbox \
    --to=pratyush.anand@st.com \
    --cc=Mohit.KUMAR@st.com \
    --cc=arnd@arndb.de \
    --cc=jg1.han@samsung.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=viresh.linux@gmail.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 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).