From patchwork Fri Apr 29 02:48:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 8976661 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 89AF2BF440 for ; Fri, 29 Apr 2016 02:49:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8B4520149 for ; Fri, 29 Apr 2016 02:49:09 +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 E8A452017E for ; Fri, 29 Apr 2016 02:49:08 +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 1avyUO-0002SC-Mz; Fri, 29 Apr 2016 02:49:08 +0000 Received: from lucky1.263xmail.com ([211.157.147.131]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avyUL-0002OL-HJ for linux-rockchip@lists.infradead.org; Fri, 29 Apr 2016 02:49:07 +0000 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.228]) by lucky1.263xmail.com (Postfix) with SMTP id 78B998E794; Fri, 29 Apr 2016 10:48:42 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-KSVirus-check: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 7C3A04123; Fri, 29 Apr 2016 10:48:40 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: adrian.hunter@intel.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <9fbadf7c5276cbe0ec73f4ccb35e973c> X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 2735743SIII; Fri, 29 Apr 2016 10:48:41 +0800 (CST) From: Shawn Lin To: Adrian Hunter , Ulf Hansson Subject: [PATCH v2 5/6] mmc: sdhci: implement enhanced strobe callback Date: Fri, 29 Apr 2016 10:48:23 +0800 Message-Id: <1461898103-29026-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1461897751-28810-1-git-send-email-shawn.lin@rock-chips.com> References: <1461897751-28810-1-git-send-email-shawn.lin@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160428_194907_193754_6CFC621E X-CRM114-Status: UNSURE ( 6.03 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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: devicetree@vger.kernel.org, Doug Anderson , Heiko Stuebner , Shawn Lin , linux-mmc@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Jaehoon Chung , linux-rockchip@lists.infradead.org, Rob Herring , soren.brinkmann@xilinx.com 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 Enhanced strobe stuff currently is beyond the scope of Secure Digital Host Controller Interface. So we can't find a register here to enable/disable it. We experct variant drivers to finish the details according to their vendor settings. Signed-off-by: Shawn Lin --- Changes in v2: None drivers/mmc/host/sdhci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 94cffa7..a04e4c4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2049,6 +2049,16 @@ out_unlock: return err; } +static int sdhci_prepare_enhanced_strobe(struct mmc_host *mmc, bool enable) +{ + /* + * Currently we can't find a register to enable enhanced strobe + * function for standard sdhci, so we expect variant drivers to + * overwrite it. + */ + return -EINVAL; +} + static int sdhci_select_drive_strength(struct mmc_card *card, unsigned int max_dtr, int host_drv, int card_drv, int *drv_type) @@ -2158,6 +2168,7 @@ static const struct mmc_host_ops sdhci_ops = { .enable_sdio_irq = sdhci_enable_sdio_irq, .start_signal_voltage_switch = sdhci_start_signal_voltage_switch, .prepare_hs400_tuning = sdhci_prepare_hs400_tuning, + .prepare_enhanced_strobe = sdhci_prepare_enhanced_strobe, .execute_tuning = sdhci_execute_tuning, .select_drive_strength = sdhci_select_drive_strength, .card_event = sdhci_card_event,