Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5651088img; Wed, 27 Mar 2019 12:27:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBx2V4PqfcWbF/EA1AYiqBeQyPYGmZeWvLDJ4ccOAHKZCoVHAvWTSqEu+vO1tK4pv0dh9G X-Received: by 2002:a17:902:a5c9:: with SMTP id t9mr37514745plq.196.1553714869596; Wed, 27 Mar 2019 12:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714869; cv=none; d=google.com; s=arc-20160816; b=Dd/6o2Vy2WhZjdvZCbHEdHrVPYyVPNZq+vRgzsNyT2xdFyGmxUgzLAE3+hzUuTyyPG rlFsCl1UX1SkAXK1ufzkqprY6yHPd+aWQh8yx9/GhDXNi3QHfNJqXBVNEx1p/eUMVbg8 1ltF779UhVdWFYgD+gtyyysHkqUCbmIL9+KKpqeUBgLNPHKnPPPg+2lPFFtcHg+WBTLG 8pO1kyFYVSXv+S1/SQTIebunmnZoH3pwkh1ZbLDBCcxAbXxhVsJ6KOfAk7bsuYbrUptv GDZHklXI9lTwikUqtL9AdQDoeiVgTXWus8oxEySDajaZnuD7EjnojCdxEiCVQuJec0y8 0vKw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lKoBJ0Jet6Xz98swK/sgWgnmUEBxAJ5mb09plIxPAEw=; b=cMoIXmEu54/eS0qrk2fhV11sVIw0XWwFXosA+vqtuYtiXYpxxcJKAZoYWFf+ZOdtl5 KdmDUgTHR6Nxj2Qm3+sP66ShmS5/QQwZCCFZTumjE+76iNHq1seQ8e38/o3Te6XNrMlp QzZ2dKgWaXGz01ZTOHtI2KK+5aCUZLmgB2I4mtZSoUFNP019A38dO1tIRW/XQcFcPEEA 4WRbVbKp1zKeSaa270ZsRXd5Hn/Ps9VtMTH9ZxL2xzl6jqlZSxC+bLoI8T4GkHtbswIF 9iGBABU63kUqPduNpS26LroQtJSAlONQ+J3kCdvI7/aamaQtcZSrk6AaBqlVv9s0OJYm +xrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tg+XMRI7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si18816956pgv.562.2019.03.27.12.27.34; Wed, 27 Mar 2019 12:27:49 -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=tg+XMRI7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387803AbfC0T1B (ORCPT + 99 others); Wed, 27 Mar 2019 15:27:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387477AbfC0SEu (ORCPT ); Wed, 27 Mar 2019 14:04:50 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0BE1C2063F; Wed, 27 Mar 2019 18:04:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709889; bh=2OCLNz6pAJicctvws5sen0XorFDKpUsrUOAIW3CZusQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tg+XMRI7udnYM1eDXjgC3DBx+1xaJQBKXxb/Lexi5so1C0i+F3nrkykftrasKbpl3 RTMZHIsjUOBWwND1uYs+bXjRs9waCRBZ6T5zCwazmtQCchB8eoex15MMtz9eqAEA7R oo65j5R7XK6SReAN3ZLkPKthH1CucGKNwiOauFvU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Aaro Koskinen , Ulf Hansson , Sasha Levin , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 092/262] mmc: omap: fix the maximum timeout setting Date: Wed, 27 Mar 2019 13:59:07 -0400 Message-Id: <20190327180158.10245-92-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aaro Koskinen [ 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