summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-06-16 13:25:02 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:39:29 -0700
commit889f8e96da85483ffb140caa5120e1c556e7b5ac (patch)
tree940a38ce787810074c4fcae6650a7c0bb6c3b5f7 /include
parent8feb0062040a30f479706d11afc06752397e01c0 (diff)
Derive board name and machine ID from the device tree.
The board device ID needs to be passed to the kernel for proper initialization of the machine (until FDT is deployed for that). The device ID is picked based on the board name in the u-boot device tree. BUG=chromium-os:834 TEST=manual Tested combined with the rest of the patches in this set. Change-Id: Ifb9395196d13e96d6616ec61ae1e6fc6bd300ab6 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/2773 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/common.h5
-rw-r--r--include/configs/seaboard.h8
-rw-r--r--include/configs/tegra2-common.h6
3 files changed, 13 insertions, 6 deletions
diff --git a/include/common.h b/include/common.h
index 1b73bd12aed..934c007c354 100644
--- a/include/common.h
+++ b/include/common.h
@@ -778,4 +778,9 @@ int cpu_release(int nr, int argc, char * const argv[]);
#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
+#ifdef CONFIG_OF_CONTROL
+extern const char* get_board_name(void);
+extern ulong get_arch_number(void);
+#endif
+
#endif /* __COMMON_H_ */
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index 46f96581941..5c4aa4b00bf 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -33,8 +33,7 @@
/* High-level configuration options */
#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M"
-#define V_PROMPT "Tegra2 (SeaBoard) # "
-#define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Seaboard"
+#define V_PROMPT "Tegra2 # "
#include "tegra2-common.h"
@@ -59,7 +58,9 @@
/* Put USB1 in host mode */
#define CONFIG_TEGRA2_USB1_HOST
-#endif
+#define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD
+
+#endif /* CONFIG_OF_CONTROL not defined ^^^^^^^ */
#define CONFIG_TEGRA2_KEYBOARD
#define CONFIG_KEYBOARD
@@ -70,7 +71,6 @@
"stdout=serial,lcd\0" \
"stderr=serial,lcd\0"
-#define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD
#define CONFIG_SYS_BOARD_ODMDATA 0x300d8011 /* lp1, 1GB */
#define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
index da74f315794..717c35764d2 100644
--- a/include/configs/tegra2-common.h
+++ b/include/configs/tegra2-common.h
@@ -84,7 +84,9 @@
#define CONFIG_SYS_NS16550
#define CONFIG_SYS_NS16550_REG_SIZE (-4)
-#ifndef CONFIG_OF_CONTROL
+#ifdef CONFIG_OF_CONTROL
+#define CONFIG_COMPAT_STRING "nvidia,tegra250"
+#else
#define V_NS16550_CLK 216000000 /* 216MHz (pllp_out0) */
#define CONFIG_SYS_NS16550_SERIAL
@@ -94,7 +96,7 @@
* select serial console configuration
*/
#define CONFIG_CONS_INDEX 1
-#endif /* CONFIG_OF_CONTROL */
+#endif /* CONFIG_OF_CONTROL ^^^^^ not defined */
#define CONFIG_ENV_SIZE SZ_4K