From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] [ARM] tegra: PCI Express support
Date: Mon, 20 Sep 2010 10:58:15 +0100 [thread overview]
Message-ID: <20100920095815.GA30793@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4C9709F4.9040308@compulab.co.il>
On Mon, Sep 20, 2010 at 09:15:00AM +0200, Mike Rapoport wrote:
> From what you are saying I understand that the region reservation should
> look like:
>
> static struct resource res_mmio = {
> .name = "PCI IO"
> .start = 0x80400000,
> .end = 0x80400000 + IO_SIZE,
> .flags = IORESOURCE_MEM,
> };
>
> static struct resource pcie_res[] = {
> [0] = {
> .name = "PCIe IO",
> .start = 0x1000,
> .end = 0x1000 + IO_SIZE - 1,
> .flags = IORESOURCE_IO,
> },
> [1] = {
> .name = "PCIe MEM",
> .start = MEM_BASE,
> .end = MEM_BASE + MEM_SIZE - 1,
> .flags = IORESOURCE_MEM,
> },
> };
>
> static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
> {
> request_region(&iomem_resource, &res_mmio);
> request_region(&iomem_resource, &pcie_res[1]);
> request_region(&ioport_resource, &pcie_res[0]);
> sys->resource[0] = &pcie_res[0];
> sys->resource[1] = &pcie_res[1];
> }
>
> I've used 0x1000 as IO resources start because having it 0 would cause
> pcibios_enable_device to fail.
More or less. You can avoid the ioport resource (&pcie_res[0]) and
replace it with &ioport_resource if you set PCIBIOS_MIN_IO to 0x1000.
This will have the effect of preventing BARs being allocated below
0x1000.
Don't also forget to check the return value from request_region()...
prev parent reply other threads:[~2010-09-20 9:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 16:53 [PATCH 0/3] [ARM] tegra: PCI Express support Mike Rapoport
2010-09-16 16:53 ` [PATCH 1/3] [ARM] tegra: add PCI Express clocks Mike Rapoport
2010-09-16 21:27 ` Colin Cross
2010-09-16 22:27 ` Mike Rapoport
2010-09-17 0:14 ` Gary King
2010-09-19 7:54 ` Mike Rapoport
2010-09-16 23:53 ` Mogambo Park
2010-09-19 7:52 ` Mike Rapoport
2010-09-16 16:53 ` [PATCH 2/3] [ARM] tegra: add PCI Express support Mike Rapoport
2010-09-16 21:42 ` Colin Cross
2010-09-16 22:16 ` Mike Rapoport
2010-09-16 16:53 ` [PATCH 3/3] [ARM] tegra: harmony: enable PCI Express Mike Rapoport
2010-09-16 21:44 ` Colin Cross
2010-09-16 21:57 ` Mike Rapoport
2010-09-16 17:12 ` [PATCH 0/3] [ARM] tegra: PCI Express support Arnd Bergmann
2010-09-19 14:07 ` Mike Rapoport
2010-09-19 14:39 ` Arnd Bergmann
2010-09-19 15:02 ` Russell King - ARM Linux
2010-09-19 16:34 ` Arnd Bergmann
2010-09-19 16:40 ` Russell King - ARM Linux
2010-09-19 17:09 ` Arnd Bergmann
2010-09-19 15:36 ` Mike Rapoport
2010-09-19 16:01 ` Russell King - ARM Linux
2010-09-20 7:15 ` Mike Rapoport
2010-09-20 9:13 ` Arnd Bergmann
2010-09-20 9:58 ` Russell King - ARM Linux [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=20100920095815.GA30793@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 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).