From patchwork Mon Jan 20 23:29:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 3514871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7348FC02DC for ; Mon, 20 Jan 2014 23:29:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A79D120136 for ; Mon, 20 Jan 2014 23:29:40 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC37D2012D for ; Mon, 20 Jan 2014 23:29:39 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5OHe-0003jC-QP; Mon, 20 Jan 2014 23:29:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5OHc-0006Bm-CJ; Mon, 20 Jan 2014 23:29:32 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5OHZ-0006BS-OL for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2014 23:29:30 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s0KNT7BK025815; Mon, 20 Jan 2014 17:29:07 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0KNT72O005380; Mon, 20 Jan 2014 17:29:07 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Mon, 20 Jan 2014 17:29:06 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0KNT6rB027975; Mon, 20 Jan 2014 17:29:06 -0600 From: Nishanth Menon To: Balaji T K , Chris Ball Subject: [PATCH] mmc: omap_hsmmc: Add support for Erratum 2.1.1.128 in device tree boot Date: Mon, 20 Jan 2014 17:29:02 -0600 Message-ID: <1390260542-22213-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140120_182929_860113_B801EC5E X-CRM114-Status: GOOD ( 11.02 ) X-Spam-Score: -7.5 (-------) Cc: Nishanth Menon , devicetree@vger.kernel.org, Tony Lindgren , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When device is booted using devicetree, platforms impacted by Erratum 2.1.1.128 is not detected easily in the mmc driver. This erratum indicates that the module cannot do multi-block transfers. Handle this by providing a boolean flag to indicate to driver that it is working on a hardware with mentioned limitation. Signed-off-by: Nishanth Menon Acked-by: Felipe Balbi Acked-by: Balaji T K --- This explains the logs I see: OMAP3430 LDP (ES2.2): uImage only boot: http://slexy.org/raw/s2YrbMAi7c uImage+dtb concatenated boot: http://slexy.org/raw/s20qVg17T0 With the following flag set, device is now able to consistently boot with device tree supported uImage+dtb concat boot. .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 2 ++ drivers/mmc/host/omap_hsmmc.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt index 8c8908a..ab36f8b 100644 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt @@ -26,6 +26,8 @@ specifier is required. dma-names: List of DMA request names. These strings correspond 1:1 with the DMA specifiers listed in dmas. The string naming is to be "rx" and "tx" for RX and TX DMA requests, respectively. +ti,erratum-2.1.1.128: boolean, for OMAP3430/OMAP35xx platforms with broken +multiblock reads Examples: diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 014bfe5..f2d5940 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1730,6 +1730,9 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) if (of_find_property(np, "ti,dual-volt", NULL)) pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT; + if (of_find_property(np, "ti,erratum-2.1.1.128", NULL)) + pdata->controller_flags |= OMAP_HSMMC_BROKEN_MULTIBLOCK_READ; + /* This driver only supports 1 slot */ pdata->nr_slots = 1; pdata->slots[0].switch_pin = cd_gpio;