Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp256879imu; Mon, 26 Nov 2018 10:28:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/VBaEwxLG5bX+y/F09yHHoV7QijMW1wGkHdtJl65E7MIh6RRZQZ2dyDU18po0yA50jaw4kd X-Received: by 2002:a62:5658:: with SMTP id k85mr18900592pfb.231.1543256888944; Mon, 26 Nov 2018 10:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543256888; cv=none; d=google.com; s=arc-20160816; b=GBjF2gIS8EEHwzEzN+bQ491rglA+GxT8JtjoPepvdcRSVXVQ84l6FNt6T7dh5p8r3e lsQdNHp0CFAlokeM//eNrBSUQgQ/fcBMSjbE3mNu7n8Mpdl20FKp+63oCO77SgrAKWzT R2V0xczicKZ8/qn9sLadOuda9Sc2fxUJbMYjNpHnzk2085wJv5r0zpSXkO/Q8nNvu/+I BCf+lmCccpC3lkus+jVO2LAyikW8T+C1fcqKAR1uN3hsaxd6Udkmfg6WdnDGuiNUtrSz T9U55JxXYpzouGcPMTYL2EOdmNsnZFK2uop507Wv3OzxYnjylMN23zalCH6NnLEQm0kn 4WOQ== 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=HktZkRW68wtQ+u0+5VCsyAi7ntvCc/+mmzCpYmd0SF0=; b=TuvfyvYOrwFAeG9pvzxoz5WIgBfXjDwoWkZVX19fpjiLDZjc4o/QVYTL0gPeIJdtGo SwV7yDD0bav80TI/qK+0LqnMbbuUK3+b6nEDzySCSh4Sc/6/GlV89Y9I5Lmah1UCGQtn BZCbgCddBFY4k4CdFSTtSZaXciVKgx7VNFb1ELX+vHnmh5J14aJtuUHa0yNMmM0SlmXF Wpz5ktPRHzis9y5OQemmetuO6DFA/QYE6t3ycAeRoZxAh6eDKkQBy8c5F8F/Yzibd2EX tEduWeZTlYTyI8LPj0DWhd0PVouoQ0ZqOzC8sfkn17g46NZzqLBgvG22G4FAeZ9eNeKg m6ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJ593CjE; 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 l14si917433pgi.147.2018.11.26.10.27.30; Mon, 26 Nov 2018 10:28: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=KJ593CjE; 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 S1726370AbeK0FTk (ORCPT + 99 others); Tue, 27 Nov 2018 00:19:40 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55712 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725199AbeK0FTk (ORCPT ); Tue, 27 Nov 2018 00:19:40 -0500 Received: by mail-wm1-f67.google.com with SMTP id y139so19193288wmc.5; Mon, 26 Nov 2018 10:24:43 -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=HktZkRW68wtQ+u0+5VCsyAi7ntvCc/+mmzCpYmd0SF0=; b=KJ593CjEAnaLLhkDZXsBrkQ30oM1RgoLVJFL/nGixd3v5Dks5DPPjsTr4BL2gvFznv E2NiOBwJG8YDdGes8ygjVM9Q1O4t5YHaYad3gHO289SgerVSorBOD0rGshu9osGn8bHT dSjSumFDKNNKEur3h+FpcZbxejHqz68csw2IPxJg2yG8paOyibuHbKyMvzwcZtma0TbA nfKmIHzPYiaUVKDXGSwM5f0uEOvo+2+sAw8SCiKtGmwnvnqvvp/797mSOY+LcYbJkXOg TRYYNj6UQ5dqSGBZXOJ3llGcHV/3Si3vn2usc+wAxgREuoKKCjlyLsf3LWVCrXHr0rqV dV4w== 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=HktZkRW68wtQ+u0+5VCsyAi7ntvCc/+mmzCpYmd0SF0=; b=j3u2rd4PhYQGLZmgM3qz1oazvVqTi/Q5sv7r07JFVvntghgsFvWii/5nCilJ5y8TV3 b97c2qR5CwT4HMGj6XeVOxzcp9/uDNsCBEpLaHEQEM3EXD9gW4Guy5f3Au1uA1cNkr4L OtaJe3ERIub/q02ucKbYiv6vvXXf5MEnvpCpSiX9FudvydqFr5dyPOsxh2DoWY/uZeVF gP3raZJmtxziGnsuj2J/c5Ix7NZrGA+YARnlFaXCVf9eY5OPNY2WewUFhaOqpSaJVSgB UVEE6BGfjARX2Aygzyf8pW+AGFOU3gI/ZcThEgRILzick2ob154pqb/5L+25kMSV54ky sAIg== X-Gm-Message-State: AA+aEWYO6/4KYU4rNiDiu/3r02pPdP4puN3i4wtDfdosVaUbJdOGy0HB /78HPeQb74N7Cp7qBCtVYj/tQCUmi6mODla9cS4= X-Received: by 2002:a7b:c404:: with SMTP id k4mr25017154wmi.144.1543256682743; Mon, 26 Nov 2018 10:24:42 -0800 (PST) MIME-Version: 1.0 References: <20181117181225.10737-1-andrew.smirnov@gmail.com> <20181117181225.10737-4-andrew.smirnov@gmail.com> In-Reply-To: From: Andrey Smirnov Date: Mon, 26 Nov 2018 10:24:31 -0800 Message-ID: Subject: Re: [PATCH 3/3] PCI: imx: Add support for i.MX8MQ To: Leonard Crestez , Lucas Stach Cc: Richard Zhu , linux-imx@nxp.com, Chris Healy , Dong Aisheng , linux-kernel , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Fabio Estevam , Mark Rutland , linux-arm-kernel , Bjorn Helgaas , linux-pci@vger.kernel.org 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 Tue, Nov 20, 2018 at 2:49 AM Leonard Crestez wrote: > > On Sat, 2018-11-17 at 10:12 -0800, Andrey Smirnov wrote: > > @@ -921,7 +1004,28 @@ static int imx6_pcie_probe(struct platform_device *pdev) > > - case IMX7D: > > + case IMX8MQ: > > + if (of_property_read_u32(node, "fsl,iomux-gpr1x", > > + &imx6_pcie->gpr1x)) { > > + dev_err(dev, "Failed to get GPR1x address\n"); > > + return -EINVAL; > > + } > > This is for distinguishing multiple controllers on the SOC but other > registers and bits might differ. Isn't it preferable to have a property > for controller id instead of adding many registers to DT? > I liked encoding necessary info in DT directly slightly better than encoding abstract ID and then decoding it further in the driver code. OTOH, I am not really attached to that path. Lucas, can you comment on this please? > > + > > + if (of_property_read_u32_array( > > + node, "fsl,gpr12-device-type", > > + imx6_pcie->device_type, > > + ARRAY_SIZE(imx6_pcie->device_type))) { > > + dev_err(dev, "Failed to get device type > > mask/value\n"); > > + return -EINVAL; > > + } > > The device type can be set on multiple SOCs, why are you adding a > mandatory property only for 8m? My thinking was that other SoCs don't really have two controllers, so they don't really need to have that property, but, more importantly, not forcing them to have this property should preserve backwards compatibility with old DTBs. > > There should probably be a separate patch with documented DT bindings. > Yes, definitely, I just wanted to come up with a set of bindings agreed on by the driver maintainers first. Thanks, Andrey Smirnov