From patchwork Thu Jun 8 13:13:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9774655 X-Patchwork-Delegate: geert@linux-m68k.org 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 EEE7760350 for ; Thu, 8 Jun 2017 13:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E23A728520 for ; Thu, 8 Jun 2017 13:13:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6F8B28557; Thu, 8 Jun 2017 13:13:37 +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 7B45828533 for ; Thu, 8 Jun 2017 13:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbdFHNNh (ORCPT ); Thu, 8 Jun 2017 09:13:37 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:60503 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbdFHNNg (ORCPT ); Thu, 8 Jun 2017 09:13:36 -0400 Received: from penelope.horms.nl (unknown [217.111.208.18]) by kirsty.vergenet.net (Postfix) with ESMTPA id 77C3E25BEE1; Thu, 8 Jun 2017 23:13:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1496927609; bh=GUx/+TVF2SVXqPUcf+Z4C514IPmo5zKOgqLi8sdxtfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNiidm8dXEK3WMLGGoD3/Ql/A0wE5TNCykixvBh3ShKWwM1YPKTINA5wyGbVngZ39 ExRH+i0PMLAdxuuwdMSwO34QoT8/XhfLSRaqXqGr+EL9hGzbkcuOpAwGI0+SoP7mSo UGWm8fHP4SW7m64hy1A5s72c/3F8KTplur7HkQm8= Received: by penelope.horms.nl (Postfix, from userid 7100) id D7A3AE2307C; Thu, 8 Jun 2017 15:13:20 +0200 (CEST) From: Simon Horman To: Wolfram Sang , Ulf Hansson Cc: Magnus Damm , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Simon Horman , Yoshihiro Shimoda , Ai Kyuse Subject: [PATCH/RFC 2/5] mmc: sh_mobile_sdhi: set max_segs and max_blk_count values R-Car Gen3 Date: Thu, 8 Jun 2017 15:13:12 +0200 Message-Id: <1496927595-19521-3-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496927595-19521-1-git-send-email-horms+renesas@verge.net.au> References: <1496927595-19521-1-git-send-email-horms+renesas@verge.net.au> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/mmc/host/renesas_sdhi.h | 2 ++ drivers/mmc/host/renesas_sdhi_core.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index eb3ea15ff92d..6f7233fe32a2 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -31,6 +31,8 @@ struct renesas_sdhi_of_data { int scc_offset; struct renesas_sdhi_scc *taps; int taps_num; + unsigned int max_blk_count; + unsigned short max_segs; }; int renesas_sdhi_probe(struct platform_device *pdev, diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 82150a966391..294bc9705c5f 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -522,6 +522,8 @@ int renesas_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; }