From patchwork Tue Feb 14 20:05:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9572715 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 C62E060589 for ; Tue, 14 Feb 2017 20:08:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C43E026E4D for ; Tue, 14 Feb 2017 20:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9180271BC; Tue, 14 Feb 2017 20:08:07 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 6BD9228415 for ; Tue, 14 Feb 2017 20:08:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754658AbdBNUIF (ORCPT ); Tue, 14 Feb 2017 15:08:05 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33153 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754618AbdBNUHo (ORCPT ); Tue, 14 Feb 2017 15:07:44 -0500 Received: by mail-wm0-f68.google.com with SMTP id v77so5209035wmv.0 for ; Tue, 14 Feb 2017 12:07:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=vzot4kH11x84xOZ3HWmaZmqYvCEhe29TflfAXBz1fhE=; b=mIAZW5P/BpUkRCBgR7oXiLtqeOtMXd2RYQgGR+45ErapoMcLvFykunVD5ENd7/oxi1 gTLHifXo/luBQ5+AvVIYK7Tkfcldn7h0AbfQwgpGKxc++d07HDCN+unpZcuBAhB2gKzR gy4h2lsYFUYFVBIWM0twcDOYm3RyFOgoHdIvbMNLzxIQuKLHm+IuuyUmMZKMK7/J9XjA o6Nx9FkpPz1A1Hm5ePL4xbHy3KtITvCGnWMeDitgdaOOc5Vw87QS6yyUhT19sKgKh3ss hnvkot020yxao4icKd+qFpILQlYhnu/cqMAv2GhrfL56vaP4akReRAw1dcHuGNybikuA KQ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vzot4kH11x84xOZ3HWmaZmqYvCEhe29TflfAXBz1fhE=; b=VqS0WHVQi12Eymi6jNzVNpOqZj3e7oQD6aEiMiHD2XN2v0rJ39V6JmenKpS5diQt7z MOxnywNo8tUEYGl9IqLymz8u6r4UibsIhWmt7FU7gKMGKennbNFx6dnmPrGBShexGmQY rjNYPrfd8QcGMV0JA6B6/lVtKsF+E60VSYa7pP78WmH0zbh4I45eG/5tz5p0AtDFMvv0 7dvEUJ3i7ei8NHmsQ2rpzBoWbRsx/f03MoGwTHWAEcAeKjsDUrHvIWy1UVDJXRrN5WB2 mmYZVrtqhQRCo5/Iddd8uO3DBdKB078P4lo/hBGX04Z3o9Q2uyRiuKkm3oW1RoDRFm/W N5dQ== X-Gm-Message-State: AMke39kiLQScA+VGJkWJIFSIX/Ecx7MhpGlakdMnBRWlxyHbRn6KqZIP+lzWz7Wi67Z2zQ== X-Received: by 10.28.236.79 with SMTP id k76mr4752517wmh.79.1487102849445; Tue, 14 Feb 2017 12:07:29 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:9533:a20:55f1:fb4b? (p200300C6EBDC400095330A2055F1FB4B.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:9533:a20:55f1:fb4b]) by smtp.googlemail.com with ESMTPSA id g6sm4730785wmc.30.2017.02.14.12.07.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 12:07:28 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 01/18] mmc: meson-gx: set segment host parameters To: Ulf Hansson , Kevin Hilman References: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: Date: Tue, 14 Feb 2017 21:05:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> 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 Setting the segment parameters boosted the read performance from 13 MB/s to 32 MB/s in my case. Default for segment size is only 4k (PAGE_SIZE). Signed-off-by: Heiner Kallweit --- drivers/mmc/host/meson-gx-mmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 5a959783..1ad66f84 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -118,6 +118,7 @@ #define SD_EMMC_CFG_RESP_TIMEOUT 256 /* in clock cycles */ #define SD_EMMC_CFG_CMD_GAP 16 /* in clock cycles */ #define MUX_CLK_NUM_PARENTS 2 +#define MESON_MMC_MAX_SEGS 512 struct meson_host { struct device *dev; @@ -789,8 +790,10 @@ static int meson_mmc_probe(struct platform_device *pdev) if (ret) goto free_host; + mmc->max_segs = MESON_MMC_MAX_SEGS; mmc->max_blk_count = CMD_CFG_LENGTH_MASK; mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; + mmc->max_seg_size = mmc->max_req_size; /* data bounce buffer */ host->bounce_buf_size = mmc->max_req_size;