Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp37662imm; Tue, 25 Sep 2018 15:29:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV60u2plF67LfBU1+g0VGn2ukpDnngx98Sp7a/T8i3Q5TdE+5llsFgAoL62YBPDd8zVoUslD7 X-Received: by 2002:a62:ac15:: with SMTP id v21-v6mr3240946pfe.126.1537914596618; Tue, 25 Sep 2018 15:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537914596; cv=none; d=google.com; s=arc-20160816; b=wsbvM4Af2Y5awUUughoMw9QDuJFtSlaqyBI5S62STvnbxjG+DCuB+urIAOfchFGNoN DjV3ZRzhgTLw16Qw5t6KfMy57WVADGgXsg7E6z72bZALp/C4UAxveTmB+VOpuEFTsqw2 QrYQyOMVC7V0aPn+pOZFbDSAAbkdTUWy+BJUN9FZJk7htrRmyZjwoEy7NfRDsp7vwBVJ zqtE2sWK0ZWYRXraMt6M06aQMIjPwonSnQiGDnwEj7N0AtdneWQoyCSwXaP3Q8aHPuI0 H15TkykDx0QyZYUj4dCMajMwhFUAai8Z9flQx+Ewt5OP8419XAXERwVJ3vTlIKqcILx5 y7sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vaKpk1KBgvPkms6L0mj4us9w16TgoO45tFosF0Sy88E=; b=Eh1OvsWkLe+yHdVq4e4FftocWNUFRGA6KPiOWZ/SZkpw8+LSl9OrnXaiZSkyH5UhZq 4eMxUbHEODGthw7Nrr/or8qUlIlboUgUV1Oi7JdEQWL5I+6N2LEjIJMKzyiv/RoDf9hz elu5GZ4yrWFeRrwiYsuLcD5iO8PyZjLcjhuPuhgf6ZPBh9EQY4errLRk6TWU/R8KOEJv owLT4dwTgwfwLmkIdpPEGii5Lh8ND/Ua+QQJ0Ul/w/K/YsXTwxKt6/2IR5SGBF6Dea/M NEYUlLFK71BsaeLt/lT832RL5YgGpR8R0Pr4v/3Z60u/8OuSqthgCZ7teAYSqo6xoDuF 9yeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cJJF4ekJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c126-v6si3232488pfa.130.2018.09.25.15.29.40; Tue, 25 Sep 2018 15:29:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cJJF4ekJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726257AbeIZEiM (ORCPT + 99 others); Wed, 26 Sep 2018 00:38:12 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:38088 "EHLO mail-vs1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725733AbeIZEiM (ORCPT ); Wed, 26 Sep 2018 00:38:12 -0400 Received: by mail-vs1-f41.google.com with SMTP id y11-v6so11312683vso.5 for ; Tue, 25 Sep 2018 15:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vaKpk1KBgvPkms6L0mj4us9w16TgoO45tFosF0Sy88E=; b=cJJF4ekJU7abSID98n0o3gumKsk7yVIb9K54X+TT8gqD2naYD2xtNlRYOjjLlTymzG dYo/9BYvLezfngZ9Xm7qqyQBn8a4fV3wq6EGvChxX8fjj3BhdBcWHB5ewFkSfBAInxmd A4JxpqV3Y8fnlwtkMxgnJyNojhvrqEnc93O7YRK1aTbKQ2x6fYvjWEJvYTPcxSqZf2W2 7NePgTLQPn0T5k4kfqczSLhdYNGVpr2zr97cAk4ej/bhHAzHpQ8WNSQh1JirAef9ZEZm WitEx+a2u1dAkKZgev3TSGepRbiZqpzDgVnFhZf6Yvqjb6FeqNn6O8usoJIOj8BB9KBQ hHZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vaKpk1KBgvPkms6L0mj4us9w16TgoO45tFosF0Sy88E=; b=UDEblA2kx1E2LHQIxZqCeUTPp06jgl+Sf+pVzIEYYjItaVqdjpq7m+G77VSymV2JOR DKE5CNZ60R7YsgRfrcIR+xrpqRXqi69nzpSrpro7+Zsiwf+aSPAbu7WLxG2n9i3NVj8I cB4t7gTdrCpkPwuVrXrW3eQFS8JIb1lzVAmno9UkKjLV/MrPqRhEK/jq9vDt7H63KyV3 7chvXICBqeHgKl9r8YPM3MeDooa/6Y9/OZS4xppvB7pJ9H06s9l/CU1RrCYopQiTGxhK 9YHIFzDhA52lYe4u4qvaZUSLvvwfd59q53dLVPxfR35+K/NRt+4jeW5KlM2vRaiVAxI9 nFkg== X-Gm-Message-State: ABuFfojvnh/c0l5PIlvVi2zsj/TXGIFeuhox9EFLJrHibPlVYqYiPiAe mbCuFrSmWpLNRx3OhCDT/gtZ2r5fabuyjpFfe+9IMg== X-Received: by 2002:a67:3511:: with SMTP id c17-v6mr979519vsa.42.1537914507645; Tue, 25 Sep 2018 15:28:27 -0700 (PDT) MIME-Version: 1.0 References: <1537887875-29494-1-git-send-email-vbadigan@codeaurora.org> <1537887875-29494-3-git-send-email-vbadigan@codeaurora.org> In-Reply-To: <1537887875-29494-3-git-send-email-vbadigan@codeaurora.org> From: Doug Anderson Date: Tue, 25 Sep 2018 15:28:15 -0700 Message-ID: Subject: Re: [PATCH 2/2] mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically To: vbadigan@codeaurora.org Cc: Adrian Hunter , Ulf Hansson , Rob Herring , Asutosh Das , riteshh@codeaurora.org, stummala@codeaurora.org, sayalil@codeaurora.org, Evan Green , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Sep 25, 2018 at 8:05 AM Veerabhadrarao Badiganti wrote: > + /* > + * Whenever core-clock is gated dynamically, it's needed to > + * re-initialize the DLL when the clock is ungated. > + */ > + if (msm_host->restore_dll_cfg_needed && msm_host->clk_rate) { > + msm_host->restore_dll_cfg = true; > + mmc_retune_needed(host->mmc); Using the boolean "restore_dll_cfg" to communicate like this seems really fragile. I have no basis in fact, but I worry that something will happen in the meantime that really ought to invalidate the "saved_tuning_phase" but the boolean will still be set. Is there a reason you can't just call msm_config_cm_dll_phase() directly from sdhci_msm_runtime_resume()? Perhaps after the clk_bulk_prepare_enable() call below? -Doug