From patchwork Wed Jun 29 22:05:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9206233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0534460752 for ; Wed, 29 Jun 2016 22:06:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7D4B2862E for ; Wed, 29 Jun 2016 22:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC67B2863B; Wed, 29 Jun 2016 22:06:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839492862E for ; Wed, 29 Jun 2016 22:06:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751703AbcF2WGA (ORCPT ); Wed, 29 Jun 2016 18:06:00 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:55002 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbcF2WGA (ORCPT ); Wed, 29 Jun 2016 18:06:00 -0400 Received: from penelope.kanocho.kobe.vergenet.net (unknown [46.189.67.97]) by kirsty.vergenet.net (Postfix) with ESMTPSA id EB2DD25B750; Thu, 30 Jun 2016 08:05:54 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1467237955; bh=tcCrf2VJpjBR81a1+syA2BGWGPFcHj7R+4pnkZ08zR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ml4TBKzHAetOSpbJiHd9mJ3Sxt4EwF34KkqnuG5nfg+aV3Ttyi4AItArgMsBui8ZX zXGey+52TWmw7ZOk19PkOp9mZARxY4vhKtQIqngeXR0kW5rQ6fwxXQFa9rqon3Vkpx i4zzbL5t7FgsRDWr394jVAb3et/FyRDOifKcARkY= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id 605D4612BD; Thu, 30 Jun 2016 00:05:51 +0200 (CEST) From: Simon Horman To: Wolfram Sang , Ulf Hansson Cc: Magnus Damm , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , Ai Kyuse , Simon Horman Subject: [PATCH/RFC v2 3/5] mmc: tmio: add max_segs and max_blk_count in tmio_mmc_data Date: Thu, 30 Jun 2016 00:05:38 +0200 Message-Id: <1467237940-24388-4-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1467237940-24388-1-git-send-email-horms+renesas@verge.net.au> References: <1467237940-24388-1-git-send-email-horms+renesas@verge.net.au> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yoshihiro Shimoda To change each value from related driver (e.g. sh_mobile_sdhi driver), this patch adds these member in the struct tmio_mmc_data. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Ai Kyuse Signed-off-by: Simon Horman --- v2 * First post --- drivers/mmc/host/tmio_mmc_pio.c | 2 +- include/linux/mfd/tmio.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index c0020c331595..39dd8402e126 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -1124,7 +1124,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities; mmc->caps2 |= pdata->capabilities2; - mmc->max_segs = 32; + mmc->max_segs = pdata->max_segs ? pdata->max_segs : 32; mmc->max_blk_size = 512; mmc->max_blk_count = (PAGE_SIZE / mmc->max_blk_size) * mmc->max_segs; diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 7a26286db895..3b95dc7eb314 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h @@ -125,6 +125,8 @@ struct tmio_mmc_data { unsigned int cd_gpio; int alignment_shift; dma_addr_t dma_rx_offset; + unsigned int max_blk_count; + unsigned short max_segs; void (*set_pwr)(struct platform_device *host, int state); void (*set_clk_div)(struct platform_device *host, int state); };