From patchwork Tue Aug 19 11:14:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 4741991 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8FC349F39D for ; Tue, 19 Aug 2014 11:14:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A87E3200E6 for ; Tue, 19 Aug 2014 11:14:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77A062015D for ; Tue, 19 Aug 2014 11:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbaHSLOY (ORCPT ); Tue, 19 Aug 2014 07:14:24 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35781 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbaHSLOW (ORCPT ); Tue, 19 Aug 2014 07:14:22 -0400 Received: by mail-pa0-f44.google.com with SMTP id eu11so9881233pac.17 for ; Tue, 19 Aug 2014 04:14:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rfv4FE4rVs/Isn7VaPRL/ZiDzl2ZrBv04VjiQi8hD/o=; b=PTopwOFnYsoDnndxC+XKVTapbox3DxYzJjfSyVQdN4GAsvOpx06oS8XcW/7p12HOcp wNsZyin9jEDFVrpTEt3BnfLkBvbPRrtcGbiSvvUhZKUMTDagrT9xERRsIjT3Q/FvewHW lRHkbCjHoEl1viKZi+r0/rf96lWw40Wz3SirzmWYmySwloVg2+iRI4BwCRloPB8Ewez+ O1E04TcYrH9z1Y2PuqCEOJ1uy+GiskEGOhjfwdFvfNEp7e1+z7GZyfFFjdWumCPLypoO c/aPa6MfeuBfSZuzh1SfYvkQXILDeeD8EAjItrjL8S71PGq5ssjRFm0/E52v4M4cTlgy L0dw== X-Gm-Message-State: ALoCoQmYvkhNDrRmzPkJXdT+VwhfZRMNNAlhZ0LbUjMQE2kwIIGhaod4AIDlCKjXLR8du1N94p4c X-Received: by 10.70.40.227 with SMTP id a3mr49337273pdl.36.1408446860230; Tue, 19 Aug 2014 04:14:20 -0700 (PDT) Received: from localhost.localdomain ([117.203.126.32]) by mx.google.com with ESMTPSA id f12sm68345516pat.23.2014.08.19.04.14.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Aug 2014 04:14:18 -0700 (PDT) From: Srinivas Kandagatla To: linux-mmc@vger.kernel.org Cc: Linus Walleij , Chris Ball , Ulf Hansson , Russell King , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2 1/4] mmc: mmci: Support any block sizes for ux500v2 and qcom variant Date: Tue, 19 Aug 2014 12:14:07 +0100 Message-Id: <1408446847-1604-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408446785-1399-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1408446785-1399-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ulf Hansson For the ux500v2 variant of the PL18x block, any block sizes are supported. This will make it possible to decrease data overhead for SDIO transfers. This patch is based on Ulf Hansson patch http://www.spinics.net/lists/linux-mmc/msg12160.html Signed-off-by: Srinivas Kandagatla enabled this support on qcom variant. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij --- drivers/mmc/host/mmci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index c11cb05..3089fba 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -77,6 +77,7 @@ static unsigned int fmax = 515633; * @qcom_fifo: enables qcom specific fifo pio read logic. * @reversed_irq_handling: handle data irq before cmd irq. * @qcom_dml: enables qcom specific dma glue for dma transfers. + * @any_blksize: true if block any sizes are supported */ struct variant_data { unsigned int clkreg; @@ -102,6 +103,7 @@ struct variant_data { bool qcom_fifo; bool reversed_irq_handling; bool qcom_dml; + bool any_blksize; }; static struct variant_data variant_arm = { @@ -194,6 +196,7 @@ static struct variant_data variant_ux500v2 = { .pwrreg_clkgate = true, .busy_detect = true, .pwrreg_nopower = true, + .any_blksize = true, }; static struct variant_data variant_qcom = { @@ -212,6 +215,7 @@ static struct variant_data variant_qcom = { .explicit_mclk_control = true, .qcom_fifo = true, .qcom_dml = true, + .any_blksize = true, }; static int mmci_card_busy(struct mmc_host *mmc) @@ -239,10 +243,11 @@ static int mmci_card_busy(struct mmc_host *mmc) static int mmci_validate_data(struct mmci_host *host, struct mmc_data *data) { + struct variant_data *variant = host->variant; + if (!data) return 0; - - if (!is_power_of_2(data->blksz)) { + if (!is_power_of_2(data->blksz) && !variant->any_blksize) { dev_err(mmc_dev(host->mmc), "unsupported block size (%d bytes)\n", data->blksz); return -EINVAL;