public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
@ 2011-10-29 10:20 Jens Scharsig
  2011-10-29 22:47 ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Scharsig @ 2011-10-29 10:20 UTC (permalink / raw)
  To: u-boot


* re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
---
 include/configs/eb_cpux9k2.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h
index 4324172..e437f25 100644
--- a/include/configs/eb_cpux9k2.h
+++ b/include/configs/eb_cpux9k2.h
@@ -42,6 +42,10 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 
 /*--------------------------------------------------------------------------*/
+#ifndef MACH_TYPE_EB_CPUX9K2
+#define MACH_TYPE_EB_CPUX9K2           1977
+#endif
+/*--------------------------------------------------------------------------*/
 #define CONFIG_SYS_TEXT_BASE 		0x00000000
 #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
  2011-10-29 10:20 [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board Jens Scharsig
@ 2011-10-29 22:47 ` Marek Vasut
  2011-10-30 10:32   ` Albert ARIBAUD
  2011-10-30 13:12   ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Marek Vasut @ 2011-10-29 22:47 UTC (permalink / raw)
  To: u-boot

> * re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
> 
> Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
> ---
>  include/configs/eb_cpux9k2.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h
> index 4324172..e437f25 100644
> --- a/include/configs/eb_cpux9k2.h
> +++ b/include/configs/eb_cpux9k2.h
> @@ -42,6 +42,10 @@
>  #define CONFIG_BOARD_EARLY_INIT_F
> 
>  /*------------------------------------------------------------------------
> --*/ +#ifndef MACH_TYPE_EB_CPUX9K2
> +#define MACH_TYPE_EB_CPUX9K2           1977
> +#endif
> +/*------------------------------------------------------------------------
> --*/ #define CONFIG_SYS_TEXT_BASE 		0x00000000
>  #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */

You don't need the ifndef. Cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
  2011-10-29 22:47 ` Marek Vasut
@ 2011-10-30 10:32   ` Albert ARIBAUD
  2011-10-31  7:28     ` Jens Scharsig
  2011-10-30 13:12   ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Albert ARIBAUD @ 2011-10-30 10:32 UTC (permalink / raw)
  To: u-boot

Hi Jens, Marek,

Le 30/10/2011 00:47, Marek Vasut a ?crit :
>> * re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
>>
>> Signed-off-by: Jens Scharsig<js_at_ng@scharsoft.de>
>> ---
>>   include/configs/eb_cpux9k2.h |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h
>> index 4324172..e437f25 100644
>> --- a/include/configs/eb_cpux9k2.h
>> +++ b/include/configs/eb_cpux9k2.h
>> @@ -42,6 +42,10 @@
>>   #define CONFIG_BOARD_EARLY_INIT_F
>>
>>   /*------------------------------------------------------------------------
>> --*/
>> +#ifndef MACH_TYPE_EB_CPUX9K2
>> +#define MACH_TYPE_EB_CPUX9K2           1977
>> +#endif
>> +/*------------------------------------------------------------------------
>> --*/
>>   #define CONFIG_SYS_TEXT_BASE 		0x00000000
>>   #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */
>
> You don't need the ifndef. Cheers

I'd even say you need to not have them: this way, when the MACH_ID shows 
up eventually in machine-type, the preprocessor will emit a warning for 
the redefinition in the config file, thus letting us know it is time to 
remove the temporary MACH_TYPE there.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
  2011-10-29 22:47 ` Marek Vasut
  2011-10-30 10:32   ` Albert ARIBAUD
@ 2011-10-30 13:12   ` Wolfgang Denk
  2011-10-30 20:14     ` Marek Vasut
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-10-30 13:12 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201110300047.46696.marek.vasut@gmail.com> you wrote:
>
> >  /*------------------------------------------------------------------------
> > --*/ +#ifndef MACH_TYPE_EB_CPUX9K2
> > +#define MACH_TYPE_EB_CPUX9K2           1977
> > +#endif
> > +/*------------------------------------------------------------------------
> > --*/ #define CONFIG_SYS_TEXT_BASE 		0x00000000
> >  #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */
> 
> You don't need the ifndef. Cheers

But it doesn;t hurt either.  I consider it defensive programming, just
in case the #defined gets re-added to machtypes.h.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Unix is simple, but it takes a genius to understand the simplicity."
					             - Dennis Ritchie

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
  2011-10-30 13:12   ` Wolfgang Denk
@ 2011-10-30 20:14     ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2011-10-30 20:14 UTC (permalink / raw)
  To: u-boot

> Dear Marek Vasut,
> 
> In message <201110300047.46696.marek.vasut@gmail.com> you wrote:
> > >  /*--------------------------------------------------------------------
> > >  ----
> > > 
> > > --*/ +#ifndef MACH_TYPE_EB_CPUX9K2
> > > +#define MACH_TYPE_EB_CPUX9K2           1977
> > > +#endif
> > > +/*--------------------------------------------------------------------
> > > ---- --*/ #define CONFIG_SYS_TEXT_BASE 		0x00000000
> > > 
> > >  #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load 
address */
> > 
> > You don't need the ifndef. Cheers
> 
> But it doesn;t hurt either.  I consider it defensive programming, just
> in case the #defined gets re-added to machtypes.h.
> 
> Best regards,
> 
> Wolfgang Denk

Sure, but if the machine ID is re-added, we will get a warning in here without 
the ifdefs. With the ifdefs, the machine ID might be different here and in the 
mach-types file and it might slide unnoticed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
  2011-10-30 10:32   ` Albert ARIBAUD
@ 2011-10-31  7:28     ` Jens Scharsig
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Scharsig @ 2011-10-31  7:28 UTC (permalink / raw)
  To: u-boot

Am 30.10.2011 11:32, schrieb Albert ARIBAUD:
> Hi Jens, Marek,
>
> Le 30/10/2011 00:47, Marek Vasut a ?crit :
>>> * re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board
>>>
>>> Signed-off-by: Jens Scharsig<js_at_ng@scharsoft.de>
>>> ---
>>>    include/configs/eb_cpux9k2.h |    4 ++++
>>>    1 files changed, 4 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h
>>> index 4324172..e437f25 100644
>>> --- a/include/configs/eb_cpux9k2.h
>>> +++ b/include/configs/eb_cpux9k2.h
>>> @@ -42,6 +42,10 @@
>>>    #define CONFIG_BOARD_EARLY_INIT_F
>>>
>>>    /*------------------------------------------------------------------------
>>> --*/
>>> +#ifndef MACH_TYPE_EB_CPUX9K2
>>> +#define MACH_TYPE_EB_CPUX9K2           1977
>>> +#endif
>>> +/*------------------------------------------------------------------------
>>> --*/
>>>    #define CONFIG_SYS_TEXT_BASE 		0x00000000
>>>    #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */
>>
>> You don't need the ifndef. Cheers
>
> I'd even say you need to not have them: this way, when the MACH_ID shows
> up eventually in machine-type, the preprocessor will emit a warning for
> the redefinition in the config file, thus letting us know it is time to
> remove the temporary MACH_TYPE there.
>
> Amicalement,

Ok, I will send a straightforward variant as V2 patch

Regards

Jens

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-31  7:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 10:20 [U-Boot] [PATCH] ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board Jens Scharsig
2011-10-29 22:47 ` Marek Vasut
2011-10-30 10:32   ` Albert ARIBAUD
2011-10-31  7:28     ` Jens Scharsig
2011-10-30 13:12   ` Wolfgang Denk
2011-10-30 20:14     ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox