From patchwork Wed Sep 3 02:09:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4829761 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 C0C469F2ED for ; Wed, 3 Sep 2014 02:09:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3055201F4 for ; Wed, 3 Sep 2014 02:09:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14245201E4 for ; Wed, 3 Sep 2014 02:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbaICCJe (ORCPT ); Tue, 2 Sep 2014 22:09:34 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:46297 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbaICCJe (ORCPT ); Tue, 2 Sep 2014 22:09:34 -0400 Received: by mail-pa0-f54.google.com with SMTP id fb1so16204380pad.13 for ; Tue, 02 Sep 2014 19:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:mime-version:to:cc :in-reply-to:references:content-type; bh=YpCqkXv69LZHZR9RC6cfYqOab4a7ThWfYkNrSQs9azA=; b=plAUuJSd+LsleUy2yVrzYeYqrOfZzQ5l6Er1TjalUif+gQWWXE72NruaD6f0tfIAPi cYQyQLtoEZWHa3d8AfEipoGecpZ2DzH9o+aW398X7dr4HSyG0UxsEWgbHEebXCnnHYJK gYbkNCUXSB5LkrTE8WNw0S1RnK5RlaKEpvmIvnUUiwgGWHmJCsynR8SA9wVqra/+goXQ NXgUJScRbE39C+snTcdw3xx3rBld4HdmC9LJS4F2CAEwd65o+lp944lb5SjTFlC0H0UF +7poUah9ArK6XDwjmevAad+S2czuAwZyVl1DgT/4plBpQGaTKVDRXwMT/P/UmGc/DhQ+ s+lA== X-Received: by 10.70.5.33 with SMTP id p1mr24292603pdp.134.1409710173692; Tue, 02 Sep 2014 19:09:33 -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 qi1sm15366086pac.46.2014.09.02.19.09.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Sep 2014 19:09:33 -0700 (PDT) Date: Tue, 02 Sep 2014 19:09:33 -0700 (PDT) Message-ID: <877g1l78v9.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") To: Ulf Hansson , Chris Ball , Simon Cc: Kuninori Morimoto , Linux-SH , linux-mmc In-Reply-To: <87bnqx78xr.wl%kuninori.morimoto.gx@gmail.com> References: <87r3zvzohj.wl%kuninori.morimoto.gx@gmail.com> <87bnqx78xr.wl%kuninori.morimoto.gx@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.5 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 --- v2 -> v3 - blk_size_workaround -> multi_io_quirk drivers/mmc/host/tmio_mmc_pio.c | 13 +++++++++++++ include/linux/mfd/tmio.h | 4 ++++ 2 files changed, 17 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..dec750e 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -1,10 +1,12 @@ #ifndef MFD_TMIO_H #define MFD_TMIO_H +#include #include #include #include #include +#include #include #include @@ -142,6 +144,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); }; /*