From patchwork Thu May 12 22:43:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9086601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C590EBF29F for ; Thu, 12 May 2016 22:46:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5DFA20256 for ; Thu, 12 May 2016 22:46:01 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id D7FC820225 for ; Thu, 12 May 2016 22:46:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0zLD-0002LD-4n; Thu, 12 May 2016 22:44:23 +0000 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0zL3-0002FK-7z for linux-arm-kernel@lists.infradead.org; Thu, 12 May 2016 22:44:13 +0000 Received: by mail-pa0-x22b.google.com with SMTP id r5so34816149pag.1 for ; Thu, 12 May 2016 15:43:51 -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; bh=EAZAMrLHdcy7nUHAqSjAJ5PTvlhnsHxGOJj8yDHgLM4=; b=NKn5m5tGEopgqQ6bygRNlJW89DXukSCUacLRHaq+lIlFP/pCzQ2KYoLlu+1K0UjdML h0ZghW79ON8+RIjnnrc05asVTTTh3hOvypCCnnX/egbirOh823rduz2AOgr31vfJw21t QEo8srFQOOwwXOlKIx0NTTlldvnCd/EPQEBL0= 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; bh=EAZAMrLHdcy7nUHAqSjAJ5PTvlhnsHxGOJj8yDHgLM4=; b=l+nHM6tdOVOQOpIjEa/kwywCiMDEKPjgzjlZ/JTmdoRbx2CLEXz4U0cZM8x4oQpNYS xrPX502nv9jy0ZWosM/ONHxBYiJoJKMc7KwVreZjRCru2lz0JpTVRT4TtldMRe4YbbD8 ecxu26FiRTtnKIkCbxYDpYHWFyXlOWA0rZqHlVDEnDNIYQZ5F9xPEKyGEddUb10uGk+h Mb+j+z/Q/uARb/P+RuDErGLDZIAi522aG1KcGchUkjFupFKRgQEW5KSQkH21YhBWy2bw eQhXdYUvi+ZlXdUSq8EP2I4Bw3+KDNCdimn5qAamnJOKgaFSQeOGjs97B96ln50Rv5D6 ncpQ== X-Gm-Message-State: AOPr4FUNDynflzdx8Was69OIKMZF/mof8FOun8MJosUjtr9ZThXcgJ6mX6w8AGtSDtjBtTXl X-Received: by 10.66.66.42 with SMTP id c10mr17558905pat.119.1463093031125; Thu, 12 May 2016 15:43:51 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id 28sm22189254pfr.89.2016.05.12.15.43.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 15:43:50 -0700 (PDT) From: Brian Norris To: Kishon Vijay Abraham I Subject: [PATCH 1/4] phy: rockchip-emmc: give DLL some extra time to be ready Date: Thu, 12 May 2016 15:43:03 -0700 Message-Id: <1463092986-61777-1-git-send-email-briannorris@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160512_154413_316743_BA533C33 X-CRM114-Status: GOOD ( 11.51 ) X-Spam-Score: -2.7 (--) 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: Heiko Stuebner , Shawn Lin , Brian Norris , Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Brian Norris , 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-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 Reviewed-by: Douglas Anderson Tested-by: Heiko Stuebner Acked-by: Kishon Vijay Abraham I --- 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);