Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1643104ybb; Thu, 2 Apr 2020 04:56:10 -0700 (PDT) X-Google-Smtp-Source: APiQypKA7n7juE/fWk392u6E+48GJxLxiRCRvSISifNaqP/AcyT4FEtOqalptP98d/zwroCOqGyt X-Received: by 2002:aca:d446:: with SMTP id l67mr1894196oig.115.1585828569851; Thu, 02 Apr 2020 04:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585828569; cv=none; d=google.com; s=arc-20160816; b=cev+HLmli7/t95OkWY7iWfRoPngd5uRgqsvkAxAV1YtLYiO8AXZA4SDF5czpTzC3Va SMIvXOYfaDAzEy+3/7UsyISG1pSXuNZaLob8BJSuc/7C1v3HlbIbGQUYf3OJcWMTmaqX ova68wVXcDeWkcepblE9h1fqPcuOF1EDmgu7HyYE5DJEFfJWSkU0P/AAL2xrmP67pOch zbAWaBaCp5g59pN+3HcGhD0bYHLFdKk1dHmL6L1rQDTwAwhxZtgTH/Sl+7P2G810BldL fQKYEDDhhi7eBvO6fO8AxIUdn1n/9HDGVqpKdxlqBNF+LaKTJy30g2tlm4NpcxYjRjgj FvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :mime-version:subject:from:references:in-reply-to:message-id:date :dkim-signature; bh=FjkVc+ZLkSMLcSBlypXq5m7/4SXCaTstL+PzXYZ8pKc=; b=drUSDqVEf9gjbfM8wF8qlY1d/5enUeZhslqW0hbagqcrcmRdlhWJ1KRec+f95sMxG5 l3xoe8cAfccNheUEYRphFkspxePNYZkMriKdapk+X1bft/85gyk8xKbeGZhk7qnFsyzF GJ3zA5JLiFwUoNooXx7NMZIOEQUrje04JlUTOOCI2T0/RdaezBai67HvVyB+7kFOagjZ JkYW9JvIGZBidZfL6n8iJW1yHjDueNHJ4FfLi/aRD2JPOK/ekcZYHCLo10IhlWuWNL48 Gl8FTOPJ63hhMQFYMCpdKYbXhb31aFcp4MSJjeFVb7wnW34dJVqvfzKbqj7a0qfGNX7I SBKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b="LkH/JJNw"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12si2224619ooi.0.2020.04.02.04.55.57; Thu, 02 Apr 2020 04:56:09 -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=@rere.qmqm.pl header.s=1 header.b="LkH/JJNw"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388184AbgDBLzA (ORCPT + 99 others); Thu, 2 Apr 2020 07:55:00 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:53370 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388036AbgDBLy4 (ORCPT ); Thu, 2 Apr 2020 07:54:56 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48tM1q2kCPzHd; Thu, 2 Apr 2020 13:54:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585828495; bh=1uCh1WDcEq7ykZh83IGYF9lRjbZGbC9UBX1/WwembVU=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=LkH/JJNwkiGvEKfhcKQ7pBaFC/o9ZRHOB3W8piHiJ89mdz60D3bMGYEd6gSV1s/2i Tzfuw2tG4HmgdWqKvl7goizWrQrLzrqfvpbV620+HGtJDFsshUabhsgziWlcXO2qEr vbFFy5IjUaVFV7OkXJmVPYVjuF69INx+Hg0PUxvA7HznNloxcjd9LJ5N7gfMFZhtkU iGb9ZbzA5OCYJsfgc7zoJjToofTs0gMrxdehjB5IzviherTlbz6HtPdNdk1lEvaRWc M3c55IoazFXZ2XVY1IKdYa0aKTMkXBhYkht1ZvY45mU502TSlWwxH07Wzzl5UbDyMZ qJL/YpwI5BPDA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Thu, 02 Apr 2020 13:54:55 +0200 Message-Id: <23c3fe72b0ff0eabdbf3a45023a76da1b18a7e90.1585827904.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 1/7] mmc: sdhci: fix base clock usage in preset value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Adrian Hunter , Ulf Hansson , Kevin Liu , Michal Simek , Suneel Garapati Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixed commit added an unnecessary read of CLOCK_CONTROL. The value read is overwritten for programmable clock preset, but is carried over for divided clock preset. This can confuse sdhci_enable_clk() if the register has enable bits set for some reason at time time of clock calculation. value to be ORed with enable flags. Remove the read. Fixes: 52983382c74f ("mmc: sdhci: enhance preset value function") Signed-off-by: Michał Mirosław --- drivers/mmc/host/sdhci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3f716466fcfd..9aa3af5826df 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1765,7 +1765,6 @@ u16 sdhci_calc_clk(struct sdhci_host *host, unsigned int clock, if (host->preset_enabled) { u16 pre_val; - clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); pre_val = sdhci_get_preset_value(host); div = FIELD_GET(SDHCI_PRESET_SDCLK_FREQ_MASK, pre_val); if (host->clk_mul && -- 2.20.1