From patchwork Tue Sep 9 07:04:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4866561 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 2FD279F32F for ; Tue, 9 Sep 2014 07:04:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F162020154 for ; Tue, 9 Sep 2014 07:04:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD9662014A for ; Tue, 9 Sep 2014 07:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755707AbaIIHEH (ORCPT ); Tue, 9 Sep 2014 03:04:07 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:46377 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755683AbaIIHEF (ORCPT ); Tue, 9 Sep 2014 03:04:05 -0400 Received: by mail-pa0-f49.google.com with SMTP id lf10so2872047pab.22 for ; Tue, 09 Sep 2014 00:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; bh=U/D82BJdQbFzvgzSJcN2ZhztHQ9J86J0rSfFdhVKifc=; b=IZc2dMfpesQ+g8N8gV62rswDnCteCu+AQzd9XjIpp2Xmq8y+EY5Nm/HvfODmABx0yt XQrjxafxHxHeib4PJlZyL/6vqhHNA6EnAVXTxx7AtLjndjlKeVGH4sEsYvQNQtkIIhXE WA1ROL/VkQORIbLAVtr3RtYEgils9X/WAqQKsjwWGpHVN8qX6wLWGQu1NBaZlKLeS3Lh sDQRYta95mn3zNs1GQ/moDJFERt2FDt46FWvW4aZH3XEdj9VtwLRsqjyeXDEOXR4vkd6 DAD9unj64snSCu41/x+4jyjuwx5/KK/mc0Zr+ErfYW1a66ggBodR8ldfVResaxtg68Gc gBzA== X-Received: by 10.68.228.37 with SMTP id sf5mr11867668pbc.154.1410246245042; Tue, 09 Sep 2014 00:04:05 -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 ki11sm870131pbd.41.2014.09.09.00.04.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 09 Sep 2014 00:04:04 -0700 (PDT) Date: Tue, 09 Sep 2014 00:04:04 -0700 (PDT) Message-ID: <878ult6zry.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto To: Lee Jones Cc: Ulf Hansson , Chris Ball , Simon , Kuninori Morimoto , Linux-SH , linux-mmc Subject: Re: [PATCH 2/6 v4] mmc: use .multi_io_quirk on tmio_mmc In-Reply-To: <87ha0h70n1.wl%kuninori.morimoto.gx@gmail.com> References: <87r3zvzohj.wl%kuninori.morimoto.gx@gmail.com> <87k35d70pz.wl%kuninori.morimoto.gx@gmail.com> <87ha0h70n1.wl%kuninori.morimoto.gx@gmail.com> User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 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 Hi Lee I forgot to add you on this patch. Can you please check this patch from "mfd" point ? ------------------------------ 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); }; /*