From patchwork Fri Dec 21 10:13:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 10740267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDE6E6C5 for ; Fri, 21 Dec 2018 10:13:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB6A2284B9 for ; Fri, 21 Dec 2018 10:13:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E4AF28500; Fri, 21 Dec 2018 10:13:50 +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.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 161D9284B9 for ; Fri, 21 Dec 2018 10:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731949AbeLUKNt (ORCPT ); Fri, 21 Dec 2018 05:13:49 -0500 Received: from smtp3-g21.free.fr ([212.27.42.3]:28225 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731874AbeLUKNt (ORCPT ); Fri, 21 Dec 2018 05:13:49 -0500 Received: from [192.168.108.68] (unknown [213.36.7.13]) (Authenticated sender: marc.w.gonzalez) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 5CD3513F8BA; Fri, 21 Dec 2018 11:13:18 +0100 (CET) To: Kishon Vijay Abraham , Andy Gross , David Brown , Yaniv Gardi Cc: Vivek Gautam , Matt Wagantall , Mitchel Humpherys , Will Deacon , Bjorn Andersson , Arnd Bergmann , MSM , Linux ARM , LKML From: Marc Gonzalez Subject: [PATCH v1] phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro Message-ID: <88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr> Date: Fri, 21 Dec 2018 11:13:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The private copy of readl_poll_timeout is no longer needed. Use the implementation in iopoll.h instead. Signed-off-by: Marc Gonzalez Reviewed-by: Bjorn Andersson Reviewed-by: Andy Gross Reviewed-by: Vivek Gautam --- drivers/phy/qualcomm/phy-qcom-ufs-i.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ufs-i.h b/drivers/phy/qualcomm/phy-qcom-ufs-i.h index 681644e43248..f798fb64de94 100644 --- a/drivers/phy/qualcomm/phy-qcom-ufs-i.h +++ b/drivers/phy/qualcomm/phy-qcom-ufs-i.h @@ -23,24 +23,7 @@ #include #include #include - -#define readl_poll_timeout(addr, val, cond, sleep_us, timeout_us) \ -({ \ - ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ - might_sleep_if(timeout_us); \ - for (;;) { \ - (val) = readl(addr); \ - if (cond) \ - break; \ - if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ - (val) = readl(addr); \ - break; \ - } \ - if (sleep_us) \ - usleep_range(DIV_ROUND_UP(sleep_us, 4), sleep_us); \ - } \ - (cond) ? 0 : -ETIMEDOUT; \ -}) +#include #define UFS_QCOM_PHY_CAL_ENTRY(reg, val) \ { \