Skip to contentSkip to conversation

arm: jadecpu: Readd MACH_TYPE_JADECPU

PATCH Superseded Matthias Weisser 4 participants 9 messages Oct 31, 2011 – Nov 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board config file.

---
 board/syteco/jadecpu/jadecpu.c |    1 -
 include/configs/jadecpu.h      |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)
board/syteco/jadecpu/jadecpu.c +0 -1
index 63a0d33..72288fe 100644
@@ -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();
include/configs/jadecpu.h +6 -0
index a239efc..42cb858 100644
@@ -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
  */
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Quoted 4 lines · Matthias Weisser

MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board config file.

Quoted 34 lines
---
 board/syteco/jadecpu/jadecpu.c |    1 -
 include/configs/jadecpu.h      |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)
board/syteco/jadecpu/jadecpu.c +0 -1
index 63a0d33..72288fe 100644
@@ -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();
include/configs/jadecpu.h +6 -0
index a239efc..42cb858 100644
@@ -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
  */
Signature · 2 lines
Regards,
Igor.
#2 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

In reply to Matthias Weisser

Hi Matthias,

Le 31/10/2011 08:26, Matthias Weisser a ?crit :

Quoted 26 lines

MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board config file.

---
  board/syteco/jadecpu/jadecpu.c |    1 -
  include/configs/jadecpu.h      |    6 ++++++
  2 files changed, 6 insertions(+), 1 deletions(-)
board/syteco/jadecpu/jadecpu.c +0 -1
index 63a0d33..72288fe 100644
@@ -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();
include/configs/jadecpu.h +0 -0
index a239efc..42cb858 100644

include/configs/jadecpu.h line 42

Quoted 6 lines
include/configs/jadecpu.h +3 -0
@@ -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.

include/configs/jadecpu.h line 48

Quoted 5 lines
include/configs/jadecpu.h +2 -0
+#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
+
  /*
   * Environment settings
   */

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Dear Albert ARIBAUD,

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

include/configs/jadecpu.h line 42

Quoted 4 lines
include/configs/jadecpu.h +3 -0
+#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

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
If the facts don't fit the theory, change the facts.
                                                   -- Albert Einstein
#4 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Le 05/11/2011 14:26, Wolfgang Denk a ?crit :

Quoted 12 lines

Dear Albert ARIBAUD,

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

include/configs/jadecpu.h line 42

Quoted 4 lines
include/configs/jadecpu.h +3 -0
+#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.

Quoted 3 lines

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.

Quoted 3 lines

Best regards,

Wolfgang Denk

Amicalement,

Signature · 1 line
Albert.
#5 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Dear Albert ARIBAUD,

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

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.

Quoted 7 lines

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

Signature · 6 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
I am pleased to see that we have differences.  May we together become
greater than the sum of both of us.
	-- Surak of Vulcan, "The Savage Curtain", stardate 5906.4
#6 lore raw

PATCH 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Le 05/11/2011 15:56, Wolfgang Denk a ?crit :

Quoted 11 lines

Dear Albert ARIBAUD,

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

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

Quoted 8 lines
Quoted 4 lines
	#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.

Quoted 3 lines

Best regards,

Wolfgang Denk

Amicalement,

Signature · 1 line
Albert.
#7 lore raw

PATCH v2 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

In reply to Matthias Weisser

MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board config file.

---
Changes in V2:
Removed ifdef around MACH_TYPE

 board/syteco/jadecpu/jadecpu.c |    1 -
 include/configs/jadecpu.h      |    6 ++++++
 2 files changed, 6 insertions(+), 1 deletions(-)
board/syteco/jadecpu/jadecpu.c +0 -1
index 63a0d33..72288fe 100644
@@ -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();
include/configs/jadecpu.h +4 -0
index a239efc..42cb858 100644
@@ -37,6 +37,10 @@
 #define CONFIG_USE_ARCH_MEMCPY
 #define CONFIG_USE_ARCH_MEMSET
 
+#define MACH_TYPE_JADECPU	2636
+
+#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
+
 /*
  * Environment settings
  */
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH v2 1/1 arm: jadecpu: Readd MACH_TYPE_JADECPU

Hi Matthias,

Le 05/11/2011 13:15, Matthias Weisser a ?crit :

Quoted 29 lines

MACH_TYPE_JADECPU was removed from mach-types.h. Add it to board config file.

---
Changes in V2:
Removed ifdef around MACH_TYPE

  board/syteco/jadecpu/jadecpu.c |    1 -
  include/configs/jadecpu.h      |    6 ++++++
  2 files changed, 6 insertions(+), 1 deletions(-)
board/syteco/jadecpu/jadecpu.c +0 -1
index 63a0d33..72288fe 100644
@@ -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();
include/configs/jadecpu.h +0 -0
index a239efc..42cb858 100644

include/configs/jadecpu.h line 46

Quoted 10 lines
include/configs/jadecpu.h +4 -0
@@ -37,6 +37,10 @@
  #define CONFIG_USE_ARCH_MEMCPY
  #define CONFIG_USE_ARCH_MEMSET
 
+#define MACH_TYPE_JADECPU	2636
+
+#define CONFIG_MACH_TYPE MACH_TYPE_JADECPU
+
  /*
   * Environment settings
   */

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.