From patchwork Mon Sep 1 09:21:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4818001 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 8B66C9F2ED for ; Mon, 1 Sep 2014 09:22:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B66A92015A for ; Mon, 1 Sep 2014 09:22:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E300F20155 for ; Mon, 1 Sep 2014 09:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753044AbaIAJVy (ORCPT ); Mon, 1 Sep 2014 05:21:54 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:49989 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031AbaIAJVx (ORCPT ); Mon, 1 Sep 2014 05:21:53 -0400 Received: by mail-pa0-f53.google.com with SMTP id fa1so11584933pad.26 for ; Mon, 01 Sep 2014 02:21:52 -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=rb878fj966a2k/+UMk8Up1R73HiCud5pQcVjZqpOALY=; b=y3sO/ewMUPRaAc9KqJav194W4wab/sKFRgkor100b/cQ0Bg07eCCPnoPLkpXEbkqMP 1L4ARzp5O11xoO5QZ24WYdZhkjp3MbcbhxsXSk7eAcJMq8X34BWmqpdidLzgLaqD9Wso Xb4fUiL2/AmdYkmqkmXH4Y2t3SMlqq8cOn/wyNpuQiDCvv3OYBtDWDBBx6SrnGh3vh+o k1U4Ipnk800ORqgcexqlngELpopHrOpumWf0Ryt5JWx18plkIGclcmMV179SXKsMsO7Q Ilq3N0LicbiGL7ocFi/zmwrFpRmYM8Vg6k/1ySbx6E8Zd/1xoCQiJE6mTLnJOquIjoYU AoxQ== X-Received: by 10.70.128.65 with SMTP id nm1mr37606920pdb.15.1409563312945; Mon, 01 Sep 2014 02:21: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 fk5sm364841pbb.13.2014.09.01.02.21.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Sep 2014 02:21:52 -0700 (PDT) Date: Mon, 01 Sep 2014 02:21:52 -0700 (PDT) Message-ID: <87mwajzoep.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 3/7] 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: <87r3zvzohj.wl%kuninori.morimoto.gx@gmail.com> References: <87r3zvzohj.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=-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 --- 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); }; /*