From patchwork Tue Sep 2 02:02:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4822501 Return-Path: X-Original-To: patchwork-linux-mmc@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 981D29F2ED for ; Tue, 2 Sep 2014 02:02:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D272420170 for ; Tue, 2 Sep 2014 02:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB13920176 for ; Tue, 2 Sep 2014 02:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751711AbaIBCCI (ORCPT ); Mon, 1 Sep 2014 22:02:08 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:42701 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbaIBCCH (ORCPT ); Mon, 1 Sep 2014 22:02:07 -0400 Received: by mail-pd0-f174.google.com with SMTP id ft15so7217499pdb.5 for ; Mon, 01 Sep 2014 19:02:07 -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:to:cc:in-reply-to :references:mime-version:content-type; bh=IfjFRH9Hlx49IkRLIzACWue6L1ywEjK3LhuqxWa+G34=; b=FOSssWKsH/rF0wniYHpyWuQGdRCnnsuBCI8OGaaREkLZ+2uinjyXZC/dteKgIdcmfa 7eXtfLh1/ZnHF0lLEJWucvR76yd8xfSrXdl9zCixNQyL4rHVVmsoqNSBOZfObJET6PmI E6nkEjG0AwJV8odESY+HS/mONzRJbDgHI9scfuOdHdEZz9G1sqt5nRfDnouthSoVylrV f2XdU/sF0dNLmyvjde76aAXfJff/eHFa7AAGsg8X30AeUXXompajZaMZuSFgL21E8Jpv Wdga/ZTsoNz2LHJPeuBp/gX205vaG98ScQVYJLcAGHHZkxDYyJrkPt6sri/tTujEDwXg om6g== X-Received: by 10.70.38.49 with SMTP id d17mr44125274pdk.19.1409623327357; Mon, 01 Sep 2014 19:02:07 -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 d8sm3098157pdl.94.2014.09.01.19.02.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Sep 2014 19:02:06 -0700 (PDT) Date: Mon, 01 Sep 2014 19:02:06 -0700 (PDT) Message-ID: <87ha0qkcf7.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 3/7 v2] mmc: tmio_mmc: use blk_size_workaround 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: <87lhq2kcif.wl%kuninori.morimoto.gx@gmail.com> References: <87r3zvzohj.wl%kuninori.morimoto.gx@gmail.com> <87lhq2kcif.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-8.4 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=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 From: Kuninori Morimoto Now, tmio_mmc can use blk_size_workaround. let's use it. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change 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..f9afa27 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_blk_size_workaround(struct mmc_card *card, + struct request *req, int blk_size) +{ + struct tmio_mmc_host *host = mmc_priv(card->host); + struct tmio_mmc_data *pdata = host->pdata; + + if (pdata->blk_size_workaround) + return pdata->blk_size_workaround(card, req, 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, + .blk_size_workaround = tmio_blk_size_workaround, }; 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..0e0bd6a 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 (*blk_size_workaround)(struct mmc_card *card, + struct request *req, int blk_size); }; /*