From patchwork Thu Aug 29 10:49:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 172573 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2037106ily; Thu, 29 Aug 2019 03:50:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzazeg4qoBErFHG3RXy1KVJHdOQ7b6ejURaCV34nMq910NvUYzZKLJl4SDb8WDmLcG+GOwn X-Received: by 2002:a63:5754:: with SMTP id h20mr7462721pgm.195.1567075812243; Thu, 29 Aug 2019 03:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567075812; cv=none; d=google.com; s=arc-20160816; b=YHOPiRT4XimrNg/UtlQWebEe8Hr2VttQmRXc21tJUNiCLtPWKsAHNtpT+ix91FPSdt 7Rqy2DLGayu3C3RfxQSB1xwEUHBdkzMoQ0HNF0i7R+Lt42fmf308C3Qf2FAHp8cktTAq 0zzfxfqqdVGGYIm6V0nBrGnA0kCs1RpRko1vLJeJP61VmEmYyemFlTV8bLWAyJNmmjy+ le/+BC4Q97pB+A75lnDTNkD/nTfIttgvjmmas4zpaCaZU5pSCJKvSTIOUg9Jv/MFUDyP N2OGqK1MoBv1tuvEQMsNijv/uS6YFlSlaKqKnj0f4l3M6Cw9eROPWzEMUB7GXF4zO0eD NIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=lYozHE89Wu43zYr2OY/wYXUHm6PW8Z5Hu122oF77ydQ=; b=vAzKF3F881Fc5cTz6dYg3u0ulRPJnUJh5xB4o1jbEOrKR8GFIv47igy9jLsPfHhftX +GzpAUJuh8sGTMNhoD+31SE9WvVKXrpYR3XCKbTja/YFGtZiv5DjYMOwFkM8+w290zc8 O1jdqcSqeifSRy93HqEEdeWre5QojroRo2uAw2HFNQaP8Ui5644VnFUJ+IBA5y9QrFIu yEVIdSNsRae0gDgjhQoC+bsNnakSWXTHsCMJXdhmW0psgpsjeaKdgCqpNOC+LR2SJmCa xxY4pQJ6+K1Rc9ea8IwrHispdB7VYWNw0CCN+ZYXdT7DWKs4M2C9SMACdzB8F1e7VVd2 UDyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=DVoeJBCf; 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 b7si1662574pls.80.2019.08.29.03.50.11; Thu, 29 Aug 2019 03:50:12 -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=@nifty.com header.s=dec2015msa header.b=DVoeJBCf; 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 S1727372AbfH2KuL (ORCPT + 28 others); Thu, 29 Aug 2019 06:50:11 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:17272 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfH2KuJ (ORCPT ); Thu, 29 Aug 2019 06:50:09 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x7TAnToh013730; Thu, 29 Aug 2019 19:49:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x7TAnToh013730 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1567075773; bh=lYozHE89Wu43zYr2OY/wYXUHm6PW8Z5Hu122oF77ydQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVoeJBCfK1a2SJY98pTQua2p/4ENI6cD/18ReVMUkbiY1fGmE1j20A7KskiM7e887 ZIOs6yhheiTLUdIt2Sm4idniog4XTjm2fGapOO5WtIkFLTxA1npSBXnyEpo2aFIXQK fyYTHLxSIqBjNTAgHoPsrjTCU6YVBeEUbQER5+2nnEhXULrokb8uk8LSE/kPKUBlZK rdBE4rcE35S1QyM9sISGO0SHpngpMeX0mkeOnduXERg5QKKiCr0M5UyOYxZjR9kUFY nwXjo/vlL/myi40n+XsikxPA8E5HRc/O2F3Upuy4/DiMja3fJUiJkr1HBLZFdthiQi GwCM0HYlmUvBg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org, Adrian Hunter , Ulf Hansson Cc: Piotr Sroka , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] mmc: sdhci-cadence: override spec version Date: Thu, 29 Aug 2019 19:49:28 +0900 Message-Id: <20190829104928.27404-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829104928.27404-1-yamada.masahiro@socionext.com> References: <20190829104928.27404-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The datasheet of the IP (sd4hc) says it is compiatible with SDHCI v4, but the spec version field in the version register is read as 2 (i.e. SDHCI_SPEC_300) based on the RTL provided by Cadence. Socionext did not fix it up when it integrated the IP into the SoCs. So, it is working as SDHCI v3. It is not a real problem because there is no difference in the program flow in sdhci.c between SDHCI_SPEC_300/400, but set the real version just in case. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/sdhci-cadence.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index 44139fceac24..9837214685b6 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -341,6 +341,7 @@ static int sdhci_cdns_probe(struct platform_device *pdev) unsigned int nr_phy_params; int ret; struct device *dev = &pdev->dev; + static const u16 version = SDHCI_SPEC_400 << SDHCI_SPEC_VER_SHIFT; clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) @@ -370,6 +371,7 @@ static int sdhci_cdns_probe(struct platform_device *pdev) host->mmc_host_ops.hs400_enhanced_strobe = sdhci_cdns_hs400_enhanced_strobe; sdhci_enable_v4_mode(host); + __sdhci_read_caps(host, &version, NULL, NULL); sdhci_get_of_property(pdev);