From: Florian Fainelli <f.fainelli@gmail.com>
To: Jim Quinlan <jim2101024@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com, bhelgaas@google.com
Subject: Re: [PATCH 2/2] pci: host: Add Broadcom STB PCIE RC controller
Date: Thu, 5 May 2016 11:19:57 -0700 [thread overview]
Message-ID: <572B8ECD.4070100@gmail.com> (raw)
In-Reply-To: <CANCKTBuNFQFLsab2WS+BRGUOuUOTLYuoaWNuM5T9HPGihvwYCg@mail.gmail.com>
On 05/05/16 10:48, Jim Quinlan wrote:
>>> Why is this?
>>
>> This is so we do not end-up programming the PCIe RC which is agnostic of
>> the number of
>
> I believe this code is still around for folks passing us a device tree
> with lacking information. It should be removed.
I have actually reworked this to utilize the brcm,log2-scb-sizes
property, since the number of elements in the property is equal to the
number of memory controllers populated on the system.
>
>>
>>>
>>>> + resource_list_for_each_entry(win, &res) {
>>>> + struct brcm_window *w = &pcie->out_wins[i];
>>>> +
>>>> + r = win->res;
>>>> +
>>>> + if (!r->flags)
>>>> + continue;
>>>> +
>>>> + switch (resource_type(r)) {
>>>> + case IORESOURCE_MEM:
>>>> + w->cpu_addr = r->start;
>>>> + w->size = resource_size(r);
>>>> + w->pcie_iomem_res.name = "External PCIe MEM";
>>>> + w->pcie_iomem_res.flags = r->flags;
>>>> + w->pcie_iomem_res.start = r->start;
>>>> + w->pcie_iomem_res.end = r->end;
>>>> + pcie->num_out_wins++;
>>>> + i++;
>>>> + /* Request memory region resources. */
>>>> + ret = devm_request_resource(&pdev->dev,
>>>> + &iomem_resource,
>>>> + &w->pcie_iomem_res);
>>>> + if (ret) {
>>>> + dev_err(&pdev->dev,
>>>> + "request PCIe memory resource failed\n");
>>>> + goto out_err_clk;
>>>> + }
>>>> + break;
>>>> +
>>>> + default:
>>>> + continue;
>>>> + }
>>>> + }
>>>
>>> What about IORESOURCE_IO?
>>
>> We do not support I/O space on this controller AFAIR. Our downstream
>> driver does insert a fake bogus I/O range, but I cannot really remember
>> why that was needed now, Jim do you remember?
>> --
>> Florian
>
> We added a bogus IO region because there was no other way to proceed
> w/o getting an error. Or should I say, I knew of no other way to
> proceed...
AH, I found your commit doing that, I would really think that the PCI
domains logic should be able to take care of assigning non-conflicting
I/O regions these days, if not, that seems like a bug to me.
Do I need a specific board with a ton of switches/peripherals attached
to it to expose whether this is needed or not? Right now, I removed it
from this patchset, but I suppose we could add it back, would we need that?
Thanks Jim!
--
Florian
prev parent reply other threads:[~2016-05-05 18:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 1:25 [PATCH 0/2] pci: host: Broadcom STB PCIE RC controller support Florian Fainelli
2016-05-03 1:25 ` [PATCH 1/2] Documentation: DT: bindings: Add Broadcom STB PCIe bindings Florian Fainelli
2016-05-03 9:36 ` Arnd Bergmann
2016-05-03 1:25 ` [PATCH 2/2] pci: host: Add Broadcom STB PCIE RC controller Florian Fainelli
2016-05-03 9:57 ` Arnd Bergmann
2016-05-04 19:36 ` Florian Fainelli
2016-05-04 19:56 ` Arnd Bergmann
2016-05-04 20:07 ` Florian Fainelli
2016-05-04 20:56 ` Arnd Bergmann
[not found] ` <572A4F31.8010802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-05 17:48 ` Jim Quinlan
2016-05-05 18:19 ` Florian Fainelli [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=572B8ECD.4070100@gmail.com \
--to=f.fainelli@gmail.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=jim2101024@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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).