[U-Boot] [PATCH 2/5] Revert "arm: Remove unregister MACH_TYPE_xxx uses"

Tom Rini trini at konsulko.com
Thu Jan 26 02:42:35 CET 2017


This reverts commit 70b26cd057f42c7126088b49d4285955c8a00eae.

This is not a strict revert as it is easier to fix
board/atmark-techno/armadillo-800eva/armadillo-800eva.c to now the
correct name (same value) than to revert that change too.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 board/Seagate/goflexhome/goflexhome.c                   |  5 +++++
 board/atmark-techno/armadillo-800eva/armadillo-800eva.c |  2 ++
 board/atmel/at91sam9x5ek/at91sam9x5ek.c                 |  3 +++
 board/davinci/da8xxevm/omapl138_lcdk.c                  |  3 +++
 board/davinci/ea20/ea20.c                               |  3 +++
 board/mini-box/picosam9g45/picosam9g45.c                |  2 ++
 board/ti/omap5_uevm/evm.c                               |  1 +
 include/configs/cardhu.h                                |  2 ++
 include/configs/colibri_t20.h                           |  2 ++
 include/configs/iconnect.h                              |  5 +++++
 include/configs/rpi.h                                   | 15 +++++++++++++++
 include/configs/smartweb.h                              |  1 +
 include/configs/tricorder.h                             |  1 +
 include/configs/ts4800.h                                |  2 ++
 include/configs/ventana.h                               |  2 ++
 include/configs/whistler.h                              |  2 ++
 include/configs/zmx25.h                                 |  1 +
 17 files changed, 52 insertions(+)

diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index ad8245aaaa55..1f4fb924942a 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -92,6 +92,11 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
+	/*
+	 * arch number of board
+	 */
+	gd->bd->bi_arch_number = MACH_TYPE_GOFLEXHOME;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
 
diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
index 0227d703e3ad..abe69abcc8db 100644
--- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
+++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
@@ -271,6 +271,8 @@ int board_early_init_f(void)
 DECLARE_GLOBAL_DATA_PTR;
 int board_init(void)
 {
+	/* board id for linux */
+	gd->bd->bi_arch_number = MACH_TYPE_ARMADILLO800EVA;
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = ARMADILLO_800EVA_SDRAM_BASE + 0x100;
 
diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
index 649312228016..b0d440d728a6 100644
--- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
@@ -256,6 +256,9 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
+	/* arch number of AT91SAM9X5EK-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9X5EK;
+
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 4a34c1a60cf8..3ce1992c1dc2 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -175,6 +175,9 @@ int board_init(void)
 	irq_init();
 #endif
 
+	/* arch number of the board */
+	gd->bd->bi_arch_number = MACH_TYPE_OMAPL138_LCDK;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
 
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 30e4c7d4de45..66804d75bd04 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -277,6 +277,9 @@ int overwrite_console(void)
 
 int board_init(void)
 {
+	/* arch number of the board */
+	gd->bd->bi_arch_number = MACH_TYPE_EA20;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
 
diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c
index 8a4a39275386..32ba9c622590 100644
--- a/board/mini-box/picosam9g45/picosam9g45.c
+++ b/board/mini-box/picosam9g45/picosam9g45.c
@@ -252,6 +252,8 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
+	gd->bd->bi_arch_number = MACH_TYPE_PICOSAM9G45;
+
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index d84ec5747bed..b5d5ba9bdf9b 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -138,6 +138,7 @@ int usb_gadget_handle_interrupts(int index)
 int board_init(void)
 {
 	gpmc_init();
+	gd->bd->bi_arch_number = MACH_TYPE_OMAP5_SEVM;
 	gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
 
 	tca642x_set_inital_state(CONFIG_SYS_I2C_TCA642X_ADDR, tca642x_init);
diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index 96d3a0d5cce9..7e3966f47803 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -25,6 +25,8 @@
 #define CONFIG_TEGRA_ENABLE_UARTA
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
 
+#define CONFIG_MACH_TYPE		MACH_TYPE_CARDHU
+
 /* I2C */
 #define CONFIG_SYS_I2C_TEGRA
 
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index e141dfb99d2a..37a472534665 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -21,6 +21,8 @@
 #define CONFIG_TEGRA_UARTA_SDIO1
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
 
+#define CONFIG_MACH_TYPE		MACH_TYPE_COLIBRI_TEGRA2
+
 /* I2C */
 #define CONFIG_SYS_I2C_TEGRA
 
diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h
index 0ea6fcb82c09..633941b7dd56 100644
--- a/include/configs/iconnect.h
+++ b/include/configs/iconnect.h
@@ -17,6 +17,11 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
 
 /*
+ * Machine type
+ */
+#define CONFIG_MACH_TYPE	MACH_TYPE_ICONNECT
+
+/*
  * Compression configuration
  */
 #define CONFIG_BZIP2
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index ce539a008cce..45d88247afa0 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -24,6 +24,21 @@
 	(&((struct bcm2835_timer_regs *)BCM2835_TIMER_PHYSADDR)->clo)
 #endif
 
+/*
+ * 2835 is a SKU in a series for which the 2708 is the first or primary SoC,
+ * so 2708 has historically been used rather than a dedicated 2835 ID.
+ *
+ * We don't define a machine type for bcm2709/bcm2836 since the RPi Foundation
+ * chose to use someone else's previously registered machine ID (3139, MX51_GGC)
+ * rather than obtaining a valid ID:-/
+ *
+ * For the bcm2837, hopefully a machine type is not needed, since everything
+ * is DT.
+ */
+#ifdef CONFIG_BCM2835
+#define CONFIG_MACH_TYPE		MACH_TYPE_BCM2708
+#endif
+
 /* Memory layout */
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_SDRAM_BASE		0x00000000
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index fd35f71f913c..df5fe2163f05 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -52,6 +52,7 @@
 #define CONFIG_SYS_MAXARGS    32
 
 /* setting board specific options */
+#define CONFIG_MACH_TYPE		MACH_TYPE_SMARTWEB
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_ENV_OVERWRITE    1 /* Overwrite ethaddr / serial# */
 #define CONFIG_AUTO_COMPLETE
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index a961e5c0e6bb..4a8782c830de 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -24,6 +24,7 @@
 #define CONFIG_ARM_ERRATA_430973
 #define CONFIG_ARM_ERRATA_621766
 
+#define CONFIG_MACH_TYPE		MACH_TYPE_TRICORDER
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  * 64 bytes before this address should be set aside for u-boot.img's
diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
index 261daef9aa3f..a451acf1f4bf 100644
--- a/include/configs/ts4800.h
+++ b/include/configs/ts4800.h
@@ -21,6 +21,8 @@
 
 #define CONFIG_HW_WATCHDOG
 
+#define CONFIG_MACH_TYPE	MACH_TYPE_TS48XX
+
 /* text base address used when linking */
 #define CONFIG_SYS_TEXT_BASE	0x90008000
 
diff --git a/include/configs/ventana.h b/include/configs/ventana.h
index 615acfe7e384..1150adfe7d94 100644
--- a/include/configs/ventana.h
+++ b/include/configs/ventana.h
@@ -18,6 +18,8 @@
 #define CONFIG_TEGRA_ENABLE_UARTD
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE
 
+#define CONFIG_MACH_TYPE		MACH_TYPE_VENTANA
+
 /* SD/MMC */
 #define CONFIG_GENERIC_MMC
 
diff --git a/include/configs/whistler.h b/include/configs/whistler.h
index 30a48e83ca42..19b57fd2235a 100644
--- a/include/configs/whistler.h
+++ b/include/configs/whistler.h
@@ -19,6 +19,8 @@
 #define CONFIG_TEGRA_UARTA_UAA_UAB
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
 
+#define CONFIG_MACH_TYPE		MACH_TYPE_WHISTLER
+
 /* I2C */
 #define CONFIG_SYS_I2C_TEGRA
 
diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h
index 4b79f15872f4..0e108e23de30 100644
--- a/include/configs/zmx25.h
+++ b/include/configs/zmx25.h
@@ -19,6 +19,7 @@
 #define CONFIG_SYS_TIMER_COUNTER	\
 	(&((struct gpt_regs *)IMX_GPT1_BASE)->counter)
 
+#define CONFIG_MACH_TYPE	MACH_TYPE_ZMX25
 /*
  * Environment settings
  */
-- 
1.9.1



More information about the U-Boot mailing list