Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1021564ybe; Wed, 4 Sep 2019 11:15:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyubrLEPyCyKJQQj1fXJqtSf7C1RA36youIHDHn7lqokSICPUa9KRgPUmoiEDwUqSqJRKve X-Received: by 2002:a62:cd45:: with SMTP id o66mr48586150pfg.112.1567620958632; Wed, 04 Sep 2019 11:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620958; cv=none; d=google.com; s=arc-20160816; b=UH1mQrj2s40o3wY8rVcgn2IL7b7vUnLVM5I0frX2RaycON33XtaFla6rKYDFxHDXnJ YHnWCSj3zSbWdmDi9+GnrRmrijzT7LDxbdy5lnD3el4utuwil64q9HXKRcAWEfVin9Ok DQKXAnctVYxZTGePt17BQ6EkCabgXa3iH2bmyjpjVcrl8fa/3QTy33rw4a1+LGRr2IDe yushk9wy/wOg6Pm/Spvobof9Er3Q15oNOjpOA29HeNLJpFEaQCehBDrmkSaUk4vgh1s9 L9CeRGQ/yCx9mwK5qsJEiLCozfXqfW4UoIblIvmNy8nndI1NLXVX87rCsWTGx6sCRWgK QtyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6P2FIiNl/1xVTTVcqe8WPbHwGKIPlyHc4WtOUj3ytqM=; b=WXPrBH72jR8uKe16Cz98wjQr7tQp+juWJAsh1hUWiKK5qWkVA/YC2f8BFiuTdqUrP7 mXBWLDroy6V23qo13YUmvfPE5+Hm1gRUL/l/sNcwvlpq7zy536KhLiicA5PFMlPvAFo8 8PFKtbUZXGEKBarweOXTwKiZtFfiokuJmoAncCn//PTpgQ4iSmZfoYfHSCNe1iUjY21G +Qk4oxeQ1/zCzQKqDx5iNiz2O9FtRbS/ngMOK/kE7TRXd/whB/AlUZXZ0UW2CTFdsoWp omw/f0tARE/+0unLJpgCLrhL2jmYdU3KGGyHWSZ8J4rYOHjt+BWnGrSLK2UEGAKmy4dC IFNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=losMKIiG; 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 i18si2847830pjx.1.2019.09.04.11.15.42; Wed, 04 Sep 2019 11:15:58 -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=@kernel.org header.s=default header.b=losMKIiG; 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 S2390627AbfIDSNJ (ORCPT + 99 others); Wed, 4 Sep 2019 14:13:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:57782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389432AbfIDSNI (ORCPT ); Wed, 4 Sep 2019 14:13:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2064B208E4; Wed, 4 Sep 2019 18:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620787; bh=QfaEHryzVEL2hXwWkCzJ3WcurmZFn+JfnVJi9dnQP8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=losMKIiGeaIrMhlVfgZgve3+KoQZde7uAtUrG1a6N9Xs+L3LkFFvBgasvtl2hqO0l wwt9wXKBE0DyhBfK6Y2UqSwNc3uuz/j/WXNTWQ5QENHoYGlNe1SRH1F2kWZ22CYmWO 2NrCnM7E4ygh9MGLqCphHyvN7i28Y53lxaoMw4XU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Ulf Hansson Subject: [PATCH 5.2 094/143] mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing Date: Wed, 4 Sep 2019 19:53:57 +0200 Message-Id: <20190904175317.813874728@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit e73a3896eaca95ea5fc895720502a3f040eb4b39 upstream. The IP datasheet says this controller is compatible with SD Host Specification Version v4.00. As it turned out, the ADMA of this IP does not work with 64-bit mode when it is in the Version 3.00 compatible mode; it understands the old 64-bit descriptor table (as defined in SDHCI v2), but the ADMA System Address Register (SDHCI_ADMA_ADDRESS) cannot point to the 64-bit address. I noticed this issue only after commit bd2e75633c80 ("dma-contiguous: use fallback alloc_pages for single pages"). Prior to that commit, dma_set_mask_and_coherent() returned the dma address that fits in 32-bit range, at least for the default arm64 configuration (arch/arm64/configs/defconfig). Now the host->adma_addr exceeds the 32-bit limit, causing the real problem for the Socionext SoCs. (As a side-note, I was also able to reproduce the issue for older kernels by turning off CONFIG_DMA_CMA.) Call sdhci_enable_v4_mode() to fix this. Cc: # v4.20+ Signed-off-by: Masahiro Yamada Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-cadence.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -369,6 +369,7 @@ static int sdhci_cdns_probe(struct platf host->mmc_host_ops.execute_tuning = sdhci_cdns_execute_tuning; host->mmc_host_ops.hs400_enhanced_strobe = sdhci_cdns_hs400_enhanced_strobe; + sdhci_enable_v4_mode(host); sdhci_get_of_property(pdev);