Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4657140ima; Mon, 4 Feb 2019 22:12:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYsLmj3HmovciGi62FYY2e1onEsl/dtaY0LuBKMO0kkU3iuB0PL+gIdAlqN3tDQK5PU6GLI X-Received: by 2002:a17:902:7687:: with SMTP id m7mr3385968pll.187.1549347137914; Mon, 04 Feb 2019 22:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549347137; cv=none; d=google.com; s=arc-20160816; b=gpLjtkN6/NKsrShy+VU7iglPS3qvIB0G/Es2Mwd+UcDQ+VqxN5R3m2DbGjD0URL6Vt 8B06QNhK4tqPyIqaEJOfzYZnAmHFYlnV4cSA5ElENzByx3n2X1phXlZXHBVAwgWeoK8J YRvS1P3kEmasg1ScxCD80vWyoScXlPhL8bq2NlO3lMC6cE/k0FTPsvvlgxacvUsvXWOb KLpPcDTEAPCzxkCM6KPhjbtFGnGAqZAvFuuE85kE1uIE8nmPmslbzl52IhVSVkUnNhFd dHnQPcS8Q5ZzjXHC3aG2FbmELwyjxIxrAMBMWGOndG9BtMtn2x5njyuj/NDA6oNVjiwG DIgQ== 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=RdqnK8Sush9EMCE1fFJIyiI9lYcylVQGWUm228F9l+M=; b=NKA/xaIsM4ccAmr6kpV1/OviYKiEhf22L+sED/BWdqQBxHFDsp3QBEIoqXwQNxipLr +vZeNUYEMt9aqRidbaQGEf0NcT3gOQHKjfmD0fGoupHdZNgRZkjuMvhtKhyNgBNgWNLj FSGqIl8PMCrOkqbN1q82aSWYtozx1mpXTxGjgtOq36rWxnK4wnVQSWGFJ7xThDbeqFkY /xM121g230Pq1olBLbqtmOc6e03sVbjZ2gVONBoEJ1NPP7+ABSUA4+bLJlqkCXTFPnjE S+jnT+533YBD6I7KrlzAukLlo5btMlA8U5yBLb6rRiVa/GtWzovaiUayNVRISL0sa53k P94g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mobiveil.co.in header.s=google header.b=JQjyNvjZ; 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 z188si2235896pgb.330.2019.02.04.22.12.02; Mon, 04 Feb 2019 22:12:17 -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=@mobiveil.co.in header.s=google header.b=JQjyNvjZ; 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 S1727733AbfBEGJl (ORCPT + 99 others); Tue, 5 Feb 2019 01:09:41 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40475 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbfBEGJl (ORCPT ); Tue, 5 Feb 2019 01:09:41 -0500 Received: by mail-wm1-f66.google.com with SMTP id f188so2275081wmf.5 for ; Mon, 04 Feb 2019 22:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mobiveil.co.in; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RdqnK8Sush9EMCE1fFJIyiI9lYcylVQGWUm228F9l+M=; b=JQjyNvjZOBil8q9iAorY2tERlu1QjToI85LOozJUiZE+qJke32JsVqqf1J8KJnK2d5 22xkaKyZapXLrAXCS2memoDt3mTJ+9JJM52z3Tke1Ddcdv1jx9ER28HzN4BZkwY1xHov zuqqHkludEn4JXqX0/+4+4WVBOMIMh0/8+NTA= 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=RdqnK8Sush9EMCE1fFJIyiI9lYcylVQGWUm228F9l+M=; b=mnSyCLmYHh1EgLcAbeIILzreznR9bOLhso9GkFwuG4PJoDZk8FZf+qMDTJdrE59pIc 4k+oABOggNedQHouB73F8FlbDmiZ76QJxkf7AjPZq+PRYn1E9v6hXmNmz52LUB3tI+jd FPdTwJSo3dcyfI1hsZP3OttbpfjHc1wHGgN3k20RoRv25GYXV3gtz3BPj0LRh7tUe/Oq NUCE5DTZlbJR6RjggSq2zug6PhfXwdOj3u9DL/m9/VfhOvgX5PgG4GinRqDuDMT9wVfG KB6NfHrmmMQnFw7GbL6TJ1Kh/4dSNsmpV46FPLt+iIa4x7UCWMsPm1iLnnjY311tufFZ WDqw== X-Gm-Message-State: AHQUAuYBQy6Ynd/pZB9fKz/GxB+nm3HcUmSz2lS9IOHf4RwX1NPwKWjE bHShr9/0DCPa7V8jbi7tKoDEzqMUmgKY1HDAaWwyxA== X-Received: by 2002:a7b:c5d1:: with SMTP id n17mr2163957wmk.152.1549346979076; Mon, 04 Feb 2019 22:09:39 -0800 (PST) MIME-Version: 1.0 References: <20190129080926.36773-1-Zhiqiang.Hou@nxp.com> <20190129080926.36773-13-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190129080926.36773-13-Zhiqiang.Hou@nxp.com> From: Subrahmanya Lingappa Date: Tue, 5 Feb 2019 11:42:13 +0530 Message-ID: Subject: Re: [PATCHv3 12/27] PCI: mobiveil: move out the link up waiting from mobiveil_host_init To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao 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 Reviewed-by: Subrahmanya Lingappa On Tue, Jan 29, 2019 at 1:39 PM Z.q. Hou wrote: > > From: Hou Zhiqiang > > Host initial sequence does not depend on PCIe link up, so move it > to the place just before the enumeration. > > Signed-off-by: Hou Zhiqiang > Reviewed-by: Minghuan Lian > --- > V3: > - No change > > drivers/pci/controller/pcie-mobiveil.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c > index 8eee1ab7ee24..c2848c22b466 100644 > --- a/drivers/pci/controller/pcie-mobiveil.c > +++ b/drivers/pci/controller/pcie-mobiveil.c > @@ -582,15 +582,8 @@ static void mobiveil_pcie_enable_msi(struct mobiveil_pcie *pcie) > static int mobiveil_host_init(struct mobiveil_pcie *pcie) > { > u32 value, pab_ctrl, type; > - int err; > struct resource_entry *win; > > - err = mobiveil_bringup_link(pcie); > - if (err) { > - dev_info(&pcie->pdev->dev, "link bring-up failed\n"); > - return err; > - } > - > /* > * program Bus Master Enable Bit in Command Register in PAB Config > * Space > @@ -662,7 +655,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) > /* setup MSI hardware registers */ > mobiveil_pcie_enable_msi(pcie); > > - return err; > + return 0; > } > > static void mobiveil_mask_intx_irq(struct irq_data *data) > @@ -922,6 +915,12 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) > bridge->map_irq = of_irq_parse_and_map_pci; > bridge->swizzle_irq = pci_common_swizzle; > > + ret = mobiveil_bringup_link(pcie); > + if (ret) { > + dev_info(dev, "link bring-up failed\n"); > + goto error; > + } > + > /* setup the kernel resources for the newly added PCIe root bus */ > ret = pci_scan_root_bus_bridge(bridge); > if (ret) > -- > 2.17.1 >