Skip to contentSkip to conversation

Use manifest constants from mach-types.h when setting bi_arch_number

PATCH New George G. Davis 2 participants 2 messages Aug 24, 2004 – Oct 10, 2004 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use manifest constants from mach-types.h when setting bi_arch_number

Greetings,

The attached patches update ARM boards to use manifest constants from mach-types.h when setting bi_arch_number. I've split this change into two patches. The first patch includes the bi_arch_number changes for all ARM boards which either have no disparity between machine numbers/names or I'm otherwise confident that the machine numbers/names are correct. The second patch includes updates for ARM boards which were either never registered or the machine number has changed since the board was first submitted.

N.B. Some of the boards in the second patch have "hijacked" the numbers
of other ARM machines. Owners of those boards should register their boards and obtain an official machine number here:

http://www.arm.linux.org.uk/developer/machines/?action=new

--
Regards,
George
-------------- next part --------------
* Patch by George G. Davis, 06 Jul 2004:
- update ARM boards to use manifest constants from mach-types.h when setting bi_arch_number

-------------- next part --------------
Index: u-boot/board/assabet/assabet.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/assabet/assabet.c,v retrieving revision 1.1

board/assabet/assabet.c +1 -1
diff -u -r1.1 assabet.c
@@ -101,7 +101,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	gd->bd->bi_arch_number = 25;	/* Intel Assabet Board */
+	gd->bd->bi_arch_number = MACH_TYPE_ASSABET;
 	gd->bd->bi_boot_params = 0xc0000100;
 
 	neponset_init();

Index: u-boot/board/at91rm9200dk/at91rm9200dk.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/at91rm9200dk/at91rm9200dk.c,v retrieving revision 1.5

board/at91rm9200dk/at91rm9200dk.c +1 -1
diff -u -r1.5 at91rm9200dk.c
@@ -45,7 +45,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of AT91RM9200DK-Board */
-	gd->bd->bi_arch_number = 251;
+	gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 

Index: u-boot/board/cerf250/cerf250.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/cerf250/cerf250.c,v retrieving revision 1.1

board/cerf250/cerf250.c +1 -1
diff -u -r1.1 cerf250.c
@@ -42,7 +42,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of cerf PXA Board */
-	gd->bd->bi_arch_number = 139;
+	gd->bd->bi_arch_number = MACH_TYPE_PXA_CERF;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;

Index: u-boot/board/csb226/csb226.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/csb226/csb226.c,v retrieving revision 1.6

board/csb226/csb226.c +1 -1
diff -u -r1.6 csb226.c
@@ -71,7 +71,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of CSB226 board */
-	gd->bd->bi_arch_number = 216;
+	gd->bd->bi_arch_number = MACH_TYPE_CSB226;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;

Index: u-boot/board/ep7312/ep7312.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/ep7312/ep7312.c,v retrieving revision 1.1.1.1

board/ep7312/ep7312.c +1 -1
diff -u -r1.1.1.1 ep7312.c
@@ -40,7 +40,7 @@
 	IO_LEDFLSH = 0x40;
 
 	/* arch number MACH_TYPE_EDB7312 */
-	gd->bd->bi_arch_number = 131;
+	gd->bd->bi_arch_number = MACH_TYPE_EDB7312;
 
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0xc0020100;

Index: u-boot/board/gcplus/gcplus.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/gcplus/gcplus.c,v retrieving revision 1.1

board/gcplus/gcplus.c +1 -1
diff -u -r1.1 gcplus.c
@@ -37,7 +37,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	gd->bd->bi_arch_number = 29;	/* ADS GraphicsClientPlus Board */
+	gd->bd->bi_arch_number = MACH_TYPE_GRAPHICSCLIENT;
 
 	gd->bd->bi_boot_params = 0xc000003c; /* Weird address? */
 

Index: u-boot/board/integratorap/integratorap.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/integratorap/integratorap.c,v retrieving revision 1.3

board/integratorap/integratorap.c +1 -1
diff -u -r1.3 integratorap.c
@@ -68,7 +68,7 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	/* arch number of Integrator Board */
-	gd->bd->bi_arch_number = 21;
+	gd->bd->bi_arch_number = MACH_TYPE_INTEGRATOR;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;

