Patchwork [3/4] Don't call idprom_init() on LEON

login
register
mail settings
Submitter Kristoffer Glembo
Date Dec. 1, 2009, 2:52 p.m.
Message ID <1259679176-29835-3-git-send-email-kristoffer@gaisler.com>
Download mbox | patch
Permalink /patch/39915/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Kristoffer Glembo - Dec. 1, 2009, 2:52 p.m.
LEON does not have an idprom and idprom_init prints 
some bogus info (e.g. incorrect Ethernet address).

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
 arch/sparc/kernel/setup_32.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Sam Ravnborg - Dec. 1, 2009, 6:21 p.m.
On Tue, Dec 01, 2009 at 03:52:55PM +0100, Kristoffer Glembo wrote:
> LEON does not have an idprom and idprom_init prints 
> some bogus info (e.g. incorrect Ethernet address).
> 
> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
> ---
>  arch/sparc/kernel/setup_32.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
> index 9be2af5..1d3cf56 100644
> --- a/arch/sparc/kernel/setup_32.c
> +++ b/arch/sparc/kernel/setup_32.c
> @@ -271,7 +271,10 @@ void __init setup_arch(char **cmdline_p)
>  #endif
>  	boot_flags_init(*cmdline_p);
>  
> +#ifndef CONFIG_SPARC_LEON
>  	idprom_init();
> +#endif
> +
>  	if (ARCH_SUN4C)
>  		sun4c_probe_vac();
>  	load_mmu();

I suggest to drop all idprom support in case of
leon and then use stub functions so you do not
need ifdef like above.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 1, 2009, 11:50 p.m.
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 1 Dec 2009 19:21:16 +0100

> On Tue, Dec 01, 2009 at 03:52:55PM +0100, Kristoffer Glembo wrote:
>> LEON does not have an idprom and idprom_init prints 
>> some bogus info (e.g. incorrect Ethernet address).
>> 
>> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
>> ---
>>  arch/sparc/kernel/setup_32.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
>> index 9be2af5..1d3cf56 100644
>> --- a/arch/sparc/kernel/setup_32.c
>> +++ b/arch/sparc/kernel/setup_32.c
>> @@ -271,7 +271,10 @@ void __init setup_arch(char **cmdline_p)
>>  #endif
>>  	boot_flags_init(*cmdline_p);
>>  
>> +#ifndef CONFIG_SPARC_LEON
>>  	idprom_init();
>> +#endif
>> +
>>  	if (ARCH_SUN4C)
>>  		sun4c_probe_vac();
>>  	load_mmu();
> 
> I suggest to drop all idprom support in case of
> leon and then use stub functions so you do not
> need ifdef like above.

Also, the idprom provides a default ethernet address for the
system.  It might be even better to just cons up a fake idprom
or similar.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index 9be2af5..1d3cf56 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -271,7 +271,10 @@  void __init setup_arch(char **cmdline_p)
 #endif
 	boot_flags_init(*cmdline_p);
 
+#ifndef CONFIG_SPARC_LEON
 	idprom_init();
+#endif
+
 	if (ARCH_SUN4C)
 		sun4c_probe_vac();
 	load_mmu();