devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dilip Kota <eswara.kota@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, andriy.shevchenko@intel.com,
	gustavo.pimentel@synopsys.com, andrew.murray@arm.com,
	robh@kernel.org, linux-kernel@vger.kernel.org,
	cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com,
	qi-ming.wu@intel.com
Subject: Re: [PATCH v10 2/3] PCI: dwc: intel: PCIe RC controller driver
Date: Wed, 11 Dec 2019 17:59:58 +0800	[thread overview]
Message-ID: <7f5f0eec-465e-9c21-35ac-b6906119ed5e@linux.intel.com> (raw)
In-Reply-To: <20191210234951.GA175479@google.com>


On 12/11/2019 7:49 AM, Bjorn Helgaas wrote:
> On Fri, Dec 06, 2019 at 03:27:49PM +0800, Dilip Kota wrote:
>> Add support to PCIe RC controller on Intel Gateway SoCs.
>> PCIe controller is based of Synopsys DesignWare PCIe core.
>>
>> Intel PCIe driver requires Upconfigure support, Fast Training
>> Sequence and link speed configurations. So adding the respective
>> helper functions in the PCIe DesignWare framework.
>> It also programs hardware autonomous speed during speed
>> configuration so defining it in pci_regs.h.
>>
>> Also, mark Intel PCIe driver depends on MSI IRQ Domain
>> as Synopsys DesignWare framework depends on the
>> PCI_MSI_IRQ_DOMAIN.
>>
>> Signed-off-by: Dilip Kota <eswara.kota@linux.intel.com>
>> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
>> Reviewed-by: Andrew Murray <andrew.murray@arm.com>
>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>> Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
>> --- a/drivers/pci/controller/dwc/pcie-designware.c
>> +++ b/drivers/pci/controller/dwc/pcie-designware.c
>> @@ -14,6 +14,8 @@
>>   
>>   #include "pcie-designware.h"
>>   
>> +extern const unsigned char pcie_link_speed[];
> This shouldn't be needed; there's a declaration in drivers/pci/pci.h.
Sure, will do it. Thanks for pointing it.
>
>> +struct intel_pcie_soc {
>> +	unsigned int pcie_ver;
>> +	unsigned int pcie_atu_offset;
>> +	u32 num_viewport;
>> +};
> Looks a little strange to have the fields below lined up but the ones
> above not.
My miss, i will update it.
>
>> +struct intel_pcie_port {
>> +	struct dw_pcie		pci;
>> +	void __iomem		*app_base;
>> +	struct gpio_desc	*reset_gpio;
>> +	u32			rst_intrvl;
>> +	u32			max_speed;
>> +	u32			link_gen;
>> +	u32			max_width;
>> +	u32			n_fts;
>> +	struct clk		*core_clk;
>> +	struct reset_control	*core_rst;
>> +	struct phy		*phy;
>> +	u8			pcie_cap_ofst;
>> +};
>> +
>> +static void pcie_update_bits(void __iomem *base, u32 ofs, u32 mask, u32 val)
>> +{
>> +	u32 old;
>> +
>> +	old = readl(base + ofs);
>> +	val = (old & ~mask) | (val & mask);
>> +
>> +	if (val != old)
>> +		writel(val, base + ofs);
> I assume this is never used on registers where the "old & ~mask" part
> contains RW1C bits?  If there are RW1C bits in that part, this will
> corrupt them.
There is no impact because RW1C bits of respective registers are 0s at 
the time of this function call.
>
>> +	if (!lpp->pcie_cap_ofst) {
>> +		ret = dw_pcie_find_capability(&lpp->pci, PCI_CAP_ID_EXP);
>> +		if (!ret) {
>> +			ret = -ENXIO;
>> +			dev_err(dev, "Invalid PCIe capability offset\n");
> Some of your messages start with a capital letter, others not.
I will correct it.
>
>> +int intel_pcie_msi_init(struct pcie_port *pp)
> You might add a comment here like the one at
> ks_pcie_am654_msi_host_init().  Since the users of the
> .msi_host_init() function pointer only call the function if the
> pointer is non-NULL, it's not completely obvious why you have this
> stub function.
Ok, i will change it.
>
>> +{
>> +	/* PCIe MSI/MSIx is handled by MSI in x86 processor */
>> +	return 0;
>> +}
>> +	/*
>> +	 * Intel PCIe doesn't configure IO region, so set viewport
>> +	 * to not to perform IO region access.
> s/to not to/to not/
Ok, i will fix it.
>
>> +	 */
>> +	pci->num_viewport = data->num_viewport;
>> +
>> +	dev_info(dev, "Intel PCIe Root Complex Port init done\n");
> Probably superfluous.
I will remove the print then!
>
>> +
>> +	return ret;
> Since the return value is known here:
>
>    return 0;

Ok, i will update it.

I see, this patch series is merged in the maintainer tree.
Should i need to submit as a separate patch on top of maintainer tree or 
submit the new version of whole patch series?
Please let me know the best practice.

Regards,
Dilip

>
>> +}

  reply	other threads:[~2019-12-11 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  7:27 [PATCH v10 0/3] PCI: Add Intel PCIe Driver and respective dt-binding yaml file Dilip Kota
2019-12-06  7:27 ` [PATCH v10 1/3] dt-bindings: PCI: intel: Add YAML schemas for the PCIe RC controller Dilip Kota
2019-12-06  7:27 ` [PATCH v10 2/3] PCI: dwc: intel: PCIe RC controller driver Dilip Kota
2019-12-10 23:49   ` Bjorn Helgaas
2019-12-11  9:59     ` Dilip Kota [this message]
2019-12-11 14:20       ` Bjorn Helgaas
2019-12-11 23:46         ` Andrew Murray
2019-12-06  7:27 ` [PATCH v10 3/3] PCI: artpec6: Configure FTS with dwc helper function Dilip Kota
2019-12-06 10:51 ` [PATCH v10 0/3] PCI: Add Intel PCIe Driver and respective dt-binding yaml file Lorenzo Pieralisi

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=7f5f0eec-465e-9c21-35ac-b6906119ed5e@linux.intel.com \
    --to=eswara.kota@linux.intel.com \
    --cc=andrew.murray@arm.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=cheol.yong.kim@intel.com \
    --cc=chuanhua.lei@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=qi-ming.wu@intel.com \
    --cc=robh@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).