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: 9086521 Return-Path: X-Original-To: patchwork-linux-rockchip@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 2214DBF29F for ; Thu, 12 May 2016 22:44:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4145C2017D for ; Thu, 12 May 2016 22:44:15 +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 6F75D2025A for ; Thu, 12 May 2016 22:44:14 +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 1b0zL3-0002IJ-Ur; Thu, 12 May 2016 22:44:13 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0zL1-0002FJ-Pn for linux-rockchip@lists.infradead.org; Thu, 12 May 2016 22:44:12 +0000 Received: by mail-pa0-x22c.google.com with SMTP id bt5so33390921pac.3 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=HcJ1bkF5HPLCOgCydHep/3lIPl8EC1rIS2r75vi5d5Y31NF8gNwvkPaTLfUfB6lan5 ncI9zfaoYOw3JSeDHMa3njeQQjNK+0sZsXDvu4wCaAyR9M9PHoBopBBLSbmYVVhdgdWm txO7KcQ8quZRDffbG3/NM3OvPbETBkJsUPB4YBLqTKX3a/Hkg5sum9hWXHiyqv5BkFMz /U+js+IA76KVwXzCbAq/tgTMp4LRf1rPSB4IihNGeljBfptB6UcaEfGCTajPMkR9BhX8 upGG539I0lopimTl0xAlR8zWyB60j6vBrQNyP/HUw86/Nv8ANEx7p3owAaVDJPLv1IP5 4ucQ== X-Gm-Message-State: AOPr4FX7bZa0hM054YC4xqsHIt/PVWAQqGqXAiWZULEHNDoXT4DGuC1QE1cdejik9xNQdbRz 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_154411_878637_9EB48BFC X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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=ham 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);