Patchwork [U-Boot,v2] arm: get_sp() should always be compiled

login
register
mail settings
Submitter Po-Yu Chuang
Date Feb. 16, 2011, 8:54 a.m.
Message ID <1297846475-1772-1-git-send-email-ratbert.chuang@gmail.com>
Download mbox | patch
Permalink /patch/83345/
State Accepted
Commit 3a8a83e08d832dc14e715f046aaf0d010d36c523
Delegated to: Albert ARIBAUD
Headers show

Comments

Po-Yu Chuang - Feb. 16, 2011, 8:54 a.m.
From: Po-Yu Chuang <ratbert@faraday-tech.com>

get_sp() was incorrectly excluded if none of
  CONFIG_SETUP_MEMORY_TAGS
  CONFIG_CMDLINE_TAG
  CONFIG_INITRD_TAG
  CONFIG_SERIAL_TAG
  CONFIG_REVISION_TAG
were defined.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
v2:
rebase

 arch/arm/lib/bootm.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Albert ARIBAUD - Feb. 17, 2011, 12:44 p.m.
Hi,

Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>
> get_sp() was incorrectly excluded if none of
>    CONFIG_SETUP_MEMORY_TAGS
>    CONFIG_CMDLINE_TAG
>    CONFIG_INITRD_TAG
>    CONFIG_SERIAL_TAG
>    CONFIG_REVISION_TAG
> were defined.


Which board exactly requires this patch?

Amicalement,
Macpaul Lin - Feb. 17, 2011, 12:54 p.m.
Hi,

2011/2/17 Albert ARIBAUD <albert.aribaud@free.fr>:
> Hi,
>
> Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
>> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>>
>> get_sp() was incorrectly excluded if none of
>>    CONFIG_SETUP_MEMORY_TAGS
>>    CONFIG_CMDLINE_TAG
>>    CONFIG_INITRD_TAG
>>    CONFIG_SERIAL_TAG
>>    CONFIG_REVISION_TAG
>> were defined.
>
>
> Which board exactly requires this patch?
>

I think it is a320evb.
Albert ARIBAUD - Feb. 17, 2011, 5:23 p.m.
Le 17/02/2011 13:54, Macpaul Lin a écrit :
> Hi,
>
> 2011/2/17 Albert ARIBAUD<albert.aribaud@free.fr>:
>> Hi,
>>
>> Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
>>> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>>>
>>> get_sp() was incorrectly excluded if none of
>>>     CONFIG_SETUP_MEMORY_TAGS
>>>     CONFIG_CMDLINE_TAG
>>>     CONFIG_INITRD_TAG
>>>     CONFIG_SERIAL_TAG
>>>     CONFIG_REVISION_TAG
>>> were defined.
>>
>>
>> Which board exactly requires this patch?
>>
>
> I think it is a320evb.

Ok. This patch indeed removes the 'get_sp' error on this board's build, 
but as an FYI, it does not build anyway.

Amicalement,
Albert ARIBAUD - Feb. 17, 2011, 5:26 p.m.
Hi Po-Yu Chang,

Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>
> get_sp() was incorrectly excluded if none of
>    CONFIG_SETUP_MEMORY_TAGS
>    CONFIG_CMDLINE_TAG
>    CONFIG_INITRD_TAG
>    CONFIG_SERIAL_TAG
>    CONFIG_REVISION_TAG
> were defined.
>
> Signed-off-by: Po-Yu Chuang<ratbert@faraday-tech.com>
> ---
> v2:
> rebase

Applied, to u-boot-arm/master as it is actually an old patch submission 
and a bugfix.

Amicalement,
Po-Yu Chuang - Feb. 18, 2011, 5:42 a.m.
Hi Albert,

On Fri, Feb 18, 2011 at 1:23 AM, Albert ARIBAUD <albert.aribaud@free.fr> wrote:
> Le 17/02/2011 13:54, Macpaul Lin a écrit :
>> 2011/2/17 Albert ARIBAUD<albert.aribaud@free.fr>:
>>> Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
>>>> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>>>>
>>>> get_sp() was incorrectly excluded if none of
>>>>    CONFIG_SETUP_MEMORY_TAGS
>>>>    CONFIG_CMDLINE_TAG
>>>>    CONFIG_INITRD_TAG
>>>>    CONFIG_SERIAL_TAG
>>>>    CONFIG_REVISION_TAG
>>>> were defined.
>>>
>>> Which board exactly requires this patch?
>>
>> I think it is a320evb.
>
> Ok. This patch indeed removes the 'get_sp' error on this board's build, but
> as an FYI, it does not build anyway.

The following patches fix all the build errors of a320evb:
(Although it still won't work, its timer still need some fix.)

[PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
[PATCH v2 2/2] arm: a320: use new ftpmu010 API

best regards,
Po-Yu Chuang
Albert ARIBAUD - Feb. 18, 2011, 6:17 a.m.
Le 18/02/2011 06:42, Po-Yu Chuang a écrit :
> Hi Albert,
>
> On Fri, Feb 18, 2011 at 1:23 AM, Albert ARIBAUD<albert.aribaud@free.fr>  wrote:
>> Le 17/02/2011 13:54, Macpaul Lin a écrit :
>>> 2011/2/17 Albert ARIBAUD<albert.aribaud@free.fr>:
>>>> Le 16/02/2011 09:54, Po-Yu Chuang a écrit :
>>>>> From: Po-Yu Chuang<ratbert@faraday-tech.com>
>>>>>
>>>>> get_sp() was incorrectly excluded if none of
>>>>>     CONFIG_SETUP_MEMORY_TAGS
>>>>>     CONFIG_CMDLINE_TAG
>>>>>     CONFIG_INITRD_TAG
>>>>>     CONFIG_SERIAL_TAG
>>>>>     CONFIG_REVISION_TAG
>>>>> were defined.
>>>>
>>>> Which board exactly requires this patch?
>>>
>>> I think it is a320evb.
>>
>> Ok. This patch indeed removes the 'get_sp' error on this board's build, but
>> as an FYI, it does not build anyway.
>
> The following patches fix all the build errors of a320evb:
> (Although it still won't work, its timer still need some fix.)
>
> [PATCH v2 1/2] power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
> [PATCH v2 2/2] arm: a320: use new ftpmu010 API

Thanks. If these receive review soon, I'll include them in my next pull 
along with the ARM machine type update.

> best regards,
> Po-Yu Chuang

Amicalement,

Patch

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a1649ee..7734953 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -327,12 +327,12 @@  void setup_revision_tag(struct tag **in_params)
 }
 #endif  /* CONFIG_REVISION_TAG */
 
-
 static void setup_end_tag (bd_t *bd)
 {
 	params->hdr.tag = ATAG_NONE;
 	params->hdr.size = 0;
 }
+#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
 
 static ulong get_sp(void)
 {
@@ -341,5 +341,3 @@  static ulong get_sp(void)
 	asm("mov %0, sp" : "=r"(ret) : );
 	return ret;
 }
-
-#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */