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: 887359 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dnCAV61r"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 403wyr2bvfz9sTF for ; Sun, 18 Mar 2018 21:53:08 +1100 (AEDT) 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 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;