Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Mayank Rana <quic_mrana@quicinc.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: <jingoohan1@gmail.com>, <will@kernel.org>,
	<lpieralisi@kernel.org>, <kw@linux.com>, <robh@kernel.org>,
	<bhelgaas@google.com>, <krzk@kernel.org>,
	<linux-pci@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <quic_krichai@quicinc.com>
Subject: Re: [PATCH v3 2/4] PCI: host-generic: Export gen_pci_init() API to allow ECAM creation
Date: Fri, 15 Nov 2024 10:16:13 -0800	[thread overview]
Message-ID: <70cfe4b4-93dc-4e9a-b064-9ce149dcca3c@quicinc.com> (raw)
In-Reply-To: <20241115091759.5wogqwvyaqgc7iua@thinkpad>



On 11/15/2024 1:17 AM, Manivannan Sadhasivam wrote:
> On Wed, Nov 06, 2024 at 02:13:39PM -0800, Mayank Rana wrote:
>> Export gen_pci_init() API to create ECAM and initialized ECAM OPs
>> from PCIe driver which don't have way to populate driver_data as
>> just ECAM ops.
>>
>> Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
>> ---
>>   drivers/pci/controller/pci-host-common.c | 3 ++-
>>   include/linux/pci-ecam.h                 | 2 ++
>>   2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
>> index cf5f59a745b3..b9460a4c5b7e 100644
>> --- a/drivers/pci/controller/pci-host-common.c
>> +++ b/drivers/pci/controller/pci-host-common.c
>> @@ -20,7 +20,7 @@ static void gen_pci_unmap_cfg(void *ptr)
>>   	pci_ecam_free((struct pci_config_window *)ptr);
>>   }
>>   
>> -static struct pci_config_window *gen_pci_init(struct device *dev,
>> +struct pci_config_window *gen_pci_init(struct device *dev,
> 
> Please rename the API to something like 'pci_host_common_init()'.
> 'gen_pci_init()' is fine within the driver, but doesn't look good when exported
> outside.
ACK

> - Mani
> 
>>   		struct pci_host_bridge *bridge, const struct pci_ecam_ops *ops)
>>   {
>>   	int err;
>> @@ -48,6 +48,7 @@ static struct pci_config_window *gen_pci_init(struct device *dev,
>>   
>>   	return cfg;
>>   }
>> +EXPORT_SYMBOL_GPL(gen_pci_init);
>>   
>>   int pci_host_common_probe(struct platform_device *pdev)
>>   {
>> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
>> index 3a4860bd2758..386c08349169 100644
>> --- a/include/linux/pci-ecam.h
>> +++ b/include/linux/pci-ecam.h
>> @@ -94,5 +94,7 @@ extern const struct pci_ecam_ops loongson_pci_ecam_ops; /* Loongson PCIe */
>>   /* for DT-based PCI controllers that support ECAM */
>>   int pci_host_common_probe(struct platform_device *pdev);
>>   void pci_host_common_remove(struct platform_device *pdev);
>> +struct pci_config_window *gen_pci_init(struct device *dev,
>> +		struct pci_host_bridge *bridge, const struct pci_ecam_ops *ops);
>>   #endif
>>   #endif
>> -- 
>> 2.25.1
>>
> 

  reply	other threads:[~2024-11-15 18:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 22:13 [PATCH v3 0/4] Add Qualcomm SA8255p based firmware managed PCIe root complex Mayank Rana
2024-11-06 22:13 ` [PATCH v3 1/4] PCI: dwc: Export dwc MSI controller related APIs Mayank Rana
2024-11-15  9:14   ` Manivannan Sadhasivam
2024-11-15 18:15     ` Mayank Rana
2024-11-06 22:13 ` [PATCH v3 2/4] PCI: host-generic: Export gen_pci_init() API to allow ECAM creation Mayank Rana
2024-11-15  9:17   ` Manivannan Sadhasivam
2024-11-15 18:16     ` Mayank Rana [this message]
2024-11-06 22:13 ` [PATCH v3 3/4] dt-bindings: PCI: qcom,pcie-sa8255p: Document ECAM compliant PCIe root complex Mayank Rana
2024-11-07  9:35   ` Krzysztof Kozlowski
2024-11-07 17:39     ` Mayank Rana
2024-11-15 10:55   ` Manivannan Sadhasivam
2024-11-06 22:13 ` [PATCH v3 4/4] PCI: qcom: Add Qualcomm SA8255p based PCIe root complex functionality Mayank Rana
2024-11-07  8:45   ` neil.armstrong
2024-11-07 17:45     ` Mayank Rana
2024-11-08 10:22       ` neil.armstrong
2024-11-15 11:21         ` Manivannan Sadhasivam
2024-11-15 18:17           ` Mayank Rana
2024-11-09 23:45   ` kernel test robot
2024-11-15 11:25   ` Manivannan Sadhasivam
2024-11-15 18:28     ` Mayank Rana
2024-11-19 17:14       ` Manivannan Sadhasivam
2024-11-15 11:28 ` [PATCH v3 0/4] Add Qualcomm SA8255p based firmware managed PCIe root complex Manivannan Sadhasivam
2024-11-15 18:31   ` Mayank Rana
2024-11-19 17:10     ` Manivannan Sadhasivam

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=70cfe4b4-93dc-4e9a-b064-9ce149dcca3c@quicinc.com \
    --to=quic_mrana@quicinc.com \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=krzk@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=quic_krichai@quicinc.com \
    --cc=robh@kernel.org \
    --cc=will@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