[U-Boot] arm: jadecpu: Readd MACH_TYPE_JADECPU

Submitted by Matthias Weisser on Oct. 31, 2011, 7:26 a.m.

Details

Message ID 1320045986-3282-1-git-send-email-weisserm@arcor.de
State Superseded
Headers show

Commit Message

Matthias Weisser Oct. 31, 2011, 7:26 a.m.
MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board
config file.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
---
 board/syteco/jadecpu/jadecpu.c |    1 -
 include/configs/jadecpu.h      |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)

Comments

Igor Grinberg Oct. 31, 2011, 7:41 a.m.
On 10/31/11 09:26, Matthias Weisser wrote:
> MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board
> config file.
> 
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

> ---
>  board/syteco/jadecpu/jadecpu.c |    1 -
>  include/configs/jadecpu.h      |    6 ++++++
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/board/syteco/jadecpu/jadecpu.c b/board/syteco/jadecpu/jadecpu.c
> index 63a0d33..72288fe 100644
> --- a/board/syteco/jadecpu/jadecpu.c
> +++ b/board/syteco/jadecpu/jadecpu.c
> @@ -40,7 +40,6 @@ int board_init(void)
>  	writel(0x00000010, &ccnt->cmux_md);
>  
>  	gd->flags = 0;
> -	gd->bd->bi_arch_number = MACH_TYPE_JADECPU;
>  	gd->bd->bi_boot_params = PHYS_SDRAM + PHYS_SDRAM_SIZE - 0x10000;
>  
>  	icache_enable();
> diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h
> index a239efc..42cb858 100644
> --- a/include/configs/jadecpu.h
> +++ b/include/configs/jadecpu.h
> @@ -37,6 +37,12 @@
>  #define CONFIG_USE_ARCH_MEMCPY
>  #define CONFIG_USE_ARCH_MEMSET
>  
> +#ifndef MACH_TYPE_JADECPU
> +#define MACH_TYPE_JADECPU	2636
> +#endif
> +
> +#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
> +
>  /*
>   * Environment settings
>   */
Albert ARIBAUD Nov. 5, 2011, 10:49 a.m.
Hi Matthias,

Le 31/10/2011 08:26, Matthias Weisser a écrit :
> MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board
> config file.
>
> Signed-off-by: Matthias Weisser<weisserm@arcor.de>
> ---
>   board/syteco/jadecpu/jadecpu.c |    1 -
>   include/configs/jadecpu.h      |    6 ++++++
>   2 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/board/syteco/jadecpu/jadecpu.c b/board/syteco/jadecpu/jadecpu.c
> index 63a0d33..72288fe 100644
> --- a/board/syteco/jadecpu/jadecpu.c
> +++ b/board/syteco/jadecpu/jadecpu.c
> @@ -40,7 +40,6 @@ int board_init(void)
>   	writel(0x00000010,&ccnt->cmux_md);
>
>   	gd->flags = 0;
> -	gd->bd->bi_arch_number = MACH_TYPE_JADECPU;
>   	gd->bd->bi_boot_params = PHYS_SDRAM + PHYS_SDRAM_SIZE - 0x10000;
>
>   	icache_enable();
> diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h
> index a239efc..42cb858 100644
> --- a/include/configs/jadecpu.h
> +++ b/include/configs/jadecpu.h
> @@ -37,6 +37,12 @@
>   #define CONFIG_USE_ARCH_MEMCPY
>   #define CONFIG_USE_ARCH_MEMSET
>
> +#ifndef MACH_TYPE_JADECPU
> +#define MACH_TYPE_JADECPU	2636
> +#endif

NAK -- remove ifndef/endif around definition. This way, if/when mach 
type reappears in official mach-type.h, we will get a warning about your 
mach-type being defined twice.

> +#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
> +
>   /*
>    * Environment settings
>    */

Amicalement,
Wolfgang Denk Nov. 5, 2011, 1:26 p.m.
Dear Albert ARIBAUD,

In message <4EB514C7.9000503@aribaud.net> you wrote:
> 
> > +#ifndef MACH_TYPE_JADECPU
> > +#define MACH_TYPE_JADECPU	2636
> > +#endif
> 
> NAK -- remove ifndef/endif around definition. This way, if/when mach
> type reappears in official mach-type.h, we will get a warning about your
> mach-type being defined twice.

