diff options
author | vojo <joris.van.vossen@sintecs.nl> | 2018-01-29 14:56:18 (GMT) |
---|---|---|
committer | vojo <joris.van.vossen@sintecs.nl> | 2018-01-29 14:56:18 (GMT) |
commit | 0c521ff1a651585741317b4b4dfe99fd242dace2 (patch) | |
tree | c7f872464f0c360a25c5ab925ca06acd102aaecc /board/scalys/grapeboard/grapeboard.c | |
parent | b07fac8eed8edd5866cb67d5a653599ca5c7b877 (diff) | |
download | u-boot-0c521ff1a651585741317b4b4dfe99fd242dace2.tar.xz |
BCD data reading implemented
Diffstat (limited to 'board/scalys/grapeboard/grapeboard.c')
-rw-r--r-- | board/scalys/grapeboard/grapeboard.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/board/scalys/grapeboard/grapeboard.c b/board/scalys/grapeboard/grapeboard.c index 78c5502..bd5e640 100644 --- a/board/scalys/grapeboard/grapeboard.c +++ b/board/scalys/grapeboard/grapeboard.c @@ -31,16 +31,14 @@ #include <../../../include/generated/autoconf.h> #include <usb.h> #include "gpio_grapeboard.h" +#include "board_configuration_data.h" DECLARE_GLOBAL_DATA_PTR; int checkboard(void) { struct ccsr_gpio *pgpio = (void *)(CONFIG_SYS_GPIO2); -#if 0 - const void* bcd_dtc_blob; - int ret; -#endif + int m2_config = 0; int serdes_cfg = get_serdes_protocol(); @@ -50,17 +48,6 @@ int checkboard(void) setbits_be32(&pgpio->gpdir, QSPI_MUX_N_MASK); clrbits_be32(&pgpio->gpdat, QSPI_MUX_N_MASK); -#if 0 /* todo: test */ - bcd_dtc_blob = get_boardinfo_rescue_flash(); - if (bcd_dtc_blob != NULL) { - /* Board Configuration Data is intact, ready for parsing */ - ret = add_mac_addressess_to_env(bcd_dtc_blob); - if (ret != 0) { - printf("Error adding BCD data to environment\n"); - } - } -#endif - /* Configure USB hub */ usb_hx3_hub_init(); @@ -92,6 +79,18 @@ int checkboard(void) int misc_init_r(void) { + const void* bcd_dtc_blob; + int ret; + + bcd_dtc_blob = get_boardinfo_rescue_flash(); + if (bcd_dtc_blob != NULL) { + /* Board Configuration Data is intact, ready for parsing */ + ret = add_mac_addressess_to_env(bcd_dtc_blob); + if (ret != 0) { + printf("Error adding BCD data to environment\n"); + } + } + return 0; } @@ -177,3 +176,4 @@ int ft_board_setup(void *blob, bd_t *bd) return 0; } + |