From patchwork Mon Mar 14 13:00:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Vinni X-Patchwork-Id: 633081 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2ED0ZqW021447 for ; Mon, 14 Mar 2011 13:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358Ab1CNNAb (ORCPT ); Mon, 14 Mar 2011 09:00:31 -0400 Received: from web161814.mail.bf1.yahoo.com ([98.139.210.164]:20770 "HELO web161814.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752966Ab1CNNAa (ORCPT ); Mon, 14 Mar 2011 09:00:30 -0400 Received: (qmail 39450 invoked by uid 60001); 14 Mar 2011 13:00:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1300107629; bh=qwbedHJguVStkXAO9VcnPuIJd3gwnklpMdxREs7HtsI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=mvXOXThSAxI3MA3HeabQ7+aXGk4q+xhmLXZglt3+/BXbhY7qtuL6ahAtlMlhd3Fc8mozTUcFHdQYkYusNzbdEfC5sHm55D1J5HlHedu1+8GjuO+fx0iXlm/5t6pxTBnkLOXxV6bNkl2IOER1Don0EOePEpl3haP/YTj0M+1Pd7w= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xGIEZKGnfFMgywIw6MwHZmEDGX6WNRIfFVXeBLDZgO6bsC2KBKDeveIqrbiDxJktyLbE7hiUTkmNl0zr9JTRm6HbDK42HJkMkH90ohXps7QqidZ6gvbPfy9GkMDbgxqc1BxNuUHNOaJPxz+QFwxh28iBxhg4SIHAWkFFybsOwbo=; Message-ID: <470477.34668.qm@web161814.mail.bf1.yahoo.com> X-YMail-OSG: MoEPD7gVM1nN3nbZv67JwNmX5VbcFG5Ve7eBaVdGA.HmlhF rEhluFJJ_nzoVrlSafaof310U8dyRPe2dbjzFl96BTIP7iXAiCvry2eNIlHf _8IL5obgO3G5WTqPRbdgbeU8skcSc5JqFJrtdSJ3aC2E41ga0A.uke_6..aC lIv2c5QVm1oYLzSrdd0OMu3fVdqD3qmQH4qdUFCAY00Lw0AHxuA933TVEmwY Eloj_tLHqEuqv2EhuqY96ATcRgwltPykRKCKMVXAngDRcwPwRMB9WpUfwFve irUu4E8fa9BLi7ysV.53DepS1kT6d4HBwHnWGvhZf0KXJrgYl Received: from [193.167.65.94] by web161814.mail.bf1.yahoo.com via HTTP; Mon, 14 Mar 2011 06:00:29 PDT X-Mailer: YahooMailRC/559 YahooMailWebService/0.8.109.295617 References: <1299530457-19904-1-git-send-email-mmvinni@yahoo.com> <20110312214348.GA312@pengutronix.de> <423716.64271.qm@web161805.mail.bf1.yahoo.com> <20110314101829.GB2206@pengutronix.de> Date: Mon, 14 Mar 2011 06:00:29 -0700 (PDT) From: Mikko Vinni Subject: Re: [PATCH resend] sdhci: work around broken dma boundary behaviour To: Wolfram Sang Cc: linux-mmc@vger.kernel.org In-Reply-To: <20110314101829.GB2206@pengutronix.de> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 14 Mar 2011 13:00:50 +0000 (UTC) --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -201,6 +201,9 @@ #define SDHCI_MAX_DIV_SPEC_200 256 #define SDHCI_MAX_DIV_SPEC_300 2046 +#define SDHCI_DEFAULT_BOUNDARY_SIZE (512 * 1024) +#define SDHCI_DEFAULT_BOUNDARY_ARG (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12) + struct sdhci_ops { #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS u32 (*read_l)(struct sdhci_host *host, int reg); --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -808,7 +808,8 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) sdhci_set_transfer_irqs(host); /* We do not handle DMA boundaries, so set it to max (512 KiB) */ - sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, data->blksz), SDHCI_BLOCK_SIZE); + sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG, + data->blksz), SDHCI_BLOCK_SIZE); sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT); }