Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2272103pxy; Tue, 3 Aug 2021 02:04:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzw8259d1jKXMrDjS28zG9Dcw7uUIqyiFkmkaKijHP/9ncw1Yk1scr7mH7Ixi6yyosLeFF X-Received: by 2002:aa7:c68e:: with SMTP id n14mr21013709edq.66.1627981446990; Tue, 03 Aug 2021 02:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627981446; cv=none; d=google.com; s=arc-20160816; b=OudHSYGccfWCS7HAyk7ezrYwrT3JpftEwMyLBZHmr1tM2Ck9byTGkhCaDenNo6cNSt 8AUQ5N+u/4VPtehVw+p+7d0gm3b9ibuggkUFHf4ygYAfdAl4ICrHPbOUnRXbInCFbVBe eCtlZIDBWQ4+CYGYnbIN3gTIYbdaTUl91oIJUA5fr9RmSQnLQTtgwjQ7w7DO2Qo6TssB PfLCpGYz3PGyOM7pbJqMDeppIbFgjXJMpGBGuKalbc34BDBBlEvzLEXe0+XVnlsQpKpi xowjt6GHEkyjNVSp891/8Odzji/HmL3+tPSDK/XNaGpbPpIPEDNwNhSNShofsDFL/VNr iL2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=xUCQLTJHLMWIwjOk7GbpaIHrEiFMhqmAaVSQLefOhbc=; b=v8WzaIcKuPT4Cm+yYEsgNKIy7YHlvLpeeI0A7fn0D2Jf2Xn0+0ENBPbgIzNDYfKCBd mHWNINgC4HHWMRE+kVzx3v/1BN7AYhXgvbORNuuTmf94JQPWxGRVVwghPDyd74SFtouU tUnB7hzNMZWv5vmrBL6fXdVlss2VhctEQiWE9KMrYhDoZq3EsipT56NfTjZFUAs8Hu8B 4Ea/RC0BVMvSQkZMTx9cmBRG3JO+SCCMwxB/+/KoHPCzKxdt+YVdyqmScKSdGRSWis8T PP0HRcydY0ZY+WRHkKoJXJDSzO/tNrogXG3Suo4SJTEBV6J7Uv23UCQf2yMYgpfhUTm9 LURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GLArkjtd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bj22si12283777ejb.53.2021.08.03.02.03.42; Tue, 03 Aug 2021 02:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@chromium.org header.s=google header.b=GLArkjtd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234952AbhHCJBp (ORCPT + 99 others); Tue, 3 Aug 2021 05:01:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234631AbhHCJBo (ORCPT ); Tue, 3 Aug 2021 05:01:44 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD03C061764 for ; Tue, 3 Aug 2021 02:01:34 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id w6so27429221oiv.11 for ; Tue, 03 Aug 2021 02:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=xUCQLTJHLMWIwjOk7GbpaIHrEiFMhqmAaVSQLefOhbc=; b=GLArkjtdPgvCSnduTwRmjHH0GAo9b6Zfk37Ca+kYmtHHwq4RS5QnDFBfcMeehY9CEL L7XvbwO2q0Gfa5/gVbzx+rh51yNdz2hqv2L1nvqrLTQeIttnjUrctF6dWXUx3aQ4fqmv hlGdFxf/Ac9K84ELw8cCSCQ4T6mWyzsPFpBLs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=xUCQLTJHLMWIwjOk7GbpaIHrEiFMhqmAaVSQLefOhbc=; b=kJiS/rwjDwHct6qnVw3mF+Hw7C8irAYqj8xigdiGGsRdlIUn6nhpDQyWSLPjupXsR2 QL5hIv6Zg7ugJcK+rXe/zDYYk+OcmkoibzMH+PI5g+Ei19fvGMRzIbYW4fLs99447hE9 R7Mtz0AnWOJhro7gd0AL2enz6QvYrbH+TKO/bHV1iy2dwj+2+bhB7N8DKV++PtZMfSWO +l0jwRd48sNeNa6qO9x7W4065/imN8pRs3QXDB0LGh6k9fz6rwu/PIQ3cr9bS6soY+da 6jj0Ai+FsRVXC9Hvpp7fWBY9RYOdB6RtelsZk9FZJzlpmeihmM7g4owKltrrG7Gg8d9C Buiw== X-Gm-Message-State: AOAM532sJjSihNMWaMJKwCd0/ygsJbmkxxeZyQuoWpzKHWXtX59tBGbO LlAYpovMPQRNR8aYJyP678d9DD/oQkQci51WPmSlqQ== X-Received: by 2002:a05:6808:114a:: with SMTP id u10mr13972869oiu.19.1627981292067; Tue, 03 Aug 2021 02:01:32 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 3 Aug 2021 02:01:31 -0700 MIME-Version: 1.0 In-Reply-To: <1626435974-14462-1-git-send-email-sbhanu@codeaurora.org> References: <1626435974-14462-1-git-send-email-sbhanu@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Tue, 3 Aug 2021 02:01:31 -0700 Message-ID: Subject: Re: [PATCH V4] mmc: sdhci-msm: Update the software timeout value for sdhc To: Shaik Sajida Bhanu , adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: asutoshd@codeaurora.org, stummala@codeaurora.org, vbadigan@codeaurora.org, rampraka@codeaurora.org, sayalil@codeaurora.org, sartgarg@codeaurora.org, rnayak@codeaurora.org, cang@codeaurora.org, pragalla@codeaurora.org, nitirawa@codeaurora.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, robh+dt@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Shaik Sajida Bhanu (2021-07-16 04:46:14) > Whenever SDHC run at clock rate 50MHZ or below, the hardware data > timeout value will be 21.47secs, which is approx. 22secs and we have > a current software timeout value as 10secs. We have to set software > timeout value more than the hardware data timeout value to avioid seeing > the below register dumps. > > [ 332.953670] mmc2: Timeout waiting for hardware interrupt. > [ 332.959608] mmc2: sdhci: ============ SDHCI REGISTER DUMP =========== > [ 332.966450] mmc2: sdhci: Sys addr: 0x00000000 | Version: 0x00007202 > [ 332.973256] mmc2: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001 > [ 332.980054] mmc2: sdhci: Argument: 0x00000000 | Trn mode: 0x00000027 > [ 332.986864] mmc2: sdhci: Present: 0x01f801f6 | Host ctl: 0x0000001f > [ 332.993671] mmc2: sdhci: Power: 0x00000001 | Blk gap: 0x00000000 > [ 333.000583] mmc2: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007 > [ 333.007386] mmc2: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000 > [ 333.014182] mmc2: sdhci: Int enab: 0x03ff100b | Sig enab: 0x03ff100b > [ 333.020976] mmc2: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000 > [ 333.027771] mmc2: sdhci: Caps: 0x322dc8b2 | Caps_1: 0x0000808f > [ 333.034561] mmc2: sdhci: Cmd: 0x0000183a | Max curr: 0x00000000 > [ 333.041359] mmc2: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x00000000 > [ 333.048157] mmc2: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 > [ 333.054945] mmc2: sdhci: Host ctl2: 0x00000000 > [ 333.059657] mmc2: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: > 0x0000000ffffff218 > [ 333.067178] mmc2: sdhci_msm: ----------- VENDOR REGISTER DUMP > ----------- > [ 333.074343] mmc2: sdhci_msm: DLL sts: 0x00000000 | DLL cfg: > 0x6000642c | DLL cfg2: 0x0020a000 > [ 333.083417] mmc2: sdhci_msm: DLL cfg3: 0x00000000 | DLL usr ctl: > 0x00000000 | DDR cfg: 0x80040873 > [ 333.092850] mmc2: sdhci_msm: Vndr func: 0x00008a9c | Vndr func2 : > 0xf88218a8 Vndr func3: 0x02626040 > [ 333.102371] mmc2: sdhci: ============================================ > > So, set software timeout value more than hardware timeout value. > Should this be tagged for stable trees? > Signed-off-by: Shaik Sajida Bhanu > Acked-by: Adrian Hunter > --- > > Changes since V3: > - Addressed minor comments from Adrain Hunter and retained his > Acked-by Signed-off. > > Changes since V2: > - Updated 22 with 22LL to avoid compiler warning as > suggested by Adrian Hunter. > - Added a check to update software data timeout value if its value > is less than the calculated hardware data timeout value as suggested > by Veerabhadrarao Badiganti. > Changes since V1: > - Moved software data timeout update part to qcom specific file > as suggested by Veerabhadrarao Badiganti.