Index: u-boot/board/integratorcp/integratorcp.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/integratorcp/integratorcp.c,v retrieving revision 1.3

board/integratorcp/integratorcp.c +1 -1
diff -u -r1.3 integratorcp.c
@@ -64,7 +64,7 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	/* arch number of Integrator Board */
-	gd->bd->bi_arch_number = 275;
+	gd->bd->bi_arch_number = MACH_TYPE_CINTEGRATOR;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;

Index: u-boot/board/ixdp425/ixdp425.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/ixdp425/ixdp425.c,v retrieving revision 1.2

board/ixdp425/ixdp425.c +1 -1
diff -u -r1.2 ixdp425.c
@@ -54,7 +54,7 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	/* arch number of IXDP */
-	gd->bd->bi_arch_number = 245;
+	gd->bd->bi_arch_number = MACH_TYPE_IXDP425;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;

Index: u-boot/board/lart/lart.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/lart/lart.c,v retrieving revision 1.1.1.1

board/lart/lart.c +1 -1
diff -u -r1.1.1.1 lart.c
@@ -39,7 +39,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of LART-Board */
-	gd->bd->bi_arch_number = 27;
+	gd->bd->bi_arch_number = MACH_TYPE_LART;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;

Index: u-boot/board/lubbock/lubbock.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/lubbock/lubbock.c,v retrieving revision 1.4

board/lubbock/lubbock.c +1 -1
diff -u -r1.4 lubbock.c
@@ -42,7 +42,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of Lubbock-Board */
-	gd->bd->bi_arch_number = 89;
+	gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;

Index: u-boot/board/mpl/vcma9/vcma9.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/mpl/vcma9/vcma9.c,v retrieving revision 1.10

board/mpl/vcma9/vcma9.c +1 -1
diff -u -r1.10 vcma9.c
@@ -119,7 +119,7 @@
 	serial_init();
 
 	/* arch number of VCMA9-Board */
-	gd->bd->bi_arch_number = 227;
+	gd->bd->bi_arch_number = MACH_TYPE_MPL_VCMA9;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x30000100;

Index: u-boot/board/mx1ads/mx1ads.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/mx1ads/mx1ads.c,v retrieving revision 1.3

board/mx1ads/mx1ads.c +1 -1
diff -u -r1.3 mx1ads.c
@@ -114,7 +114,7 @@
 
 	SetAsynchMode();
 
-	gd->bd->bi_arch_number = 160;	/* Arch number of MX1ADS Board 		*/
+	gd->bd->bi_arch_number = MACH_TYPE_MX1ADS;
 
 	gd->bd->bi_boot_params = 0x08000100;	/* adress of boot parameters	*/
 

Index: u-boot/board/mx1fs2/mx1fs2.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/mx1fs2/mx1fs2.c,v retrieving revision 1.1

board/mx1fs2/mx1fs2.c +1 -1
diff -u -r1.1 mx1fs2.c
@@ -81,7 +81,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	gd->bd->bi_arch_number = 470;
+	gd->bd->bi_arch_number = MACH_TYPE_MX1FS2;
 	gd->bd->bi_boot_params = 0x08000100;
 serial_init();
 	logo_init();

Index: u-boot/board/omap1510inn/omap1510innovator.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/omap1510inn/omap1510innovator.c,v retrieving revision 1.1

board/omap1510inn/omap1510innovator.c +1 -1
diff -u -r1.1 omap1510innovator.c
@@ -50,7 +50,7 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	/* arch number of OMAP 1510-Board */
-	gd->bd->bi_arch_number = 234;
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP_INNOVATOR;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;

Index: u-boot/board/omap1610inn/omap1610innovator.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/omap1610inn/omap1610innovator.c,v retrieving revision 1.6

board/omap1610inn/omap1610innovator.c +0 -1
diff -u -r1.6 omap1610innovator.c
@@ -32,7 +32,6 @@
  */
 
 #include <common.h>
-#include <asm/mach-types.h>
 #if defined(CONFIG_OMAP1610)
 #include <./configs/omap1510.h>
 #endif

Index: u-boot/board/omap5912osk/omap5912osk.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/omap5912osk/omap5912osk.c,v retrieving revision 1.1

