From patchwork Fri Oct 16 09:08:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 317810 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1258888ilm; Fri, 16 Oct 2020 02:16:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw00ei2G7IZPIqzs42rRDN5KsvwCuKqzwu4LfIf2KIeNh+B+KAFi8ZsIn4NHYKsMi2nfcLf X-Received: by 2002:a17:906:3b93:: with SMTP id u19mr2843474ejf.290.1602839761026; Fri, 16 Oct 2020 02:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602839761; cv=none; d=google.com; s=arc-20160816; b=rDksVaKI6whozKdDI/CN7Cxfb1wfcdKPtg//o5gNw6txaO7JZm+pB8u6nL12jTDBxt 0T/KwtwVuGA+fEWySGeO2cy5wqeUezVqHXv+elIuUP4oz+iFFrsqH/aXd4bctYyG5Vvh JE5vjXYEiANtppQgsXgEUpctXcquq7ZH8a/pBI127KsPqd5kNY61Z2uFGGBHDNN/myyj hyEofuY9xJSJKPY3JoL1KjJWa8xIymy+4GFOfJ3lwP2CreEvGqY522oe2F7Tvthrxid3 08N1nu6afaD9hCYrYSH2T03kL+bdsNmP72yd8FneoKvavtLmOYSOXXMVJ5zgRdfWy6an Tf0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=07tJTmeCuP+PBHEJWR9j/Ja+MlTj0HT/VfOeDRwwQqw=; b=CDthDpPexjBX1NUIPbCAf4r127k4+rsbVNrdCX76j7dVW1FSRJFLcHmOMzipjkLVf6 Ew72SaV/bmGx23ICNocNSGSncE6xg1Az0RZaFp+KilfuWaAOipGmUGjGdDgIbXHUOHG2 M/vaZo0VIApuQz+CE7fyo9uPlXcVkpBJr0KsWvl/A1JnK3cJBh7OnZd8B15btKHajTtu L4yRrBCStlTSO48WYYg6NmQ81E8Og6/jJbM8UarszIDavv82Ztk3q8yyPlhQZGWJimah z3S38q6zyCQirHvwG0npP3Bba61E8B4UIT/67H7zeFen0I4PLG6GnPaBs3dxdHvYY4ua VWUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si1254860edw.20.2020.10.16.02.16.00; Fri, 16 Oct 2020 02:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406048AbgJPJPo (ORCPT + 6 others); Fri, 16 Oct 2020 05:15:44 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54010 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2394676AbgJPJJI (ORCPT ); Fri, 16 Oct 2020 05:09:08 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1A0DFC9F62F4A6EE7BFA; Fri, 16 Oct 2020 17:09:06 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.134) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Fri, 16 Oct 2020 17:08:55 +0800 From: Zhen Lei To: Rob Herring , Arnd Bergmann , "Florian Fainelli" , Ray Jui , Scott Branden , bcm-kernel-feedback-list , Andy Gross , Bjorn Andersson , linux-arm-msm , devicetree , linux-arm-kernel , linux-kernel CC: Zhen Lei Subject: [PATCH v2 1/2] arm64: dts: broadcom: clear the warnings caused by empty dma-ranges Date: Fri, 16 Oct 2020 17:08:32 +0800 Message-ID: <20201016090833.1892-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20201016090833.1892-1-thunder.leizhen@huawei.com> References: <20201016090833.1892-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.177.134] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The scripts/dtc/checks.c requires that the node have empty "dma-ranges" property must have the same "#address-cells" and "#size-cells" values as the parent node. Otherwise, the following warnings is reported: arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ its #address-cells (1) differs from / (2) arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ its #size-cells (1) differs from / (2) Arnd Bergmann figured out why it's necessary: Also note that the #address-cells=<1> means that any device under this bus is assumed to only support 32-bit addressing, and DMA will have to go through a slow swiotlb in the absence of an IOMMU. Suggested-by: Arnd Bergmann Signed-off-by: Zhen Lei --- .../boot/dts/broadcom/stingray/stingray-usb.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 1.8.3 Acked-by: Florian Fainelli diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi index 55259f973b5a9e4..aef8f2b00778d71 100644 --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi @@ -5,20 +5,20 @@ usb { compatible = "simple-bus"; dma-ranges; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x0 0x68500000 0x00400000>; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>; usbphy0: usb-phy@0 { compatible = "brcm,sr-usb-combo-phy"; - reg = <0x00000000 0x100>; + reg = <0x0 0x00000000 0x0 0x100>; #phy-cells = <1>; status = "disabled"; }; xhci0: usb@1000 { compatible = "generic-xhci"; - reg = <0x00001000 0x1000>; + reg = <0x0 0x00001000 0x0 0x1000>; interrupts = ; phys = <&usbphy0 1>, <&usbphy0 0>; phy-names = "phy0", "phy1"; @@ -28,7 +28,7 @@ bdc0: usb@2000 { compatible = "brcm,bdc-v0.16"; - reg = <0x00002000 0x1000>; + reg = <0x0 0x00002000 0x0 0x1000>; interrupts = ; phys = <&usbphy0 0>, <&usbphy0 1>; phy-names = "phy0", "phy1"; @@ -38,21 +38,21 @@ usbphy1: usb-phy@10000 { compatible = "brcm,sr-usb-combo-phy"; - reg = <0x00010000 0x100>; + reg = <0x0 0x00010000 0x0 0x100>; #phy-cells = <1>; status = "disabled"; }; usbphy2: usb-phy@20000 { compatible = "brcm,sr-usb-hs-phy"; - reg = <0x00020000 0x100>; + reg = <0x0 0x00020000 0x0 0x100>; #phy-cells = <0>; status = "disabled"; }; xhci1: usb@11000 { compatible = "generic-xhci"; - reg = <0x00011000 0x1000>; + reg = <0x0 0x00011000 0x0 0x1000>; interrupts = ; phys = <&usbphy1 1>, <&usbphy2>, <&usbphy1 0>; phy-names = "phy0", "phy1", "phy2"; @@ -62,7 +62,7 @@ bdc1: usb@21000 { compatible = "brcm,bdc-v0.16"; - reg = <0x00021000 0x1000>; + reg = <0x0 0x00021000 0x0 0x1000>; interrupts = ; phys = <&usbphy2>; phy-names = "phy0";