diff options
Diffstat (limited to 'board/scalys/common/board_configuration_data.c')
-rw-r--r-- | board/scalys/common/board_configuration_data.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/board/scalys/common/board_configuration_data.c b/board/scalys/common/board_configuration_data.c index b6374da..fcb4e92 100644 --- a/board/scalys/common/board_configuration_data.c +++ b/board/scalys/common/board_configuration_data.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 Scalys B.V. + * Copyright 2017 Scalys B.V. * opensource@scalys.com * * SPDX-License-Identifier: GPL-2.0+ @@ -11,7 +11,7 @@ #include <fdt_support.h> #include <i2c.h> -#include <asm-generic/errno.h> +#include <linux/errno.h> #include <malloc.h> #include "board_configuration_data.h" @@ -49,7 +49,7 @@ int add_mac_addressess_to_env(const void* blob) memcpy(mac_address, value, 6); - //ret = fdtdec_get_byte_array( blob, prop_offset, propname, mac_address, 6 ); + /* ret = fdtdec_get_byte_array( blob, prop_offset, propname, mac_address, 6 ); */ if (count) { snprintf(eth_string, sizeof(eth_string), "eth%iaddr", count); @@ -93,17 +93,17 @@ const void* get_boardinfo_eeprom(void) /* Read the last 4 bytes to determine the lenght of the DTB data */ ret = i2c_read(BCD_I2C_ADDRESS, (BCD_EEPROM_SIZE-4), 2, (uint8_t*) &bcd_data_lenght, 4 ); if (ret != 0) { - debug("Error reading bcd length\n"); + printf("Error reading bcd length\n"); errno = -ENODEV; goto err_no_free; } /* Convert lenght from big endianess to architecture endianess */ bcd_data_lenght = ntohl(bcd_data_lenght); - debug("bcd_data_lenght = %i\n", bcd_data_lenght ); + printf("bcd_data_lenght = %i\n", bcd_data_lenght ); if (bcd_data_lenght > BCD_EEPROM_SIZE ) { - debug("%02x %02x %02x %02x\n", + printf("BCD data length error %02x %02x %02x %02x\n", ( (uint8_t*) &bcd_data_lenght)[0], ( (uint8_t*) &bcd_data_lenght)[1], ( (uint8_t*) &bcd_data_lenght)[2], @@ -115,17 +115,17 @@ const void* get_boardinfo_eeprom(void) /* Allocate, and verify memory for the BCD data */ bcd_data = (uint8_t*) malloc(bcd_data_lenght); if (bcd_data == NULL) { - debug("Error locating memory for BCD data\n"); + printf("Error locating memory for BCD data\n"); goto err_no_free; } - debug("Allocated memory for BCD data\n"); + printf("Allocated memory for BCD data\n"); /* Read the DTB BCD data to memory */ ret = i2c_read(BCD_I2C_ADDRESS, (BCD_EEPROM_SIZE-bcd_data_lenght), 2, (uint8_t*) bcd_data, bcd_data_lenght ); - debug("Read data from I2C bus\n"); + printf("Read data from I2C bus\n"); if (ret != 0) { - debug("Error reading complete BCD data from EEPROM\n"); + printf("Error reading complete BCD data from EEPROM\n"); errno = -ENOMEM; goto err_free; } @@ -141,7 +141,7 @@ const void* get_boardinfo_eeprom(void) received_crc = ntohl(received_crc); if (calculated_crc != received_crc) { - debug("Checksum error. expected %08x, got %08x\n", + printf("Checksum error. expected %08x, got %08x\n", calculated_crc, received_crc); errno = -EBADMSG; goto err_free; @@ -389,4 +389,4 @@ U_BOOT_CMD( "Show the Board Configuration Data (stored in eeprom)", "" ); -#endif
\ No newline at end of file +#endif |