Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1102132rdb; Wed, 6 Dec 2023 08:37:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEry6tNoHYy6bkA6lbNK6GqSe2dJoH6fU5pAAU6VyIIJAgv9whKQg1mqhMxwmVQfbS++7vf X-Received: by 2002:a17:902:ca0d:b0:1d0:c2ef:a6f7 with SMTP id w13-20020a170902ca0d00b001d0c2efa6f7mr758315pld.73.1701880629716; Wed, 06 Dec 2023 08:37:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701880629; cv=none; d=google.com; s=arc-20160816; b=A+IBZvaGvy0ok7gNgmZMyiy048v3f1YN86AkJieqNOOapu15evVA2G81OQ6gyT4e4n Nq32YrQkls0e48HfZwv04iPnjrwkYZIugOQfuhoMSWThONwJDMz3oHee4+mrESMFyKu0 qVOBc8r2lrnS+Cx+LLFwpRwVTlKMK6IvJ+w8byrU0Bhg9FlDRbGEWK/Lgn/8z43xdg1w M1XFJDm88uHkdvsO0R9GED8L3IH4/Ov1W6ct9uByzG+q+YWRMjygO3nydZZIClmvIPxT TOA9eXoDhA4tQFi7kdyd6liDbv1puBxbRtGR2bolW0SaxEBF5ohd4SNornNe11ULRuXF Ymmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=raqICnOm/Jto411HvUdvKox9ZmSVp/F3P9NKXA+vnzg=; fh=QiRF+CJZHybialbpiaW5Kiw2YSMyWrUXu8a7YmhfYTg=; b=WMu8CKQ6+v7LitpJ4VPJKMo6jlZtj1Yc0YsdUhJh3w+2pUPeGSD8gyYRbp41TfuPwU uDCYVFrL4Kb3rxN9xN7BzugwAxmyrzsUStD+/w/xnoXN4MJG4BhX+r5nWXtfKrbVSr4X tdBY3s3PXQGIhhklDhA/8AOI1BEeotcyEiTC5Jii0zZHi/IeBe7cgQwxMZuXdVCkJdoL lwrNtCDt45Bkgix91TSKi8kldRmj3HzkE+FBa+musVFlHmjIpoUvDBgkwZiQEfqxDIZJ cVHWqB9hQ7oG7HP5043fWEGviQsqg7SqbS1s65IdzhBSnbR+802Nx5fLqb6G6JI7epjB F/RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j5IdAlbs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id l3-20020a170902f68300b001d06eae7147si45777plg.215.2023.12.06.08.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:37:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j5IdAlbs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 86F9F801BE4E; Wed, 6 Dec 2023 08:37:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379347AbjLFQgx (ORCPT + 99 others); Wed, 6 Dec 2023 11:36:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378708AbjLFQgw (ORCPT ); Wed, 6 Dec 2023 11:36:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61BCD4F for ; Wed, 6 Dec 2023 08:36:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13909C433C7; Wed, 6 Dec 2023 16:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701880618; bh=PAw5s5SpAWe3wAZR6pYxGYEQ6qttc4q+gC0fJiypNJ8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=j5IdAlbsgiy+9Txp0nN0TqkTvpiW+CTXnI9lNDq++3fi3am94Qs2X/n+KzrkyejEp yDvNGm/oI60UmMVRny3sU/H6xkSt4cIBVj1l8g5W98y7SaAdGoaPRMdMr9UyLBbg7T VW+SLXgIxPyGK67PpZOX8ya4roe4chlVe9T243OyDUPZb+qrSBt5fvq+INI0AR7XQf 7X8zr5NSo44LOxHlEOlyvV0q1JNSRIGCqVNaTb4f2z1tabYGYxBmMXxErw5ChNto9O 4ijFzVuxjeGg8ZQNtgmJo4ysKf/sGsgin0Bm5BIGQ9K9HoF5EdYt8NyG/9C3NApun2 GNhIGKz2TJHNQ== Date: Wed, 6 Dec 2023 10:36:56 -0600 From: Bjorn Helgaas To: Frank Li Cc: imx@lists.linux.dev, Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "open list:PCI DRIVER FOR IMX6" , "moderated list:PCI DRIVER FOR IMX6" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [PATCH 4/9] PCI: imx6: Using "linux,pci-domain" as slot ID Message-ID: <20231206163656.GA717052@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206155903.566194-5-Frank.Li@nxp.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 08:37:07 -0800 (PST) In subject, maybe you mean "Use 'linux,pci-domain' as slot ID"? "Using" is the wrong verb form here. On Wed, Dec 06, 2023 at 10:58:58AM -0500, Frank Li wrote: > Avoid use get slot id by compared with register physical address. If there > are more than 2 slots, compared logic will become complex. But this doesn't say anything about "linux,pci-domain", and I don't see anything about a register physical address in the patch. Maybe this commit log was meant for a different patch? I'm confused. > Signed-off-by: Frank Li > --- > drivers/pci/controller/dwc/pci-imx6.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 62d77fabd82a..239ef439ba70 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -33,6 +33,7 @@ > #include > #include > > +#include "../../pci.h" > #include "pcie-designware.h" > > #define IMX8MQ_GPR_PCIE_REF_USE_PAD BIT(9) > @@ -1333,6 +1334,11 @@ static int imx6_pcie_probe(struct platform_device *pdev) > "Failed to get PCIEPHY reset control\n"); > } > > + /* Using linux,pci-domain as PCI slot id */ > + imx6_pcie->controller_id = of_get_pci_domain_nr(node); > + if (imx6_pcie->controller_id) > + imx6_pcie->controller_id = 0; I don't understand what this is doing. It looks the same as just: imx6_pcie->controller_id = 0; Maybe this is a typo? As written, it doesn't look like there's any point in calling of_get_pci_domain_nr(). > switch (imx6_pcie->drvdata->variant) { > case IMX7D: > if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) > -- > 2.34.1 >