From a0e4d66eb7f1c156b756f3c4b3271c5a298e955a Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 12 Mar 2013 15:08:39 +0100 Subject: [PATCH] Board: omap4: panda: Add u-boot command to check PandaBoard revision There is a difference between PandaBoard (4430) and PandaBoardES (4460) at least regaring to audio - the routing is different. the added is_pandaES can be called from a script to decide which dtb file should be loaded on the PandaBoard we are booting. Signed-off-by: Peter Ujfalusi --- board/ti/panda/panda.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 20be81c..61b89ea 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -241,3 +241,20 @@ u32 get_board_rev(void) { return 0x20; } + +static int do_panda_rev_check(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + if (gd->bd->bi_arch_number != MACH_TYPE_OMAP4_PANDA) + return 1; + + if (omap_revision() < OMAP4460_ES1_0) + return 1; + else + return 0; +} + +U_BOOT_CMD( + is_pandaES, 1, 0, do_panda_rev_check, + "Checks if the board is PandaBoardES", + "- PandaBoard revision check" +); -- 1.8.1.5