Skip to content

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

Commit: https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/6d6fa2fd186100d6a53a6d90243215d1efc9479c

[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: https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/50d3aa63abbf2e553ef413d981426f631572c13b

[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: https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/11669214aaa75acfe3ec69329f5eb1953c92fc49

[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: https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/899e768164a69a18d4a6f430850442a879986ffa

[EEPROM] Cosmetic Fixes: remove trailing tabs and whitespaces

--

Commit: https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/62eb4d41662594613169bcc329f84fd7ee0a9061

[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

Loading