Note that you will only get a warning if a _different_ value get's
defined (``warning: "VAR" redefined'').  If both values are the same,
no warning will be raised.

Best regards,

Wolfgang Denk
Albert ARIBAUD Nov. 5, 2011, 2:09 p.m.
Le 05/11/2011 14:26, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4EB514C7.9000503@aribaud.net>  you wrote:
>>
>>> +#ifndef MACH_TYPE_JADECPU
>>> +#define MACH_TYPE_JADECPU	2636
>>> +#endif
>>
>> NAK -- remove ifndef/endif around definition. This way, if/when mach
>> type reappears in official mach-type.h, we will get a warning about your
>> mach-type being defined twice.
>
> Note that you will only get a warning if a _different_ value get's
> defined (``warning: "VAR" redefined'').  If both values are the same,
> no warning will be raised.

Hmm, correct. In order to catch the mach-type creeping back in 
mach-types.h, we'd need to define something like

	#define MACH_TYPE_JADECPU	(2636)

I'll post an ARM-global patch for this, but as it will obviously not be 
a bugfix, it'll wait until next merge window.

> Best regards,
>
> Wolfgang Denk

Amicalement,
Wolfgang Denk Nov. 5, 2011, 2:56 p.m.
Dear Albert ARIBAUD,

In message <4EB543AF.7010006@aribaud.net> you wrote:
>
> > Note that you will only get a warning if a _different_ value get's
> > defined (``warning: "VAR" redefined'').  If both values are the same,
> > no warning will be raised.
> 
> Hmm, correct. In order to catch the mach-type creeping back in 
> mach-types.h, we'd need to define something like
> 
> 	#define MACH_TYPE_JADECPU	(2636)
> 
> I'll post an ARM-global patch for this, but as it will obviously not be 
> a bugfix, it'll wait until next merge window.

Please save the effort.  Waht would it be good for?  As long as the
values are the same, it's OK anyway.  And if they should be different,
we get a bunch of warnings.

Best regards,

Wolfgang Denk
Albert ARIBAUD Nov. 5, 2011, 3:04 p.m.
Le 05/11/2011 15:56, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4EB543AF.7010006@aribaud.net>  you wrote:
>>
>>> Note that you will only get a warning if a _different_ value get's
>>> defined (``warning: "VAR" redefined'').  If both values are the same,
>>> no warning will be raised.
>>
>> Hmm, correct. In order to catch the mach-type creeping back in
>> mach-types.h, we'd need to define something like
>>
>> 	#define MACH_TYPE_JADECPU	(2636)
>>
>> I'll post an ARM-global patch for this, but as it will obviously not be
>> a bugfix, it'll wait until next merge window.
>
> Please save the effort.  Waht would it be good for?  As long as the
> values are the same, it's OK anyway.  And if they should be different,
> we get a bunch of warnings.

Just wanted to make sure we know when the temporary MACH_TYPE addition 
in the config header becomes obsolete. But then, I can also run a grep 
on include/configs/*.h whenever mach-types.h is updated.

> Best regards,
>
> Wolfgang Denk

Amicalement,

Patch hide | download patch | download mbox

diff --git a/board/syteco/jadecpu/jadecpu.c b/board/syteco/jadecpu/jadecpu.c
index 63a0d33..72288fe 100644
--- a/board/syteco/jadecpu/jadecpu.c
+++ b/board/syteco/jadecpu/jadecpu.c
@@ -40,7 +40,6 @@  int board_init(void)
 	writel(0x00000010, &ccnt->cmux_md);
 
 	gd->flags = 0;
-	gd->bd->bi_arch_number = MACH_TYPE_JADECPU;
 	gd->bd->bi_boot_params = PHYS_SDRAM + PHYS_SDRAM_SIZE - 0x10000;
 
 	icache_enable();
diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h
index a239efc..42cb858 100644
--- a/include/configs/jadecpu.h
+++ b/include/configs/jadecpu.h
@@ -37,6 +37,12 @@ 
 #define CONFIG_USE_ARCH_MEMCPY
 #define CONFIG_USE_ARCH_MEMSET
 
+#ifndef MACH_TYPE_JADECPU
+#define MACH_TYPE_JADECPU	2636
+#endif
+
+#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
+
 /*
  * Environment settings
  */