From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06931C4332F for ; Wed, 16 Nov 2022 18:15:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238781AbiKPSPL (ORCPT ); Wed, 16 Nov 2022 13:15:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238775AbiKPSOx (ORCPT ); Wed, 16 Nov 2022 13:14:53 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC20363BA3; Wed, 16 Nov 2022 10:14:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6339FB81DFB; Wed, 16 Nov 2022 18:14:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B72CDC433B5; Wed, 16 Nov 2022 18:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668622488; bh=ZbvWhNXLnawHqCFvLKSoqvTe4ZGBq4urDiURbMd5tIQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=t6zrV32zUKhntxysWQus4Co5jV1dQLykPnLCa2DRr83G31IBPsPAS3/SkqMHlbSy4 7CgdIOHqmHnLJ/TMTB2taeVYINP76l3OrSk1k2dqU4m+CXkB2SsgbLPWOq7SZlTSSY DzoF+OnxqC5YeWH4TmfGN0kQsIpklwagCg1CLMRiKMRwxAuioUeLyh+R5tRawrl5j+ AcDJ6yhmBPZHWGFZREvBSrPATs9Z+vfz1qlMbv80TqZdDEEwreTM3rDOnaBofORz2h LMUR4nLJHVvKTQNeLFtKqgxGtc7GLr4PUcdWg70RZsr9HwMBh+NXs+drPXq8HCy1xj zQZcjK/rHvA1Q== Date: Wed, 16 Nov 2022 12:14:46 -0600 From: Bjorn Helgaas To: Liu Peibao Cc: Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Jiaxun Yang , Christophe JAILLET , Huacai Chen , Jianmin Lv , Yinbo Zhu , wanghongliang , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V5] PCI: loongson: Skip scanning unavailable child devices Message-ID: <20221116181446.GA1126453@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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