Integrate meta-seco-rk/u-boot-seco_2017_09_next/seco_2017.09_next_eeprom_customUIDs
Integrate u-boot-seco-rk/seco_2017.09_next_eeprom_customUIDs
--
[EEPROM] Add option to use custom subsection on Seco EEPROM
This option enables custom subsections on SECO Eeprom. Each board can manage custom subsections (UIDs from 0xF0 to 0xFE) defining populate_custom_uid() in its board file.
--
[EEPROM] Add check on subsection length and zero initialization
To avoid overflow, it's better to check the subsection length before copying the content to the struct. It's also a best practise to initialize the struct at zero, so the data element can be safely printed as a string. For this purpose we also increase the data size in the struct by 1, to be sure that the last element is always zero and it wont be overwritten.
--
[EEPROM] Improve print of subsections and CRC
- PANEL_ID can be any 8 bit integer, print hexadecimal
- UID_PANEL_ORIENTATION is a character (L, R, N or P)
- Missing closing parenthesis on CRC Warning
--
[EEPROM] Cosmetic Fixes: remove trailing tabs and whitespaces
--
[EEPROM] Seco Eeprom Manager refactoring
This commit introduces a massive refactory of the Seco Eeprom Manager.
- Introduction of an initialization function, seco_eeprom_init(...), where
- read_raw_data(...): the whole eeprom is read and stored in memory
- check_header(...) and check_crc(...): version and CRC are checked
- populate_uids(...): the content is then stored and the various fields prepared for use
- Introduction of the management of some UIDs previously not considered
- UID_PANEL_ID
- UID_PANEL_ORIENTATION
-
Introduction of new exported functions int seco_eeprom_init(u8 i2c_bus_number, u8 i2c_addr); int seco_eeprom_get_macaddr(u8 *mac_addr); int seco_eeprom_get_panel_id(u8 *panel); int seco_eeprom_get_orientation(u8 *orientation); int seco_eeprom_print_all(void);
-
Fix and improve coherency in names and comments