From patchwork Tue Mar 22 11:40:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 722 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:11 -0000 Delivered-To: patches@linaro.org Received: by 10.204.113.5 with SMTP id y5cs101476bkp; Tue, 22 Mar 2011 04:53:31 -0700 (PDT) Received: by 10.236.63.231 with SMTP id a67mr6937134yhd.98.1300794810544; Tue, 22 Mar 2011 04:53:30 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by mx.google.com with ESMTP id x5si1465468yhc.248.2011.03.22.04.53.29; Tue, 22 Mar 2011 04:53:30 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.33 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.33 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) smtp.mail=chander.kashyap@linaro.org Received: from epmmp2 (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LIG00EJSJP4E040@mailout3.samsung.com>; Tue, 22 Mar 2011 20:53:28 +0900 (KST) Received: from Linaro.sisodomain.com ([107.108.215.143]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LIG007GGJOQJR@mmp2.samsung.com>; Tue, 22 Mar 2011 20:53:28 +0900 (KST) Date: Tue, 22 Mar 2011 17:10:50 +0530 From: Chander Kashyap Subject: [PATCH] S5P: mmc: Resolved interrupt error during mmc_init To: u-boot@lists.denx.de Cc: mk7.kang@samsung.com, bjlee@samsung.com, angus.ainslie@linaro.org, patches@linaro.org Message-id: <1300794050-5170-1-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.1 Content-transfer-encoding: 7BIT Blocksize was hardcoded to 512 bytes. But the blocksize varies depeding on various mmc subsystem commands (between 8 and 512). This hardcoding was resulting in interrupt error during data transfer. It is now calculated based upon the request sent by mmc subsystem. Signed-off-by: Chander Kashyap --- drivers/mmc/s5p_mmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c index 195b5be..0323800 100644 --- a/drivers/mmc/s5p_mmc.c +++ b/drivers/mmc/s5p_mmc.c @@ -51,7 +51,7 @@ static void mmc_prepare_data(struct mmc_host *host, struct mmc_data *data) writeb(ctrl, &host->reg->hostctl); /* We do not handle DMA boundaries, so set it to max (512 KiB) */ - writew((7 << 12) | (512 << 0), &host->reg->blksize); + writew((7 << 12) | (data->blocksize & 0xFFF), &host->reg->blksize); writew(data->blocks, &host->reg->blkcnt); }