From: Joao Pinto <Joao.Pinto@synopsys.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
<Vineet.Gupta1@synopsys.com>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-snps-arc@lists.infradead.org>,
<CARLOS.PALMINHA@synopsys.com>, <Alexey.Brodkin@synopsys.com>,
<robh+dt@kernel.org>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
<galak@codeaurora.org>
Subject: Re: [PATCH v7 2/2] add new platform driver for PCI RC
Date: Wed, 3 Feb 2016 18:12:00 +0000 [thread overview]
Message-ID: <56B242F0.6040704@synopsys.com> (raw)
In-Reply-To: <20160203180514.GA10879@localhost>
Hi Bjorn,
Are these tasks enough?
- replace mdelay() for msleep()
- remove synopsys_pcie_irq_handler()
- replace "snps,pcie-synopsys" for "snps,pcie-synopsys-ipk"?
- rename the driver to pcie-synopsys-ipk?
- update the devicetree documentation referring that the ranges also include the
config space
Joao
On 2/3/2016 6:05 PM, Bjorn Helgaas wrote:
> Hi Joao & Arnd,
>
> On Tue, Feb 02, 2016 at 09:25:25PM +0100, Arnd Bergmann wrote:
>> On Monday 01 February 2016 18:07:45 Joao Pinto wrote:
>>> This patch adds a new driver that will be the reference platform driver
>>> for all PCI RC IP Protoyping Kits based on ARC SDP.
>>> This patch is composed by:
>>>
>>> -MAINTAINERS file was updated to include the new driver
>>> -Documentation/devicetree/bindings/pci was updated to include the new
>>> driver documentation
>>> -New driver called pcie-synopsys
>>>
>>> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
>>
>> I must have completely missed all the earlier submissions and just happened
>> to see this one now that it was merged.
>>
>> I have a couple of comments, maybe you can send a follow up patch to address
>> them:
>
> These seem pretty easy to address, so I pulled these patches out of
> for-linus temporarily while we fix them.
>
> Joao, you can just fix the mdelay() in your driver; don't worry about
> fixing other drivers with the same problem or consolidating them.
>
> Bjorn
>
>>> +----------------------------------
>>> +
>>> +This is the reference platform driver to be used in the Synopsys PCI Root
>>> +Complex IP Prototyping Kit.
>>> +
>>> +Required properties:
>>> +- compatible: set to "snps,pcie-synopsys";
>>
>> Please also include the exact version of the designware PCIe part that
>> is used in here, such as "snps,dw-pcie-1.234". I'm sure you can find
>> out the version.
>>
>> "snps,pcie-synopsys" by itself is about the worst possible compatible
>> string because it says nothing about the specific hardware. Half the
>> machines we support all have a designware PCIe host that was made
>> by synopsys. Please use the name of the SoC for the most specific
>> string.
>>
>>> +- reg: base address and length of the pcie controller registers.
>>> +- #address-cells: set to <3>
>>> +- #size-cells: set to <2>
>>> +- device_type: set to "pci"
>>> +- ranges: ranges for the PCI memory and I/O regions.
>>> +- interrupts: one interrupt source for MSI interrupts, followed by interrupt
>>> + source for hardware related interrupts.
>>> +- #interrupt-cells: set to <1>
>>> +- num-lanes: set to <1>;
>>> +
>>> +Example configuration:
>>> +
>>> + pcie: pcie@0xdffff000 {
>>> + compatible = "snps,pcie-synopsys";
>>> + reg = <0xdffff000 0x1000>;
>>> + #address-cells = <3>;
>>> + #size-cells = <2>;
>>> + device_type = "pci";
>>> + ranges = <0x00000800 0 0xd0000000 0xd0000000 0 0x00002000>,
>>
>> This line looks misplaced here and does not match the documentation. It's
>> probably a leftover from an earlier version that had the config space
>> in the ranges, so you need to remove that.
>>
>>> +/* This handler was created for future work */
>>> +static irqreturn_t synopsys_pcie_irq_handler(int irq, void *arg)
>>> +{
>>> + return IRQ_NONE;
>>> +}
>>
>> It's not harmful, but we generally don't add code "for future work",
>> better remove it for now.
>>
>>> +static void synopsys_pcie_establish_link(struct pcie_port *pp)
>>> +{
>>> + int retries = 0;
>>> +
>>> + /* check if the link is up or not */
>>> + for (retries = 0; retries < 10; retries++) {
>>> + if (dw_pcie_link_up(pp)) {
>>> + dev_info(pp->dev, "Link up\n");
>>> + return;
>>> + }
>>> + mdelay(100);
>>> + }
>>> +}
>>
>> That mdelay() needs to be an msleep(). You should never waste
>> a whole second worth of CPU time in a driver.
>>
>> Arnd
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Joao.Pinto@synopsys.com (Joao Pinto)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH v7 2/2] add new platform driver for PCI RC
Date: Wed, 3 Feb 2016 18:12:00 +0000 [thread overview]
Message-ID: <56B242F0.6040704@synopsys.com> (raw)
In-Reply-To: <20160203180514.GA10879@localhost>
Hi Bjorn,
Are these tasks enough?
- replace mdelay() for msleep()
- remove synopsys_pcie_irq_handler()
- replace "snps,pcie-synopsys" for "snps,pcie-synopsys-ipk"?
- rename the driver to pcie-synopsys-ipk?
- update the devicetree documentation referring that the ranges also include the
config space
Joao
On 2/3/2016 6:05 PM, Bjorn Helgaas wrote:
> Hi Joao & Arnd,
>
> On Tue, Feb 02, 2016@09:25:25PM +0100, Arnd Bergmann wrote:
>> On Monday 01 February 2016 18:07:45 Joao Pinto wrote:
>>> This patch adds a new driver that will be the reference platform driver
>>> for all PCI RC IP Protoyping Kits based on ARC SDP.
>>> This patch is composed by:
>>>
>>> -MAINTAINERS file was updated to include the new driver
>>> -Documentation/devicetree/bindings/pci was updated to include the new
>>> driver documentation
>>> -New driver called pcie-synopsys
>>>
>>> Signed-off-by: Joao Pinto <jpinto at synopsys.com>
>>
>> I must have completely missed all the earlier submissions and just happened
>> to see this one now that it was merged.
>>
>> I have a couple of comments, maybe you can send a follow up patch to address
>> them:
>
> These seem pretty easy to address, so I pulled these patches out of
> for-linus temporarily while we fix them.
>
> Joao, you can just fix the mdelay() in your driver; don't worry about
> fixing other drivers with the same problem or consolidating them.
>
> Bjorn
>
>>> +----------------------------------
>>> +
>>> +This is the reference platform driver to be used in the Synopsys PCI Root
>>> +Complex IP Prototyping Kit.
>>> +
>>> +Required properties:
>>> +- compatible: set to "snps,pcie-synopsys";
>>
>> Please also include the exact version of the designware PCIe part that
>> is used in here, such as "snps,dw-pcie-1.234". I'm sure you can find
>> out the version.
>>
>> "snps,pcie-synopsys" by itself is about the worst possible compatible
>> string because it says nothing about the specific hardware. Half the
>> machines we support all have a designware PCIe host that was made
>> by synopsys. Please use the name of the SoC for the most specific
>> string.
>>
>>> +- reg: base address and length of the pcie controller registers.
>>> +- #address-cells: set to <3>
>>> +- #size-cells: set to <2>
>>> +- device_type: set to "pci"
>>> +- ranges: ranges for the PCI memory and I/O regions.
>>> +- interrupts: one interrupt source for MSI interrupts, followed by interrupt
>>> + source for hardware related interrupts.
>>> +- #interrupt-cells: set to <1>
>>> +- num-lanes: set to <1>;
>>> +
>>> +Example configuration:
>>> +
>>> + pcie: pcie at 0xdffff000 {
>>> + compatible = "snps,pcie-synopsys";
>>> + reg = <0xdffff000 0x1000>;
>>> + #address-cells = <3>;
>>> + #size-cells = <2>;
>>> + device_type = "pci";
>>> + ranges = <0x00000800 0 0xd0000000 0xd0000000 0 0x00002000>,
>>
>> This line looks misplaced here and does not match the documentation. It's
>> probably a leftover from an earlier version that had the config space
>> in the ranges, so you need to remove that.
>>
>>> +/* This handler was created for future work */
>>> +static irqreturn_t synopsys_pcie_irq_handler(int irq, void *arg)
>>> +{
>>> + return IRQ_NONE;
>>> +}
>>
>> It's not harmful, but we generally don't add code "for future work",
>> better remove it for now.
>>
>>> +static void synopsys_pcie_establish_link(struct pcie_port *pp)
>>> +{
>>> + int retries = 0;
>>> +
>>> + /* check if the link is up or not */
>>> + for (retries = 0; retries < 10; retries++) {
>>> + if (dw_pcie_link_up(pp)) {
>>> + dev_info(pp->dev, "Link up\n");
>>> + return;
>>> + }
>>> + mdelay(100);
>>> + }
>>> +}
>>
>> That mdelay() needs to be an msleep(). You should never waste
>> a whole second worth of CPU time in a driver.
>>
>> Arnd
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-03 18:12 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 18:07 [PATCH v7 0/2] adding PCI support to AXS10x Joao Pinto
2016-02-01 18:07 ` Joao Pinto
2016-02-01 18:07 ` [PATCH v7 1/2] PCI support added to ARC Joao Pinto
2016-02-01 18:07 ` Joao Pinto
2016-02-02 10:48 ` Vineet Gupta
2016-02-02 10:48 ` Vineet Gupta
2016-02-01 18:07 ` [PATCH v7 2/2] add new platform driver for PCI RC Joao Pinto
2016-02-01 18:07 ` Joao Pinto
2016-02-02 17:12 ` Bjorn Helgaas
2016-02-02 17:12 ` Bjorn Helgaas
2016-02-02 20:25 ` Arnd Bergmann
2016-02-02 20:25 ` Arnd Bergmann
2016-02-02 23:14 ` Bjorn Helgaas
2016-02-02 23:14 ` Bjorn Helgaas
2016-02-02 23:27 ` Arnd Bergmann
2016-02-02 23:27 ` Arnd Bergmann
2016-02-03 18:05 ` Bjorn Helgaas
2016-02-03 18:05 ` Bjorn Helgaas
2016-02-03 18:12 ` Joao Pinto [this message]
2016-02-03 18:12 ` Joao Pinto
2016-02-03 18:38 ` Bjorn Helgaas
2016-02-03 18:38 ` Bjorn Helgaas
2016-02-03 21:01 ` Arnd Bergmann
2016-02-03 21:01 ` Arnd Bergmann
2016-02-04 11:10 ` Joao Pinto
2016-02-04 11:10 ` Joao Pinto
2016-02-04 13:12 ` Arnd Bergmann
2016-02-04 13:12 ` Arnd Bergmann
2016-02-04 11:14 ` Joao Pinto
2016-02-04 11:14 ` Joao Pinto
2016-02-04 14:09 ` Joao Pinto
2016-02-04 14:09 ` Joao Pinto
2016-02-04 15:22 ` Arnd Bergmann
2016-02-04 15:22 ` Arnd Bergmann
2016-02-02 17:14 ` [PATCH v7 0/2] adding PCI support to AXS10x Bjorn Helgaas
2016-02-02 17:14 ` Bjorn Helgaas
2016-02-02 17:17 ` Joao Pinto
2016-02-02 17:17 ` Joao Pinto
2016-02-02 17:24 ` Joao Pinto
2016-02-02 17:24 ` Joao Pinto
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=56B242F0.6040704@synopsys.com \
--to=joao.pinto@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=arnd@arndb.de \
--cc=galak@codeaurora.org \
--cc=helgaas@kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@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 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.