mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
cmd: add tlv_eeprom command
Add support for read/write of ONIE "Tlvinfo" EEPROM data format. TLV
stands for Type-Length-Value. The data format is described here:
https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html#board-eeprom-information-format
Based on U-Boot patch from the Open Compute project:
ec87e872d4/patches/u-boot/common/feature-sys-eeprom-tlv-common.patch
Keep only I2C EEPROM support. Use the generic eeprom driver. Fix
checkpatch issues.
Add support for multiple EEPROM TLV stores on the same system. This is
useful in case of SOM and carrier that both provide ID and hardware
configuration information.
Add option to enable for SPL. This allows selection of RAM configuration
based on EEPROM stored board identification.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
This commit is contained in:
committed by
Stefan Roese
parent
ae7ba525a5
commit
1c79f2ff88
14
cmd/Kconfig
14
cmd/Kconfig
@@ -242,6 +242,20 @@ config CMD_REGINFO
|
||||
help
|
||||
Register dump
|
||||
|
||||
config CMD_TLV_EEPROM
|
||||
bool "tlv_eeprom"
|
||||
depends on I2C_EEPROM
|
||||
help
|
||||
Display and program the system EEPROM data block in ONIE Tlvinfo
|
||||
format. TLV stands for Type-Length-Value.
|
||||
|
||||
config SPL_CMD_TLV_EEPROM
|
||||
bool "tlv_eeprom for SPL"
|
||||
depends on SPL_I2C_EEPROM
|
||||
select SPL_DRIVERS_MISC_SUPPORT
|
||||
help
|
||||
Read system EEPROM data block in ONIE Tlvinfo format from SPL.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Boot commands"
|
||||
|
@@ -183,6 +183,8 @@ obj-$(CONFIG_X86) += x86/
|
||||
obj-$(CONFIG_ARCH_MVEBU) += mvebu/
|
||||
endif # !CONFIG_SPL_BUILD
|
||||
|
||||
obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o
|
||||
|
||||
# core command
|
||||
obj-y += nvedit.o
|
||||
|
||||
|
1105
cmd/tlv_eeprom.c
Normal file
1105
cmd/tlv_eeprom.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user