From patchwork Wed Apr 25 12:09:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134253 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp778763lji; Wed, 25 Apr 2018 05:10:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LFzaFdkFz9w0N5VjSUTuLYO20hQ0+H0Hw5qSGek8UhtUoiN7UY/evuq4vn+vFKVBgHf4p X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr29253195plt.142.1524658209824; Wed, 25 Apr 2018 05:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524658209; cv=none; d=google.com; s=arc-20160816; b=kCFgNesOhO5/tYEVu00dytLqd320As6msRFlbcEdrcruJXYHuL4NRJbV4Ah6ZH8/pS lDe/K2A6ECJMWe5ugfAstrb3UJmvMgbsK4j/CO8XbA+24vgCGMcyKRWkrVdeDjqWmfaO HNdIznGQpXsyoDkY1EGMLd7YU14H4y3b0PL5DFsefBVFRmfWdYPCWb7GSuwPSRzI5pJG XD2vYGFzZxyHB1g82RHDZEr1i2rLNfrjm+dI4QLLCsNJfp5aLZYN1vRYCD+qgFyAWLYl ZgvoKYVaMNOWMAGwSuOtT5YAGUtYetzhBbnh1LPBeg2Ods2xypZN+NnY5k9iZYR4H2sj W19w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=0QmutJIZ/H43dWYy32XQae/aftujNmxK1nseTperK4s=; b=LdPcUEk078AGBE3892yCfhycXAn0gc2UOqOAFHnkeUmvx+QilsoGFo2ncw8c8OOz5f qQMTBnfeJgzSlJ52PUZgDzPCWaNWOyOySANq8xbHLTNlaaBFVpQI8TO3HgBWj2YMVuB7 hUOy/LCZIhyi5TeXLZqQyGuV7NAbMW7XQWx0sctcHIh1KP1f3juX1O/FpQw12DSHpXxq CPCMujt/Qyz5tcCI2EGBvLpHz0QikKvt9Eu3D0scTCyvywJNRSi696XMEC2sHvkylbEz KXP0KtVHVCYE55+MlLl/BTzvbpEObHhOOSG3caoK0WwEG3sxbL1dC99nqOQlZCBs+jKx nREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ckHgR/kP; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si15640088pfl.143.2018.04.25.05.10.09; Wed, 25 Apr 2018 05:10:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ckHgR/kP; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbeDYMKH (ORCPT + 6 others); Wed, 25 Apr 2018 08:10:07 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:60360 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbeDYMJ6 (ORCPT ); Wed, 25 Apr 2018 08:09:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3PC9oGi012250; Wed, 25 Apr 2018 07:09:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524658190; bh=bq6E3VAqe/kxvHB4omcvaJlkbdf1tBk2WYg73VVMOrQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ckHgR/kPoUWIV8BG5uexFtJSHIf7hrBAu3+tTj4kfylNp+S6Q1UrYve2wavIQxPM9 cb9I2bEyFMg289g0G9Uc4U4KInWOL94d46WV6c/D9s0GeC3gbvotX6O35PsgVvFL68 IKeyJn/H8ui3YHlqp6wR7eZ7cV0uGb1CNBXOXvs0= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PC9o4g015722; Wed, 25 Apr 2018 07:09:50 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 25 Apr 2018 07:09:50 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 25 Apr 2018 07:09:50 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PC9hhO009970; Wed, 25 Apr 2018 07:09:47 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: , Rob Herring , Mark Rutland , , , , , Tony Lindgren Subject: [PATCH v4 01/12] mmc: sdhci-omap: Fix when capabilities are obtained from SDHCI_CAPABILITIES reg Date: Wed, 25 Apr 2018 17:39:26 +0530 Message-ID: <20180425120937.29867-2-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425120937.29867-1-kishon@ti.com> References: <20180425120937.29867-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org sdhci_omap_config_iodelay_pinctrl_state() requires caps and caps2 to be initialized (speed mode capabilities like UHS/HS200) before it is invoked. While mmc_of_parse() initializes caps/caps2 if capabilities is populated in device tree, it will remain uninitialized for capabilities obtained from SDHCI_CAPABILITIES register. Fix sdhci_omap_config_iodelay_pinctrl_state() to be used even while getting the capabilities from SDHCI_CAPABILITIES register by invoking sdhci_setup_host() before sdhci_omap_config_iodelay_pinctrl_state(). Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren --- drivers/mmc/host/sdhci-omap.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 1456abd5eeb9..9bb53702e0e5 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -916,10 +916,6 @@ static int sdhci_omap_probe(struct platform_device *pdev) goto err_put_sync; } - ret = sdhci_omap_config_iodelay_pinctrl_state(omap_host); - if (ret) - goto err_put_sync; - host->mmc_host_ops.get_ro = mmc_gpio_get_ro; host->mmc_host_ops.start_signal_voltage_switch = sdhci_omap_start_signal_voltage_switch; @@ -930,12 +926,23 @@ static int sdhci_omap_probe(struct platform_device *pdev) sdhci_read_caps(host); host->caps |= SDHCI_CAN_DO_ADMA2; - ret = sdhci_add_host(host); + ret = sdhci_setup_host(host); if (ret) goto err_put_sync; + ret = sdhci_omap_config_iodelay_pinctrl_state(omap_host); + if (ret) + goto err_cleanup_host; + + ret = __sdhci_add_host(host); + if (ret) + goto err_cleanup_host; + return 0; +err_cleanup_host: + sdhci_cleanup_host(host); + err_put_sync: pm_runtime_put_sync(dev); From patchwork Wed Apr 25 12:09:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134261 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp781723lji; Wed, 25 Apr 2018 05:12:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/dnzozKqtIJhXilSy0zXv5Un8hOZiVVmLTM6VHlkijILvQ7zuaJjT/hnsNiY1zPGNIkq+1 X-Received: by 2002:a17:902:a704:: with SMTP id w4-v6mr28889307plq.5.1524658360143; Wed, 25 Apr 2018 05:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524658360; cv=none; d=google.com; s=arc-20160816; b=et2eha73Ra/XIeKjgmO/DigwuKVpY08Hm4KCCPJvsT5jNdanlkAIvbpzxOS+5VWf2h 4VBpUtmcwoSIAlhfO91pu8R8plW6M8qvhh5Iz0pRBolxkrrklkp2raxvZCukfYm/ekL1 ydx+A5uhh1xsx6frLpa5UBu1FW3TKJif0XjqAhsV9M5ZAtNJ8hJiGOTa3W3sgNWbf3ak fil8u02ym0ivxfIv6yu4lCAmobYwQxjoJTqDr4kdVIug7YoyYileKOZR/uCApK/hmD85 aCzd2UjGk9B8Hankg8aP2maQuDft46m7L4EuH9WUVNBqpvd/KtGPFUqzM/vmcRW7FDVL qBbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vDmcHJWToBqOYh8duOj2QMiu91OEs93gfQ8kurTSqU4=; b=XNN2ZnXpW/au0RZRrdyrUhE3Hto8DISpI9gGhdAm0udO7VemLWCTjIrOnGaOPNtY4j 81s8UAhV28ixFvpONRedL8h9bHRirqC2un31JJGEVZe/155aDXTaWu6YpZ4E7pMMEgsr tUL4gDN8ZGGIRUmY4sm/7SXJ71jfZcED07cXQoLsD4PQcK1nl4sQIplmLSqRJYJW1Wkz uwxvbfobd6fhPc+exEialVXNJKcqKIyrjCzQzhocCO1lWDtYbv3D5XLG6spf7Xi6Hsfl uFTnFBKBQw3FxbSQcAhjgANbxetv9LvTARwfC6A5t+thhAETRuUvs25XUAekfBZwg9dm TV8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=xsDbjDLP; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14-v6si1757669plq.439.2018.04.25.05.12.39; Wed, 25 Apr 2018 05:12:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=xsDbjDLP; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbeDYMMi (ORCPT + 6 others); Wed, 25 Apr 2018 08:12:38 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:13748 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbeDYMKR (ORCPT ); Wed, 25 Apr 2018 08:10:17 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3PCAAXf017442; Wed, 25 Apr 2018 07:10:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524658210; bh=/JoDwUQXlRqzfDR/Jbbn3G6wLg9UjQ+jGXfrCrAUztU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xsDbjDLP6Flsur4DZbrMRlRrNidBjTV6p4bi0JmzDUojNiFDzFdqGkTIKBU6O4aS9 7Jl3dGKU5EXt2Zt7DKb5Gayf36PXW0Eg7wlhsKGAf0mIxZgmCcAg9dPsP5ZPXbgMqp 16HTzog91c91RfEZeYXs8neiWeBbJVERmvLJScwA= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PCAAhu016474; Wed, 25 Apr 2018 07:10:10 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 25 Apr 2018 07:10:09 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 25 Apr 2018 07:10:09 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PC9hhU009970; Wed, 25 Apr 2018 07:10:06 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: , Rob Herring , Mark Rutland , , , , , Tony Lindgren Subject: [PATCH v4 07/12] mmc: sdhci: Factor out target_timeout calculation Date: Wed, 25 Apr 2018 17:39:32 +0530 Message-ID: <20180425120937.29867-8-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425120937.29867-1-kishon@ti.com> References: <20180425120937.29867-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Adrian Hunter Factor out the target_timeout calculation so it can be re-used. Signed-off-by: Adrian Hunter Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci.c | 48 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 18 deletions(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index b91163de4da4..c432ec3644aa 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -709,6 +709,35 @@ static u32 sdhci_sdma_address(struct sdhci_host *host) return sg_dma_address(host->data->sg); } +static unsigned int sdhci_target_timeout(struct sdhci_host *host, + struct mmc_command *cmd, + struct mmc_data *data) +{ + unsigned int target_timeout; + + /* timeout in us */ + if (!data) { + target_timeout = cmd->busy_timeout * 1000; + } else { + target_timeout = DIV_ROUND_UP(data->timeout_ns, 1000); + if (host->clock && data->timeout_clks) { + unsigned long long val; + + /* + * data->timeout_clks is in units of clock cycles. + * host->clock is in Hz. target_timeout is in us. + * Hence, us = 1000000 * cycles / Hz. Round up. + */ + val = 1000000ULL * data->timeout_clks; + if (do_div(val, host->clock)) + target_timeout++; + target_timeout += val; + } + } + + return target_timeout; +} + static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd, bool *too_big) { @@ -732,24 +761,7 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd, return 0xE; /* timeout in us */ - if (!data) - target_timeout = cmd->busy_timeout * 1000; - else { - target_timeout = DIV_ROUND_UP(data->timeout_ns, 1000); - if (host->clock && data->timeout_clks) { - unsigned long long val; - - /* - * data->timeout_clks is in units of clock cycles. - * host->clock is in Hz. target_timeout is in us. - * Hence, us = 1000000 * cycles / Hz. Round up. - */ - val = 1000000ULL * data->timeout_clks; - if (do_div(val, host->clock)) - target_timeout++; - target_timeout += val; - } - } + target_timeout = sdhci_target_timeout(host, cmd, data); /* * Figure out needed cycles. From patchwork Wed Apr 25 12:09:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134259 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp780445lji; Wed, 25 Apr 2018 05:11:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+uRtX/4PPddwWKR+7G+dey8ekJplp9NlEGO/lRwdhurKSKdbqZ4MtGgNr2L9jQ17Lv9b+2 X-Received: by 10.99.64.3 with SMTP id n3mr23516603pga.13.1524658296311; Wed, 25 Apr 2018 05:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524658296; cv=none; d=google.com; s=arc-20160816; b=eRKHwvzEDPpwLVCtNdNL6WKUrh1xgJ63h75D8dDs9oFikLJTfBDqXtOSRF20Q/E3r0 vP+czFeQMEvKAIhg478SdvMrzkiWGXZwStnbMZ3bkhdxkq/mRm5CU2PyjJB2hf77SEHz /ioRob4aN0utth7ZHqhbpHXE/IrkJdbxXqeKM4FSvap7XjX4vpOTt5HKrYUjRMPp10+L RmBWicRS39BJHxPBTSiAY8x1qHjw5gkk+fCZpWJmO+Fb1qSNi4ujArfNuwvwAxvzJaiS phsX7kVu5d52xfLfcIEkJYC3tPPi0ftE6XC3jxUdZJdRs/mdVAe0ZwfOYxPKcWu/gnyH 2Ljg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=lE0rFvQh8LmvK11KU7CGm7udqNPEbRypeqOY4LkZuUo=; b=x4Z9D1tQ0GIUcGTWtJO3JIF9Cj7G++IJqJPRtlS93xjeihogXlGv8+LSG4YQBer3Pq 5wrvU6TIvJbYNzTkeb5r1aLD0CO/kcAeLqOqFCyHM1SbyIg+qbKghVkmgP7kT5dHUgwm HSeqq8KaokTe21c1nmE1/+e/ZwaA/o+QPkORUY3AHphLUeVjMOUe5zpRUvTHSMt0IZSs ln2o0p31XrBt7W/Ni2DLUomcO7dB8yloAC+WeVX7CFk2nwn0vFx3aYK6mehh/zkXrpxY MXOHd0ZLas+Lxp89nkytVhngtKbixRYpuPric3L8SLMGPgv3pM7fhEEQAOWRsFe5YPKC l8YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QTRdRnHB; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si13497930pgn.416.2018.04.25.05.11.36; Wed, 25 Apr 2018 05:11:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QTRdRnHB; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753565AbeDYMLe (ORCPT + 6 others); Wed, 25 Apr 2018 08:11:34 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:13761 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753269AbeDYMKX (ORCPT ); Wed, 25 Apr 2018 08:10:23 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3PCAGaf017456; Wed, 25 Apr 2018 07:10:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524658216; bh=QaxobufYbdR3GVOu0PfjOTqCHhXJ4jfD08WJdhbqKMY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QTRdRnHBRuLpu1InqvgHFOoWjrgCrtoRZ7qlIcuq5oDLZZcxoLiWkIMrwjgeku6zf SAia1FMRIkDm2KmwOKYilegqnv14cAcAG3gLZxteaQN63WcneD6R/q/v0GeJruDzxR DU7D/ZaTw/8nrWKkeAChOe9nJa04JRcgVBPJrfJg= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PCAGEq016690; Wed, 25 Apr 2018 07:10:16 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 25 Apr 2018 07:10:16 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 25 Apr 2018 07:10:16 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3PC9hhW009970; Wed, 25 Apr 2018 07:10:13 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: , Rob Herring , Mark Rutland , , , , , Tony Lindgren Subject: [PATCH v4 09/12] mmc: sdhci-omap: Workaround for Errata i834 Date: Wed, 25 Apr 2018 17:39:34 +0530 Message-ID: <20180425120937.29867-10-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425120937.29867-1-kishon@ti.com> References: <20180425120937.29867-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Errata i834 in AM572x Sitara Processors Silicon Revision 2.0, 1.1 (SPRZ429L July 2014–Revised April 2018 [1]) mentions the maximum obtainable timeout through MMC host controller is 700ms. And for commands taking longer than 700ms, hardware timeout should be disabled and software timeout should be used. The workaround for Errata i834 can be achieved by adding SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci-omap. [1] -> http://www.ti.com/lit/er/sprz429l/sprz429l.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren --- drivers/mmc/host/sdhci-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Adrian Hunter diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 2d9ea23610d5..b2c54940d032 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -715,7 +715,8 @@ static const struct sdhci_pltfm_data sdhci_omap_pdata = { SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC, .quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN | SDHCI_QUIRK2_PRESET_VALUE_BROKEN | - SDHCI_QUIRK2_RSP_136_HAS_CRC, + SDHCI_QUIRK2_RSP_136_HAS_CRC | + SDHCI_QUIRK2_DISABLE_HW_TIMEOUT, .ops = &sdhci_omap_ops, };