Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2589704rwj; Mon, 19 Dec 2022 06:34:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Su1N0MmfzWpYYNDW0RgXgkgY17SKLUUCSBLdTaEsCRKdSSIU5rcXEKUSNd3/5uMWnsSoE X-Received: by 2002:a17:907:6743:b0:7c1:7c3a:5c65 with SMTP id qm3-20020a170907674300b007c17c3a5c65mr27609145ejc.4.1671460456495; Mon, 19 Dec 2022 06:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671460456; cv=none; d=google.com; s=arc-20160816; b=R3TeTr+7MSTvkt8TyJUGjO/I+ymCMEGuGw1cXVP/LejHpIDyR9TAUVUd4+5LZIH8aD AbJzUf04WDrdm5wMTkji0aN3pkP1IUIPHKvgdT0hGWYcE6/8Jlycp3bs0FdQz5sthqd8 findKwYX8YBJ47xt8NF6DECiZVfjCl5k//gw9z0D2dwA7KExQPYbCU9WLD1dSrLMg88m JJIjtyiKkTI9z3DTFvidMWblBvzyynk0jgaKMnufCC0rehUmq7ixoQBivhPML4oJKqEh rxj3zPIH3U6bjLcZHYopRhD32O+qv9sxZnsDQZRljT8eNr57g8F/rMed9S15j9EXJ8qg XeNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WT4NfijVvAyDAew7cjYlvKxAfrdUBj8fv5owla86UN0=; b=R0tmYVUdTeSN/coMPsP7FCbk6zsc57AdoyOOYhq4QH8eDOCPTiStdCGvTjQmc2WdmG K+6dx1i0RxNwFPcWSmRtNikkoCn6X77pUK5VZ6wFUx6OD9I0DugAJvZ4AEGMuUXO9N3s v/W7EjewY2OtIEVYhVGP5RvqYHsBUBqic3n9B8/z4czUcnwNVdMRLeDFYfi/V+/1StMa T38Ta05yD/DnC4Qijzrl+v1bZ1Q4X8dTtm8S0FQZRG2riavtyATPNseKJhg2nLnZmfEs F1ellxDV0Phk8Vd+Hebd2YdYIgdb8CdCnBbDp8DVb24OY9kzdxDh2QHOSq09tubvRnTu OX+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=XzWssM40; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a170906358500b007ae3f78c8d5si7625515ejb.787.2022.12.19.06.33.58; Mon, 19 Dec 2022 06:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=XzWssM40; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232120AbiLSOZ6 (ORCPT + 71 others); Mon, 19 Dec 2022 09:25:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232055AbiLSOZp (ORCPT ); Mon, 19 Dec 2022 09:25:45 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74452FACF; Mon, 19 Dec 2022 06:25:35 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BJ9PoMS009678; Mon, 19 Dec 2022 06:25:31 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=WT4NfijVvAyDAew7cjYlvKxAfrdUBj8fv5owla86UN0=; b=XzWssM40X/os2wxsvNzF4rJFjw6a90LQJffbvrHrUrkXMnUwcAt5oyA9jlhjVE135Ur3 VTRqdZlpszfzStYcSHbxnPJt9puTa74AhqUEO/x/54NYqa2r2QngJNgYk4h8YPBhQACR Y/a1Bu6kvTVKeIZJUbENnbtDT1NizYuyK1A2BL3kyxeLm9y+Wc9D8imYVxSXJ8CDsCgp /rOoHsoy9qzjpPr6gbUB8Gvs51G0cDGf/E47m/OkNpWJEPi2tgYEMT58DurvJ1QvTj1z s5VkpmE1HMMmV/LP0QKNfxkgyOq2mWZElLjPiGVpY7s5j+pdx8M0K3a6Tvm+6NKFB+qD Jg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mjnans1v3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 19 Dec 2022 06:25:31 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 19 Dec 2022 06:25:30 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Mon, 19 Dec 2022 06:25:30 -0800 Received: from localhost.localdomain (unknown [10.110.150.250]) by maili.marvell.com (Postfix) with ESMTP id D876D3F7041; Mon, 19 Dec 2022 06:25:29 -0800 (PST) From: Piyush Malgujar To: , , , , , , , CC: , , Piyush Malgujar Subject: [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci timeout Date: Mon, 19 Dec 2022 06:24:17 -0800 Message-ID: <20221219142418.27949-5-pmalgujar@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221219142418.27949-1-pmalgujar@marvell.com> References: <20221219142418.27949-1-pmalgujar@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: HFaYfyYpVStyMqdEgoBzeGHMUxNElPik X-Proofpoint-ORIG-GUID: HFaYfyYpVStyMqdEgoBzeGHMUxNElPik X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-19_01,2022-12-15_02,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jayanthi Annadurai Add config option to choose the sdhci timeout in seconds. Signed-off-by: Jayanthi Annadurai Signed-off-by: Piyush Malgujar --- drivers/mmc/host/Kconfig | 8 ++++++++ drivers/mmc/host/sdhci.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index b5b2ae0bb4625bdb9d17acdbb1887c9caa3a1f32..ab48f2bc4cff73d1aad8d7da542d761cf0346d9f 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -1132,3 +1132,11 @@ config MMC_LITEX module will be called litex_mmc. If unsure, say N. + +config MMC_SDHCI_TIMEOUT + int + default 1 if MMC_SDHCI_CADENCE + default 10 + depends on MMC_SDHCI + help + Default timeout value for command and data. diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f3af1bd0f7b955272fbd8b034ecb591860b89aed..e9bc24258746834ec9c8f13fe24456587a2b758d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1707,7 +1707,8 @@ static bool sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) else if (!cmd->data && cmd->busy_timeout > 9000) timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ; else - timeout += 10 * HZ; + timeout += CONFIG_MMC_SDHCI_TIMEOUT * HZ; + sdhci_mod_timer(host, cmd->mrq, timeout); if (host->use_external_dma) -- 2.17.1