mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] nvmem: fix Kconfig dependency of the Atmel I2C helper
@ 2026-12-01  9:20 Alexander Shiyan
  0 siblings, 0 replies; only message in thread
From: Alexander Shiyan @ 2026-12-01  9:20 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Shiyan

commit 0837819622a2 ("nvmem: add support for Atmel sha204(a)") adds
NVMEM_ATMEL_I2C for atmel-i2c.o, which uses both crc16() and bitrev16(),
but selects them in the wrong symbol: NVMEM_ATMEL_SHA204A selects CRC16
and BITREV while NVMEM_ATMEL_I2C selects BITREVERSE, a symbol that does
not exist in barebox.

Kconfig silently treats an unknown symbol as n, so the dead select is a
no-op. The dependencies only work today because the sole user,
NVMEM_ATMEL_SHA204A, selects CRC16 and BITREV itself; any other user of
NVMEM_ATMEL_I2C would fail to link.

Move CRC16 and BITREV to NVMEM_ATMEL_I2C, which is the symbol that
builds atmel-i2c.o, and drop the non-existent BITREVERSE.

Fixes: 0837819622a2 ("nvmem: add support for Atmel sha204(a)")
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 drivers/nvmem/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index b7501798cb..f251e22a5d 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -117,8 +117,6 @@ config STARFIVE_OTP
 config NVMEM_ATMEL_SHA204A
 	bool "Support for Microchip / Atmel SHA accelerator OTP support"
 	depends on I2C
-	select CRC16
-	select BITREV
 	select NVMEM_ATMEL_I2C
 	help
 	  Microchip / Atmel SHA accelerator and RNG.
@@ -127,7 +125,8 @@ config NVMEM_ATMEL_SHA204A
 
 config NVMEM_ATMEL_I2C
 	bool
-	select BITREVERSE
+	select CRC16
+	select BITREV
 
 config TI_K3_OTP
 	bool "TI K3 OTP"
-- 
2.54.0




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  9:20 [PATCH] nvmem: fix Kconfig dependency of the Atmel I2C helper Alexander Shiyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox