From patchwork Wed Jul 2 11:50:09 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Przemyslaw Marczak
X-Patchwork-Id: 366335
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 C52A914009B
for ;
Wed, 2 Jul 2014 21:53:23 +1000 (EST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 53CB74B5FB;
Wed, 2 Jul 2014 13:52:22 +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 tshH3dChDRA6; Wed, 2 Jul 2014 13:52:21 +0200 (CEST)
Received: from theia.denx.de (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 7D3B54B61C;
Wed, 2 Jul 2014 13:51:15 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by theia.denx.de (Postfix) with ESMTP id 457884B5A8
for ; Wed, 2 Jul 2014 13:51:05 +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 M5Loyog9Osm3 for ;
Wed, 2 Jul 2014 13:51:03 +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 mailout3.w1.samsung.com (mailout3.w1.samsung.com
[210.118.77.13]) by theia.denx.de (Postfix) with ESMTPS id 11A004A033
for ; Wed, 2 Jul 2014 13:50:52 +0200 (CEST)
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout3.w1.samsung.com
(Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit
(built Nov
17 2011)) with ESMTP id <0N830051Y28KPU00@mailout3.w1.samsung.com>
for u-boot@lists.denx.de; Wed, 02 Jul 2014 12:50:44 +0100 (BST)
X-AuditID: cbfec7f4-b7fac6d000006cfe-28-53b3f214055b
Received: from eusync2.samsung.com ( [203.254.199.212])
by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 07.71.27902.412F3B35;
Wed, 02 Jul 2014 12:50:44 +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 <0N8300JK32873590@eusync2.samsung.com>; Wed,
02 Jul 2014 12:50:44 +0100 (BST)
From: Przemyslaw Marczak
To: u-boot@lists.denx.de
Date: Wed, 02 Jul 2014 13:50:09 +0200
Message-id: <1404301814-3657-8-git-send-email-p.marczak@samsung.com>
X-Mailer: git-send-email 1.9.1
In-reply-to: <1404301814-3657-1-git-send-email-p.marczak@samsung.com>
References: <1403792137-3113-1-git-send-email-p.marczak@samsung.com>
<1404301814-3657-1-git-send-email-p.marczak@samsung.com>
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFupjluLIzCtJLcpLzFFi42I5/e/4FV2RT5uDDe62mlp8WniC1WJ74zQ2
i11/7zNa3PjVxmrx5uFmRouOIy2MFjsu32CxWPdkLavFuocvmCwmL57PbPF2bye7A7fHh6PX
2DxeXbjD4nH2zg5Gj/1nxT36tqxi9Dh+YztTAFsUl01Kak5mWWqRvl0CV8bVxjaWgi18FU+u
PGRvYLzM3cXIySEhYCKxraGTFcIWk7hwbz1bFyMXh5DAUkaJq8t+gyWEBPqYJH5/VQOx2QQM
JPZcOsMMYosISEj86r/KCNLALLCYWWJr8wOwhLCAv8S8J9OYQGwWAVWJe/2PwQbxCrhI7Gve
xgSxTU7i5LHJYHFOAVeJqZ8fsHQxcgAtq5fYf9NiAiPvAkaGVYyiqaXJBcVJ6bmGesWJucWl
eel6yfm5mxghYfhlB+PiY1aHGAU4GJV4eBtXbAgWYk0sK67MPcQowcGsJMLbf2NzsBBvSmJl
VWpRfnxRaU5q8SFGJg5OqQbGcr10j3Rm51V/dZ+fvLdk1Yllh7IvPtypF+spszhtctwbMa0s
rqXFW7qXB4QZn8hs4Lvvvkm8N4Txv63cPr+qTcd1o5dkLp2se1CNZW4us6xVq2V7hM3lzjNP
fyrPqak/+bMi3E9hL0PSAl9mG7X9r6Ib9D7tOlMXt9hfbf2SJQtMo4942tcpsRRnJBpqMRcV
JwIARJs26SECAAA=
Cc: Piotr Wilczek ,
Jaehoon Chung ,
Przemyslaw Marczak , Tom Rini
Subject: [U-Boot] [PATCH v4 07/12] 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
Changes v4:
- arch/arm/reset: fix weak function attribute to proper style
---
arch/arm/lib/reset.c | 6 ++++++
include/common.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 7a03580..9a95f08 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -23,6 +23,10 @@
#include
+__weak void reset_misc(void)
+{
+}
+
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
puts ("resetting ...\n");
@@ -30,6 +34,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);