arm: add CONFIG_MACH_TYPE setting and documentation
authorIgor Grinberg <grinberg@compulab.co.il>
Thu, 14 Jul 2011 05:45:07 +0000 (05:45 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 17 Jul 2011 09:07:01 +0000 (11:07 +0200)
CONFIG_MACH_TYPE is used to set the machine type number in the
common arm code instead of setting it in the board code.
Boards with dynamically discoverable machine types can still set the
machine type number in the board code.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
README
arch/arm/lib/board.c

diff --git a/README b/README
index 1e2d4d3..7b27c99 100644 (file)
--- a/README
+++ b/README
@@ -442,6 +442,16 @@ The following options need to be configured:
                crash. This is needed for buggy hardware (uc101) where
                no pull down resistor is connected to the signal IDE5V_DD7.
 
+               CONFIG_MACH_TYPE        [relevant for ARM only][mandatory]
+
+               This setting is mandatory for all boards that have only one
+               machine type and must be used to specify the machine type
+               number as it appears in the ARM machine registry
+               (see http://www.arm.linux.org.uk/developer/machines/).
+               Only boards that have multiple machine types supported
+               in a single configuration file and the machine type is
+               runtime discoverable, do not have to use this setting.
+
 - vxWorks boot parameters:
 
                bootvx constructs a valid bootline using the following
index fc52a26..6bbedf4 100644 (file)
@@ -281,6 +281,10 @@ void board_init_f (ulong bootflag)
 
        gd->mon_len = _bss_end_ofs;
 
+#ifdef CONFIG_MACH_TYPE
+       gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
+#endif
+
        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                if ((*init_fnc_ptr)() != 0) {
                        hang ();