Skip to contentSkip to conversation

ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

PATCH Superseded Jens Scharsig 4 participants 6 messages Oct 29, 2011 – Oct 31, 2011

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

* re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

---
 include/configs/eb_cpux9k2.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/eb_cpux9k2.h +4 -0
index 4324172..e437f25 100644
@@ -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 */
 
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

Quoted 12 lines

* re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

---
 include/configs/eb_cpux9k2.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/eb_cpux9k2.h +0 -0
index 4324172..e437f25 100644

include/configs/eb_cpux9k2.h line 48

Quoted 9 lines
include/configs/eb_cpux9k2.h +3 -2
@@ -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

#2 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

Hi Jens, Marek,

Le 30/10/2011 00:47, Marek Vasut a ?crit :

Quoted 14 lines
Quoted 14 lines

* re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

---
  include/configs/eb_cpux9k2.h |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/eb_cpux9k2.h +0 -0
index 4324172..e437f25 100644
@@ -42,6 +42,10 @@
  #define CONFIG_BOARD_EARLY_INIT_F
 
Quoted 11 lines

include/configs/eb_cpux9k2.h line 50

Quoted 9 lines
include/configs/eb_cpux9k2.h +4 -2
  /*------------------------------------------------------------------------
--*/
+#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,

Signature · 1 line
Albert.
#3 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

Am 30.10.2011 11:32, schrieb Albert ARIBAUD:

Quoted 29 lines

Hi Jens, Marek,

Le 30/10/2011 00:47, Marek Vasut a ?crit :

Quoted 14 lines
Quoted 14 lines

* re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

---
   include/configs/eb_cpux9k2.h |    4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/eb_cpux9k2.h +0 -0
index 4324172..e437f25 100644
@@ -42,6 +42,10 @@
   #define CONFIG_BOARD_EARLY_INIT_F
 
Quoted 11 lines

include/configs/eb_cpux9k2.h line 50

Quoted 9 lines
include/configs/eb_cpux9k2.h +4 -2
   /*------------------------------------------------------------------------
--*/
+#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

Quoted 6 lines

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

#4 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

In reply to Marek Vasut

Dear Marek Vasut,

Quoted 10 lines · In message <[email protected]> you wrote:

include/configs/eb_cpux9k2.h line 50

Quoted 8 lines

/*------------------------------------------------------------------------
--*/ +#ifndef MACH_TYPE_EB_CPUX9K2

include/configs/eb_cpux9k2.h +3 -1
+#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

Signature · 5 lines
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
#5 lore raw

PATCH 1/1 ARM: re-introduce the MACH_TYPE_XXXXXX for EB_CPUX9K2 board

Quoted 6 lines

Dear Marek Vasut,

Quoted 3 lines · In message <[email protected]> you wrote:
Quoted 3 lines

/*--------------------------------------------------------------------
----

Quoted 7 lines
Quoted 7 lines

include/configs/eb_cpux9k2.h

Quoted 7 lines

--*/ +#ifndef MACH_TYPE_EB_CPUX9K2

include/configs/eb_cpux9k2.h +3 -1
+#define MACH_TYPE_EB_CPUX9K2           1977
+#endif
+/*--------------------------------------------------------------------
---- --*/ #define CONFIG_SYS_TEXT_BASE 		0x00000000
 
 #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load 

address */

Quoted 9 lines
Quoted 2 lines

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.