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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EDA5C6FD1F for ; Tue, 14 Mar 2023 20:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bdvbs9DqeyxMtNPo7Yub01vmvRJWnNW6BBBB6BndBqM=; b=hdq+HKRQRnahgm gzbNFzoswvPTcGgVLPsWB4Q5LtEvWep1ci1e/FJ1lPoUtubDw22uNCiodfCyrKkzRUtec6A+JRoRH fvk24qCi0ikIbtRTl8TE3oPgVcn9J4az2XkF8hXEEo0/2ashcCXkIGxS8N+fxhJ/9S3LCn3nbuZmQ rkrCEmWq0mwQwKxHv4BcIlZH/JmkRdgLZgbZl6YD6Ft8lARhFXNYfssghuunwvDz1CXdxaAoy89Yf aYr2VkwBMoLLMh82otweD+cACrSc6aCavdfJ7IcrI5wXK2ENJRKYprrnr+ChLcYYS9vTWuLQeqPZh dVS4C3miQgJ7m6RuZVeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcBaB-00BWgo-17; Tue, 14 Mar 2023 20:49:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcBa9-00BWgO-15 for linux-arm-kernel@bombadil.infradead.org; Tue, 14 Mar 2023 20:49:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mPD90DJPcPmP48GK0ojmCB01uj25M2d6itepQTmW9pw=; b=EtiU+r1KFlzUjyB651fRTX06yw RrQ6Rchr92eRlBarmvSKO5BIl1rhdb4WNKALVLXXUv1KkcGSqNy7XhRj2xT2zWqH/Njv3CAV5fCTV NWXuv4ucjpJjfZVyQM8jlw3M6yFtpg0JxTAktgkwHP/1qu8iXHnbxHf9z2B7NpN6p7ERxsbnOaZHs kHSj4TQI3D+CvZhbQaO0x86qLxwpOUuYqe/gR8QanM1syw9cqb/dMeIy1+oguU692DFwzT+n9PxlW VjllLfW4cgexm9JFFRao9YdfSnEVnHGpDq5owenvupuOzNAcbYB4E8nM5RaBidd5fY8khVAahuXKm V0HhwyBw==; Received: from post.baikalelectronics.com ([213.79.110.86]) by desiato.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcBa5-001u0B-0d for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2023 20:49:15 +0000 Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 7CB48E0EAF; Tue, 14 Mar 2023 23:48:40 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-type:content-type:date :from:from:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=post; bh=mPD90DJPcPmP48GK0ojm CB01uj25M2d6itepQTmW9pw=; b=imXs0fOT6I2kdFarLpn+5DLc6Sulgu0uKYBS 8+y7rgDItOEXt6tQKJiSJboGHfR9gyeASF9T1Qegc6dNa8y7mPGusLCGaaNpQq65 hcDY+cSmj8zMSpLOfeHsIfQgL0yszpuYlFBC2VdcTxZ40HfBHZm5kyaCiq93EHtE 6VhkXC8= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 55B53E0E1C; Tue, 14 Mar 2023 23:48:40 +0300 (MSK) Received: from mobilestation (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 23:48:39 +0300 Date: Tue, 14 Mar 2023 23:48:38 +0300 From: Serge Semin To: Bjorn Helgaas CC: Elad Nachman , , , , , , , , , , Subject: Re: [PATCH v4 8/8] PCI: dwc: Introduce region limit from DT Message-ID: <20230314204838.buba4y2iyx3m6qnn@mobilestation> References: <20230313124016.17102-9-enachman@marvell.com> <20230313194802.GA1531673@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230313194802.GA1531673@bhelgaas> X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_204913_762898_1BC6D0E6 X-CRM114-Status: GOOD ( 24.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Bjorn On Mon, Mar 13, 2023 at 02:48:02PM -0500, Bjorn Helgaas wrote: > [+cc Serge, who has done most of the recent work in this file] > Thanks for sending copy to me. I'll have a look at the series on this week. -Serge(y) > On Mon, Mar 13, 2023 at 02:40:16PM +0200, Elad Nachman wrote: > > From: Elad Nachman > > > > Allow dts override of region limit for SOCs with older Synopsis > > Designware PCIe IP but with greater than 32-bit address range support, > > such as the Armada 7020/7040/8040 family of SOCs by Marvell, > > when the DT file places the PCIe window above the 4GB region. > > The Synopsis Designware PCIe IP in these SOCs is too old to specify the > > highest memory location supported by the PCIe, but practically supports > > such locations. Allow these locations to be specified in the DT file. > > DT property is called num-regionmask , and can range between 33 and 64. > > s/Synopsis/Synopsys/ (several occurrences) > > s/Designware/DesignWare/ (several occurrences) > > Remove space before comma. > > > Signed-off-by: Elad Nachman > > --- > > v4: > > 1) Fix blank lines removal / addition > > > > 2) Remove usage of variable with same name as dt binding property > > > > drivers/pci/controller/dwc/pcie-designware.c | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c > > index 53a16b8b6ac2..9773c110c733 100644 > > --- a/drivers/pci/controller/dwc/pcie-designware.c > > +++ b/drivers/pci/controller/dwc/pcie-designware.c > > @@ -735,8 +735,10 @@ static void dw_pcie_link_set_max_speed(struct dw_pcie *pci, u32 link_gen) > > void dw_pcie_iatu_detect(struct dw_pcie *pci) > > { > > int max_region, ob, ib; > > - u32 val, min, dir; > > + u32 val, min, dir, ret; > > u64 max; > > + struct device *dev = pci->dev; > > + struct device_node *np = dev->of_node; > > > > val = dw_pcie_readl_dbi(pci, PCIE_ATU_VIEWPORT); > > if (val == 0xFFFFFFFF) { > > @@ -781,7 +783,13 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci) > > dw_pcie_writel_atu(pci, dir, 0, PCIE_ATU_UPPER_LIMIT, 0xFFFFFFFF); > > max = dw_pcie_readl_atu(pci, dir, 0, PCIE_ATU_UPPER_LIMIT); > > } else { > > - max = 0; > > + /* Allow dts override of region limit for older IP with above 32-bit support: */ > > Reflow comment to fit in 80 columns. > > > + ret = of_property_read_u32(np, "num-regionmask", &val); > > + if (!ret && val > 32) { > > + max = GENMASK(val - 33, 0); > > + dev_info(pci->dev, "Overriding region limit to %u bits\n", val); > > + } else > > + max = 0; > > } > > > > pci->num_ob_windows = ob; > > -- > > 2.17.1 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel