From patchwork Tue Oct 10 03:01:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaotian Jing X-Patchwork-Id: 9994999 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 D58D660216 for ; Tue, 10 Oct 2017 03:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C415023E64 for ; Tue, 10 Oct 2017 03:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B89CA2656B; Tue, 10 Oct 2017 03:53:08 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CAA42262AE for ; Tue, 10 Oct 2017 03:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/eJdt5PhendnVmGgRra5VsBT/sjSuTqzVFtZE+RwIcM=; b=XxNiOnsVgwB7jK yfTNnj1lACmCKqrE/Nxy1ZDEHTH2ItzG5QgH1JUeVhD4wID4iF7ZQVKdrKSWQ/NqQFO3ekpVmtQGk ZGW2YG/wEJT0o5sTS+pruVdLHHu2iQOoFsDlHm7DzJmeF7nQAUu6TYoXHjf9+jEhZ2hJG1hYr3No7 UD4pLzmGmsAW0iXSEAp+gZGeHaBr8ivdHZJVGbvnsjzJGMXuf6w0sVMQ4c/UOf6jFUFQyrHbRElas MX2TLm6Q4H3eDm8kaT0qUJ6M7Hzurw2tX6O6otWYKMkDQ+7mF7ydj5L38d2H5C7X7Yg5PVQBCWdOu w6e16Nt5Fs+G4OvIXfMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e1lb2-0006Ib-3N; Tue, 10 Oct 2017 03:52:44 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1laz-0005UM-VY; Tue, 10 Oct 2017 03:52:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hZ2YC4wFDC1ys9q8NfwfS5twLgbhAb3Fhsmhn3pK2Rk=; b=aKSepf54w0dLJ9nAnKmmMOgPZ B+xYQSP+zogy9ZTRkCK3uZXXcPPXTZgVG87gw+29wLZNRvxTlm7C7KxXNL1R5fWnLdhgHSZ8GIBe8 4r34KFq+33EPLb+sRmYOjRvyrmHMhRQm9+PtKRAp6DWek+ghrS6cnEVVZdOEQ4nuUc1gRykhkDuLo 2nZUyXp5J7HDjFw2Mv0CN6uoRkDcYf7E+4cLDSAeYfcKtErRaZvJTEWxdhFdQg/s6EwrucNwe1bTn P5I2lOewNSeEVgQ0stm6qlyUJMJnFOIRmw+U+5xzOoKTo3MGqht8ZMR+kXLOzRw7QgWeP2z1gzel9 jpsrF4iDQ==; Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1koj-0006xF-Lm; Tue, 10 Oct 2017 03:02:51 +0000 X-UUID: eac5bd8e79bb43d1b0945cf546694b2f-20171010 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 999892248; Tue, 10 Oct 2017 11:02:13 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 10 Oct 2017 11:02:11 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 10 Oct 2017 11:02:10 +0800 From: Chaotian Jing To: Ulf Hansson Subject: [PATCH v3 12/12] mmc: mediatek: perfer to use rise edge latching for cmd line Date: Tue, 10 Oct 2017 11:01:20 +0800 Message-ID: <1507604480-23246-13-git-send-email-chaotian.jing@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1507604480-23246-1-git-send-email-chaotian.jing@mediatek.com> References: <1507604480-23246-1-git-send-email-chaotian.jing@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171010_040250_011048_094E7C9E X-CRM114-Status: GOOD ( 14.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, srv_heupstream@mediatek.com, Catalin Marinas , Linus Walleij , Will Deacon , linux-kernel@vger.kernel.org, yong mao , Phong LE , Rob Herring , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , linux-mmc@vger.kernel.org, Chaotian Jing , Heiner Kallweit 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 data lines have applied to perfer to use rise edge, also need apply it to cmd line. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 4cffc04..731574e 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -1558,7 +1558,8 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) } final_rise_delay = get_best_delay(host, rise_delay); /* if rising edge has enough margin, then do not scan falling edge */ - if (final_rise_delay.maxlen >= 12 && final_rise_delay.start < 4) + if (final_rise_delay.maxlen >= 12 || + (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4)) goto skip_fall; sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);