From patchwork Fri Nov 10 21:58:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10053839 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 B2D816032D for ; Fri, 10 Nov 2017 21:59:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A80852929B for ; Fri, 10 Nov 2017 21:59:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C53D2B11C; Fri, 10 Nov 2017 21:59:02 +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 5FBBC2929B for ; Fri, 10 Nov 2017 21:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751324AbdKJV7B (ORCPT ); Fri, 10 Nov 2017 16:59:01 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:56324 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbdKJV7A (ORCPT ); Fri, 10 Nov 2017 16:59:00 -0500 Received: by mail-wr0-f194.google.com with SMTP id q66so9701993wrb.13; Fri, 10 Nov 2017 13:58:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+zCmnIKoiT/rlNBHmthA7UggQMf6U3HiUtv49rJxkOo=; b=Ct88teOB8ZWHf5s0hAcaKACcTpwJGkv2v7j9n/Qtp6JXIql3xieZ7L4BAk2OJBe/0O 77PAYJvTR+MrHXhY3E/H/lIrkWkK3c+pUjI3LhFyeybGr0zx0kzX5VIsRsI0iylkWItH GPzjb4wTkqMw5fQnYGSyMdyd1WDm35mD+JDkC/T6FUp/oA1UwwG/mA7/YZYkqs+5Yn4h bPN2NWid6Uvuc13e7fX6jMndlHMCakKxDch6sXQ3q8pncS0wSd8GDQ3S+GwEYLACEmLK lkgNvFw69S3N2NhDV2XGRIh3977l1gDAs+CsPsn9sakTc0JmYF4UMlyDOoY9I8oDDvjK GuPQ== 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:in-reply-to :references; bh=+zCmnIKoiT/rlNBHmthA7UggQMf6U3HiUtv49rJxkOo=; b=RfBARu7oikiEDS9HYo/w1wAgiC00GDvsMDx4PMessGjMmCypNPpt6PXKE9VH/mrdaK uSmnn4cafhbMdl9lla1tNQ50g6Mdyll4LrQuPDUCZyBrThxiO3TkKp6JnbgMQo8tdNzr Y9CACqgsPbneQXLVDqEZxaFRvfRJRm13km5QDr9gJiR6yctVziCujRIcKVwRD5aCsdOd aLwsy3SJDrDps0T/2biuqymx7e4ZNTy2WIIdjzL2WlDq+rcYO17h9E1fJdCJHTHHbL2g GW7SYcnJ3B9tly0hWoMEeABRizZ+hvJ+zR9L6QqeVvyel+UheKA5NhRJXsFdtKcSDteO qMVw== X-Gm-Message-State: AJaThX6GlszQ7dtw0Gi9iJwPwz0fH0hLB4uGLSfimaZ6jHx5IYL7anTN Natg/wLXvQL7Wave4qeIIl0q4cc9 X-Google-Smtp-Source: AGs4zMazTAMz1PcOW3wkwDSfGDuz2V8JuYs8SY6ol47BRtMQn6HaFkLqv7G6t75P4qP80rtr4FWnZw== X-Received: by 10.223.135.132 with SMTP id b4mr1503983wrb.248.1510351138639; Fri, 10 Nov 2017 13:58:58 -0800 (PST) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id c3sm4560784wrd.44.2017.11.10.13.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 13:58:57 -0800 (PST) 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 V2 1/5] PCI: rcar: Poll more often in rcar_pcie_wait_for_dl() Date: Fri, 10 Nov 2017 22:58:39 +0100 Message-Id: <20171110215843.432-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171110215843.432-1-marek.vasut+renesas@gmail.com> References: <20171110215843.432-1-marek.vasut+renesas@gmail.com> 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 Acked-by: Simon Horman --- V2: New patch --- 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 e00f865952d5..351e1276b90a 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -531,13 +531,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;