board/omap5912osk/omap5912osk.c +1 -3
diff -u -r1.1 omap5912osk.c
@@ -60,9 +60,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	/* arch number of OMAP 1510-Board */
-	/* to be changed for OMAP 1610 Board */
-	gd->bd->bi_arch_number = 234;
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP_OSK;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;

Index: u-boot/board/omap730p2/omap730p2.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/omap730p2/omap730p2.c,v retrieving revision 1.3

board/omap730p2/omap730p2.c +1 -1
diff -u -r1.3 omap730p2.c
@@ -87,7 +87,7 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	/* arch number of OMAP 730 P2 Board - Same as the Innovator! */
-	gd->bd->bi_arch_number = 491;
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP_PERSEUS2;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;

Index: u-boot/board/scb9328/scb9328.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/scb9328/scb9328.c,v retrieving revision 1.1

board/scb9328/scb9328.c +1 -1
diff -u -r1.1 scb9328.c
@@ -29,7 +29,7 @@
 int board_init( void ){
   DECLARE_GLOBAL_DATA_PTR;
 
-  gd->bd->bi_arch_number = 508;
+  gd->bd->bi_arch_number = MACH_TYPE_SCB9328;
   gd->bd->bi_boot_params = 0x08000100;
 
   return 0;

Index: u-boot/board/shannon/shannon.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/shannon/shannon.c,v retrieving revision 1.3

board/shannon/shannon.c +1 -1
diff -u -r1.3 shannon.c
@@ -63,7 +63,7 @@
 #endif /* CONFIG_INFERNO */
 
 	/* arch number for shannon */
-	gd->bd->bi_arch_number = 97;
+	gd->bd->bi_arch_number = MACH_TYPE_SHANNON;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;

Index: u-boot/board/smdk2400/smdk2400.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/smdk2400/smdk2400.c,v retrieving revision 1.2

board/smdk2400/smdk2400.c +1 -1
diff -u -r1.2 smdk2400.c
@@ -77,7 +77,7 @@
 	gpio->OPENCR = 0x0;
 
 	/* arch number of SAMSUNG-Board to MACH_TYPE_SMDK2400 */
-	gd->bd->bi_arch_number = 145;
+	gd->bd->bi_arch_number = MACH_TYPE_SMDK2400;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x0C000100;

Index: u-boot/board/smdk2410/smdk2410.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/smdk2410/smdk2410.c,v retrieving revision 1.2

board/smdk2410/smdk2410.c +1 -1
diff -u -r1.2 smdk2410.c
@@ -104,7 +104,7 @@
 	gpio->GPHUP = 0x000007FF;
 
 	/* arch number of SMDK2410-Board */
-	gd->bd->bi_arch_number = 193;
+	gd->bd->bi_arch_number = MACH_TYPE_SMDK2410;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x30000100;

Index: u-boot/board/versatile/versatile.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/versatile/versatile.c,v retrieving revision 1.3

board/versatile/versatile.c +1 -1
diff -u -r1.3 versatile.c
@@ -74,7 +74,7 @@
 	   (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel));
 
 	/* arch number of Versatile Board */
-	gd->bd->bi_arch_number = 387;
+	gd->bd->bi_arch_number = MACH_TYPE_VERSATILE_PB;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;

Index: u-boot/board/wepep250/wepep250.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/wepep250/wepep250.c,v retrieving revision 1.3

