diff options
Diffstat (limited to 'board/scalys/common')
-rw-r--r-- | board/scalys/common/Kconfig | 81 | ||||
-rw-r--r-- | board/scalys/common/board_configuration_data.c | 24 |
2 files changed, 93 insertions, 12 deletions
diff --git a/board/scalys/common/Kconfig b/board/scalys/common/Kconfig new file mode 100644 index 0000000..51cdc24 --- /dev/null +++ b/board/scalys/common/Kconfig @@ -0,0 +1,81 @@ +if TARGET_SIMC_TXXXX || TARGET_QT1040_1GB + +config SYS_VENDOR + default "scalys" + +config RAMBOOT_PBL + bool + default y + +config SPL_FSL_PBL + bool + default y + +config NOR_FLASH + bool + prompt "Support NOR flash" + default y + +config NAND_FLASH + bool + prompt "Support NAND flash" + default y + +config SPI_FLASH + bool + prompt "Support SPI flash" + default y + +config SDHC_FLASH + bool + prompt "Support SDHC flash" + default y + +choice + prompt "SYSCLK frequency" + default SYS_CLK_FREQ_100 + +config SYS_CLK_FREQ_66 + bool + prompt "66.6 MHz" + +config SYS_CLK_FREQ_100 + bool + prompt "100 MHz" + +endchoice + +choice + prompt "Bootsource" + default NAND_FLASH_BOOT + +config NAND_FLASH_BOOT + bool + depends on NAND_FLASH + prompt "NAND boot" + help + Select NAND Flash as the bootsource + +config NOR_FLASH_BOOT + bool + depends on NOR_FLASH + prompt "NOR boot" + help + Select NOR Flash as the bootsource + +config SPI_FLASH_BOOT + bool + depends on SPI_FLASH + prompt "SPI boot" + help + Select SPI Flash as the bootsource + +config SDHC_FLASH_BOOT + bool + depends on SDHC_FLASH + prompt "SDHC boot" + help + Select SDHC Flash as the bootsource +endchoice + +endif 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 |