Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1025696yba; Thu, 4 Apr 2019 02:42:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyowyemI5mQ6A/I9hEZIcKGXrk5GoDZDuUz81dHaWXuRFYOlaumcOD3oraKuUfORllJfFBl X-Received: by 2002:aa7:8719:: with SMTP id b25mr4860949pfo.90.1554370967141; Thu, 04 Apr 2019 02:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370967; cv=none; d=google.com; s=arc-20160816; b=zLp06ew3MjnVE72/ovEnAGVSNOcPXZDEPOT63bagq0/pSJUypu2fczasawxi+vLreT zHOakPUr8ab/cVb3Q0xZTC8NIy+vTXQWbB4Ffu0ytuUq3uLfD2T7c+9T3g1W9+M63laB 81Bup43j44SI591Mvw53ZBQVzOjFw7WzSiQ0x2Rmvl7DBRnJ7c5uCSwPxhTVYhxdW90e HOOC7qp9jesyWdrgNcsgSvawuD5t3ZrxPYjUi8QRO2IDhrJLDZ8+W8BA3bcUdFD6qDWQ rYQ3F0MG8Opy3pZZfkPxRdE8P+LbDMdgTenJOpsEMu8TTUfuRNcRWGz2c/mf8KHJ46r3 x6UQ== 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=D2kKNXvEoQ3876guwXNnkUX2yNpSlUfxXGoBRVrAd+8=; b=GQu/ePEkE7OtjRrRxKnJjAxOQBXldAZVDDVQRZG9G8hn1pRNfOkVP5SvC/LZMe+8nj ZYfhQfiTiZ0y2D9vIPyUONmRoNTslM1r9cDhOpjeiW74gOBFJhDaZHcEzS02IOsQYiln 9pW1KQZ/05GQV+/uQyJ4MIDF5JfcRW5PClRHdDWLqzH5gDAXG+RFPOpspOpyWtIx7zXt oMQsomZjwFhaV6LBRTySsU1A6/4YiEQRVuMuex+HE7t1YfjRcyhNLgMHOJixPurfDvcQ +kMCDGbCJ0ywQi3wBMC0BLSD8msXaFWi1De0bnYJ84dpUaId37c1I0KKqWYtxPcyuDQ2 Lh0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pdzQ8buG; 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 y2si5665947pgq.170.2019.04.04.02.42.31; Thu, 04 Apr 2019 02:42:47 -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=pdzQ8buG; 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 S1730687AbfDDJBo (ORCPT + 99 others); Thu, 4 Apr 2019 05:01:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:38902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731006AbfDDJBm (ORCPT ); Thu, 4 Apr 2019 05:01:42 -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 5B6012184B; Thu, 4 Apr 2019 09:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368501; bh=Bev0Irtg0XD9cZKOUquJ0GPyvcgvoMqDdptoYGr33RE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pdzQ8buG8dOAVNPVwiFyG4TT/NtzrpAlh+0gNwiFEcmescyR0kbT+scOCZkGtROYk 9DSroXTh/z3D+FVjQcVNNXuRwKz1uKjzp/zoeiiFRMEqBL9P9aZnb5qHjhFcO7v0tX IZCET1qRB8U/cKezNwPU1D6NOtppStQH6+jvRG0Y= 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.19 063/187] mmc: omap: fix the maximum timeout setting Date: Thu, 4 Apr 2019 10:46:40 +0200 Message-Id: <20190404084606.034359341@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@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.19-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 c60a7625b1fa..b2873a2432b6 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