[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221116181446.GA1126453@bhelgaas>
Date: Wed, 16 Nov 2022 12:14:46 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Liu Peibao <liupeibao@...ngson.cn>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Huacai Chen <chenhuacai@...ngson.cn>,
Jianmin Lv <lvjianmin@...ngson.cn>,
Yinbo Zhu <zhuyinbo@...ngson.cn>,
wanghongliang <wanghongliang@...ngson.cn>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5] PCI: loongson: Skip scanning unavailable child devices
On Wed, Nov 16, 2022 at 05:57:46PM +0800, Liu Peibao wrote:
> On 11/15/22 1:11 AM, Bjorn Helgaas wrote:
> > On Mon, Nov 14, 2022 at 03:43:46PM +0800, Liu Peibao wrote:
> > I assume there's a single device in the hardware, and both the
> > "platform device" and the PCI device" refer to that single device?
> >
> > And there's some reason you prefer to use the platform device
> > interface to enumerate that device?
>
> No, they are not the same device. For example, GMAC1(on chip PCI device) and
> GPIO(platform device, not PCI device) 14 use the same pin. The function for
> this pin can be configured by one bit in general register, eg, 0 for GPIO 14,
> 1 for GMAC1. Sometimes, GPIO 14 is preferred, so configure the pin with
> function GPIO 14 and disable GMAC1.
Ah, I see, so there's some circuit that can be driven by either the
platform (GPIO) device or the PCI (GMAC1) device.
> Overall, how about the following refactored commit log:
>
> "This patch adds a mechanism to disable on chip PCI devices by DT. Typically,
> when there are pins shareable between the platform device and the on chip PCI
> device, if the PCI device is not preferred, add `status = "disabled"` property
> to this PCI device DT node.
>
> For example, on LS2K1000, GMAC1(on chip PCI device) and GPIO(platform device,
> not PCI device) 14 share the same pin. If GMAC1 is not preferred, add
> `status = "disabled"` property in GMAC1 DT node."
Add a mechanism ...
(Instead of "This patch adds ..."; no need to say "this patch" because
it's obvious that the commit log applies to *this patch*)
Add spaces before "(", e.g., "GMAC1 (on-chip PCI device)".
Looks good!
Bjorn
Powered by blists - more mailing lists