From patchwork Wed Jul 6 20:23:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9217015 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 70AE160467 for ; Wed, 6 Jul 2016 20:24:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62CB828454 for ; Wed, 6 Jul 2016 20:24:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 578DE28455; Wed, 6 Jul 2016 20:24:05 +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 07C5528457 for ; Wed, 6 Jul 2016 20:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755810AbcGFUYD (ORCPT ); Wed, 6 Jul 2016 16:24:03 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:43971 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755769AbcGFUYC (ORCPT ); Wed, 6 Jul 2016 16:24:02 -0400 Received: from penelope.kanocho.kobe.vergenet.net (dhcp-077-251-078-056.chello.nl [77.251.78.56]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 45D1725BEA7; Thu, 7 Jul 2016 06:23:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1467836635; bh=YmoI+82WN3QRdGM6olDA64I9yP4RrJSulSnfALBEfTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzEjincjbbhC2rg+2NiOSPXFIU3xsOA4+J88m9QbuBNxBib5dB3pd6FVmlpJRe23R 69sCi7SwSUxTu74rTI92Qp/mZmiYULj9r/y8TtJgFOTFuwsC5xEwV0U4nlkL1Q/G7f 9mjHukWGdvKJ/xPbEvkzVgFqyzTvXRW+btuwYkuQ= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id D1E3C611E0; Wed, 6 Jul 2016 22:23: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 Subject: [PATCH/RFC v3 4/6] mmc: sh_mobile_sdhi: add some SoC specific data for R-Car Gen3 Date: Wed, 6 Jul 2016 22:23:28 +0200 Message-Id: <1467836610-18539-5-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1467836610-18539-1-git-send-email-horms+renesas@verge.net.au> References: <1467836610-18539-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 394e018e6f39..83ca6cb78484 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[] = { @@ -365,6 +370,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; }