From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: <bhelgaas@google.com>, <lpieralisi@kernel.org>, <robh@kernel.org>,
<kw@linux.com>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <r-gunasekaran@ti.com>,
<srk@ti.com>, <s-vadapalli@ti.com>
Subject: Re: [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC
Date: Thu, 19 Oct 2023 13:47:38 +0530 [thread overview]
Message-ID: <08cb761b-e6ca-446a-9594-bc5a9733b470@ti.com> (raw)
In-Reply-To: <ba217723-1501-4e72-b143-e0047266ea9a@ti.com>
Hello Serge,
On 19/10/23 10:07, Siddharth Vadapalli wrote:
>
>
> On 18/10/23 17:45, Serge Semin wrote:
>> On Wed, Oct 18, 2023 at 05:26:53PM +0530, Siddharth Vadapalli wrote:
...
>
> Sure. Thank you for the suggestion. I will leave ks_pcie_ops as-is for the older
> 3.65 controller while adding the ks_pcie_am6_ops without the .add_bus method for
> the newer 4.90 controller. I assume this should be acceptable since the
> pci-keystone.c driver only has two controller versions, namely 3.65a and 4.90a,
> with the new 4.90a controller only applicable to AM654x SoC which is already
> being distinguished in the driver using the is_am6 flag.
>
> In the v3 patch, I will add the following:
>
> static struct pci_ops ks_pcie_am6_ops = {
> .map_bus = dw_pcie_own_conf_map_bus,
> .read = pci_generic_config_read,
> .write = pci_generic_config_write,
> };
>
> and also update ks_pcie_host_init() to the following:
> if(ks_pcie->is_am6)
> pp->bridge->ops = &ks_pcie_am6_ops;
> else
> pp->bridge->ops = &ks_pcie_ops;
>
>>
>> Meanwhile your fix look more like a workaround. The
>> ks_pcie_v3_65_add_bus() function will be still called for the AM6x
>> v4.90 controllers, which based on its semantic would be and will be
>> wrong in any case. So instead of noop-ing the function it would be
>> better to just drop it being called for the new controllers.
>
> Yes, I will drop it for the new 4.90a controller rather than making it a no-op.
I have posted the v3 patch at:
https://lore.kernel.org/r/20231019081330.2975470-1-s-vadapalli@ti.com/
implementing your suggestion of adding a new pci_ops structure.
Please review it and let me know in case of any feedback.
--
Regards,
Siddharth.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-19 8:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 7:50 [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC Siddharth Vadapalli
2023-10-18 8:19 ` Ravi Gunasekaran
2023-10-18 8:24 ` Siddharth Vadapalli
2023-10-18 11:11 ` Serge Semin
2023-10-18 11:56 ` Siddharth Vadapalli
2023-10-18 12:15 ` Serge Semin
2023-10-19 4:37 ` Siddharth Vadapalli
2023-10-19 8:17 ` Siddharth Vadapalli [this message]
2023-10-18 16:36 ` Bjorn Helgaas
2023-10-19 4:44 ` Siddharth Vadapalli
2023-10-19 8:22 ` Siddharth Vadapalli
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=08cb761b-e6ca-446a-9594-bc5a9733b470@ti.com \
--to=s-vadapalli@ti.com \
--cc=bhelgaas@google.com \
--cc=fancer.lancer@gmail.com \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=r-gunasekaran@ti.com \
--cc=robh@kernel.org \
--cc=srk@ti.com \
/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