Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1030787yba; Thu, 4 Apr 2019 02:50:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxse2lW7Gr4bliJJ+xFTzpbHDlTFMtPUuFwJidaTeqJYi1tVF/wtk7hUSlPjm+CMVilGFmH X-Received: by 2002:a17:902:2f43:: with SMTP id s61mr5402608plb.158.1554371434795; Thu, 04 Apr 2019 02:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554371434; cv=none; d=google.com; s=arc-20160816; b=K0ycNVBQCa/17kMv7/88t2XiEvUK8bw6oZP35F+JnsVxRwWS3XoW6a25e6oZnikXul 7hUnsxxKq2TMRcaSqvR7DVqqS76CyilXrVU8lNu7efZDKbBC+X1/6nLkVW3vyQ4wWmG4 yyesTbXFxMvNs0gsy2YAPizy6JwAmmsQzPBnviGJ+82Kka5dApX0v5/CUsXb732mT7aX 77G4bldbGQtbXhlso1PdzqfOyyHXQlPdCu6X2tIBH4ztV35FfuwrCOYylTp0FXvl3X2F rOjqe6aQ4Ts8GWd0SGssJbaUMmfbiy3iwIagBlbPcPFbuNmRhUosMzRL43PZBjaAw5dF hcjQ== 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=XqWJ3pMYlRs5j1hdkMi4j7V9AWBPAFOmDdrbV0ex0h8=; b=qli2LJC0akD76lDWxc9x1VfDwSFeaKVSLkhVwiDaoCIKL+1UiX6pObOZq7xMCI1kz3 2sxJnxqqtHKYTm9Xc5531ybeyCDzBi3QWykkjzTgq5Y7jHuBRI9/u4hoDEgKghVGClUY cTUlTR4cLf4vcTyg31JwCWcxNS+ou/GHk3bgoQvhXJo3HsmBoD8qGOn5EWxTWI8YgDAZ Tt5d1RC+fN8Zzf73g2Utwgx1OKNkzamczpFbcwOSvxS9tm7g0ZdzY5m5V4O7mVb6lJEl y6ekW5H1LCRpTFC72vRvTu7sjgVj7kDTBHJgu5F9/jvV6U6Un+8/i8qCiGinIgzidLhn 4+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ssqr3OWp; 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 l70si16063405pgd.242.2019.04.04.02.50.19; Thu, 04 Apr 2019 02:50:34 -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=Ssqr3OWp; 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 S1730638AbfDDJtp (ORCPT + 99 others); Thu, 4 Apr 2019 05:49:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:59506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729268AbfDDI4O (ORCPT ); Thu, 4 Apr 2019 04:56:14 -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 B417520652; Thu, 4 Apr 2019 08:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368174; bh=vVwPuTDAvMSOha1T0pRQQg6hi7UY/1tQ6mxeu0vVoNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ssqr3OWp5blv4Gx3msHl3IUNurxkxAh6GGlbZuvUefQOtZyo83edre7QxUKDpVyYr dzoMG0x4DUjEVkciwSmt8J4+Owhgt3ozrFSN313dyiwfhu92xeOPXovGV/0hl7jpQo 6Lcj+7Gx/PqbLpH9KsYF7m5CJEoTA0HJD3Xocgq4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaro Koskinen , Ulf Hansson , Sasha Levin Subject: [PATCH 4.14 048/121] mmc: omap: fix the maximum timeout setting Date: Thu, 4 Apr 2019 10:47:16 +0200 Message-Id: <20190404084547.866319556@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084545.245659903@linuxfoundation.org> References: <20190404084545.245659903@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit a6327b5e57fdc679c842588c3be046c0b39cc127 ] When running OMAP1 kernel on QEMU, MMC access is annoyingly noisy: MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! [ad inf.] Emulator warnings appear to be valid. The TI document SPRU680 [1] ("OMAP5910 Dual-Core Processor MultiMedia Card/Secure Data Memory Card (MMC/SD) Reference Guide") page 36 states that the maximum timeout is 253 cycles and "0xff and 0xfe cannot be used". Fix by using 0xfd as the maximum timeout. Tested using QEMU 2.5 (Siemens SX1 machine, OMAP310), and also checked on real hardware using Palm TE (OMAP310), Nokia 770 (OMAP1710) and Nokia N810 (OMAP2420) that MMC works as before. [1] http://www.ti.com/lit/ug/spru680/spru680.pdf Fixes: 730c9b7e6630f ("[MMC] Add OMAP MMC host driver") Signed-off-by: Aaro Koskinen Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index c28c51ad650f..f11245a0521c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -920,7 +920,7 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques reg &= ~(1 << 5); OMAP_MMC_WRITE(host, SDIO, reg); /* Set maximum timeout */ - OMAP_MMC_WRITE(host, CTO, 0xff); + OMAP_MMC_WRITE(host, CTO, 0xfd); } static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req) -- 2.19.1