From patchwork Sat Jun 19 22:51:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 463922 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1191371jao; Sat, 19 Jun 2021 15:53:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxCKu5ou1EHlUcrCfltecVSuXxhdVxdyqR0+MXkA9HT6NzHy26wiNsMgJU0j4WV+jfRLRO X-Received: by 2002:a17:906:f285:: with SMTP id gu5mr17293166ejb.226.1624143220503; Sat, 19 Jun 2021 15:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624143220; cv=none; d=google.com; s=arc-20160816; b=qoIKvpL/a18EkeBnmSpRExOKnCyd5IBG6JVjKP/W98F5zppnW9JXY8jEZDNLKDwapC bTHyprF4yD5LMskR5xf0I0wvCSKjtzSsQPT6sRYX9PMcRwVWhfALAZFA6HJajF06T9op wD8dcrz1HGRp71kv4LNmzhQQdicpOmuuYJITeZ+YReW64Ewb/J/vypH6swUpahT0StP6 Aj8tU1oHncrqWbFFF0s36d3I3YaDEoCK3E4Kzw30M1BtJOqRcTtRXlTWNlPua9kzhvVo aEnhyz+iDOObqNVRooftg85/QaDbbMjldDyFNSYxbKFvumLU37iVlD98fS7UZ+6hfdbY bX7w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cKOYKZbl9cSfYG/W7JR30gdvjqHpzjJI/OIK0TN7/5M=; b=mr0sEgUbYGCBhN1kpSpMtZHKGdhpGZb40975gW8EFzU7gcHUDuS/FgD6IvkLp2La9n 9Rvf2sf7s4IzlMbf1A2ujQ8Ik3qXoY6+6gmSSaGCsY6+6/X29XmKRWroBGOpS9Le5quQ uC9goXaslYFAmmtYF9tIUKud+AnPtNn2eJFQ6Up+sULOs8vm5mqdkgxog5mixWUeEyOO NGi8weMkx9DBE7x4bmtc/qyYkqEPXo4XsAdw385RhT+kMOcYVAbqF4FFJwEqfdVY1jCU Ag1mOj3PDkQXN+T6umc54tLW6lHPHbmGQLz41mKYMQL6/BtMfsFfwAS394MUcZOM+cC1 0hew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zoAFGIic; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si12497093edw.0.2021.06.19.15.53.39; Sat, 19 Jun 2021 15:53:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zoAFGIic; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229584AbhFSWzn (ORCPT + 4 others); Sat, 19 Jun 2021 18:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhFSWzn (ORCPT ); Sat, 19 Jun 2021 18:55:43 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DAA0C061574 for ; Sat, 19 Jun 2021 15:53:30 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id m21so23205040lfg.13 for ; Sat, 19 Jun 2021 15:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cKOYKZbl9cSfYG/W7JR30gdvjqHpzjJI/OIK0TN7/5M=; b=zoAFGIicsSAcKPNNfvXcauX0oqNhZ/C/3tTNjm+3eRsIiFCF7GHkSXMuXXxfL3Ej3Y yOSesUJ3BaczlR3ULawUw7QSlJ5/YyqUqQyj5zjCqAdGdDwnFA0i1d6KEem6HlZWy8YS Aukg7ND3ddzqF5+YD+WfHWOn5X4aFX/YMlZ11oVSSbA7B1kvkkjrsB6m8KYWFEMGoJsZ dV12yprixZLUqPe1ZpkhB/qLEBbf90y0d7aSdvEIPGp7d6MvqmK943DbDdqo6Tmw8rIF kdZ4B2WdIeXaO6mZ8BFJ/Fl60Uh7HYN0VG5o8rx7J7DgtT+QAyoHwTuFQKZ8THX8DUo3 VkFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cKOYKZbl9cSfYG/W7JR30gdvjqHpzjJI/OIK0TN7/5M=; b=Jt6VHXgcl7V1lRMsprjIldjMZ3Ib2GyrOjKfCzc7yLOkfCrcPHWtdCHJrhL2tdVkit d/GcJUzKZ8SfI0xKmM60HH2QNAmDu191GJa9FO6+qgg14ct8fZc/RffiyFPPFipfxcyA Ab0IF2Q1KKO8ue5v44Qsux//aDQTJOceR+pi2O/4zKm4wWGO/MOISrZnwleO68LinUBy ZHwrPeAh2ehNDcEUzoThkIrrLIRmcG3FbO4PIcnk4rvRu03jtDCVrRKBYn2MNaV8nPMW Ru8Ap+hh+G/tZ5J59WtFDQs20HbdlhI0+0jYpezvePtvahg2C9UnAs2lDRIdp1hPwkxD g0DQ== X-Gm-Message-State: AOAM533jJ+ZcepbUw6Ipxu/C1pMnYWytFfR+qxZ+E2Z1bib0fFvYvyZ1 LsaRd1y1U0+yrjVYZ1IJLFLllchnB54nnw== X-Received: by 2002:a19:7003:: with SMTP id h3mr8738694lfc.537.1624143206730; Sat, 19 Jun 2021 15:53:26 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id y5sm1345349lfa.148.2021.06.19.15.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 15:53:25 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Russell King , Yann Gautier , Ludovic Barre Subject: [PATCH 1/3] mmc: mmci: De-assert reset on probe Date: Sun, 20 Jun 2021 00:51:16 +0200 Message-Id: <20210619225118.1862634-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org If we find a reset handle when probing the MMCI block, make sure the reset is de-asserted. It could happen that a hardware has reset asserted at boot. Cc: Russell King Cc: Yann Gautier Cc: Ludovic Barre Signed-off-by: Linus Walleij --- drivers/mmc/host/mmci.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.31.1 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 984d35055156..af2ed6013ef9 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -2125,6 +2125,10 @@ static int mmci_probe(struct amba_device *dev, if (IS_ERR(host->rst)) { ret = PTR_ERR(host->rst); goto clk_disable; + } else { + ret = reset_control_deassert(host->rst); + if (ret) + dev_err(mmc_dev(mmc), "failed to de-assert reset\n"); } /* Get regulators and the supported OCR mask */ From patchwork Sat Jun 19 22:51:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 463923 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1191644jao; Sat, 19 Jun 2021 15:54:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNBa0tq6GcE8YO3+IyNnbsVQeoShsLFOqSJ904DJ3PJ5A7c0J1p/r4zBFLUak5PdSKuEOR X-Received: by 2002:a05:6402:4cf:: with SMTP id n15mr13229524edw.162.1624143256647; Sat, 19 Jun 2021 15:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624143256; cv=none; d=google.com; s=arc-20160816; b=ogxtV7ycBQb7/xbY4C4+DOFBTblG9WPkeFdDRhmJrLSZklHmx+QAIUhIsztkH1s/JG tp3i5PRj9j8N58DOXZ5ZDZ19Y6mBaG5T0VcRSvrT4VUZuYrk7dJpJILFlITd7/jL5QwK ZZ50Hnb3BQOPBg2Q/mvVfs7/laSUIJRxO3m3+suKeLgNhSnrO4cx8DfCMsBa26WB6GbZ IuH4TTR9SfuV6LkmKFmNOdGH1OnVp7QweD8IPkXRhXBS5OMPftCDPoSSplii1vGvtlae Z3psZIsdkM0379+Y+W1oOxJUycSH8iuf8/HO/kR5KeXB3yXWNhERfgf+icQYKSmZXL8e bl/A== 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=BSV/mBbqmIvRpaPtX9Y4vVykJHKsnTG2qhsD896N4Qc=; b=y9odd3NNP22pgJUNKKZEXdVztvgH2rPGGC9zaCoa9Bsuot95ABgZufS3g6xrWmtLLf Cl4OR/TIdkPDBzpMfbKmc0EklezBRWcGLPnMpS/+RTzdoueHLwL9+8/Uz7AIvCtWfnoi 0mkfgkTGJ7tcmUY3K0KjyMZE3rPx12odx2qm/+1SzeH5CRa5dk88WQCPOXnC9HZWvFeb OAqMLkVuNRFP41c4u4G5+Z+JkgLRrdYhFPQLfyxgm12dpSUJSlwifILP7+jUALDson/S LyeGZzOt9fZ95Wk/XA5smSBPkWowzkrUClf6zT3dNmuF/dAdRZMKz4w4NPSnyu3YEnCK AGeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j881TjQ1; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si2242965edc.164.2021.06.19.15.54.16; Sat, 19 Jun 2021 15:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j881TjQ1; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbhFSW4X (ORCPT + 4 others); Sat, 19 Jun 2021 18:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhFSW4U (ORCPT ); Sat, 19 Jun 2021 18:56:20 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925FBC061574 for ; Sat, 19 Jun 2021 15:54:07 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id u13so3921620lfk.2 for ; Sat, 19 Jun 2021 15:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BSV/mBbqmIvRpaPtX9Y4vVykJHKsnTG2qhsD896N4Qc=; b=j881TjQ1hJ1/WDFdJDzEykNhyEERfWapEGoMbqBnaGFjSypPB3XEZK+CSOdTG8kPRj ApmA3BlujhkYrhBOPOOC7luaBqVf3a1JQ3/FwaIBdzyXP1gj1tWbPw+4FSh7p8QzeQeF 60CkM5y4ov/nNuq5if43cAlK1oWotF7iTyNG7aPp6JGj7Nj0KjpDDjzAeemiofQQDxUj uKxxVzpR4jqadqU3hdRKYlzUXx/vDvG2Fdj5BwUpzUH9lFHrTKSUw3s3KII0+5W+5chF 9Vm28MV/rPlX4HtTajfpLfpXQsbRumdU47D3k82Cv8Ihnwmvbg+6PLEcjzVJZLV352+F SDVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BSV/mBbqmIvRpaPtX9Y4vVykJHKsnTG2qhsD896N4Qc=; b=hDw83t4jmmHVa4vpt687b5Ch1rGp2LG1sQBRo1LSxGwjsReQgiCtlvkMxfI5mK8l8S M/5/BE1fsOudWZ93acePqSL4GQn+E08XBs1D3ZE2agNIk9cMCCA0zTvZVX0nYwuCi4Ln 2TzDKPt9Ebgy6BW8t8qRK7e9L8jJknGbw7jJLcwFio5Xm2PlPboeHdk37AqKIlZD+2PN 6K440gMg9Ue5o341NyjEO3ptukIzDPpj9cUKCUSJZMniYQfaWN9C21/mZkeHm/woOOx5 pS3jgthSUrLELKOdrVT/1t+3JD1mpNUPWIXdT6ck2o63sKqxGOsnNXV+18gZqBUZrPbM Sldw== X-Gm-Message-State: AOAM530HhjaZOHtvIE68rotUvOzGHkdo8GXFjppyMoz9w/RoH0ZD45q1 TkqqLx92Cf8lQRETItxUtxjmzu/M4CeFkQ== X-Received: by 2002:ac2:54a9:: with SMTP id w9mr8476711lfk.11.1624143245831; Sat, 19 Jun 2021 15:54:05 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id y5sm1345349lfa.148.2021.06.19.15.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 15:54:05 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Russell King , Yann Gautier , Ludovic Barre Subject: [PATCH 2/3] mmc: mmci: Implement .hw_reset() callback Date: Sun, 20 Jun 2021 00:51:17 +0200 Message-Id: <20210619225118.1862634-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210619225118.1862634-1-linus.walleij@linaro.org> References: <20210619225118.1862634-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The .hw_reset() callback is optionally called when attaching a host if and only if MMC_CAP_HW_RESET is set on the host, which can be done from the device tree by putting the flag cap-mmc-hw-reset in the DT node. This is sometimes helpful for eMMC. Cc: Russell King Cc: Yann Gautier Cc: Ludovic Barre Signed-off-by: Linus Walleij --- drivers/mmc/host/mmci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.31.1 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index af2ed6013ef9..97fa5e67ca0c 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1883,6 +1883,15 @@ static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios) return ret; } +static void mmci_hw_reset(struct mmc_host *mmc) +{ + struct mmci_host *host = mmc_priv(mmc); + + reset_control_assert(host->rst); + udelay(2); + reset_control_deassert(host->rst); +} + static struct mmc_host_ops mmci_ops = { .request = mmci_request, .pre_req = mmci_pre_request, @@ -1891,6 +1900,7 @@ static struct mmc_host_ops mmci_ops = { .get_ro = mmc_gpio_get_ro, .get_cd = mmci_get_cd, .start_signal_voltage_switch = mmci_sig_volt_switch, + .hw_reset = mmci_hw_reset, }; static void mmci_probe_level_translator(struct mmc_host *mmc) From patchwork Sat Jun 19 22:51:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 463924 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1191648jao; Sat, 19 Jun 2021 15:54:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyapS2O7+2kBzz2XPR0+g8BSXuM3Ywsu7Kfa5UctgDL3mthP972YPfBxH0Dl68+trneF2JI X-Received: by 2002:a05:6402:11cc:: with SMTP id j12mr12995626edw.114.1624143257053; Sat, 19 Jun 2021 15:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624143257; cv=none; d=google.com; s=arc-20160816; b=mar2r+/ip+JkNL08CHif80XqVmHLF2SW3KAmoOZgTcQtAt9x/fRMjXbJXZy8lcl0st 9CP1dnvblgG8Fan+4S+9FxxPDcFEuLR0+G+sLPpcLOOCDrwrSMeq++qad8Snd38E7P3P iApeKoozBOBwGK3zWwSwf/+j0r2fh51I2bDk3yJA7qUXJVnwxn+7fzmTK9qOZu1sB8UZ a6ImBfMm5ixttdYbyhYFTQd2Z2wM+9dLsr1zSpPLMKOO/G0RrAZdXfRAH1p3vwNFA3dD hgxUQBu3O3JOe+rzMlyLDqrFrkHFcxdOeLFzu71QHwQpU5WtEHk+eeoxTvcKgFDW49F4 KIXw== 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=J4O/PSg42XQGCFuaHFKksTpyRyVdPtGQ1Rdj/uH+UqA=; b=z5EHrxyO98i+GIT9QA8W76//DBGCYv2GfRWpv4CzqjvnlkuUvy4GErgj9bH+bXp8Yl 4i1txXVhKPM5siVhVzNVJUNe7vh/S1oh30UqsGHcqp21WEQmCOwTm+zw2E6623v23Amv VTOiVMFoF0WruDEAK5jJ9Jc/vcIlqK3liEYKDQ/OBMTnzDGQCMe8FCjXypLYwq4DXe3g G6AG3SYajebc6SgA1qIv7Lu1AL5nOlBOoJ1pl4xJod3cqxfLIOeHy3D7aMdGgWt6iGcM OsAH4mMSIdld6wrC4vX6YnLZv2fzWea7DGCZg2CxaHRT0IaLq6WYQA5lIYuqL4ikMaZE p0Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nnYlDJV7; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si2242965edc.164.2021.06.19.15.54.16; Sat, 19 Jun 2021 15:54:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nnYlDJV7; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbhFSW4X (ORCPT + 4 others); Sat, 19 Jun 2021 18:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbhFSW4U (ORCPT ); Sat, 19 Jun 2021 18:56:20 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A63C061756 for ; Sat, 19 Jun 2021 15:54:08 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id m21so23206445lfg.13 for ; Sat, 19 Jun 2021 15:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J4O/PSg42XQGCFuaHFKksTpyRyVdPtGQ1Rdj/uH+UqA=; b=nnYlDJV7lF+OmF4cNajdGrn/NgWZCzgPHuiMJ6lnF9trRrHXMMVKH3Oz5wxIAQ4wtL yWDMKhycSDwRyaXkkqMbWfBNO8gx2Xb10I3oJj2DXSEfc4Savwni3KUB7Canea7IIxyV GHzv/DnGmUTzfnEQQ+mktoaFSHMlikRuhnTYXhRAwFoQ+Fkjfuk/WIK6LQ263lLa9gB4 9IRJgsWJEh7YDr5C0W1QAXr9m/vcKluRI+zDHzXpo+lF+q+6abBuygU88yFGxUcbcmM+ qqxzA5BGaNVXOOhyVd+xQvd3JB6oIDmlxOcbtdJDczSa4Qhq9DKBGO2zYWBqTred8cdO wxmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J4O/PSg42XQGCFuaHFKksTpyRyVdPtGQ1Rdj/uH+UqA=; b=CD7dSJ7kkCpohzv0grRzbAbCqmPqDsknu2hkR3RnWfQG+XKU1AnmRatuLMKXEbNF23 Cwykw+s3xYv5QL1GWmE+Mwr+NnArZWwX9e/llHXNNrEh3CqKmxUWhPHMGJREE9Z4TtdY ZWJ1GYdIZiLlBvfDZ37hkHMFqnYGd8lQ8rpqOfqtls2l7Mzp05rOaUKsriksRMrn/RHq /jYDqS1hjaZmthe/4Egj/AvogmMdMKNWQ2bYHVO6Bir8lWJtT4AH4vTkSXOpiOn1XApE DiMFdWvYLztriZRDANlBdt6JEmV0PNuAoJ+Ilo+soX1R2vEQXVWUpDPRsrSuxB5mHbmw v/tg== X-Gm-Message-State: AOAM531aOKUhkKXZ+OHUaB3TR++25tVpfi442GN71jeJDhv6yqxQrPqE IGjTWk9yEy2Ue80kaDWeBIqDwhvzcNN2Ug== X-Received: by 2002:a19:c753:: with SMTP id x80mr6935805lff.200.1624143247150; Sat, 19 Jun 2021 15:54:07 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id y5sm1345349lfa.148.2021.06.19.15.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 15:54:06 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Russell King , Yann Gautier , Ludovic Barre Subject: [PATCH 3/3] mmc: mmci: Add small comment about reset thread Date: Sun, 20 Jun 2021 00:51:18 +0200 Message-Id: <20210619225118.1862634-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210619225118.1862634-1-linus.walleij@linaro.org> References: <20210619225118.1862634-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Put a small comment before assigning IRQ_WAKE_THREAD telling us what is going on. Cc: Russell King Cc: Yann Gautier Cc: Ludovic Barre Signed-off-by: Linus Walleij --- drivers/mmc/host/mmci.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.31.1 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 97fa5e67ca0c..b646ba7f4e10 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1394,6 +1394,10 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, } else if (host->variant->busy_timeout && busy_resp && status & MCI_DATATIMEOUT) { cmd->error = -ETIMEDOUT; + /* + * This will wake up mmci_irq_thread() which will issue + * a hardware reset of the MMCI block. + */ host->irq_action = IRQ_WAKE_THREAD; } else { cmd->resp[0] = readl(base + MMCIRESPONSE0);