Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17214190ybl; Thu, 2 Jan 2020 00:46:08 -0800 (PST) X-Google-Smtp-Source: APXvYqx4LLgFAgY8b99aHF5qX8aoLSEzXuKjHo30mbwK1lmNfDJJB1fs2oeWDZ+B76anavsPlE4t X-Received: by 2002:a9d:6308:: with SMTP id q8mr49849324otk.290.1577954768395; Thu, 02 Jan 2020 00:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577954768; cv=none; d=google.com; s=arc-20160816; b=QZolae3CBzM6wOX8Cr3LDZuTWZjETxKmKxxis2dBhtYZcZZf4lp8N0ywF+YEnw2VX6 IJUaBbC8zAVYBQjEFRw45X8l4TOjfCe0HZP41jTBTJOr3humEHnWr5We+q9KbNHtjwuJ 4tDsmbY4+4toZ/8Eab8d3Lr5j8mCF2X+NiLRUc+I5JACuyl81qufPnF8CMdO6f4nsdFH /RV4yStqHoJbuThQqirz3b8SysMVBgIPDsvdMCwL2bIFXYc/J2/b9GDqxA4Og+KWFvwx AeWub27VvbJtmF3zr3Fv3/+h4Rh01unDXNdfSnwGIkizf34kMLk/wLjMfGyvaA9MZvDd eQ9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RJXFVlyRwTqj9HkStatG/uviJjFGvZJlZBeqka9UDNY=; b=0nUt3P8J4fK3KPbsV7aWgTTx/D+QuedS3tcobBKn5HdorCWXygCuar7ml//eJFThm3 GJgx35UTFSaRaabBhNpNZiSgBTvXxbYptPEMrEkQ6eOlPtiCBH5OW+ayxn7bSVZH1uXG lHtH7b+AIXc8pp94Fgmnu2Ei5TvfU2GPtKZeq5v7Pmo3DXDX224FsW4A2h9O7evB3XyJ CVQu2X1/mkE4i0SU8dU+tPeuwPpkB21hhHIOaAsJ+yrMcLEREB+TP/tpq7iyNaROUM7r RsbV3XZfdJhT4qvxD0wtKMZhtgzUOxw0Rx4jTbEPbIQCtMzyWc/286qVE3saRXVCI5cK DoEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gdiUCeOP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si29536057otd.50.2020.01.02.00.45.56; Thu, 02 Jan 2020 00:46:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gdiUCeOP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727861AbgABIou (ORCPT + 99 others); Thu, 2 Jan 2020 03:44:50 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:42070 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727756AbgABIot (ORCPT ); Thu, 2 Jan 2020 03:44:49 -0500 Received: by mail-ot1-f67.google.com with SMTP id 66so56084251otd.9; Thu, 02 Jan 2020 00:44:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RJXFVlyRwTqj9HkStatG/uviJjFGvZJlZBeqka9UDNY=; b=gdiUCeOPqScjXzrbvIh+ShMJdMtOIFx3qiDxl8Rnx0tRID+ljoSEDWZXifZyy+UDoK ZbP+uX2yH0Lua7XN3AMGacK2rVrdEAdaFX09Pn8/uzG3t01jvXUKjmInkQIVS+QHIezD VXX6JM5ur/SC4XeH73Y6MZ2pf8t8dk3hLl6vy6PahZF9tKuqXwq53iy00PMcaIcImJvz a0qOXjUw9jKbNkcQk34Ejg4DCSj/O8c7yFs5z0bZaMFOy6CrljgugPlFvg6n+X9/iQEw F/xgEeo5JX2ZN4LVxKsTrzXDRQO8ty7llvBlWTz/fa7rkDg9PweY+jOm9fuFBl4kD2F5 0bPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RJXFVlyRwTqj9HkStatG/uviJjFGvZJlZBeqka9UDNY=; b=RL2nRiSN6pm26gySagtnGSBdpJFox4fSSxM0bkFoFZhavUAvTp9lk1wV+v1BmsvU4y 789IjyZYuEBkldfyMvSe82ptq4Lcp0Wsg2j0oscyzeCrYS8hv4+hfVjdZnzMlIcBW03a h5lCgvSY1Is6zfofSLM4K9HIq6mkmTUl8feVUM64lK0hdZUKfXqujfqRtc6UExvz14QJ BfE6oQKFx+/piAnrLsyCrDo1atLPQioJzpHU1HFty4u66VHPjAHTVhU7JrblJDLITEV/ tqpyPEomO13AUAPaKlaAL5QNremkrs2coRdNVtfzkEOLGD5WUGDZASA8BwD2ZCs/r8Qy B8CA== X-Gm-Message-State: APjAAAVOTxiJbxzCAeuNrYa9Mxeo9kOw8qLrwofBhvqOmJNZlIl3R6fR q2Fe0897JKIDyKcwvobKAl+o5lNXp87uZ9B2bok= X-Received: by 2002:a9d:5c02:: with SMTP id o2mr83617674otk.176.1577954688818; Thu, 02 Jan 2020 00:44:48 -0800 (PST) MIME-Version: 1.0 References: <20191213084748.11210-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20191213084748.11210-4-prabhakar.mahadev-lad.rj@bp.renesas.com> <20191219233129.GA5484@bogus> In-Reply-To: <20191219233129.GA5484@bogus> From: "Lad, Prabhakar" Date: Thu, 2 Jan 2020 08:44:23 +0000 Message-ID: Subject: Re: [v2 3/6] of: address: add support to parse PCI outbound-ranges To: Rob Herring Cc: Bjorn Helgaas , Mark Rutland , Geert Uytterhoeven , Magnus Damm , Kishon Vijay Abraham I , Marek Vasut , Yoshihiro Shimoda , PCI , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Arnd Bergmann , Greg Kroah-Hartman , Andrew Murray , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "open list:MEDIA DRIVERS FOR RENESAS - FCP" , Chris Paterson , Frank Rowand , Gustavo Pimentel , Jingoo Han , Simon Horman , Shawn Lin , Tom Joseph , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , "Lad, Prabhakar" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Thu, Dec 19, 2019 at 11:31 PM Rob Herring wrote: > > On Mon, Dec 16, 2019 at 08:49:23AM +0000, Lad, Prabhakar wrote: > > Hi Rob, > > > > Thank you for the review. > > > > On Fri, Dec 13, 2019 at 8:37 PM Rob Herring wrote: > > > > > > On Fri, Dec 13, 2019 at 2:48 AM Lad Prabhakar > > > wrote: > > > > > > > > From: "Lad, Prabhakar" > > > > > > > > this patch adds support to parse PCI outbound-ranges, the > > > > outbound-regions are similar to pci ranges except it doesn't > > > > have pci address, below is the format for bar-ranges: > > > > > > > > outbound-ranges = > > > upper32_size lower32_size>; > > > > > > You can't just make up a new ranges property. Especially one that > > > doesn't follow how 'ranges' works. We already have 'dma-ranges' to > > > translate device to memory addresses. > > > > > > Explain the problem or feature you need, not the solution you came up > > > with. Why do you need this and other endpoint bindings haven't? > > > > > rcar SoC's supports multiple outbound region for mapping the PCI address > > locally to the system. This lead to discussion where there exist controllers > > which support regions for high/low priority transfer and similarly regions > > for large/small memory allocations, as a result a new ranges property was > > added, where we can specify the flags which would indicate how the outbound > > region can be used during requests. > > What are the flags? below are the flags which were discussed in first version of the series, but since the driver is currently using just PCI_EPC_WINDOW_FLAG_NON_MULTI_ALLOC flag I'll be dropping them in next version (suggested by Kishon) and rest will be added as and when required by the driver. * @PCI_EPC_WINDOW_FLAG_MULTI_ALLOC: Indicates multiple chunks of memory can be * allocated from same window * @PCI_EPC_WINDOW_FLAG_NON_MULTI_ALLOC: Indicates only single memory allocation * is possible on the window * @PCI_EPC_WINDOW_FLAG_LARGE_ALLOC: Window is used for large memory allocation * @PCI_EPC_WINDOW_FLAG_SMALL_ALLOC: Window is used for small memory allocation * @PCI_EPC_WINDOW_FLAG_HIGH_PRI_ALLOC: Window is used for high priority data * transfers * @PCI_EPC_WINDOW_FLAG_LOW_PRI_ALLOC: Window is used for low priority data * transfers Cheers, --Prabhakar