From patchwork Wed Dec 5 13:31:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amar X-Patchwork-Id: 13374 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9FFDE4C15B0 for ; Wed, 5 Dec 2012 13:10:51 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6E95AA199DE for ; Wed, 5 Dec 2012 13:10:50 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so7813384ieb.11 for ; Wed, 05 Dec 2012 05:10:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=3cuKqUfdnwPgXZwQze3aA0WBKbxmlwdpxogHeX2w16M=; b=jCgmgMA7LbUE4Qo5xKdgsKkeUsELtH/krqr/kJSHBJ5UmBt2JfXIl9nKqk1FTSu/Qf TAXZCOIDUeW7nIqzEstQQN0ChdvoKURfODj4jUhIguk+tryPzqPaZFUtn0tyiXDof72l Ls6GCeiBEZtTXV2MomCjZgy98eTbdIFV8YoZ2zQ4faPozgB2OF8yYs046NK3deAVtFCK 2iqg6rcR8EQakkXRWhtTtbMaPDQA9B6yQbkNQ5QOcBvUr3R9R7wLv6aHt5RyS8RkAetv 62CvDKL/2MkJjiPZTpHXeMYCRUmgpM2DAjQXptP/BI9m3kNcPGTuotlGLKGknMA8X7jl wBWg== Received: by 10.50.185.166 with SMTP id fd6mr1659033igc.62.1354713049679; Wed, 05 Dec 2012 05:10:49 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp338229igt; Wed, 5 Dec 2012 05:10:49 -0800 (PST) Received: by 10.68.194.6 with SMTP id hs6mr48787937pbc.77.1354713048900; Wed, 05 Dec 2012 05:10:48 -0800 (PST) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id tp3si6960852pbc.85.2012.12.05.05.10.48; Wed, 05 Dec 2012 05:10:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of amarendra.xt@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=amarendra.xt@samsung.com Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MEK00BND79YWG00@mailout2.samsung.com>; Wed, 05 Dec 2012 22:10:46 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 51.40.12699.6D74FB05; Wed, 05 Dec 2012 22:10:46 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-da-50bf47d62396 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 90.40.12699.6D74FB05; Wed, 05 Dec 2012 22:10:46 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MEK00BI176AKQA0@mmp1.samsung.com>; Wed, 05 Dec 2012 22:10:46 +0900 (KST) From: Amar To: u-boot@lists.denx.de, jh80.chung@samsung.com Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, afleming@gmail.com Subject: [PATCH 1/4] MMC: DWMMC: Modified fifo size computation Date: Wed, 05 Dec 2012 19:01:34 +0530 Message-id: <1354714297-11568-2-git-send-email-amarendra.xt@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1354714297-11568-1-git-send-email-amarendra.xt@samsung.com> References: <1354714297-11568-1-git-send-email-amarendra.xt@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsWyRsSkVvea+/4Ag8N9VhYP199ksZhy+AuL A5PHnWt72AIYo7hsUlJzMstSi/TtErgyFj6ewVxwn7WiZ/cFtgbGeyxdjJwcEgImErcX72eC sMUkLtxbz9bFyMUhJLCUUWJh32q4ot5lmxkhEosYJX6feMwC4bQzSfw72MDaxcjBwSagKvFr sT1Ig4iAgcT0J9vBwswCBRLPdouBhIUF7CX2bj7NCmKzAFVvnPOXHcTmFfCQWHFmHzPELgWJ 1mWHwOKcAp4SzXcfgtlCQDUHvlxkgugVkPg2+RALyHgJAVmJTQeYQa6RELjNJjHj6B5GiDmS EgdX3GCZwCi8gJFhFaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkZgMJ7+90x6B+OqBotDjAIc jEo8vBLG+wKEWBPLiitzDzFKcDArifDedN0fIMSbklhZlVqUH19UmpNafIjRB+iSicxSosn5 wEjJK4k3NDYxNzU2tTQyMjM1xSGsJM7b7JESICSQnliSmp2aWpBaBDOOiYNTqoFxZcjGK3wN Bhye13P4z8k7bErjZ5xxNj/9t1b/h517bQ5puidZSxx9W8W4rbFPxN3XckltS9kmsyln11zT ETu9RI3z7Cx+4b0TDvlsT8/PW3/gV0ERb8D0KKZegbenJj3jenRs0Z57ud2O39ayh5Vv/59Z edEiTP+ItdJziY+OW6vs9s+7IG+kxFKckWioxVxUnAgAi9jvxnMCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42I5/e+xgO419/0BBicbNS0err/JYjHl8BcW ByaPO9f2sAUwRjUw2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4 BOi6ZeYAzVZSKEvMKQUKBSQWFyvp22GaEBripmsB0xih6xsSBNdjZIAGEtYwZix8PIO54D5r Rc/uC2wNjPdYuhg5OSQETCR6l21mhLDFJC7cW8/WxcjFISSwiFHi94nHLBBOO5PEv4MNrF2M HBxsAqoSvxbbgzSICBhITH+yHSzMLFAg8Wy3GEhYWMBeYu/m06wgNgtQ9cY5f9lBbF4BD4kV Z/YxQ+xSkGhddggszingKdF89yGYLQRUc+DLRaYJjLwLGBlWMYqmFiQXFCel5xrpFSfmFpfm pesl5+duYgSH+jPpHYyrGiwOMQpwMCrx8EoY7wsQYk0sK67MPcQowcGsJMJ703V/gBBvSmJl VWpRfnxRaU5q8SFGH6CrJjJLiSbnA+MwryTe0NjE3NTY1NLEwsTMEoewkjhvs0dKgJBAemJJ anZqakFqEcw4Jg5OqQZGSZ68mi67ZfuCc/8usGGba6J+fffezU8dFfVb39atibDqiLL+IilX 9ss17ESM3coMy8WL/62/InpqplTprQdRl6tMXp17O1d9zlW++gsKhSkCgh+TI26u6r7z6NzZ 27OW3eObscB9snfJ6slBptuNjEw0VKJX2/r85rt1juNtzkGFw8+iF92ZoMRSnJFoqMVcVJwI AHn8J9yiAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQndOCNn309hXpD8DkE4SKjTEn942b5h4GevziRkUAjkUZ2ZzGQmX6vZpGOOkqtDV2r/QDWH The current implementation of fifo size computation was giving improper values for eMMC channel. Modified the computation as per user manual. Signed-off-by: Amarendra Reddy Acked-by: Jaehoon Chung --- drivers/mmc/dw_mmc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 4070d4e..62dc152 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -332,6 +332,8 @@ static int dwmci_init(struct mmc *mmc) dwmci_writel(host, DWMCI_BMOD, 1); fifo_size = dwmci_readl(host, DWMCI_FIFOTH); + fifo_size = ((fifo_size & RX_WMARK(0xFFF)) >> 16) + 1; + if (host->fifoth_val) fifoth_val = host->fifoth_val; else