From patchwork Thu Jun 26 14:15:32 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Przemyslaw Marczak
X-Patchwork-Id: 364556
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 B5CB91400F4
for ;
Fri, 27 Jun 2014 00:18:02 +1000 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id D6F72A7719;
Thu, 26 Jun 2014 16:17:35 +0200 (CEST)
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 FuOqAQglUBGQ; Thu, 26 Jun 2014 16:17:35 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 98A87A774D;
Thu, 26 Jun 2014 16:16:22 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 2DF39A7716
for ; Thu, 26 Jun 2014 16:16:13 +0200 (CEST)
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 bGO5DiVC7Kzt for ;
Thu, 26 Jun 2014 16:16:12 +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 71FD0A771F
for ; Thu, 26 Jun 2014 16:15:59 +0200 (CEST)
Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245])
by mailout1.w1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0N7S0027L4YE5IC0@mailout1.w1.samsung.com>
for u-boot@lists.denx.de; Thu, 26 Jun 2014 15:15:50 +0100 (BST)
X-AuditID: cbfec7f5-b7f626d000004b39-27-53ac2b1a0722
Received: from eusync2.samsung.com ( [203.254.199.212])
by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id DB.7C.19257.A1B2CA35;
Thu, 26 Jun 2014 15:15:54 +0100 (BST)
Received: from AMDC1186.digital.local ([106.116.147.185])
by eusync2.samsung.com
(Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit
(built Aug
10 2011)) with ESMTPA id <0N7S00E7W4YB8V60@eusync2.samsung.com>; Thu,
26 Jun 2014 15:15:54 +0100 (BST)
From: Przemyslaw Marczak
To: u-boot@lists.denx.de
Date: Thu, 26 Jun 2014 16:15:32 +0200
Message-id: <1403792137-3113-7-git-send-email-p.marczak@samsung.com>
X-Mailer: git-send-email 1.9.1
In-reply-to: <1403792137-3113-1-git-send-email-p.marczak@samsung.com>
References: <1402566394-23342-1-git-send-email-p.marczak@samsung.com>
<1403792137-3113-1-git-send-email-p.marczak@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFmplluLIzCtJLcpLzFFi42I5/e/4FV0p7TXBBpefmFl8WniC1WLX3/uM
Fjd+tbFavHm4mdGi40gLo8WOyzdYLNY9Wctqse7hCyaLyYvnM1u83dvJ7sDl8eHoNTaPVxfu
sHicvbOD0aNvyypGj+M3tjMFsEZx2aSk5mSWpRbp2yVwZRxdLVmwnK/iyZ2fbA2MF7i7GDk4
JARMJBa2SHQxcgKZYhIX7q1nA7GFBJYySky+ydTFyAVk9zFJtF+8zASSYBMwkNhz6QwziC0i
ICHxq/8qI0gRs8APJolt776zgiSEBfwlLh39wA5iswioShw+9BTM5hVwkXh+/hArxDY5iZPH
JoPZnAKuEtt2nmOF2NbAKPHkyi7WCYy8CxgZVjGKppYmFxQnpeca6RUn5haX5qXrJefnbmKE
BN3XHYxLj1kdYhTgYFTi4T0RtjpYiDWxrLgy9xCjBAezkgjvMak1wUK8KYmVValF+fFFpTmp
xYcYmTg4pRoYE5o0ry1TPrFch7tg7vGEoBNJqscUexX6u7Keek8PaHkq8FBI5NufrAti99RP
bBFhEN8/oU1nm69V5eSzxy8dfnqv/dy9OQefzXT4XHI6u92XL/6CXugFiV1/7pXbRs99rj37
w1N9EQ6lmPKI5s+yzGuuXz3FWn2xwvliYuiC7CCjzMA77FMPKrEUZyQaajEXFScCABfk1TsY AgAA
Cc: Piotr Wilczek ,
Jaehoon Chung ,
Przemyslaw Marczak , Tom Rini
Subject: [U-Boot] [PATCH v3 06/11] arm:reset: call the reset_misc() before
the cpu reset
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.11
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
On an Odroid U3 board, the SOC is unable to reset the eMMC card
in the DWMMC mode by the cpu software reset. Manual reset of the card
by switching proper gpio pin - fixes this issue.
Such solution needs to add a call to pre reset function.
This is done by the reset_misc() function, which is called before reset_cpu().
The function reset_misc() is a weak function.
Signed-off-by: Przemyslaw Marczak
Cc: Minkyu Kang
Cc: Jean-Christophe PLAGNIOL-VILLARD
Cc: Albert ARIBAUD
Cc: Tom Rini
---
arch/arm/lib/reset.c | 7 +++++++
include/common.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 7a03580..3b39466 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -23,6 +23,11 @@
#include
+void __reset_misc(void) {}
+
+void reset_misc(void)
+ __attribute((weak, alias("__reset_misc")));
+
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
puts ("resetting ...\n");
@@ -30,6 +35,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
udelay (50000); /* wait 50 ms */
disable_interrupts();
+
+ reset_misc();
reset_cpu(0);
/*NOTREACHED*/
diff --git a/include/common.h b/include/common.h
index 232136c..04bab78 100644
--- a/include/common.h
+++ b/include/common.h
@@ -629,6 +629,7 @@ int checkicache (void);
int checkdcache (void);
void upmconfig (unsigned int, unsigned int *, unsigned int);
ulong get_tbclk (void);
+void reset_misc (void);
void reset_cpu (ulong addr);
#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
void ft_cpu_setup(void *blob, bd_t *bd);