From: Bjorn Helgaas <helgaas@kernel.org>
To: Liu Peibao <liupeibao@loongson.cn>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Huacai Chen" <chenhuacai@loongson.cn>,
"Jianmin Lv" <lvjianmin@loongson.cn>,
"Yinbo Zhu" <zhuyinbo@loongson.cn>,
wanghongliang <wanghongliang@loongson.cn>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V5] PCI: loongson: Skip scanning unavailable child devices
Date: Wed, 16 Nov 2022 12:14:46 -0600 [thread overview]
Message-ID: <20221116181446.GA1126453@bhelgaas> (raw)
In-Reply-To: <bdf78e6a-3be9-2b5c-ac57-9df8341a2fcc@loongson.cn>
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
next prev parent reply other threads:[~2022-11-16 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 7:43 [PATCH V5] PCI: loongson: Skip scanning unavailable child devices Liu Peibao
2022-11-14 8:14 ` 陈华才
2022-11-14 8:35 ` Liu Peibao
2022-11-14 17:11 ` Bjorn Helgaas
2022-11-16 9:57 ` Liu Peibao
2022-11-16 18:14 ` Bjorn Helgaas [this message]
2022-11-17 2:05 ` Liu Peibao
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=20221116181446.GA1126453@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=chenhuacai@loongson.cn \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jiaxun.yang@flygoat.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liupeibao@loongson.cn \
--cc=lpieralisi@kernel.org \
--cc=lvjianmin@loongson.cn \
--cc=robh+dt@kernel.org \
--cc=wanghongliang@loongson.cn \
--cc=zhuyinbo@loongson.cn \
/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