Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp516907imu; Tue, 27 Nov 2018 02:08:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/XOH0UGSmN53jG60+e8GZGbgCWssiY4L8rTrZP91AHOvP270jtq6nvHpz7wCoyu+VrYo00f X-Received: by 2002:a63:5c41:: with SMTP id n1mr27534824pgm.1.1543313320298; Tue, 27 Nov 2018 02:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543313320; cv=none; d=google.com; s=arc-20160816; b=Zkp7/+OPUDuR4S/DEujC7U4sZOv/dg+z1se1WfX/SgzMCRmnrLEermI1gbIwK8Xczr 5ZLMnIK+zqcRjlaCAHEv4VQxGmQuQ/Z1mCzIrjzWaReNvgaQ8RbZlKjgMnXhC7D5oFCi 7w1E3dciba+WrzLVn3Ru5iiB3bWhkrJL6ZdH2CQGBz2risiHlqk3kxAgxEp2aBXIqPar QCL2Y86FpGjKb8HJvEJOewNCSdWeo4fxyFTcInXMcRcAFgs83h7kLhPTE3dNGBwr4Wga /r3FE67aOX2yeRF3oFSueOKH2+JxZA99hNF34cOdP1ArwVB64n/RU9Ok1dsCXphWUVpx 6qNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=rkpMJxhNE2cS6cuClF2UisvgUIvW0pWK3WosC1s7Xkg=; b=X+kDYPj1Ss0ZD92nkuLFXrAhHIQwN9SmRRwIsQnpdiKH0ckzFVFF3/vQXzGG99Yuhs /pY3Di8uVRasnaYQY7VH7Ok4foRPuXqLtj5qlGNn2672nd1A4mHiuflnvdEG6d49OFGa 68PuziK0y5Bo+W1vMRoKYaEWQItawCDuEwSzOFI8+7ox1/Jfk3FfYh3OIlTPmaD7nTVt 1/stflX343spoKZ3V0wxFl0eb9bAJI3TpjmmE3X0r95+XLWqkuMfxTpxP++5yUGtZJMF XOI4dgmDqrYdmsJRlyqrocosHxuFx1FY37bSzE/7mxtUQgOar7jETlgyAR2CIokJvZDW TPEw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si3319412plo.184.2018.11.27.02.08.23; Tue, 27 Nov 2018 02:08:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730509AbeK0VDm (ORCPT + 99 others); Tue, 27 Nov 2018 16:03:42 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:52303 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbeK0VDm (ORCPT ); Tue, 27 Nov 2018 16:03:42 -0500 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1gRaFu-0004NI-73; Tue, 27 Nov 2018 11:06:10 +0100 Message-ID: <1543313169.2507.39.camel@pengutronix.de> Subject: Re: [PATCH 3/3] PCI: imx: Add support for i.MX8MQ From: Lucas Stach To: Andrey Smirnov , Leonard Crestez 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 Date: Tue, 27 Nov 2018 11:06:09 +0100 In-Reply-To: References: <20181117181225.10737-1-andrew.smirnov@gmail.com> <20181117181225.10737-4-andrew.smirnov@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrey, Am Montag, den 26.11.2018, 10:24 -0800 schrieb Andrey Smirnov: > 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? Yes, after rereading the patch with this in mind I agree that having the GPR offset on DT directly is IMO the better approach than an abstract ID. One other thing I noticed is that we probably need some property to encode if the clock is supplied by an external clkgen, or if the clock is provided by the i.MX. Hardcoding this in the driver will lead to DT backward compatibility headaches later on if someone decides to build a board with the clock provided from the i.MX. Regards, Lucas