From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: openwrt-devel@openwrt.org,
Florian Fainelli <f.fainelli@gmail.com>,
Paulius Zaleckas <paulius.zaleckas@gmail.com>,
linux-pci <linux-pci@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Janos Laube <janos.dev@gmail.com>,
Hans Ulli Kroll <ulli.kroll@googlemail.com>
Subject: Re: [PATCH 2/4] PCI: add driver for Cortina Gemini Host Bridge
Date: Thu, 16 Feb 2017 15:08:48 +0100 [thread overview]
Message-ID: <3658176.ffWihUmtIa@wuerfel> (raw)
In-Reply-To: <CACRpkdb=BqihykWo3egtNW1VKE2-FV+nJQQVYOc2GdCvh1fMng@mail.gmail.com>
On Saturday, February 4, 2017 7:43:15 PM CET Linus Walleij wrote:
> On Wed, Feb 1, 2017 at 12:11 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Saturday, January 28, 2017 9:48:37 PM CET Linus Walleij wrote:
>
> >> + /* No clue what these do */
> >> + pcibios_min_io = 0x100;
> >> + pcibios_min_mem = 0;
> >
> > Don't touch these
>
> OK I have a clue why this is there now, atleast the first one.
>
> The first 0x100 in the IOspace is actually configuration registers
> for the bridge. That is why we have this:
I see. It's normal to have the PCI config space done through
ports 0cf8-0cff, but apparently this one uses other ports in
the same range.
> reg = <0x50000000 0x100>;
> (...)
> /* PCI ranges mappings */
> ranges = /* 1MiB I/O space 0x50000000-0x500fffff */
> <0x01000000 0 0 0x50000000 0 0x00100000>,
>
> This is in all the vendor code I have located too.
>
> So the pcibios_min_io is manipulated to avoid touching that
> sensitive area. But I also see that arch/arm/mm/iomap.c
> sets it to 0x1000, according to the commit because you said
> it's the only valid value :D
>
> I tried setting the IO range to <0x50000100 0x000FFF00>
> instead of <0x50000000 0x00100000>
> but predictably that doesn't work. Maybe it should, I don't
> know really.
It should work in theory, but then you'd have to update
io_offset accordingly, and it would be a bit confusing.
Did you notice my other comment below (quoting from my own
message)?
> > +
> > + bus = pci_scan_root_bus(&pdev->dev, 0, &gemini_pci_ops, p, &res);
>
> Can you try using the new pci_register_host_bridge() API?
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] PCI: add driver for Cortina Gemini Host Bridge
Date: Thu, 16 Feb 2017 15:08:48 +0100 [thread overview]
Message-ID: <3658176.ffWihUmtIa@wuerfel> (raw)
In-Reply-To: <CACRpkdb=BqihykWo3egtNW1VKE2-FV+nJQQVYOc2GdCvh1fMng@mail.gmail.com>
On Saturday, February 4, 2017 7:43:15 PM CET Linus Walleij wrote:
> On Wed, Feb 1, 2017 at 12:11 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Saturday, January 28, 2017 9:48:37 PM CET Linus Walleij wrote:
>
> >> + /* No clue what these do */
> >> + pcibios_min_io = 0x100;
> >> + pcibios_min_mem = 0;
> >
> > Don't touch these
>
> OK I have a clue why this is there now, atleast the first one.
>
> The first 0x100 in the IOspace is actually configuration registers
> for the bridge. That is why we have this:
I see. It's normal to have the PCI config space done through
ports 0cf8-0cff, but apparently this one uses other ports in
the same range.
> reg = <0x50000000 0x100>;
> (...)
> /* PCI ranges mappings */
> ranges = /* 1MiB I/O space 0x50000000-0x500fffff */
> <0x01000000 0 0 0x50000000 0 0x00100000>,
>
> This is in all the vendor code I have located too.
>
> So the pcibios_min_io is manipulated to avoid touching that
> sensitive area. But I also see that arch/arm/mm/iomap.c
> sets it to 0x1000, according to the commit because you said
> it's the only valid value :D
>
> I tried setting the IO range to <0x50000100 0x000FFF00>
> instead of <0x50000000 0x00100000>
> but predictably that doesn't work. Maybe it should, I don't
> know really.
It should work in theory, but then you'd have to update
io_offset accordingly, and it would be a bit confusing.
Did you notice my other comment below (quoting from my own
message)?
> > +
> > + bus = pci_scan_root_bus(&pdev->dev, 0, &gemini_pci_ops, p, &res);
>
> Can you try using the new pci_register_host_bridge() API?
Arnd
next prev parent reply other threads:[~2017-02-16 14:08 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-28 20:48 [PATCH 1/4] PCI: add DT bindings for Cortina Gemini PCI Host Bridge Linus Walleij
2017-01-28 20:48 ` Linus Walleij
2017-01-28 20:48 ` Linus Walleij
2017-01-28 20:48 ` [PATCH 2/4] PCI: add driver for Cortina Gemini " Linus Walleij
2017-01-28 20:48 ` Linus Walleij
2017-01-31 0:37 ` Bjorn Helgaas
2017-01-31 0:37 ` Bjorn Helgaas
2017-02-26 19:42 ` Linus Walleij
2017-02-26 19:42 ` Linus Walleij
2017-02-27 16:49 ` Bjorn Helgaas
2017-02-27 16:49 ` Bjorn Helgaas
2017-02-01 11:11 ` Arnd Bergmann
2017-02-01 11:11 ` Arnd Bergmann
2017-02-04 18:43 ` Linus Walleij
2017-02-04 18:43 ` Linus Walleij
2017-02-16 14:08 ` Arnd Bergmann [this message]
2017-02-16 14:08 ` Arnd Bergmann
2017-02-18 14:05 ` Linus Walleij
2017-02-18 14:05 ` Linus Walleij
2017-02-05 10:00 ` Hans Ulli Kroll
2017-02-05 10:00 ` Hans Ulli Kroll
2017-02-05 14:36 ` Linus Walleij
2017-02-05 14:36 ` Linus Walleij
2017-01-28 20:48 ` [PATCH 3/4] ARM: gemini: select MIGHT_HAVE_PCI Linus Walleij
2017-01-28 20:48 ` Linus Walleij
2017-01-28 20:48 ` [PATCH 4/4] ARM: dts: add PCI to the Gemini DTSI Linus Walleij
2017-01-28 20:48 ` Linus Walleij
2017-02-05 10:03 ` Hans Ulli Kroll
2017-02-05 10:03 ` Hans Ulli Kroll
2017-02-05 15:00 ` Linus Walleij
2017-02-05 15:00 ` Linus Walleij
2017-02-06 9:55 ` Hans Ulli Kroll
2017-02-06 9:55 ` Hans Ulli Kroll
2017-02-10 15:40 ` Arnd Bergmann
2017-02-10 15:40 ` Arnd Bergmann
2017-02-11 11:17 ` Linus Walleij
2017-02-11 11:17 ` Linus Walleij
2017-01-31 0:31 ` [PATCH 1/4] PCI: add DT bindings for Cortina Gemini PCI Host Bridge Bjorn Helgaas
2017-01-31 0:31 ` Bjorn Helgaas
2017-01-31 0:31 ` Bjorn Helgaas
2017-02-01 20:00 ` Linus Walleij
2017-02-01 20:00 ` Linus Walleij
2017-02-01 20:00 ` Linus Walleij
2017-02-01 11:09 ` Arnd Bergmann
2017-02-01 11:09 ` Arnd Bergmann
2017-02-01 11:09 ` Arnd Bergmann
2017-02-05 14:44 ` Linus Walleij
2017-02-05 14:44 ` Linus Walleij
2017-02-05 14:44 ` Linus Walleij
2017-02-01 11:19 ` Arnd Bergmann
2017-02-01 11:19 ` Arnd Bergmann
2017-02-01 11:19 ` Arnd Bergmann
2017-02-05 14:56 ` Linus Walleij
2017-02-05 14:56 ` Linus Walleij
2017-02-05 14:56 ` Linus Walleij
2017-02-06 16:05 ` Arnd Bergmann
2017-02-06 16:05 ` Arnd Bergmann
2017-02-06 16:05 ` Arnd Bergmann
2017-02-01 16:02 ` Rob Herring
2017-02-01 16:02 ` Rob Herring
2017-02-01 16:02 ` Rob Herring
2017-02-01 20:04 ` Linus Walleij
2017-02-01 20:04 ` Linus Walleij
2017-02-01 20:04 ` Linus Walleij
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=3658176.ffWihUmtIa@wuerfel \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=f.fainelli@gmail.com \
--cc=janos.dev@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=openwrt-devel@openwrt.org \
--cc=paulius.zaleckas@gmail.com \
--cc=ulli.kroll@googlemail.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.