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: 9548963 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 6B2A2604E0 for ; Wed, 1 Feb 2017 06:50:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CACC27E3E for ; Wed, 1 Feb 2017 06:50:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5154B2841D; Wed, 1 Feb 2017 06:50:25 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2501927E3E for ; Wed, 1 Feb 2017 06:50:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cYokG-0004Rt-3Q; Wed, 01 Feb 2017 06:50:20 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYok7-00034z-HJ for linux-amlogic@lists.infradead.org; Wed, 01 Feb 2017 06:50:14 +0000 Received: by mail-wm0-x242.google.com with SMTP id c85so3600427wmi.1 for ; Tue, 31 Jan 2017 22:49:53 -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=LdYlZkkE/Xkz9sXOy6kmdS5W/uDNy/jpq/UI3pPs/JZs45zi8rSPaneEFISCIJFwbD RGnVd9+WX4eROjrpk1/9m9ggzI8ZF1ZMZqb4HHiCpLqPaONMKmk27j0u5HwhV4xKWKyN QGEW/+IJH6l2VB1Vb2GaZlyXmb7/lAQDcS8MlocWh/PmYTSdoszuGy8ZYCM95OGFBF0/ 2i/AgtBHCQQiW7nXXs/sopDqdvLNRb6nCPordY2mNMjo5JcwZhe5N+k/phitFVRfBI4S LBm6llBZyI6023FMo6YwBp6HBFumbdRJPLaQpVMELskItE/VNeKBN7qbRHiWUVUcZkul UZCw== X-Gm-Message-State: AIkVDXKN/CyKZswh2yfcuLVWThvI6aAVzcu/r7tHYZnQSIQeprw2Z47mVVj6gVoVMQ2kIA== 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> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170131_225011_812685_E3B018D0 X-CRM114-Status: UNSURE ( 7.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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 =