Skip to contentSkip to conversation

arm/mach-types: sync with 2.6.28 and add generating tools support

PATCH New Jean-Christophe PLAGNIOL-VILLARD 5 participants 15 messages Jan 22, 2009 – Feb 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm/mach-types: sync with 2.6.28 and add generating tools support

Makefile +14 -6
index d533564..a5af22f 100644
@@ -194,6 +194,10 @@ include $(TOPDIR)/config.mk
 #########################################################################
 # U-Boot objects....order is important (i.e. start must be first)
 
+ifeq ($(ARCH),arm)
+MACH_H = $(obj)include/asm-arm/mach-types.h
+endif
+
 OBJS  = cpu/$(CPU)/start.o
 ifeq ($(CPU),i386)
 OBJS += cpu/$(CPU)/start16.o
@@ -360,13 +364,13 @@ $(SUBDIRS):	depend $(obj)include/autoconf.mk
 $(LDSCRIPT):	depend $(obj)include/autoconf.mk
 		$(MAKE) -C $(dir $@) $(notdir $@)
 
-$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+$(NAND_SPL):	$(MACH_H) $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
 $(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
 		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
 
-$(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+$(ONENAND_IPL):	$(MACH_H) $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
 $(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
@@ -382,6 +386,9 @@ $(TIMESTAMP_FILE):
 		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
 		@date +'#define U_BOOT_TIME "%T"' >> $@
 
+$(obj)include/asm-arm/mach-types.h:
+		$(MAKE) -C tools/arm $@
+
 gdbtools:
 		$(MAKE) -C tools/gdb all || exit 1
 
@@ -391,7 +398,7 @@ updater:
 env:
 		$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
 
-depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE)
+depend dep:	$(MACH_H) $(TIMESTAMP_FILE) $(VERSION_FILE)
 		for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
 
 TAG_SUBDIRS += include
@@ -453,14 +460,14 @@ $(obj)System.map:	$(obj)u-boot
 # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
 # the dep file is only include in this top level makefile to determine when
 # to regenerate the autoconf.mk file.
-$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
+$(obj)include/autoconf.mk.dep: $(obj)include/config.h $(MACH_H) include/common.h
 	@$(XECHO) Generating $@ ; \
 	set -e ; \
 	: Generate the dependancies ; \
 	$(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
 		-MQ $(obj)include/autoconf.mk include/common.h > $@
 
-$(obj)include/autoconf.mk: $(obj)include/config.h
+$(obj)include/autoconf.mk: $(obj)include/config.h $(MACH_H)
 	@$(XECHO) Generating $@ ; \
 	set -e ; \
 	: Extract the config macros ; \
@@ -3335,7 +3342,8 @@ clean:
 	       $(obj)examples/mem_to_mem_idma2intr			  \
 	       $(obj)examples/sched	   $(obj)examples/smc91111_eeprom \
 	       $(obj)examples/test_burst   $(obj)examples/timer
-	@rm -f $(obj)tools/bmp_logo	   $(obj)tools/easylogo/easylogo  \
+	@rm -f $(obj)include/asm-arm/mach-types.h			  \
+	       $(obj)tools/bmp_logo	   $(obj)tools/easylogo/easylogo  \
 	       $(obj)tools/env/{fw_printenv,fw_setenv}			  \
 	       $(obj)tools/envcrc					  \
 	       $(obj)tools/gdb/{astest,gdbcont,gdbsend}			  \
config.mk +1 -0
index b1254e9..76e8844 100644
@@ -76,6 +76,7 @@ STRIP	= $(CROSS_COMPILE)strip
 OBJCOPY = $(CROSS_COMPILE)objcopy
 OBJDUMP = $(CROSS_COMPILE)objdump
 RANLIB	= $(CROSS_COMPILE)RANLIB
+AWK	= awk
 
 #########################################################################
 
include/asm-arm/.gitignore new file +1 -0
new file mode 100644
index 0000000..9cc4155
@@ -0,0 +1 @@
+/mach-types.h
include/asm-arm/mach-types.h deleted +0 -10
deleted file mode 100644
index ce6d25f..0000000
@@ -1,24009 +0,0 @@
-/*
- * This was automagically generated from arch/arm/tools/mach-types!
-# define machine_is_at91sam9260ek_cn()	(0)
-#endif
-
-# define machine_is_em104v1()	(machine_arch_type == MACH_TYPE_EM104V1)
-#else
-# define machine_is_em104v1()	(0)
-#endif
-

.....

-# endif
-# define machine_is_geneva() (machine_arch_type == MACH_TYPE_GENEVA)
-#else
-# define machine_is_geneva() (0)
-#endif
-
-/*
- * These have not yet been registered
- */
-
-#ifndef machine_arch_type
-#define machine_arch_type __machine_arch_type
-#endif
-
-#endif

tools/arm/Makefile new file +40 -0
new file mode 100644
index 0000000..dacf533
@@ -0,0 +1,40 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+all:	$(obj).depend
+
+$(OBJTREE)/include/asm-arm/mach-types.h: gen-mach-types mach-types
+	@echo '  Generating $@'
+	@mkdir -p $(dir $@)
+	@$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
tools/arm/gen-mach-types new file +72 -0

72 lines not on this page · raw message

tools/arm/mach-types new file +1901 -0

1,901 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 arm: fix some arch_number definition

board/apollon/apollon.c +1 -1
index 8964eba..47df84a 100644
@@ -66,7 +66,7 @@ int board_init(void)
 {
 	gpmc_init();		/* in SRAM or SDRM, finish GPMC */
 
-	gd->bd->bi_arch_number = 919;
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP_APOLLON;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = (OMAP2420_SDRC_CS0 + 0x100);
 
board/armadillo/armadillo.c +1 -2
index ca5bd1d..e9be758 100644
@@ -42,8 +42,7 @@ int board_init (void)
 	/* Activate LED flasher */
 	IO_LEDFLSH = 0x40;
 
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;
 
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;
board/cm4008/cm4008.c +1 -1
index d34737c..0744905 100644
@@ -78,7 +78,7 @@ int board_late_init (void)
 int board_init (void)
 {
 	/* arch number of CM4008 */
-	gd->bd->bi_arch_number = 624;
+	gd->bd->bi_arch_number = MACH_TYPE_CM4008;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;
board/cm41xx/cm41xx.c +1 -1
index 02d05af..c4136f8 100644
@@ -78,7 +78,7 @@ int board_late_init (void)
 int board_init (void)
 {
 	/* arch number of CM41xx */
-	gd->bd->bi_arch_number = 672;
+	gd->bd->bi_arch_number = MACH_TYPE_CM41XX;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;
board/cmc_pu2/cmc_pu2.c +1 -6
index 3ad756d..205bd3a 100644
@@ -96,12 +96,7 @@ int board_init (void)
 	piob->PIO_PER = AT91C_PIO_PB3 | AT91C_PIO_PB4 |
 			AT91C_PIO_PB5 | AT91C_PIO_PB6;
 
-	/*
-	 * arch number of CMC_PU2-Board. MACH_TYPE_CMC_PU2 is not supported in
-	 * the linuxarm kernel, yet.
-	 */
-	/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
-	gd->bd->bi_arch_number = 251;
+	gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
board/imx31_phycore/imx31_phycore.c +1 -1
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 
-	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */
 	gd->bd->bi_boot_params = (0x80000100);	/* adress of boot parameters */
 
 	return 0;
board/ns9750dev/ns9750dev.c +1 -1
index fc46244..b8f377b 100644
@@ -68,7 +68,7 @@ int board_init( void )
 #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;
+	gd->bd->bi_arch_number = MACH_TYPE_NS9750;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;
board/samsung/smdk6400/smdk6400.c +1 -1
index bd2e45a..f24d70f 100644
@@ -71,7 +71,7 @@ int board_init(void)
 	/* Enable WAIT */
 	SROM_BW_REG |= 4 | 8 | 1;
 
-	gd->bd->bi_arch_number = MACH_TYPE;
+	gd->bd->bi_arch_number = MACH_TYPE_SMDK6400;
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
 	return 0;
board/trizepsiv/conxs.c +1 -1
index 7c6c855..e118f63 100644
@@ -98,7 +98,7 @@ int board_init (void)
 	/* so we do _nothing_ here */
 
 	/* arch number of ConXS Board */
-	gd->bd->bi_arch_number = 776;
+	gd->bd->bi_arch_number = MACH_TYPE_TRIZEPS4;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa000003c;
board/xaeniax/xaeniax.c +1 -1
index 9baa457..03721a2 100644
@@ -42,7 +42,7 @@ int board_init (void)
 	/* so we do _nothing_ here */
 
 	/* arch number of xaeniax */
-	gd->bd->bi_arch_number = 585;
+	gd->bd->bi_arch_number = MACH_TYPE_XAENIAX;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;
include/configs/smdk6400.h +0 -5
index 1784cc6..22cdf94 100644
@@ -55,11 +55,6 @@
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG
 
-/*
- * Architecture magic and machine type
- */
-#define MACH_TYPE		1270
-
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 1/1 arm: fix some arch_number definition

board/imx31_phycore/imx31_phycore.c int board_init (void) · line 63

Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
board/imx31_phycore/imx31_phycore.c +1 -1
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 
-	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */

Why ADS board ID for the Phycore?

Kind regards,
Jens

#3 lore raw

PATCH 1/1 arm: fix some arch_number definition

Quoted 13 lines · Jens Gehrlein

board/imx31_phycore/imx31_phycore.c int board_init (void) · line 63

Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
board/imx31_phycore/imx31_phycore.c +1 -0
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 -	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */

Why ADS board ID for the Phycore?

the 447 is the MX31ADS

if you need your own id please register one here
http://www.arm.linux.org.uk/developer/machines/

Best Regards,
J.

#4 lore raw

PATCH 1/1 arm: fix some arch_number definition

Sorry for a late reply, but it seems not to be upstream yet, so

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Jens Gehrlein

board/imx31_phycore/imx31_phycore.c int board_init (void) · line 63

Quoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
board/imx31_phycore/imx31_phycore.c +1 -0
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 -	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */

Why ADS board ID for the Phycore?

Quoted 1 line

the 447 is the MX31ADS

There is a number already, could you please use

MACH_TYPE_PCM037

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de

#5 lore raw

PATCH 1/1 arm: fix some arch_number definition

In reply to Jean-Christophe PLAGNIOL-VILLARD

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 6 lines · In message <[email protected]> you wrote:
board/armadillo/armadillo.c +0 -0
index ca5bd1d..e9be758 100644

board/armadillo/armadillo.c int board_init (void) · line 48

Quoted 9 lines
board/armadillo/armadillo.c +1 -2
@@ -42,8 +42,7 @@ int board_init (void)
 	/* Activate LED flasher */
 	IO_LEDFLSH = 0x40;
 
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;
 
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

"board/siemens/SMN42/smn42.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

I recommend you got through this again, more thoroughly.

Quoted 6 lines

index 3ad756d..205bd3a 100644

board/cmc_pu2/cmc_pu2.c +0 -0
@@ -96,12 +96,7 @@ int board_init (void)
 	piob->PIO_PER = AT91C_PIO_PB3 | AT91C_PIO_PB4 |
 			AT91C_PIO_PB5 | AT91C_PIO_PB6;

board/cmc_pu2/cmc_pu2.c int board_init (void) · line 101

Quoted 10 lines
board/cmc_pu2/cmc_pu2.c +1 -6
 
-	/*
-	 * arch number of CMC_PU2-Board. MACH_TYPE_CMC_PU2 is not supported in
-	 * the linuxarm kernel, yet.
-	 */
-	/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
-	gd->bd->bi_arch_number = 251;
+	gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

board/imx31_phycore/imx31_phycore.c int board_init (void) · line 64

Quoted 11 lines
board/imx31_phycore/imx31_phycore.c +1 -1
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 
-	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */
 	gd->bd->bi_boot_params = (0x80000100);	/* adress of boot parameters */

MX31ADS ??

board/ns9750dev/ns9750dev.c int board_init( void ) · line 71

Quoted 10 lines
board/ns9750dev/ns9750dev.c +1 -1
index fc46244..b8f377b 100644
@@ -68,7 +68,7 @@ int board_init( void )
 #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;
+	gd->bd->bi_arch_number = MACH_TYPE_NS9750;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

NAK as is. This needs to be reworked.

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
Real computer scientists don't comment their  code.  The  identifiers
are so long they can't afford the disk space.
#6 lore raw

PATCH 1/1 arm: fix some arch_number definition

Quoted 16 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 13 lines · In message <[email protected]> you wrote:
board/armadillo/armadillo.c +1 -2
index ca5bd1d..e9be758 100644
@@ -42,8 +42,7 @@ int board_init (void)
 	/* Activate LED flasher */
 	IO_LEDFLSH = 0x40;
 
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;
 
Quoted 5 lines

board/armadillo/armadillo.c int board_init (void) · line 48

Quoted 2 lines
board/armadillo/armadillo.c +0 -0
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

the ARMADILLO was changed in the current kernel it's not any more 83 but 615

83 is used for board that does not have any valid MACHINE ID

Quoted 8 lines

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

I've not find it in the official list so I've let as 83 (non registered board)

Quoted 5 lines

"board/siemens/SMN42/smn42.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

ditto

Quoted 10 lines

I recommend you got through this again, more thoroughly.

Quoted 7 lines

index 3ad756d..205bd3a 100644

board/cmc_pu2/cmc_pu2.c +0 -0
@@ -96,12 +96,7 @@ int board_init (void)
 	piob->PIO_PER = AT91C_PIO_PB3 | AT91C_PIO_PB4 |
 			AT91C_PIO_PB5 | AT91C_PIO_PB6;
 
Quoted 12 lines

board/cmc_pu2/cmc_pu2.c int board_init (void) · line 101

Quoted 9 lines
board/cmc_pu2/cmc_pu2.c +1 -6
-	/*
-	 * arch number of CMC_PU2-Board. MACH_TYPE_CMC_PU2 is not supported in
-	 * the linuxarm kernel, yet.
-	 */
-	/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
-	gd->bd->bi_arch_number = 251;
+	gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

as precedently it's the current MACHINE ID
251 is used for AT91RM9200

Quoted 15 lines

board/imx31_phycore/imx31_phycore.c int board_init (void) · line 64

Quoted 12 lines
board/imx31_phycore/imx31_phycore.c +1 -1
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 
-	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */
 	gd->bd->bi_boot_params = (0x80000100);	/* adress of boot parameters */

MX31ADS ?

Quoted 13 lines

board/ns9750dev/ns9750dev.c int board_init( void ) · line 71

Quoted 10 lines
board/ns9750dev/ns9750dev.c +1 -1
index fc46244..b8f377b 100644
@@ -68,7 +68,7 @@ int board_init( void )
 #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;
+	gd->bd->bi_arch_number = MACH_TYPE_NS9750;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

234 is use for OMAP_INNOVATOR not the ns9750 so I've correct it

I any board maintainer have a problem with it I'm open

Best Regards,
J.

#7 lore raw

PATCH 1/1 arm: fix some arch_number definition

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines
board/armadillo/armadillo.c +1 -2
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;

...

Quoted 3 lines
Quoted 2 lines

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

the ARMADILLO was changed in the current kernel it's not any more 83 but 615

I am aware of this. But anybody using some Linux kernel runnin on this board will have a nasty surprise when hisl old kernels don;t boot any more with recent versions of U-Boot.

This is why I request that you ask for an ACK from the board maintainer - he needs to be at least aware of such a change.

Quoted 8 lines
Quoted 7 lines

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

I've not find it in the official list so I've let as 83 (non registered board)

You canged the old "MACH_TYPE_ARMADILLO" / 83 setting in one place but not in others? This will cause inconsistent behaviour.

You must not do that. Either leave ALL of these as they are, or fix ALL of them in the SAME way.

Quoted 8 lines
Quoted 5 lines

board/ns9750dev/ns9750dev.c int board_init( void ) · line 71

Quoted 2 lines
board/ns9750dev/ns9750dev.c +1 -1
-	gd->bd->bi_arch_number = 234;
+	gd->bd->bi_arch_number = MACH_TYPE_NS9750;

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

234 is use for OMAP_INNOVATOR not the ns9750 so I've correct it

I any board maintainer have a problem with it I'm open

See above. You must talk to the board maintainers first.

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
Only two things are infinite,  the universe and human stupidity,  and
I'm not sure about the former.                     -- Albert Einstein
#8 lore raw

PATCH 1/1 arm: fix some arch_number definition

Quoted 26 lines · Wolfgang Denk

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines
board/armadillo/armadillo.c +1 -2
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;

...

Quoted 3 lines
Quoted 2 lines

You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch.

the ARMADILLO was changed in the current kernel it's not any more 83 but 615

I am aware of this. But anybody using some Linux kernel runnin on this board will have a nasty surprise when hisl old kernels don;t boot any more with recent versions of U-Boot.

This is why I request that you ask for an ACK from the board maintainer - he needs to be at least aware of such a change.

Quoted 7 lines
Quoted 7 lines

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

Quoted 7 lines
Quoted 1 line

I've not find it in the official list so I've let as 83 (non registered board)

You canged the old "MACH_TYPE_ARMADILLO" / 83 setting in one place but not in others? This will cause inconsistent behaviour.

You must not do that. Either leave ALL of these as they are, or fix ALL of them in the SAME way.

the other board are not a ARMODILLO correct if I wrong

Best Regards,
J.

#9 lore raw

PATCH 1/1 arm: fix some arch_number definition

Dear Jean-Christophe PLAGNIOL-VILLARD,

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

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

I've not find it in the official list so I've let as 83 (non registered board)

You canged the old "MACH_TYPE_ARMADILLO" / 83 setting in one place but not in others? This will cause inconsistent behaviour.

You must not do that. Either leave ALL of these as they are, or fix ALL of them in the SAME way.

the other board are not a ARMODILLO correct if I wrong

I don't know, and frankly, I don't care.

If you implement such a change, you must at least implement it consistently.

If you don't know how to do that for a specific board, then you need to talk with the board maintainers.

Fixing the problm in one place but leaving it unfixed in some other places (knowingly) is not acceptable.

Best regards,

Wolfgang Denk

Signature · 4 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
Disc space - the final frontier!
#10 lore raw

PATCH 1/1 arm: fix some arch_number definition

In reply to Jean-Christophe PLAGNIOL-VILLARD

Hi Jean-Christophe,

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

I've not find it in the official list so I've let as 83 (non registered board)

You canged the old "MACH_TYPE_ARMADILLO" / 83 setting in one place but not in others? This will cause inconsistent behaviour.

You must not do that. Either leave ALL of these as they are, or fix ALL of them in the SAME way.

the other board are not a ARMODILLO correct if I wrong

Why not correct the wrong comment? I think this is the consistent thing to do, as there certainly is no definition for "83" in the kernel and 83 has nothing to do with ARMADILLO.

Cheers
Detlev

PS: You have an interesting Mail-Followup-To on this posting. Maybe I
should do this also to cut down on my incoming mails ;)

Signature · 8 lines
Two  monks went  fishing in an  electron river.  The first monk drew out his
network, and out flopped a hacker.  The second monk cried, "The poor hacker!
How can  it live outside of the  network?"   The first monk said,  "When you
have learned to live outside the network, then you will know."
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
#11 lore raw

PATCH 1/1 arm: fix some arch_number definition

Dear Detlev,

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

PS: You have an interesting Mail-Followup-To on this posting. Maybe I
should do this also to cut down on my incoming mails ;)

Don't dare to attempt this. I might start doing the same...

Best regards,

Wolfgang Denk

Signature · 4 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
Things are not as simple as they seem at first.        - Edward Thorp
#12 lore raw

PATCH 1/1 arm: fix some arch_number definition

In reply to Detlev Zundel
Quoted 14 lines · Detlev Zundel

Hi Jean-Christophe,

Quoted 12 lines
Quoted 12 lines
Quoted 8 lines
Quoted 7 lines

Note that there are other places where this is used - these must be changed, too - for example:

"board/lpc2292sodimm/lpc2292sodimm.c":

42 /* arch number MACH_TYPE_ARMADILLO - not official*/
43 gd->bd->bi_arch_number = 83;

I've not find it in the official list so I've let as 83 (non registered board)

You canged the old "MACH_TYPE_ARMADILLO" / 83 setting in one place but not in others? This will cause inconsistent behaviour.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

You must not do that. Either leave ALL of these as they are, or fix ALL of them in the SAME way.

the other board are not a ARMODILLO correct if I wrong

Why not correct the wrong comment? I think this is the consistent thing to do, as there certainly is no definition for "83" in the kernel and 83 has nothing to do with ARMADILLO.

This make sense
anyway normaly no new arm board will not have a valid machine id now

Best Regards,
J.

#13 lore raw

PATCH 1/1 arm: fix some arch_number definition

In reply to Jean-Christophe PLAGNIOL-VILLARD

Hi,
all affected board maintainers
I've found in the current u-boot code some errors on the machine id could take a look on your board

nb: e-mail forwaded following

Best Regards,
J.

board/apollon/apollon.c +1 -1
index 8964eba..47df84a 100644
@@ -66,7 +66,7 @@ int board_init(void)
 {
 	gpmc_init();		/* in SRAM or SDRM, finish GPMC */
 
-	gd->bd->bi_arch_number = 919;
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP_APOLLON;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = (OMAP2420_SDRC_CS0 + 0x100);
 
board/armadillo/armadillo.c +1 -2
index ca5bd1d..e9be758 100644
@@ -42,8 +42,7 @@ int board_init (void)
 	/* Activate LED flasher */
 	IO_LEDFLSH = 0x40;
 
-	/* arch number MACH_TYPE_ARMADILLO - not official*/
-	gd->bd->bi_arch_number = 83;
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO;
 
 	/* location of boot parameters */
 	gd->bd->bi_boot_params = 0xc0000100;
board/cm4008/cm4008.c +1 -1
index d34737c..0744905 100644
@@ -78,7 +78,7 @@ int board_late_init (void)
 int board_init (void)
 {
 	/* arch number of CM4008 */
-	gd->bd->bi_arch_number = 624;
+	gd->bd->bi_arch_number = MACH_TYPE_CM4008;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;
board/cm41xx/cm41xx.c +1 -1
index 02d05af..c4136f8 100644
@@ -78,7 +78,7 @@ int board_late_init (void)
 int board_init (void)
 {
 	/* arch number of CM41xx */
-	gd->bd->bi_arch_number = 672;
+	gd->bd->bi_arch_number = MACH_TYPE_CM41XX;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x00000100;
board/cmc_pu2/cmc_pu2.c +1 -6
index 3ad756d..205bd3a 100644
@@ -96,12 +96,7 @@ int board_init (void)
 	piob->PIO_PER = AT91C_PIO_PB3 | AT91C_PIO_PB4 |
 			AT91C_PIO_PB5 | AT91C_PIO_PB6;
 
-	/*
-	 * arch number of CMC_PU2-Board. MACH_TYPE_CMC_PU2 is not supported in
-	 * the linuxarm kernel, yet.
-	 */
-	/* gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2; */
-	gd->bd->bi_arch_number = 251;
+	gd->bd->bi_arch_number = MACH_TYPE_CMC_PU2;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
board/imx31_phycore/imx31_phycore.c +1 -1
index ae93444..4b72d57 100644
@@ -60,7 +60,7 @@ int board_init (void)
 	mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL);
 	mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA);
 
-	gd->bd->bi_arch_number = 447;		/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_MX31ADS;	/* board id for linux */
 	gd->bd->bi_boot_params = (0x80000100);	/* adress of boot parameters */
 
 	return 0;
board/ns9750dev/ns9750dev.c +1 -1
index fc46244..b8f377b 100644
@@ -68,7 +68,7 @@ int board_init( void )
 #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;
+	gd->bd->bi_arch_number = MACH_TYPE_NS9750;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;
board/samsung/smdk6400/smdk6400.c +1 -1
index bd2e45a..f24d70f 100644
@@ -71,7 +71,7 @@ int board_init(void)
 	/* Enable WAIT */
 	SROM_BW_REG |= 4 | 8 | 1;
 
-	gd->bd->bi_arch_number = MACH_TYPE;
+	gd->bd->bi_arch_number = MACH_TYPE_SMDK6400;
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
 	return 0;
board/trizepsiv/conxs.c +1 -1
index 7c6c855..e118f63 100644
@@ -98,7 +98,7 @@ int board_init (void)
 	/* so we do _nothing_ here */
 
 	/* arch number of ConXS Board */
-	gd->bd->bi_arch_number = 776;
+	gd->bd->bi_arch_number = MACH_TYPE_TRIZEPS4;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa000003c;
board/xaeniax/xaeniax.c +1 -1
index 9baa457..03721a2 100644
@@ -42,7 +42,7 @@ int board_init (void)
 	/* so we do _nothing_ here */
 
 	/* arch number of xaeniax */
-	gd->bd->bi_arch_number = 585;
+	gd->bd->bi_arch_number = MACH_TYPE_XAENIAX;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0xa0000100;
include/configs/smdk6400.h +0 -5
index 1784cc6..22cdf94 100644
@@ -55,11 +55,6 @@
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG
 
-/*
- * Architecture magic and machine type
- */
-#define MACH_TYPE		1270
-
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
Signature · 1 line
1.5.6.5
#14 lore raw

cover arm/mach-types: sync with 2.6.28 and add generating tools support

In reply to Jean-Christophe PLAGNIOL-VILLARD

Dear Jean-Christophe PLAGNIOL-VILLARD,

Quoted 1 line · In message <[email protected]> you wrote:

please, *PLEASE* get used to a somewhat reasonable style of numbering your patches.

If you submit patches tagged as "[PATCH 0/1]" and "[PATCH 1/1]" everybody expects *ONE* patche, with "0/1" being introductory comments only.

If you want to post TWO patches then please tell so, and write ".../2"

I told you this before. PLEASE stick to the rules.

You make working with your patches unnecessarily hard.

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
The man on tops walks a lonely street;  the  "chain"  of  command  is
often a noose.