From patchwork Tue Sep 9 06:44:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4866431 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D62CD9F32E for ; Tue, 9 Sep 2014 06:44:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1444F2015D for ; Tue, 9 Sep 2014 06:44:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0570920142 for ; Tue, 9 Sep 2014 06:44:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbaIIGox (ORCPT ); Tue, 9 Sep 2014 02:44:53 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:45742 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbaIIGow (ORCPT ); Tue, 9 Sep 2014 02:44:52 -0400 Received: by mail-pa0-f49.google.com with SMTP id lf10so2825423pab.8 for ; Mon, 08 Sep 2014 23:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:message-id:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=EUk5BryqkY66rRx9WgH0fLajC+fWM91O7ZzhAxDsDSo=; b=qJRIIZzp3A1plaS8KiAXeabqgkpeGLuBKazwrytZetgr1QzNnoSeauzCpJaQV+6MXI gcyUaFK0hM1amHkugmIiEn9wo9JGcqqZ+8RdpmiyBrmB2QnG/sIr9x3+wIKv0VsL1y2w n+pa1NUdd0HMGX1nnQWNhzu+Tru8RVGnbKOexVfCyLVQeKVwEH8DIjr/ncFJ47t+ps96 nt3XbSzIw4Wz/qTzAVUGubxKl+lxpiH9nZ9/71loCxoo3RJ1LHcKxbES/W5kZ5+uv2SA RYn9GN4Uro1JyierELXpY5M5u3J08492WfzZ55bWZQQTkoFhvhi7ZrwLM/WJft55cNV2 WutQ== X-Received: by 10.70.133.200 with SMTP id pe8mr8538206pdb.40.1410245092244; Mon, 08 Sep 2014 23:44:52 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id t16sm10733603pdl.32.2014.09.08.23.44.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Sep 2014 23:44:51 -0700 (PDT) Date: Mon, 08 Sep 2014 23:44:51 -0700 (PDT) From: Kuninori Morimoto Message-ID: <87iokx70nz.wl%kuninori.morimoto.gx@gmail.com> Subject: [PATCH 1/6 v4] mmc: use .multi_io_quirk on omap_hsmmc User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson , Chris Ball , Simon Cc: Kuninori Morimoto , Linux-SH , linux-mmc In-Reply-To: <87k35d70pz.wl%kuninori.morimoto.gx@gmail.com> References: <87r3zvzohj.wl%kuninori.morimoto.gx@gmail.com> <87k35d70pz.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Kuninori Morimoto Now, omap_hsmmc can use .multi_io_quirk callback instead of MMC_CAP2_NO_MULTI_READ flags. let's use it. Signed-off-by: Kuninori Morimoto --- v3 -> v4 - don't use flag drivers/mmc/host/omap_hsmmc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index ece1634..df27bb4 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1829,7 +1829,17 @@ static int omap_hsmmc_disable_fclk(struct mmc_host *mmc) return 0; } -static const struct mmc_host_ops omap_hsmmc_ops = { +static int omap_hsmmc_multi_io_quirk(struct mmc_card *card, + unsigned int direction, int blk_size) +{ + /* This controller can't do multiblock reads due to hw bugs */ + if (direction == MMC_DATA_READ) + return 1; + + return blk_size; +} + +static struct mmc_host_ops omap_hsmmc_ops = { .enable = omap_hsmmc_enable_fclk, .disable = omap_hsmmc_disable_fclk, .post_req = omap_hsmmc_post_req, @@ -2101,7 +2111,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) if (host->pdata->controller_flags & OMAP_HSMMC_BROKEN_MULTIBLOCK_READ) { dev_info(&pdev->dev, "multiblock reads disabled due to 35xx erratum 2.1.1.128; MMC read performance may suffer\n"); - mmc->caps2 |= MMC_CAP2_NO_MULTI_READ; + omap_hsmmc_ops.multi_io_quirk = omap_hsmmc_multi_io_quirk; } pm_runtime_enable(host->dev);