From patchwork Thu Sep 24 15:29:50 2015
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Przemyslaw Marczak
X-Patchwork-Id: 522393
X-Patchwork-Delegate: sjg@chromium.org
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 8FDEF1401F6
for ;
Fri, 25 Sep 2015 01:30:44 +1000 (AEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 2DA724B877;
Thu, 24 Sep 2015 17:30:41 +0200 (CEST)
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 mIdkMpqyG2be; Thu, 24 Sep 2015 17:30:40 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 8A4094B83D;
Thu, 24 Sep 2015 17:30:40 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 645CE4B83D
for ; Thu, 24 Sep 2015 17:30:36 +0200 (CEST)
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 IQvLr11tp1lF for ;
Thu, 24 Sep 2015 17:30:36 +0200 (CEST)
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 mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11]) by theia.denx.de (Postfix) with ESMTPS id 2D4174B829
for ; Thu, 24 Sep 2015 17:30:33 +0200 (CEST)
Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245])
by mailout1.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NV600INVTQVUL90@mailout1.w1.samsung.com> for
u-boot@lists.denx.de; Thu, 24 Sep 2015 16:30:31 +0100 (BST)
X-AuditID: cbfec7f5-f794b6d000001495-37-5604171715a8
Received: from eusync3.samsung.com ( [203.254.199.213])
by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 88.15.05269.71714065;
Thu, 24 Sep 2015 16:30:31 +0100 (BST)
Received: from AMDC1186.digital.local ([106.116.147.185])
by eusync3.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTPA id <0NV600AWETQQDQ70@eusync3.samsung.com>; Thu,
24 Sep 2015 16:30:31 +0100 (BST)
From: Przemyslaw Marczak
To: u-boot@lists.denx.de
Date: Thu, 24 Sep 2015 17:29:50 +0200
Message-id: <1443108590-16871-4-git-send-email-p.marczak@samsung.com>
X-Mailer: git-send-email 1.9.1
In-reply-to: <1443108590-16871-1-git-send-email-p.marczak@samsung.com>
References: <1443108590-16871-1-git-send-email-p.marczak@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFprOLMWRmVeSWpSXmKPExsVy+t/xq7ri4ixhBr194hY3frWxWrx5uJnR
ouNIC6PFjss3WCy+bdnGaHFjegurRdvqD6wWb/d2sjtweMxuuMjicfbODkaPf8fYPXqb37F5
9G1ZxRjAGsVlk5Kak1mWWqRvl8CVsWdXJ1PBTu6KaXe9Gxg3cXYxcnJICJhITG/dwQ5hi0lc
uLeerYuRi0NIYCmjxJyj7SwQTjOTxK4N88Gq2AQMJPZcOsMMYosISEj86r/KCGIzC/QxSbT+
NQCxhQWiJE5/fMcKYrMIqErMfvcErJdXwFXiQ2sXG8Q2OYmTxyaD1XAKuEn8vPsdaA4H0DJX
ieYGpwmMvAsYGVYxiqaWJhcUJ6XnGukVJ+YWl+al6yXn525ihATX1x2MS49ZHWIU4GBU4uGd
qcMcJsSaWFZcmXuIUYKDWUmE94AIS5gQb0piZVVqUX58UWlOavEhRmkOFiVx3pm73ocICaQn
lqRmp6YWpBbBZJk4OKUaGBurt/rV2ExQmiS8NGNO98J/Lycu3yp26iU32/tFwg8SxSzdgzIa
Hi+53xn0ctnS4wvfLziVdlCzpTeJ+eGEL4YTVQ9piXV2ci7ssJeN0W789vWN66X9i2bltFsn
++5neMjQJXi6KZMlVFVm2T7+qVFu0hO+Rt29JquifPhTw7SomJnPg4NZUpRYijMSDbWYi4oT
Af8QqnMqAgAA
Cc: Stephen Warren ,
Jaehoon Chung , tjakobi@math.uni-bielefeld.de,
Przemyslaw Marczak
Subject: [U-Boot] [PATCH 3/3] fix: mach-exynos: clock: restore calling dead
exynos4_get_mmc_clk()
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: U-Boot discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot"
After rework of code by commit:
commit d95279685bb9690a6973226a3bd8a3bae65c2ad7
Author: Akshay Saraswat
Date: Wed Feb 4 16:00:03 2015 +0530
function get_mmc_clk() always returns -1 for Exynos 4.
This was caused by omitting, that SDHCI driver for Exynos 4,
calls get_mmc_clk(), with mmc device number as argument,
instead of pinmux peripheral id, like DW MMC driver for Exynos 5.
By this commit, the code directly calls a proper function
to get mmc clock for Exynos 4, without checking the peripheral id.
Signed-off-by: Przemyslaw Marczak
---
arch/arm/mach-exynos/clock.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
index 1c6baa1..18eadf5 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -1661,6 +1661,9 @@ unsigned long get_mmc_clk(int dev_index)
{
enum periph_id id;
+ if (cpu_is_exynos4())
+ return exynos4_get_mmc_clk(dev_index);
+
switch (dev_index) {
case 0:
id = PERIPH_ID_SDMMC0;
@@ -1679,12 +1682,7 @@ unsigned long get_mmc_clk(int dev_index)
return -1;
}
- if (cpu_is_exynos5())
- return clock_get_periph_rate(id);
- else if (cpu_is_exynos4())
- return exynos4_get_mmc_clk(dev_index);
-
- return 0;
+ return clock_get_periph_rate(id);
}
void set_mmc_clk(int dev_index, unsigned int div)