From patchwork Sat Jan 28 08:25:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9543037 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 0A516604A0 for ; Sat, 28 Jan 2017 08:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3734282F5 for ; Sat, 28 Jan 2017 08:27:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E83AF28306; Sat, 28 Jan 2017 08:27:20 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, 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 B1F3D282F5 for ; Sat, 28 Jan 2017 08:27:20 +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 1cXOLp-00051h-PA; Sat, 28 Jan 2017 08:27:13 +0000 Received: from mail-wm0-f68.google.com ([74.125.82.68]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cXOLl-000519-Sh; Sat, 28 Jan 2017 08:27:11 +0000 Received: by mail-wm0-f68.google.com with SMTP id c85so63251624wmi.1; Sat, 28 Jan 2017 00:26:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=puJX41wVv5l2irNPTsKOfZ9Oe9hTTrw5abjp7yspvFo=; b=cUHuoi2QtCLWDaElDCjUMQbu6WXSl2ufmTiuZsS50rVHVGyenul14jSnNcaXSoIjev kF3gOUEuYU4eW9QaETSLgnxQu3JMZbFFVyLMzlWWHRl1SWkp3xMdIZvsAUxy4sAxiwhS YPVfDhcZqnDGzG7NpvWkH6IB3X2eO53FVxVsB67QJZVJ6tlJQGxVjNiO3SxhNjN74j6p iczoD2vi6l7D+9R+0c6xfa1nm1NlDlcY1UN/VnvT01bUuX0qgDmFgMKoYiS6+JtdeKFj BtxaMWOQVA6mfSDX4b2qZ0Qwr73WP5oYlBLFl9vUPcnSEPNTl/sgZWHap4DWymBUQIjb vOQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=puJX41wVv5l2irNPTsKOfZ9Oe9hTTrw5abjp7yspvFo=; b=iECol43YVeB8bifDvde0y79ZplM66VALFtZR4u2E36fINujQAJ+BAsqgKZ5mMCGTHJ tFOYrKPtZJhotEO5KgHL9x/huY1nk/hbPRIPObIXt3jbl9Pbl1iIRaCvevXfh7SbzWHJ WZ5soGqfSLvqQS4LuKZC6KC1+Dv1l+gaoZ53vyF0SJ/Ad/4PAfhskne2CaQaFERFifrJ T6uBqDfmyCN37bIEGRi1OvzSLmkVoiZzOX2xcGJvMzitiET09aowPBlW4P2cmMP1lDlB 6uHT2M0TUencfT0np76tfmXRZns6gB2QKtthEIFdX+VbHmNbhCDsbb5dozzYkUNLjjxL YwEw== X-Gm-Message-State: AIkVDXKRYeCC8/GGYLI7QhTk1RlmIzBlkuyBFutckNp7PA1EqeHrVFI+Lb+uYvKoHJWkrQ== X-Received: by 10.223.168.87 with SMTP id l81mr13034619wrc.194.1485591947439; Sat, 28 Jan 2017 00:25:47 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:45f2:4915:150a:1788? (p200300C6EBC56C0045F24915150A1788.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:45f2:4915:150a:1788]) by smtp.googlemail.com with ESMTPSA id m188sm6436417wma.0.2017.01.28.00.25.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jan 2017 00:25:46 -0800 (PST) To: Ulf Hansson , Kevin Hilman , Carlo Caione From: Heiner Kallweit Subject: [PATCH v2] mmc: meson-gx: set max block count Message-ID: <0309625d-e24b-13e1-bba7-ada6b5a202c1@gmail.com> Date: Sat, 28 Jan 2017 09:25:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170128_002710_111174_564D71BC X-CRM114-Status: UNSURE ( 6.65 ) 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-arm-kernel@lists.infradead.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). Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- v2: - 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 --- drivers/mmc/host/meson-gx-mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 83361f1f..d4d174ed 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -810,6 +810,8 @@ static int meson_mmc_probe(struct platform_device *pdev) goto free_host; } + mmc->max_blk_count = CMD_CFG_LENGTH_MASK; + mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size; mmc->ops = &meson_mmc_ops; mmc_add_host(mmc);