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: 87901 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 78F6FB6F73 for ; Tue, 22 Mar 2011 22:53:41 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CBB4280D5; Tue, 22 Mar 2011 12:53:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gsVCj5jn-YuB; Tue, 22 Mar 2011 12:53:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4927D280D7; Tue, 22 Mar 2011 12:53:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3DE29280D7 for ; Tue, 22 Mar 2011 12:53:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JJ4eaVK+BSCW for ; Tue, 22 Mar 2011 12:53:33 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 078C0280D5 for ; Tue, 22 Mar 2011 12:53:31 +0100 (CET) Received: from epmmp2 (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LIG00MCVJP4SQ40@mailout2.samsung.com> for u-boot@lists.denx.de; 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> for u-boot@lists.denx.de; Tue, 22 Mar 2011 20:53:28 +0900 (KST) Date: Tue, 22 Mar 2011 17:10:50 +0530 From: Chander Kashyap To: u-boot@lists.denx.de Message-id: <1300794050-5170-1-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.1 Cc: mk7.kang@samsung.com, bjlee@samsung.com, patches@linaro.org Subject: [U-Boot] [PATCH] S5P: mmc: Resolved interrupt error during mmc_init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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); }