board/wepep250/wepep250.c +1 -1
diff -u -r1.3 wepep250.c
@@ -26,7 +26,7 @@
 int board_init( void ){
   DECLARE_GLOBAL_DATA_PTR;
 
-  gd->bd->bi_arch_number = 288;
+  gd->bd->bi_arch_number = MACH_TYPE_WEP_EP250;
   gd->bd->bi_boot_params = 0xa0000000;
 /*
  * Setup GPIO stuff to get serial working

Index: u-boot/board/xm250/xm250.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/xm250/xm250.c,v retrieving revision 1.1

board/xm250/xm250.c +1 -1
diff -u -r1.1 xm250.c
@@ -63,7 +63,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 	/* arch number of MicroSys XM250 */
-	gd->bd->bi_arch_number = 444;
+	gd->bd->bi_arch_number = MACH_TYPE_XM250;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;

Index: u-boot/board/xsengine/xsengine.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/xsengine/xsengine.c,v retrieving revision 1.1

board/xsengine/xsengine.c +1 -1
diff -u -r1.1 xsengine.c
@@ -39,7 +39,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number */
-	gd->bd->bi_arch_number = 532;
+	gd->bd->bi_arch_number = MACH_TYPE_XSENGINE;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;

Index: u-boot/include/common.h
===================================================================
RCS file: /cvsroot/u-boot/u-boot/include/common.h,v retrieving revision 1.45

include/common.h +1 -0
diff -u -r1.45 common.h
@@ -209,6 +209,7 @@
 void	setenv	     (char *, char *);
 #endif /* CONFIG_PPC */
 #ifdef CONFIG_ARM
+# include <asm/mach-types.h>
 # include <asm/setup.h>
 # include <asm/u-boot-arm.h>	/* ARM version to be fixed! */
 #endif /* CONFIG_ARM */

-------------- next part --------------

board/sx1/sx1.c +1 -0
@@ -45,6 +45,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
+#warning Please register your machine at http://www.arm.linux.org.uk/developer/machines/?action=new
 	/* arch number of SX1 Board */
 	gd->bd->bi_arch_number = 241;
 
board/ns9750dev/ns9750dev.c +1 -1
@@ -65,7 +65,7 @@
 	/* Active BBUS modules */
 	*get_bbus_reg_addr( NS9750_BBUS_MASTER_RESET ) = 0;
 
-#warning TODO check numbers
+#warning Please register your machine at http://www.arm.linux.org.uk/developer/machines/?action=new
 	/* arch number of OMAP 1510-Board */
 	/* to be changed for OMAP 1610 Board */
 	gd->bd->bi_arch_number = 234;
board/trab/trab.c +2 -2
@@ -57,7 +57,7 @@
 	int i;
 	int delay = usec * 3;
 
-	for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = 145;
+	for (i = 0; i < delay; i ++) gd->bd->bi_arch_number = MACH_TYPE_SMDK2400;
 }
 #endif /* CONFIG_MODEM_SUPPORT */
 
@@ -112,7 +112,7 @@
 	/* arch number of SAMSUNG-Board */
 	/* MACH_TYPE_SMDK2400 */
 	/* XXX this isn't really correct, but keep it for now */
-	gd->bd->bi_arch_number = 145;
+	gd->bd->bi_arch_number = MACH_TYPE_SMDK2400;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x0c000100;
board/impa7/impa7.c +1 -1
@@ -40,7 +40,7 @@
 	IO_LEDFLSH = 0x40;
 
 	/* arch number of EP7111 */
-	gd->bd->bi_arch_number = 50;
+	gd->bd->bi_arch_number = MACH_TYPE_EDB7211;
 
 	/* location of boot parameters for EP7111 */
 	gd->bd->bi_boot_params = 0xc0020100;
board/dnp1110/dnp1110.c +1 -1
@@ -39,7 +39,7 @@
 	/* so we do _nothing_ here */
 
 	/* arch number of DNP1110-Board */
-	gd->bd->bi_arch_number = 255;
+	gd->bd->bi_arch_number = MACH_TYPE_DNP1110;
 
     /* flash vpp on */
     PPDR |= 0x80;	/* assumes LCD controller is off */
board/dave/B2/B2.c +1 -1
@@ -109,7 +109,7 @@
     PDATF = temp;
 
 	/* arch number MACH_TYPE_MBA44B0 */
-	gd->bd->bi_arch_number = 178;
+	gd->bd->bi_arch_number = MACH_TYPE_S3C44B0;
 
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0x0c000100;
board/cradle/cradle.c +1 -1
@@ -186,7 +186,7 @@
 	led_code (0xf, YELLOW);
 
 	/* arch number of HHP Cradle */
-	gd->bd->bi_arch_number = 174;
+	gd->bd->bi_arch_number = MACH_TYPE_HHP_CRADLE;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;
#1 lore raw

PATCH 1/1 Use manifest constants from mach-types.h when setting bi_arch_number

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

* Patch by George G. Davis, 06 Jul 2004:

==> Tue, 24 Aug 2004 ???

Quoted 2 lines

- update ARM boards to use manifest constants from mach-types.h when setting bi_arch_number

Thanks, added.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
This is an unauthorized cybernetic announcement.