Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1015947yba; Thu, 4 Apr 2019 02:29:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSmaZx6JAL2q0ZoRJ0BvYvdx7NbHiKn3okzu6U8OCLi1USaGv079l/hXeqfwzXYulfVt+a X-Received: by 2002:a17:902:e091:: with SMTP id cb17mr5402191plb.222.1554370168411; Thu, 04 Apr 2019 02:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370168; cv=none; d=google.com; s=arc-20160816; b=b/PbsjXijbdNBb9gI3Kt2E41lblG6Ve5MURIbxPOIIA4UFfCOMCXGFcjSBhk+sIILZ zSFgjQbaDCdIrsB9SLlXN1LLL4hCmOILnJ5bDkP2uKZxL9kzLuxXZV85MP/rxzcOcwlN 3WVxHfVhqt6/xk1wXXRZ2JQXYBJZxQQJmjdgVZnZGLzO25ZPbi3Rbn0GYFmXlY5XqgoY 9AIMFuCn2wkzYIg4I9bwx6DSMCrz9WoP1+LihzAPMXsCttqiAPPVcPAhJnALXGCNxRVK 4OVKnwO915CYYJhtSpXgS2vIdErSdaqhC4ccRzlXklipzn5rRLiHrJEjVwP/2iyi4l99 XMew== 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=7AaS+r2o8yFabg5oF+RKIyqa4U/Wy6PlNhj8RGbDUFI=; b=jruZAGFQt8SVvO37HWUxMWnUmUmvmyHpEproLd4KTXrnQJEHB2QomyYqlSyUUGhGYG yf/BYgK2XETFPYcVqG6LFdnkJY8q3J3Yx5uFZlI8SU/2jvlwdXYrXjNAW0XAKkMCv/FK 2O/qRjDKw3BJzxmYqv9EJRTVRAYqflb1Hcr7XbtU4Na08f1c7LySD22WZVNvq9LG5UfW hvtnGGMHwHWiGc1ISiJ7f7nsEn0GqvARe9HvJQEh6RnD0U55O9KLzoj8kAIHfapfzfxR N74lK3MvQuC5siUIYtYAQBUgtwdIkCwF2bRL5KMVqmO0mCnCE+uqZw8Qa2tN9ntFIPyF 0j6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kCV17wPo; 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 h185si15504062pfc.241.2019.04.04.02.29.12; Thu, 04 Apr 2019 02:29:28 -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=kCV17wPo; 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 S1733227AbfDDJ2c (ORCPT + 99 others); Thu, 4 Apr 2019 05:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733204AbfDDJLq (ORCPT ); Thu, 4 Apr 2019 05:11:46 -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 E31082054F; Thu, 4 Apr 2019 09:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554369105; bh=zh0FjOkXxa8v+0n1ReJWvvJFORGA2c2b2HhlrRCAk5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kCV17wPo8iohp0uLVWBRNnOTpHI/aYi/ybJLQ4Y2/wdnTP8xld8wELK9FBFB84TZH LmOYV0DsjFPuZE1LhOGRdknxf+0As/tRQRQx9sgf+bo28OwmYS3I0Y7BfoTa9jDcnF YBhP3CWhqPnbNavRtovgawokBDkgaSK2h2XWj+hQ= 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 5.0 086/246] mmc: omap: fix the maximum timeout setting Date: Thu, 4 Apr 2019 10:46:26 +0200 Message-Id: <20190404084622.153078843@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084619.236418459@linuxfoundation.org> References: <20190404084619.236418459@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 5.0-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