From patchwork Thu Jun 8 13:09:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9774621 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 2EAED603B4 for ; Thu, 8 Jun 2017 13:09:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21C1628390 for ; Thu, 8 Jun 2017 13:09:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1635B2842B; Thu, 8 Jun 2017 13:09:49 +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 BBA8C2841C for ; Thu, 8 Jun 2017 13:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751450AbdFHNJr (ORCPT ); Thu, 8 Jun 2017 09:09:47 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:60335 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751472AbdFHNJr (ORCPT ); Thu, 8 Jun 2017 09:09:47 -0400 Received: from penelope.horms.nl (unknown [217.111.208.18]) by kirsty.vergenet.net (Postfix) with ESMTPA id 48ED725BE64; Thu, 8 Jun 2017 23:09:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1496927379; bh=GUx/+TVF2SVXqPUcf+Z4C514IPmo5zKOgqLi8sdxtfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=avB2WxF7mz73rpjZe0QAdBgmcxmopSGbgotQC4CpCFzK4ywHwPwyFUcAr5aqglIfR WO4TTWuSbP00XTG9fNN1VgR2J+r1U5mb5lWKBWSLlxCJL++iQfDHbxxDMSEVEfNOF8 slJUGtruCKmJD3Szr6FetwZE8DyH7/feUua1yy2A= Received: by penelope.horms.nl (Postfix, from userid 7100) id 824E7E23080; Thu, 8 Jun 2017 15:09:34 +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 3/5] mmc: sh_mobile_sdhi: add some SoC specific data for R-Car Gen3 Date: Thu, 8 Jun 2017 15:09:25 +0200 Message-Id: <1496927368-18897-5-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496927368-18897-1-git-send-email-horms+renesas@verge.net.au> References: <1496927368-18897-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 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; }