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: 4412631 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AE9C89F26E for ; Tue, 24 Jun 2014 19:19:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C468B20374 for ; Tue, 24 Jun 2014 19:19:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 703F6201CD for ; Tue, 24 Jun 2014 19:19:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752638AbaFXTTE (ORCPT ); Tue, 24 Jun 2014 15:19:04 -0400 Received: from mail-qc0-f178.google.com ([209.85.216.178]:61325 "EHLO mail-qc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbaFXTTD (ORCPT ); Tue, 24 Jun 2014 15:19:03 -0400 Received: by mail-qc0-f178.google.com with SMTP id c9so762386qcz.9 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 Cc: r65037@freescale.com, shawn.guo@freescale.com, marex@denx.de, d.mueller@elsoft.ch, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, tharvey@gateworks.com, Fabio Estevam 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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");