Skip to contentSkip to conversation

cmd: eeprom: Fix config dependency

PATCH Superseded Ivan Orlov 2 participants 3 messages Feb 19, 2024 – Feb 23, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ivan Orlov

author
#0 lore raw

PATCH 1/1 cmd: eeprom: Fix config dependency

We should have CONFIG_DM_I2C or CONFIG_(SPL_)SYS_I2C_LEGACY enabled in order for cmd/eeprom.c to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly.

---
 cmd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
index a86b570517..6a1a64566c 100644
@@ -740,6 +740,7 @@ config CRC32_VERIFY
 
 config CMD_EEPROM
 	bool "eeprom - EEPROM subsystem"
+	depends on DM_I2C || SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY
 	help
 	  (deprecated, needs conversion to driver model)
 	  Provides commands to read and write EEPROM (Electrically Erasable
Signature · 1 line
2.34.1
#1 lore raw
Quoted 15 lines · Ivan Orlov

We should have CONFIG_DM_I2C or CONFIG_(SPL_)SYS_I2C_LEGACY enabled in order for cmd/eeprom.c to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly.

---
 cmd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
cmd/Kconfig +0 -0
index a86b570517..6a1a64566c 100644

cmd/Kconfig config CRC32_VERIFY · line 743

Quoted 4 lines
cmd/Kconfig +1 -0
@@ -740,6 +740,7 @@ config CRC32_VERIFY
 
 config CMD_EEPROM
 	bool "eeprom - EEPROM subsystem"
+	depends on DM_I2C || SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY

You cannot enable commands in SPL, so SPL_SYS_I2C_LEGACY doesn't make sense here.

Signature · 1 line
Tom
author
#2 lore raw
Quoted 18 lines · Tom Rini
Quoted 16 lines · Ivan Orlov

We should have CONFIG_DM_I2C or CONFIG_(SPL_)SYS_I2C_LEGACY enabled in order for cmd/eeprom.c to compile as it depends on the i2c functions which are not compiled otherwise. Update the Kconfig entry for the 'eeprom' command correspondingly.

---
  cmd/Kconfig | 1 +
  1 file changed, 1 insertion(+)
cmd/Kconfig +0 -0
index a86b570517..6a1a64566c 100644
@@ -740,6 +740,7 @@ config CRC32_VERIFY
 
Quoted 7 lines

cmd/Kconfig config CRC32_VERIFY · line 743

Quoted 3 lines
cmd/Kconfig +1 -0
  config CMD_EEPROM
  	bool "eeprom - EEPROM subsystem"
+	depends on DM_I2C || SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY

You cannot enable commands in SPL, so SPL_SYS_I2C_LEGACY doesn't make sense here.

Ah, alright, I'll fix it and send the V2. Thank you for the review!

Signature · 2 lines
Kind regards,
Ivan Orlov