db3ae69c45dd11a6b70957fe6ee2b72fbe089ad6
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot / 2011.09git / 0004-am335x-evm-fall-back-to-bone-if-header.config-is-emp.patch
1 From 3e3ac90cdd7fade62e898453f529364e4d9c7589 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Tue, 18 Oct 2011 19:18:56 +0200
4 Subject: [PATCH 4/4] am335x-evm: fall back to bone if header.config is empty
6 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7 ---
8  board/ti/am335x/evm.c |    8 ++++----
9  1 files changed, 4 insertions(+), 4 deletions(-)
11 diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c
12 index f484a3c..1c3ba2c 100755
13 --- a/board/ti/am335x/evm.c
14 +++ b/board/ti/am335x/evm.c
15 @@ -495,6 +495,7 @@ int board_init(void)
16                 goto err_out;
17         }
18  
19 +       printf("EEPROM ID:\n magic: %#08x\n name: %8s\n version: %4s\n serial: %12s\n config: %32s\n mac_addr: %s\n", header.magic, header.name, header.version, header.serial, header.config, header.mac_addr);
20         if (header.magic != 0xEE3355AA) {
21                 /* read the eeprom using i2c again, but use only a 1 byte address */
22                 if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 1, (uchar *)&header,
23 @@ -522,11 +523,10 @@ int board_init(void)
24                 board_id = IPP_BOARD;
25         } else {
26                 printf("Did not find a recognized configuration, "
27 -                       "assuming General purpose EVM in Profile 0 with "
28 -                       "Daughter board\n");
29 -               board_id = GP_BOARD;
30 +                       "assuming BeagleBone\n");
31 +               board_id = BONE_BOARD;
32                 profile = 1;    /* profile 0 is internally considered as 1 */
33 -               daughter_board_connected = 1;
34 +               daughter_board_connected = 0;
35         }
36  
37         configure_evm_pin_mux(board_id, profile, daughter_board_connected);
38 -- 
39 1.6.6.1