From patchwork Wed Jun 29 22:05:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9206231 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 19AC56089F for ; Wed, 29 Jun 2016 22:06:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 083302862E for ; Wed, 29 Jun 2016 22:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F12992863B; Wed, 29 Jun 2016 22:06:01 +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 D2DE32862E for ; Wed, 29 Jun 2016 22:05:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbcF2WF6 (ORCPT ); Wed, 29 Jun 2016 18:05:58 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:54990 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbcF2WF6 (ORCPT ); Wed, 29 Jun 2016 18:05:58 -0400 Received: from penelope.kanocho.kobe.vergenet.net (unknown [46.189.67.97]) by kirsty.vergenet.net (Postfix) with ESMTPSA id E7E2225AE79; 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=7/PXijtobpR6QBw63YNRIKADVULf9pH2RUaSDYMZRIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kk7Gp1rXZvqrQl0iSh2psxscNeowvTOoxd5dnxSHlqRToVmnjzYUs55N/d75zeG5n N35SK2tokqHtoc9jIQhjzVyVSxou6Gzq8SE3T40eCbL8I9J42WJT/JUoZMbx3QGkMD Rw2uUgpmktXpEU13IUuogvRtoLYqxKlKJwnPtM3A= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id 6568B612EB; 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 4/5] mmc: sh_mobile_sdhi: add some SoC specific data for R-Car Gen3 Date: Thu, 30 Jun 2016 00:05:39 +0200 Message-Id: <1467237940-24388-5-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 avoid complicate code in own dma code for gen3, this patch adds set max_segs to 1. Then, the tmio driver will get requests as sg_len = 1 only. In the performance point of view, the CONFIG_MMC_BLOCK_BOUNCE should be set. Otherwise, mmc block layer will set 4-kbyte each as a request. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Ai Kyuse Signed-off-by: Simon Horman --- v2 * First post --- drivers/mmc/host/sh_mobile_sdhi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 320059c61c6c..51b5327557fa 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -54,6 +54,8 @@ struct sh_mobile_sdhi_of_data { enum dma_slave_buswidth dma_buswidth; dma_addr_t dma_rx_offset; unsigned bus_shift; + unsigned int max_blk_count; + unsigned short max_segs; }; static const struct sh_mobile_sdhi_of_data of_default_cfg = { @@ -79,6 +81,9 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen3_compatible = { TMIO_MMC_CLK_ACTUAL | TMIO_MMC_MIN_RCAR2, .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, .bus_shift = 2, + /* Gen3 SDHI DMAC can handle 0xffffffff blk count, but seg = 1 */ + .max_blk_count = 0xffffffff, + .max_segs = 1, }; static const struct of_device_id sh_mobile_sdhi_of_match[] = { @@ -368,6 +373,8 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data->capabilities |= of_data->capabilities; mmc_data->capabilities2 |= of_data->capabilities2; mmc_data->dma_rx_offset = of_data->dma_rx_offset; + mmc_data->max_blk_count = of_data->max_blk_count; + mmc_data->max_segs = of_data->max_segs; dma_priv->dma_buswidth = of_data->dma_buswidth; host->bus_shift = of_data->bus_shift; }