From mboxrd@z Thu Jan 1 00:00:00 1970
From: Przemyslaw Marczak
Date: Mon, 30 Jun 2014 10:41:58 +0200
Subject: [U-Boot] [PATCH v3 06/11] arm:reset: call the reset_misc()
before the cpu reset
In-Reply-To: <53ADD203.2060305@myspectrum.nl>
References: <1402566394-23342-1-git-send-email-p.marczak@samsung.com>
<1403792137-3113-1-git-send-email-p.marczak@samsung.com>
<1403792137-3113-7-git-send-email-p.marczak@samsung.com>
<53AD3C10.9080604@samsung.com> <53AD56C8.8050007@samsung.com>
<53ADD203.2060305@myspectrum.nl>
Message-ID: <53B122D6.6060802@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
Hello Jeroen,
On 06/27/2014 10:20 PM, Jeroen Hofstee wrote:
> Hello Przemyslaw,
>
> On 27-06-14 13:34, Przemyslaw Marczak wrote:
>> On 06/27/2014 11:40 AM, Minkyu Kang wrote:
>>> Dear Przemyslaw Marczak,
>>>
>>> On 26/06/14 23:15, Przemyslaw Marczak wrote:
>>>> 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")));
>>>> +
> can you please use __weak here and provide a prototype, wherever it
> ends up in the end. It prevents 3 warnings and makes it type safe..
>
> Regards,
> Jeroen
Thanks, I will add the __weak prefix there.
The prototype of this new function is in file common.h,
so this is type safe.
I checked the compilation with options: -W and -pedantic
on two configs: trats and odroid, and there was no warnings about the
function reset_misc.
Thank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com