From patchwork Tue Jun 24 19:18:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 363658 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B9B681400B5 for ; Wed, 25 Jun 2014 05:21:54 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzWFb-0007Oe-3q; Tue, 24 Jun 2014 19:19:27 +0000 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzWFY-0007JX-LR for linux-arm-kernel@lists.infradead.org; Tue, 24 Jun 2014 19:19:25 +0000 Received: by mail-qc0-f171.google.com with SMTP id w7so741898qcr.2 for ; Tue, 24 Jun 2014 12:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=ziQyKkzKg1uc3YhUV2qeXhXHvcAtyAAEmaKLQOzking=; b=K2J+CRQVDaM0Ilr1uQuM2UmnhG3l9u3i0rwn3YZExztSKq7e+Te+z4/5fatrFgvbRp N9vTsfj02PlEkhFv7JNTobn85BPfl8Av2msNbzDiN/pvCT9sHEozgnKCU4hVRm66TsBI R7C7BuPr+KjK02LiNvy0IPOfDKToFD27DnGzWZ4khueWYQNTSiLiExhe9JqKchIYhBrO DvdC2DSZmPieuRr/rZfbvQbRWiYYOrAZSmC3yrxJbo6u61Q0UD/xBNdGCiZQRmkkiMp3 gVvq2z+gZcjsezeQkG3YazW6DzgJZz/75pmss4TjjRm4GmFaNzPuoQvxONSVn3VIZskG nZpA== X-Received: by 10.140.89.197 with SMTP id v63mr2685130qgd.71.1403637542503; Tue, 24 Jun 2014 12:19:02 -0700 (PDT) Received: from localhost.localdomain ([201.82.195.30]) by mx.google.com with ESMTPSA id g10sm1842169qai.5.2014.06.24.12.18.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Jun 2014 12:19:01 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Subject: [RFC] PCI: pci-imx6: Add delay to workaround kernel hang Date: Tue, 24 Jun 2014 16:18:27 -0300 Message-Id: <1403637507-9424-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140624_121924_776623_7A495D7B X-CRM114-Status: GOOD ( 11.77 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Cc: r65037@freescale.com, marex@denx.de, Fabio Estevam , linux-pci@vger.kernel.org, tharvey@gateworks.com, shawn.guo@freescale.com, kernel@pengutronix.de, d.mueller@elsoft.ch, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Fabio Estevam When the mx6 PCI conctroller is initialized in the bootloader we see a kernel hang inside imx6_add_pcie_port(). Adding a 30ms delay allows the kernel to boot. Suggested-by: David Müller Signed-off-by: Fabio Estevam --- I am happy to get feedback on how to properly fix this. Thanks drivers/pci/host/pci-imx6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index a568efa..669f771 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -507,6 +507,8 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp, pp->root_bus_nr = -1; pp->ops = &imx6_pcie_host_ops; + usleep_range(25000, 30000); + ret = dw_pcie_host_init(pp); if (ret) { dev_err(&pdev->dev, "failed to initialize host\n");