From patchwork Mon Jun 20 17:56:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 9188389 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 DCD64607D1 for ; Mon, 20 Jun 2016 18:02:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D212827C05 for ; Mon, 20 Jun 2016 18:02:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C644327C2C; Mon, 20 Jun 2016 18:02:48 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5EF3727C05 for ; Mon, 20 Jun 2016 18:02:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3Vc-0007LR-8z; Mon, 20 Jun 2016 18:01:16 +0000 Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3VH-0007BK-LF for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2016 18:00:56 +0000 Received: by mail-pf0-x22c.google.com with SMTP id t190so56323334pfb.3 for ; Mon, 20 Jun 2016 11:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4w0KHfE3CxA3sRtTe9Rs9fsUdr25mnkervEAvbnH4b4=; b=mJ5ax//YopDVOORhytt5EKXxVLgwcpHnsdtRSqdR6KjZkdnHPRKVzjqNK5fLojtD75 iEuhHiE7/XaslXOHFsmg5kVnXFGACxEaWa2rYmdZfWPGjHVm6nG5QaAPHfw2yNOuST6a A/QAV+58ZDonO1dS2waryCL6H10Rnh8QOjEls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4w0KHfE3CxA3sRtTe9Rs9fsUdr25mnkervEAvbnH4b4=; b=RuWYIs1BicW443TFiIIBuSX7lAePNhlPXPndH9E2W860y91Vu3EZtDJFJdUGgBiaEi 5ujpDx59i5ezL3mYlNWIVCEpqU5mfcd6dNw/Ybxq+FQRp1U4cKWJIp1kKTumCDszYVAV mYgGZLngsD0D0dx+7RTlj//vPdlcsmEu4mWwjcP+t6v+x8lENAsQauY3IUhGpOll/MWq AtTkvcXDhIfxGFp+UeuuupxLa0caZnEfMHaDqwka7G/PoPU3YTqfTZ41Q88uWbFdwsWb aWCi6MOpIU1quhOEVr9/GQ55IFC500BHo6oEPQJNtA0MYsr5BGVfovI01dnnh2A5Ypjv RIGQ== X-Gm-Message-State: ALyK8tJAfcmMZ0l23jz4V3MijKB8JAKO2ZtdVNquDhdiXfYAd5t8KaKl9RVWDzsNJLa/yHWx X-Received: by 10.98.25.66 with SMTP id 63mr23024072pfz.94.1466445632727; Mon, 20 Jun 2016 11:00:32 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id c189sm60250353pfg.19.2016.06.20.11.00.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 11:00:31 -0700 (PDT) From: Douglas Anderson To: ulf.hansson@linaro.org, Heiko Stuebner Subject: [PATCH v3 01/15] phy: rockchip-emmc: give DLL some extra time to be ready Date: Mon, 20 Jun 2016 10:56:40 -0700 Message-Id: <1466445414-11974-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466445414-11974-1-git-send-email-dianders@chromium.org> References: <1466445414-11974-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_110055_875102_01166C8E X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Douglas Anderson , devicetree@vger.kernel.org, xzy.xu@rock-chips.com, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, briannorris@chromium.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, kishon@ti.com, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, groeck@chromium.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shawn Lin According to the databook, 10.2us is the max time for dll to be ready to work. However in testing, some chips need 20us for dll to be ready. This patch adds some extra margin for dllrdy to be ready, fixing our -ETIMEDOUT issues. Signed-off-by: Shawn Lin Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Tested-by: Heiko Stuebner --- Changes in v3: - Add Brian's PHY patches into my series Changes in v2: None drivers/phy/phy-rockchip-emmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 6ebcf3e41c46..48cbe691a889 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -119,10 +119,11 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy, PHYCTRL_ENDLL_MASK, PHYCTRL_ENDLL_SHIFT)); /* - * After enable analog DLL circuits, we need extra 10.2us - * for dll to be ready for work. + * After enable analog DLL circuits, we need an extra 10.2us + * for dll to be ready for work. But according to testing, we + * find some chips need more than 25us. */ - udelay(11); + udelay(30); regmap_read(rk_phy->reg_base, rk_phy->reg_offset + GRF_EMMCPHY_STATUS, &dllrdy);