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 */