All of lore.kernel.org
 help / color / mirror / Atom feed
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] PCI: imx6: ventana: fixup for IRQ mismapping
Date: Mon, 3 Mar 2014 18:01:08 -0700	[thread overview]
Message-ID: <20140304010108.GA31144@obsidianresearch.com> (raw)
In-Reply-To: <CAJ+vNU1+o=2+YF8W=QfBNUhyCoC1tm17KD=cwRnUJozbbsN8qQ@mail.gmail.com>

On Mon, Mar 03, 2014 at 04:38:10PM -0800, Tim Harvey wrote:
> On Mon, Mar 3, 2014 at 3:37 PM, Jason Gunthorpe
> <jgunthorpe@obsidianresearch.com> wrote:
> > On Mon, Mar 03, 2014 at 11:59:51AM -0800, Tim Harvey wrote:
> >
> >> A pci fixup for the XIO2001 could at least be placed in
> >> arch/arm/mach-imx/mach-imx6q.c with a check for
> >> of_machine_is_compatible("gw, ventana").  This is currently done in
> >> order to handle GPIO on the PEX890x bridge which is used as PERST# for
> >> downstream slots (see
> >> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/mach-imx/mach-imx6q.c#n87).
> >
> > That is an odd looking thing .. PERST# of a subordinate port should be
> > tied to the PCI_BRIDGE_CTL_BUS_RESET bit in the port's bridge
> > configuration space - is more configuration of the PLX chip required?
> 
> PCI_BRIDGE_CTL_BUS_RESET does cause a hot reset on the corresponding
> downstream link however the minPCIe card slot has a PERST# pin that is
> for a functional reset to the card.  

Ah, I'm getting my PCI versions mixed up, that all sounds right to me
then..

> > Also, be aware that PCI specifies a minimum time after
> > reset-deassertion before accessing the bus, and I don't see a sleep...
> 
> there is an msleep(100) there after the de-assertion.

.. and I'm blind, looks good.

> Ok - that all makes sense and hopefully when I get the legacy PCI
> interrupt mapping via DT working for IMX6 I can prove it out.
> 
> What did you think of my two ideas above to resolve this issue on our
> add-in card where the bus-topology isn't known ahead of time:
> 
>  1. bootloader builds out DT with proper interrupt-map's to handle the
> mis-map after enumerating the bus to understand the toplogy.

This is how the OF stuff for PCI has historically been used, so it is
a nice OS-agnostic way to implement this work around, particularly if
you have some kind of daughter card specific information you can rely
on (eg a SPD that could indicate the problematic PCB revision)

If you do that you could also hoist the required fixup for your switch
into firmware too.

>  2. a pci fixup for xio2001 that further qualifies the DT machine and
> the 'depth' of the xio2001 (ie make sure its the first xio2001 bridge
> on the bus) that replaces the swizzle function.  This would be in
> arch/arm/mach-imx/mach-imx6q.c

You can probably make this work, but given there is already a DT based
fix I'm not sure if people will like a .c version, especially if it
requires more single-use 'general purpose' interfaces from the core
code...

Jason

  reply	other threads:[~2014-03-04  1:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  1:19 [RFC PATCH 0/3] PCI: imx6: fixup for add-in card IRQ mismapping Tim Harvey
2014-02-28  1:19 ` [PATCH 1/3] PCI: designware: add legacy PCI interrupt mapping Tim Harvey
2014-02-28  2:00   ` Jingoo Han
2014-02-28  4:24     ` Tim Harvey
2014-02-28  7:01       ` Jingoo Han
2014-02-28 10:12         ` Marek Vasut
2014-02-28 11:27         ` Lucas Stach
2014-02-28 11:37           ` Arnd Bergmann
2014-02-28 12:09             ` Lucas Stach
2014-02-28 12:27               ` Arnd Bergmann
2014-02-28 13:53                 ` Lucas Stach
2014-02-28  2:10   ` Shawn Guo
2014-02-28  1:19 ` [PATCH 2/3] PCI: designware: add ability for custom swizzle Tim Harvey
2014-02-28  1:19 ` [PATCH 3/3] PCI: imx6: ventana: fixup for IRQ mismapping Tim Harvey
2014-02-28  2:10   ` Jingoo Han
2014-02-28  9:27   ` Arnd Bergmann
2014-02-28 17:39     ` Jason Gunthorpe
2014-03-01  0:52       ` Tim Harvey
2014-03-01  1:22         ` Jason Gunthorpe
2014-03-03 19:59           ` Tim Harvey
2014-03-03 23:37             ` Jason Gunthorpe
2014-03-04  0:38               ` Tim Harvey
2014-03-04  1:01                 ` Jason Gunthorpe [this message]
2014-02-28  1:50 ` [RFC PATCH 0/3] PCI: imx6: fixup for add-in card " Jingoo Han
2014-02-28  4:16   ` Tim Harvey
2014-02-28  6:22     ` Jingoo Han
2014-02-28 10:15       ` Marek Vasut
2014-02-28 16:52       ` Tim Harvey
2014-02-28 16:55         ` Lucas Stach

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=20140304010108.GA31144@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.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 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.