From patchwork Wed Feb 1 06:49:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548945 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 EA08C60415 for ; Wed, 1 Feb 2017 06:49:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB68627E3E for ; Wed, 1 Feb 2017 06:49:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D04B12811C; Wed, 1 Feb 2017 06:49:54 +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 8D04027E3E for ; Wed, 1 Feb 2017 06:49:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751376AbdBAGtx (ORCPT ); Wed, 1 Feb 2017 01:49:53 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35251 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdBAGtx (ORCPT ); Wed, 1 Feb 2017 01:49:53 -0500 Received: by mail-wm0-f68.google.com with SMTP id u63so3591960wmu.2 for ; Tue, 31 Jan 2017 22:49:52 -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=NOQiTjp3vmeiP+aGBFfgUOKG/hYFVpNVzz22u1N53rY=; b=meuNop3oeX0/ZPlTanFDwHh1L/f3WGbQh2cLyy1wYQRm/vK46XvjjrZxPSZsHntHea tSkZHg0avDL1B8nVpTifxLrAf9d3o75PbwUCbgEGMDygn+8HW4fGN/drKBHIVd/DM1Tc NEww2o0FAxkR+hXe9GFQjDM8wy2li1wEBBkbrnrL8+n5brepr3nu4szXWshU6kg6ffjM HhFatNljDhhLJOqawdkAuPyad4nBnpD2kHr/eTElJsxctQLvlL83HWUs0rieuFA/l9Re 493ae+YEr10SfLxVEGC9yyqr71p44kNPo0Q3E6JD+IyM9FjzkBNWIjREFxqZDQ3vblU4 ozrw== 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=NOQiTjp3vmeiP+aGBFfgUOKG/hYFVpNVzz22u1N53rY=; b=IAzgpt3zUXQcg4HVp2mH1veq2LPgWgJ9Ud4WJ/RHsQz5sRvX1osZPJUtSC62+ScgE6 Z0I6zejOKOQlB4dPs7t3f4ZBsLGRHLypl6AM44GuZTE+lbD0BRYQcm3eKlcWt/Y/znew /TSXlEpZnl1DtXp2kW1vQf/TZnimHLNz4i0J4skENuKuFoZlNIwcUWhhVeqOf3fWGUka k96BqNmCs9b11fV/L/W9PrHm8TSSmtVbTiZOyNLkob2qBpNDzpSBgdmKSPHZ8NHgKNjO nW9+iFxJJMRAk7vDaiJrZkNjdV3qJMICcT6h/ykXcJLIobZa2SqqzvD0nYUvfL5RAcwF uGjg== X-Gm-Message-State: AIkVDXL9UbaIGTRLxuEDSpHPv8bjQfAg5bylBJJtOYnlznRBDevT29vTPaZI6VhhjJfQ7Q== X-Received: by 10.28.27.14 with SMTP id b14mr1314039wmb.82.1485931791731; Tue, 31 Jan 2017 22:49:51 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977? (p200300C6EBC56C00C4CBDAB7AB364977.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977]) by smtp.googlemail.com with ESMTPSA id 33sm32202730wrd.34.2017.01.31.22.49.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 22:49:51 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 6/9] mmc: meson-gx: set max block count and request size To: Ulf Hansson , Carlo Caione , Kevin Hilman References: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> Cc: linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Message-ID: Date: Wed, 1 Feb 2017 07:49:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <584e5061-d359-1436-05ee-3767a5a4b10f@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 So far max_blk_count isn't set what results in a default of value 8 to be used (PAGE_SIZE / block size). Block length field has 9 bits, so set max_blk_count to 2^9-1 = 511. In addition set max_req_size because max_blk_count is also limited by max_req_size / block_size. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Acked-by: Kevin Hilman --- v2: - added reviewed-by, tested-by, acked-by --- 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 0fba23d2..883263c5 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -781,6 +781,9 @@ static int meson_mmc_probe(struct platform_device *pdev) if (ret) goto free_host; + mmc->max_blk_count = CMD_CFG_LENGTH_MASK; + mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; + /* data bounce buffer */ host->bounce_buf_size = SZ_512K; host->bounce_buf =