From patchwork Tue Sep 9 06:45:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4866451 Return-Path: X-Original-To: patchwork-linux-sh@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 67AA6C0338 for ; Tue, 9 Sep 2014 06:45:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C6A520145 for ; Tue, 9 Sep 2014 06:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B13552013D for ; Tue, 9 Sep 2014 06:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbaIIGp1 (ORCPT ); Tue, 9 Sep 2014 02:45:27 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:63286 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbaIIGp0 (ORCPT ); Tue, 9 Sep 2014 02:45:26 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so3560081pad.14 for ; Mon, 08 Sep 2014 23:45:26 -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=3AhMdcnuJqQgmQlAgHtB4IdbVHqN6IXpURBoQd4I8OQ=; b=ziny6TIdukasjejCA5iQyXH0pfQ+IF0U+5kzbsx4aWM8WN7aawfOzkyAdd2sFy2O6u o+X1pFc9VnbbgqAYlY/zNO08nkLyfPW5YIwq+7KjU5fdbqrV1HbqR3hhKxs3aPCYScKQ hCo48ePiu8lLAHthKinnHS47tk/OH7NcZhIlszuvuKmlTgvNJQErqJa5Qjz7vHk8OfZf phA2+bPJFnz+HiVNVoOc/6TcrOvrkAJE1pUOrtyt4z8P8oqSwEksNr1yQ4WmKGTkgm+b p6LvDBI24MfWECtaePzqb2kTRjRYmNjJJ+zXbD3At8v1vjzfqHYwqCLJXl1YSGe3U0lH gRow== X-Received: by 10.70.61.106 with SMTP id o10mr55777217pdr.16.1410245126182; Mon, 08 Sep 2014 23:45:26 -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 sp2sm10582325pbc.23.2014.09.08.23.45.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Sep 2014 23:45:25 -0700 (PDT) Date: Mon, 08 Sep 2014 23:45:25 -0700 (PDT) From: Kuninori Morimoto Message-ID: <87ha0h70n1.wl%kuninori.morimoto.gx@gmail.com> Subject: [PATCH 2/6 v4] mmc: use .multi_io_quirk on tmio_mmc 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, tmio_mmc 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 - remove un-needed header drivers/mmc/host/tmio_mmc_pio.c | 13 +++++++++++++ include/linux/mfd/tmio.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index ba45413..ff5ff0f 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -970,12 +970,25 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) return ret; } +static int tmio_multi_io_quirk(struct mmc_card *card, + unsigned int direction, int blk_size) +{ + struct tmio_mmc_host *host = mmc_priv(card->host); + struct tmio_mmc_data *pdata = host->pdata; + + if (pdata->multi_io_quirk) + return pdata->multi_io_quirk(card, direction, blk_size); + + return blk_size; +} + static const struct mmc_host_ops tmio_mmc_ops = { .request = tmio_mmc_request, .set_ios = tmio_mmc_set_ios, .get_ro = tmio_mmc_get_ro, .get_cd = mmc_gpio_get_cd, .enable_sdio_irq = tmio_mmc_enable_sdio_irq, + .multi_io_quirk = tmio_multi_io_quirk, }; static int tmio_mmc_init_ocr(struct tmio_mmc_host *host) diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 90436d5..5738817 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -142,6 +143,8 @@ struct tmio_mmc_data { /* clock management callbacks */ int (*clk_enable)(struct platform_device *pdev, unsigned int *f); void (*clk_disable)(struct platform_device *pdev); + int (*multi_io_quirk)(struct mmc_card *card, + unsigned int direction, int blk_size); }; /*