Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17925853ybl; Thu, 2 Jan 2020 14:57:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzX7TYOLtRH+WmOa7qDor/rCGjZeVJdiUST23MS2eoAnQ3dJ2AT5cXgN5T8JECRamcu1KQZ X-Received: by 2002:a9d:12a8:: with SMTP id g37mr50135874otg.261.1578005851313; Thu, 02 Jan 2020 14:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005851; cv=none; d=google.com; s=arc-20160816; b=bbJSwLhngwf+hup/yggQCt/IptOXg5iLxa0p3I2T3Vr44TtOidtOiLyC0a9oH5seds QW91pxzB4gXiJgD5Etqb8QdwxXCoDNhlPtviIaFN++DaTOVo3qHUHVgs1uTdzrxyjNUy bisgl2z5OHoAq07kVdNDrNAPKGLVECbmWuPun+3nnJuuh8xQPfHw/A3+aw0SM6GDPQ8I wiZq/dVAHJRPfhiqOuQc1RnNb1WcDoAA/ZI8GrLJtm7uN2erDWUNgQH6MBvXOu6gbayj ZitoDa1oX+63liXxpsKK9KHeBaVw5EvMQT3HGJ4FYNn5O5O70+qqXF220Um62UlQzDob rylQ== 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=OjFd9BMripPzx9vpLgRtzo7qyZ7WAuPOKIi4bZcTbyU=; b=c5O0SfnG6J9M+ws83nI7z4fdJgRrZHu9Ll5t+VxDrnTLkdZuO2yOyN9eMYuyxgx3Pw 36r3VE/HOQjkPNe3aXgPVYknH7fY/oluVfQf2mFo3fLbbpQUuctViLrWD03zr99D5ncf tFLtAtl5rj0TfibkCMiOunIIpsp3gCBtoy/kW1Op9+jn5duqSKFeyrlV0js8QeSsfVbH 5cdSU4fem9MdpguU7V6hSzA8dBHcG2l/Nmt2HIMfsSTintG5u0D7TYzV4LGvEi2+5tXt 09OOMvuLPkGkAvilFDNjjH5jZb4MhQ744U8VJNKzUgx+u5ZvD1uOHUncPSzJy9qilVF4 bbeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BJyGrgJR; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si29113446oto.205.2020.01.02.14.57.19; Thu, 02 Jan 2020 14:57:31 -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=@kernel.org header.s=default header.b=BJyGrgJR; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbgABW4L (ORCPT + 99 others); Thu, 2 Jan 2020 17:56:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:39234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbgABW4I (ORCPT ); Thu, 2 Jan 2020 17:56:08 -0500 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA3EE2467C; Thu, 2 Jan 2020 22:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578005766; bh=6Koeg/QpSh6SN7IsDtUD1Yw/jN4FQfOCYYp5OlkQg8k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BJyGrgJRAyAcMthsOmMVJk2/d9roLzBD5KeGqfyxfbX3KtZmnnxHXX0pyJ8akcsha K/iFSGYit7euv46SOim83yGJFkSBYf8D90gScmaaJtUv+dQKRJYtoCVXIxkXtGp8sR GDbQ6bO22fdQJ5Wf9rmFtnvZeSvKb4mLF6EU8dZs= Received: by mail-qt1-f173.google.com with SMTP id e5so35708757qtm.6; Thu, 02 Jan 2020 14:56:06 -0800 (PST) X-Gm-Message-State: APjAAAVKxjipXn0TO2rT+3qC8pmu+bnvQkMyWNSBpDwg/Uc+lLB5jr5G CWSio0aYWg3he0dfFCGJa9kYg0hXo9uTWv6Lrw== X-Received: by 2002:aed:2344:: with SMTP id i4mr63466799qtc.136.1578005765768; Thu, 02 Jan 2020 14:56:05 -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: From: Rob Herring Date: Thu, 2 Jan 2020 15:55:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v2 3/6] of: address: add support to parse PCI outbound-ranges To: "Lad, Prabhakar" 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 On Thu, Jan 2, 2020 at 1:44 AM Lad, Prabhakar wrote: > > 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 Looks like configuration or policy, not something that belongs in DT. Coupling driver features and DT changes is not good for ABI compatible changes either. I'm hesitant to accept any PCI endpoint binding additions because they don't seem to be completely thought out in terms of supporting different usecases. Rob