Message ID | 20240122173514.935742-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2746855dyb; Mon, 22 Jan 2024 10:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEixxIdA/ZhaqW0DiZDDuuStqo8QCXFn1pRmzSjZ2vZK6zycUifYFtMIkoEyU2cS9UlGCE+ X-Received: by 2002:aa7:d054:0:b0:55a:46:4fdd with SMTP id n20-20020aa7d054000000b0055a00464fddmr199005edo.19.1705947053069; Mon, 22 Jan 2024 10:10:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705947053; cv=pass; d=google.com; s=arc-20160816; b=A2EMYk6Z6NrhAqPxA8i5v61gBQtaqQ/I3JOMzbiiZqPk74avxp0C2lwoYm057thggA uqx2NKYwihRC361Cym7EmJLnVys0zea4N3XU2qRVU0SiAtf/Goc6ixTlQVmHkowANH7M UvNu8uVROJrGtakIYCeyI+1V3w+PA2ivFyg0mO/3rghGrNDy1FITyoa9XRuIdQPpC1ur GI7ITCotEtxdINZqmLxYTKwaIpENlaZ+UkAPhHrBvcPddd7LpL5eY9RdeoZdxEErVYcV oDFmQNHlbwNJoI6jZBMEHmsATVVvVg4zffGIskbWf9vcYYeAhPdHEnLfV4g7Rw6hjzrQ M7FQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yv6XQ0WQ5PpweMfZ+yfWmF7ZRa4c48yjkAY9V6KyDYE=; fh=FBAEltC8oowyS40+7nuoEhVJ8+DuKstAe9TFbUZuUMo=; b=vo/kHlAKItO6eTchmitFcKep+pC7RoJtyG7N43eyXki3YxRivjU8q6CEDn3b97p2d7 OhgtI3WpsA2rVj+aYh8ifY5N09/9YZhIDrFMgc0FS2+zlQkfrTXDtF/jbWvylAklhMHO dZaNtRrW4jUkI/GsJT3YmZo36pICeTVxRCkfeylZ5hD8NqP7TY7+NtvzH6VT0+xGQm42 PTYR9KF87sU/KeEpiJ5+8bHvSa0250qqrxGivwKyd160E3PhKHMM376XUgz0FjYI/2Vt RJ0OETuiArqvhF08OJHuylKR7qcBGYcDGafAduVi6ykix/2r11kLbu+1HWqg5ynQ8CLf n4pA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sRdhz3q5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x99-20020a50baec000000b00554bcef1809si11034668ede.380.2024.01.22.10.10.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:10:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sRdhz3q5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33832-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2940C1F2CE9B for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 18:10:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 484F458223; Mon, 22 Jan 2024 17:35:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sRdhz3q5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 923534A990; Mon, 22 Jan 2024 17:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944931; cv=none; b=cow5+mXNc46WsKs8TEb9w7XBohBo27VWzinFwEZw1dwPIOervya8sMWwiZISMe6GOMDYptAK5kPxsNGlSd5s991qmJEAV5SLgv8gH0Rsu8P31OeI4+aupWX35SG/ob/z+Hlr7/n8FeZfx8Qy1aXny9+19rvjjzxb4NIZCxv3mcs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944931; c=relaxed/simple; bh=h/7MA+uqwVPx3lfrDrsWshvS6sJaQjSKgJKwuuLOb4c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FS1fWU9tAhSyQGZXIjOMifwEw1h7EhSE+ePQ8yGM9rHfgAPwJU021iobmZ9n+FW93q3skoIzV27Lb/iDUfJPXFdOvcuSOzV6xtT7h2mOpSmnPp4PC/dCNH07UK5b/otDyc9BN6Jyr0QfEOe5+YLZ+2gSOQt6ke0m4mwPNoaLQfA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sRdhz3q5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 863BAC43394; Mon, 22 Jan 2024 17:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705944930; bh=h/7MA+uqwVPx3lfrDrsWshvS6sJaQjSKgJKwuuLOb4c=; h=From:To:Cc:Subject:Date:From; b=sRdhz3q50c2LFzSjqgwuho5ugqACLibobv3W1S6w6tBmB8+2ejZg1QBnlhJO163ev kMsTOgb6J7LCBJGMYpRdoHMrVJfdUnwsf1iJltEMe1Gg/qADOJ8N63KTinYOO9XvYd X2Qt4hqZyEYxoBmBY7MiwrJQkFAwZ45NHBox7/OmjbSXsGq8tyqxNU0SxT609l0wWN wEmcjzTvTiL07RKYnH1MbTyL7MBHZdKFMVHfFF/aOZ66nBKMf8wtGMn5aixFcxDbje +o1RE4KGl49C22uL4YZp5f9Q4WyW+qe6HVbmskMEjv+SpWClURCixy/lJPI6IJImCt ZNnjc/JZP6MAg== From: Rob Herring <robh@kernel.org> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com> Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: marvell,prestera: Fix example PCI bus addressing Date: Mon, 22 Jan 2024 11:35:14 -0600 Message-ID: <20240122173514.935742-1-robh@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788815137282345727 X-GMAIL-MSGID: 1788815137282345727 |
Series |
[net-next] net: marvell,prestera: Fix example PCI bus addressing
|
|
Commit Message
Rob Herring
Jan. 22, 2024, 5:35 p.m. UTC
The example for PCI devices has some addressing errors. 'reg' is written
as if the parent bus is PCI, but the default bus for examples is 1
address and size cell. 'ranges' is defining config space with a
size of 0. Generally, config space should not be defined in
'ranges', only PCI memory and I/O spaces. Fix these issues by updating
the values with made-up, but valid values.
This was uncovered with recent dtschema changes.
Signed-off-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/net/marvell,prestera.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message----- > From: Rob Herring <robh@kernel.org> > Sent: Monday, January 22, 2024 7:35 PM > To: David S. Miller <davem@davemloft.net>; Eric Dumazet > <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni > <pabeni@redhat.com>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; > Miquel Raynal <miquel.raynal@bootlin.com> > Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: [EXT] [PATCH net-next] net: marvell,prestera: Fix example PCI bus > addressing > > External Email > > ---------------------------------------------------------------------- > The example for PCI devices has some addressing errors. 'reg' is written as if > the parent bus is PCI, but the default bus for examples is 1 address and size > cell. 'ranges' is defining config space with a size of 0. Generally, config space > should not be defined in 'ranges', only PCI memory and I/O spaces. Fix these > issues by updating the values with made-up, but valid values. > > This was uncovered with recent dtschema changes. > > Signed-off-by: Rob Herring <robh@kernel.org> > --- > Documentation/devicetree/bindings/net/marvell,prestera.yaml | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.yaml > b/Documentation/devicetree/bindings/net/marvell,prestera.yaml > index 5ea8b73663a5..16ff892f7bbd 100644 > --- a/Documentation/devicetree/bindings/net/marvell,prestera.yaml > +++ b/Documentation/devicetree/bindings/net/marvell,prestera.yaml > @@ -78,8 +78,8 @@ examples: > pcie@0 { > #address-cells = <3>; > #size-cells = <2>; > - ranges = <0x0 0x0 0x0 0x0 0x0 0x0>; > - reg = <0x0 0x0 0x0 0x0 0x0 0x0>; > + ranges = <0x02000000 0x0 0x100000 0x10000000 0x0 0x0>; > + reg = <0x0 0x1000>; > device_type = "pci"; > > switch@0,0 { > -- > 2.43.0 > This yaml has a mix-up of device P/N (belonging to AC3, BC2) and PCIe IDs (belonging to AC3X, Aldrin2) Looks like a part of the yaml was updated, and another part was not There is a reference here of actual usage of prestera switch device: https://github.com/dentproject/linux/blob/dent-linux-5.15.y/arch/arm64/boot/dts/marvell/accton-as4564-26p.dts So actual ranges and reg could be used instead of made up ones. But the actual real life dts places the prestera at the top level of the dts, not under pci. I am not aware of any dts/dtsi using such kind of switch node under pcie node, similar to the example given in the yaml file, and did not manage to find any under latest linux-next for both arm and arm64 dts directories (please correct me here if I am wrong). So the question here is if this pci example really necessary for the prestera device, or can be removed altogether (which is what I think is best to do). Elad.
On Tue, Jan 23, 2024 at 09:59:46AM +0000, Elad Nachman wrote: > > > > -----Original Message----- > > From: Rob Herring <robh@kernel.org> > > Sent: Monday, January 22, 2024 7:35 PM > > To: David S. Miller <davem@davemloft.net>; Eric Dumazet > > <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni > > <pabeni@redhat.com>; Krzysztof Kozlowski > > <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; > > Miquel Raynal <miquel.raynal@bootlin.com> > > Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Subject: [EXT] [PATCH net-next] net: marvell,prestera: Fix example PCI bus > > addressing > > > > External Email > > > > ---------------------------------------------------------------------- > > The example for PCI devices has some addressing errors. 'reg' is written as if > > the parent bus is PCI, but the default bus for examples is 1 address and size > > cell. 'ranges' is defining config space with a size of 0. Generally, config space > > should not be defined in 'ranges', only PCI memory and I/O spaces. Fix these > > issues by updating the values with made-up, but valid values. > > > > This was uncovered with recent dtschema changes. > > > > Signed-off-by: Rob Herring <robh@kernel.org> > > --- > > Documentation/devicetree/bindings/net/marvell,prestera.yaml | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.yaml > > b/Documentation/devicetree/bindings/net/marvell,prestera.yaml > > index 5ea8b73663a5..16ff892f7bbd 100644 > > --- a/Documentation/devicetree/bindings/net/marvell,prestera.yaml > > +++ b/Documentation/devicetree/bindings/net/marvell,prestera.yaml > > @@ -78,8 +78,8 @@ examples: > > pcie@0 { > > #address-cells = <3>; > > #size-cells = <2>; > > - ranges = <0x0 0x0 0x0 0x0 0x0 0x0>; > > - reg = <0x0 0x0 0x0 0x0 0x0 0x0>; > > + ranges = <0x02000000 0x0 0x100000 0x10000000 0x0 0x0>; > > + reg = <0x0 0x1000>; > > device_type = "pci"; > > > > switch@0,0 { > > -- > > 2.43.0 > > > > This yaml has a mix-up of device P/N (belonging to AC3, BC2) and PCIe > IDs (belonging to AC3X, Aldrin2) > Looks like a part of the yaml was updated, and another part was not > > There is a reference here of actual usage of prestera switch device: > https://github.com/dentproject/linux/blob/dent-linux-5.15.y/arch/arm64/boot/dts/marvell/accton-as4564-26p.dts That doesn't match upstream at all... > > So actual ranges and reg could be used instead of made up ones. > > But the actual real life dts places the prestera at the top level of > the dts, not under pci. > > I am not aware of any dts/dtsi using such kind of switch node under > pcie node, similar to the example given in the yaml file, and did not > manage to find any under latest linux-next for both arm and arm64 dts > directories (please correct me here if I am wrong). Don't know. It seems plausible. > > So the question here is if this pci example really necessary for the > prestera device, or can be removed altogether (which is what I think is best to do). Miquel's commit adding indicates such devices exist. Why would he add them otherwise? Anyways, I'm just fixing boilerplate to make the PCI bus properties valid. Has nothing to do with this Marvell device really. Rob
diff --git a/Documentation/devicetree/bindings/net/marvell,prestera.yaml b/Documentation/devicetree/bindings/net/marvell,prestera.yaml index 5ea8b73663a5..16ff892f7bbd 100644 --- a/Documentation/devicetree/bindings/net/marvell,prestera.yaml +++ b/Documentation/devicetree/bindings/net/marvell,prestera.yaml @@ -78,8 +78,8 @@ examples: pcie@0 { #address-cells = <3>; #size-cells = <2>; - ranges = <0x0 0x0 0x0 0x0 0x0 0x0>; - reg = <0x0 0x0 0x0 0x0 0x0 0x0>; + ranges = <0x02000000 0x0 0x100000 0x10000000 0x0 0x0>; + reg = <0x0 0x1000>; device_type = "pci"; switch@0,0 {