Skip to content

Integrate u-boot-seco-rk/seco_2017.09_next_eeprom_customUIDs

Commit: edgehog/bsp/rockchip/u-boot-seco-rk@6d6fa2fd

[EEPROM] Add option to use custom subsection on Seco EEPROM

This option enable custom subsections on SECO Eeprom. Each board can manage custom subsections (UIDs from 0xF0 to 0xFE) defining populate_custom_uid() in its board file.

--

Commit: edgehog/bsp/rockchip/u-boot-seco-rk@50d3aa63

[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.

--

Commit: edgehog/bsp/rockchip/u-boot-seco-rk@11669214

[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

--

Commit: edgehog/bsp/rockchip/u-boot-seco-rk@899e7681

[EEPROM] Cosmetic Fixes: remove trailing tabs and whitespaces

--

Commit: edgehog/bsp/rockchip/u-boot-seco-rk@62eb4d41

[EEPROM] Seco Eeprom Manager refactoring

This commit introduces a massive refactory of the Seco Eeprom Manager.

  1. 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
  1. Introduction of the management of some UIDs previously not considered
  • UID_PANEL_ID
  • UID_PANEL_ORIENTATION
  1. 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);

  2. Fix and improve coherency in names and comments

Merge request reports