From patchwork Sun Mar 18 10:52:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10291089 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 37CB4600F6 for ; Sun, 18 Mar 2018 10:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2958A2900F for ; Sun, 18 Mar 2018 10:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E50429011; Sun, 18 Mar 2018 10:53:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D54F12905A for ; Sun, 18 Mar 2018 10:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753790AbeCRKxG (ORCPT ); Sun, 18 Mar 2018 06:53:06 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38889 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbeCRKxF (ORCPT ); Sun, 18 Mar 2018 06:53:05 -0400 Received: by mail-wr0-f194.google.com with SMTP id l8so15733932wrg.5; Sun, 18 Mar 2018 03:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3yYGloVVjIMnaazhEjGC4dvqhmIQYirAqzYbX2BCiMk=; b=dnCAV61roOAERv3z07ZV56du0Vns6nLhzSvkiyOfJatfOqPigJjvfJ4WVd3YhsqQOv cIZyvqe2oA6/7ptsEBcd1/1nEvV1kBOU8Qlt8VvIJFJTD9Vo657qCnl+MD8/5msDDx6Y oCu3q07ZWSpW6p1DciPYnNfFEfqM1U4MWwXX7a+KG5Iunb5p+MAgaTrtrc5P9up049aZ /o5Fhcs2+9bWDHLpJy2fIle/noWgObJk0QGD1FXsPzmacN8z/lTYaoqmWrhR7KS4pbF2 yOFDFOVbkSVbhOmzqU2brvJQlqffTZKW9MVajbAf1bGY05xqfm1iKb0YeOU2bRyI1z7c vsoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3yYGloVVjIMnaazhEjGC4dvqhmIQYirAqzYbX2BCiMk=; b=RpAD1fEYI4VBraZ2htLxdC9eH4rOu6qpWQ1rdb7slJ86VRTV4IprznjWhWKl9Rn1Pi fPUb3k12jtQD8QfUJm1UETKFGthvbtLWKVlqW8X4UWY4QN/DjBVRQoegpz6AhWW2Wtz8 eB7k6RnFmUIk8KdUr5qqCoYjFFoc6RYc1JP/+T1bRHt+yD3k/MMI6PE+WSeVIPQP+VHo YnQxqyA8qUtVahxdPkFOLY4Sb1gcsLZ+6hWUGWFUB55b0ihSbCB8Vj/K3eouU4i1ZBZb dLoutnttajV55Ik4uv9qbM/9j+pwaOuaZ5rRFjJUUUaftDpcmFbYqcuRRsh7jY8D9A2O EwaA== X-Gm-Message-State: AElRT7GokLkORKglT1Iwq8vljD+B81sFk1cK7jsaL850zj+BmTQWXnZN uGJOFYPSJH6mecXreG/0m2+WdZ6p X-Google-Smtp-Source: AG47ELui89aIhfdRTbVJsPil1Uje+YK3kLmjpSp4DrcjYRAy363r9A4lReZfznjIvEmurX2jf90CHg== X-Received: by 10.223.171.79 with SMTP id r15mr6011904wrc.208.1521370383501; Sun, 18 Mar 2018 03:53:03 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id k20sm5207746wre.67.2018.03.18.03.53.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 03:53:02 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-pci@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Phil Edworthy , Simon Horman , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/2] PCI: rcar: Poll more often in rcar_pcie_wait_for_dl() Date: Sun, 18 Mar 2018 11:52:52 +0100 Message-Id: <20180318105253.30532-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.16.2 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The data link active signal usually takes ~20 uSec to be asserted, poll the bit more often to avoid useless delays in this function. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org Reviewed-by: Simon Horman --- drivers/pci/host/pcie-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 93d59f15c589..099998f1923a 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -528,13 +528,13 @@ static void phy_write_reg(struct rcar_pcie *pcie, static int rcar_pcie_wait_for_dl(struct rcar_pcie *pcie) { - unsigned int timeout = 10; + unsigned int timeout = 10000; while (timeout--) { if ((rcar_pci_read_reg(pcie, PCIETSTR) & DATA_LINK_ACTIVE)) return 0; - msleep(5); + udelay(5); } return -ETIMEDOUT;