From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Harvey Date: Tue, 30 Aug 2011 16:49:35 -0400 Subject: [U-Boot] [PATCH V5 3/4] ARM: Warn when the machine ID isn't set. In-Reply-To: <20110718173344.GA3663@harvey-pc.matrox.com> Message-ID: <20110830204935.GA7377@harvey-pc.matrox.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Linux cannot boot without it. Signed-off-by: Christopher Harvey --- V2: Used a #define instead of a constant. Used a printf instead of a debug. --- V3: Moved gd->bd->bi_arch_number = BI_ARCH_NUMBER_INVALID; before the init_sequence loop, so it doesn't overwrite existing values. Removed unneeded braces. Reminder, in V2 of this series there are 3 uncommited patches that have no comments. --- V4: Fixed mixed tabs and spaces. Message prints in both debug and release mode. --- V5: Rebase to bd061a5214e60c9d1bb24393933323bd1a2dae19 arch/arm/include/asm/u-boot.h | 2 ++ arch/arm/lib/board.c | 3 +++ arch/arm/lib/bootm.c | 3 +++ 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index ed33327..81735de 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -48,4 +48,6 @@ typedef struct bd_info { } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#define BI_ARCH_NUMBER_INVALID 0xffffffff + #endif /* _U_BOOT_H_ */ diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 14a56f6..58e901b 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -275,8 +275,11 @@ 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 */ +#else + gd->bd->bi_arch_number = BI_ARCH_NUMBER_INVALID; #endif for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 802e833..d5fd26b 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -113,6 +113,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) printf ("Using machid 0x%x from environment\n", machid); } + if (machid == BI_ARCH_NUMBER_INVALID) + printf("Warning: machid not set.\n"); + show_boot_progress (15); #ifdef CONFIG_OF_LIBFDT -- 1.7.4.5