Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp412608ybl; Fri, 30 Aug 2019 01:32:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyi5ylSHdjmDdwqv5vHYN7bs90F92QTthPD12zJcfD955Alnh/aGyn/5xumrFP1S83ulie X-Received: by 2002:a63:be0d:: with SMTP id l13mr11982523pgf.357.1567153938222; Fri, 30 Aug 2019 01:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567153938; cv=none; d=google.com; s=arc-20160816; b=BicPTBfPMxdE3YpXaXpQPXud2szte4NiO8SULFNdqRVqqUIpI4iXqG9pZpKHGq1KCW yXvyMzYQmVhjUUsL6bQeQsORpukW+8N+eWLPKtXGNBJOnqcgTb1Q5ZM4p+eH1yNKdkdM hJcsg1grLrR/XZMpbRj1XVtSpuPlah0e6EmAgSQze9VF0KU5G+9c52octEv3EzGE6ayR xQsRYUzCYTN0UIENLHqGeZZjj1AOiOrH5cW/VYpAg8GG3aXBhCRByTrWVgvFOd8Vo5yU dhiAL3uatZQIDkOhVIs/m4ckHArJ2lcSLen7sCObPgZjWBfbtv/DQL4ASrwEfErdb8bM GnJQ== 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=uBe6XaZnp1DnbEiSR3tbPdbSTWUBiMGkZ5MQKY+Y/KY=; b=sVPgk6AK5QFwPYhVSNHNNNtotWvVGBZGOWnpaYsLsdrvQbZV4EJK+08KU1v3kBaQvu lWaPOpCdqOKeolkV5Au1zs7YHnnhMptgL+UM2G3cdUjKOV1scrj91p5npgbO0YFzviiP 8x1djFQwim8ONbLiU9SLT2avqSH/xWOiRna0gyneXwmp0sAtztxJOxWVdflSqvUuJ5gy TO0/pCp2s0V9yl0K5CY1I74OoUULp46VNLvs97zaMHayMWjabo5c0DMgaqeWhdmmCDiG UWaS8jstSwldNwgpXznMeULrSaZh+yQJF7pZv0bSCQmv2AsR8tYUrxqIIdI+vZ755+OV tuNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HSSx1i5M; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si4257312pga.407.2019.08.30.01.32.02; Fri, 30 Aug 2019 01:32:18 -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=@linaro.org header.s=google header.b=HSSx1i5M; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727753AbfH3I3m (ORCPT + 99 others); Fri, 30 Aug 2019 04:29:42 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:40133 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbfH3I3m (ORCPT ); Fri, 30 Aug 2019 04:29:42 -0400 Received: by mail-vs1-f65.google.com with SMTP id i128so4252393vsc.7 for ; Fri, 30 Aug 2019 01:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uBe6XaZnp1DnbEiSR3tbPdbSTWUBiMGkZ5MQKY+Y/KY=; b=HSSx1i5MvIQIppnHZp5fqcZbrHRsEuE5YKsm/+pYHehWrBMRK+Fd6yYLM9RPceYWJd 2KN6Ql6owRNffruGbdNcZSAqSso17tFIIcpLbRp0zC8kl60dO1JXkxCOZvRcyu1dIufG 1hvgSKaVKD1JOa1eugdmJFPrx3JHFGraiG6Yc+aNazmxxyKhIeW0A1MPoue8sWBjkHg1 2U/LjQQvHxtbyHKyKIvRHUSrnvL/0y4viuiAdHl86m6N5FXBwrgxRMsJfPfOTkX2P/xF bddVRikttGaleYOjqpQag/5g5JIML0+a/1FaVIA8U+xTCk8rUGlWv6r2EV2vQ8hSxIyC SbMw== 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=uBe6XaZnp1DnbEiSR3tbPdbSTWUBiMGkZ5MQKY+Y/KY=; b=DKyEUQBFVdBAh7YvFfxQ/X1R3QKvYfc2xJ8Pel2gQd7pIzubiJBkvkZiPCGLsGF6C9 LiJ620NR53WFBgLTda3IgnUdBjPi/kDA7QD/kGRZOvNb0q412Xo29inYXoZ5r/owPFwb OhmiVDEoCfBBISf7ZJV3n09Q+06Zbgl2anGPdz0I9UUvSv7D6mqOpWXbG0TU/4PVq77K 8IUe3sRpaJEUOQ0EfmGFEWOX9lE6zWf9O/cELMLVbFsjLk7ojmk2HX7KQI3UAqN7adwA rCPrpCKX4Ni2dfmSYpl6rPnKhbi02ezEYMN5wd1pl5GGej7PpcmbROmugsr6euLS3I5y QE4Q== X-Gm-Message-State: APjAAAU9/BhLgiWsEM9vjtN+frDk3n1hgBzqwUw+V8jD+iDjP1fU+dX2 diNfmMmmw2itgR1gQm5LwZ9088wUXm9SKxdSanEEQw== X-Received: by 2002:a67:e287:: with SMTP id g7mr7906924vsf.200.1567153781210; Fri, 30 Aug 2019 01:29:41 -0700 (PDT) MIME-Version: 1.0 References: <20190830074644.10936-1-andrew@aj.id.au> <20190830074644.10936-2-andrew@aj.id.au> <6feca359-34ce-445e-87bf-62fa063d785f@www.fastmail.com> In-Reply-To: <6feca359-34ce-445e-87bf-62fa063d785f@www.fastmail.com> From: Ulf Hansson Date: Fri, 30 Aug 2019 10:29:04 +0200 Message-ID: Subject: Re: [PATCH 1/2] mmc: sdhci-of-aspeed: Uphold clocks-on post-condition of set_clock() To: Andrew Jeffery Cc: linux-mmc , Adrian Hunter , Joel Stanley , Ryan Chen , openbmc@lists.ozlabs.org, Linux ARM , linux-aspeed , Linux Kernel Mailing List 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 On Fri, 30 Aug 2019 at 10:07, Andrew Jeffery wrote: > > > > On Fri, 30 Aug 2019, at 17:31, Ulf Hansson wrote: > > On Fri, 30 Aug 2019 at 09:46, Andrew Jeffery wrote: > > > > > > The early-exit didn't seem to matter on the AST2500, but on the AST2600 > > > the SD clock genuinely may not be running on entry to > > > aspeed_sdhci_set_clock(). Remove the early exit to ensure we always run > > > sdhci_enable_clk(). > > > > > > Signed-off-by: Andrew Jeffery > > > --- > > > drivers/mmc/host/sdhci-of-aspeed.c | 3 --- > > > 1 file changed, 3 deletions(-) > > > > > > diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c > > > index d5acb5afc50f..a9175ca85696 100644 > > > --- a/drivers/mmc/host/sdhci-of-aspeed.c > > > +++ b/drivers/mmc/host/sdhci-of-aspeed.c > > > @@ -55,9 +55,6 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) > > > int div; > > > u16 clk; > > > > > > - if (clock == host->clock) > > > - return; > > > - > > > sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); > > > > > > if (clock == 0) > > > -- > > > 2.20.1 > > > > > > > Further down in aspeed_sdhci_set_clock() you should probably also > > remove the assignment of host->clock = clock, as that is already > > managed by sdhci_set_ios(). > > Ah, I'll fix that in a v2 once I have your thoughts on patch 2/2. I leave this one to Adrian to comment on, as he knows this better than me. [...] Kind regards Uffe