Skip to contentSkip to conversation

nand: atmel: Rework ATMEL_EBI and DM_NAND_ATMEL interaction

PATCH In review Tom Rini 3 participants 6 messages Sep 26, 2025 – Oct 9, 2025

Subsystems (3)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 nand: atmel: Rework ATMEL_EBI and DM_NAND_ATMEL interaction

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
 	  For now this uclass has no methods yet.
 
 config ATMEL_EBI
-	bool "Support for Atmel EBI"
+	bool
 	help
 	  Driver for Atmel EBI controller. This is a dummy
 	  driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +1 -0
index aa4bb2a0595c..f083113486ed 100644
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
 config DM_NAND_ATMEL
 	bool "Support Atmel NAND controller with DM support"
 	depends on ARCH_AT91
+	select ATMEL_EBI
 	select SYS_NAND_SELF_INIT
 	imply SYS_NAND_USE_FLASH_BBT
 	help
Signature · 1 line
2.43.0
#1 lore raw
Quoted 33 lines · Tom Rini

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
 	  For now this uclass has no methods yet.
 
 config ATMEL_EBI
-	bool "Support for Atmel EBI"
+	bool
 	help
 	  Driver for Atmel EBI controller. This is a dummy
 	  driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +0 -0
index aa4bb2a0595c..f083113486ed 100644

drivers/mtd/nand/raw/Kconfig config SYS_NAND_NO_SUBPAGE_WRITE · line 52

Quoted 3 lines
drivers/mtd/nand/raw/Kconfig +0 -0
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
 config DM_NAND_ATMEL
 	bool "Support Atmel NAND controller with DM support"
 	depends on ARCH_AT91

Which branch is this patch based on ?
I have a conflict because this line ^^ is missing in master ("depends on ARCH_AT91")
Is there another patch for that ?

Quoted 4 lines
drivers/mtd/nand/raw/Kconfig +1 -0
+	select ATMEL_EBI
 	select SYS_NAND_SELF_INIT
 	imply SYS_NAND_USE_FLASH_BBT
 	help
author
#2 lore raw
Quoted 36 lines · Eugen Hristev
Quoted 33 lines · Tom Rini

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
 	  For now this uclass has no methods yet.
 
 config ATMEL_EBI
-	bool "Support for Atmel EBI"
+	bool
 	help
 	  Driver for Atmel EBI controller. This is a dummy
 	  driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +0 -0
index aa4bb2a0595c..f083113486ed 100644
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
Quoted 8 lines

drivers/mtd/nand/raw/Kconfig config SYS_NAND_NO_SUBPAGE_WRITE · line 52

Quoted 3 lines
drivers/mtd/nand/raw/Kconfig +0 -0
 config DM_NAND_ATMEL
 	bool "Support Atmel NAND controller with DM support"
 	depends on ARCH_AT91

Which branch is this patch based on ?
I have a conflict because this line ^^ is missing in master ("depends on ARCH_AT91")
Is there another patch for that ?

Ugh, yes, sorry, this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Signature · 1 line
Tom
#3 lore raw
Quoted 46 lines · Tom Rini
Quoted 36 lines · Eugen Hristev
Quoted 33 lines · Tom Rini

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
 	  For now this uclass has no methods yet.
 
 config ATMEL_EBI
-	bool "Support for Atmel EBI"
+	bool
 	help
 	  Driver for Atmel EBI controller. This is a dummy
 	  driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +0 -0
index aa4bb2a0595c..f083113486ed 100644
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
Quoted 8 lines

drivers/mtd/nand/raw/Kconfig config SYS_NAND_NO_SUBPAGE_WRITE · line 52

Quoted 3 lines
drivers/mtd/nand/raw/Kconfig +0 -0
 config DM_NAND_ATMEL
 	bool "Support Atmel NAND controller with DM support"
 	depends on ARCH_AT91

Which branch is this patch based on ?
I have a conflict because this line ^^ is missing in master ("depends on ARCH_AT91")
Is there another patch for that ?

Quoted 3 lines

Ugh, yes, sorry, this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Then maybe Dario can pick this up together with the dependency patch ?

author
#4 lore raw
Quoted 49 lines · Eugen Hristev
Quoted 46 lines · Tom Rini
Quoted 44 lines · Eugen Hristev
Quoted 33 lines · Tom Rini

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
 	  For now this uclass has no methods yet.
 
 config ATMEL_EBI
-	bool "Support for Atmel EBI"
+	bool
 	help
 	  Driver for Atmel EBI controller. This is a dummy
 	  driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +0 -0
index aa4bb2a0595c..f083113486ed 100644

drivers/mtd/nand/raw/Kconfig config SYS_NAND_NO_SUBPAGE_WRITE · line 52

Quoted 3 lines
drivers/mtd/nand/raw/Kconfig +0 -0
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
 config DM_NAND_ATMEL
 	bool "Support Atmel NAND controller with DM support"
 	depends on ARCH_AT91

Which branch is this patch based on ?
I have a conflict because this line ^^ is missing in master ("depends on ARCH_AT91")
Is there another patch for that ?

Quoted 5 lines
Quoted 3 lines

Ugh, yes, sorry, this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Then maybe Dario can pick this up together with the dependency patch ?

Works for me, Dario?

Signature · 1 line
Tom
#5 lore raw

Hi

I will add to my queue that I have now with patches, I have already prepared a branch

Michael

Quoted 61 lines · Tom Rini
Quoted 49 lines · Eugen Hristev
Quoted 46 lines · Tom Rini
Quoted 44 lines · Eugen Hristev
Quoted 33 lines · Tom Rini

The way that the NAND driver under DM_NAND_ATMEL is probed is by the dummy memory driver controlled by ATMEL_EBI. Rather than require that for NAND to work both be enabled, make NAND select ATMEL_EBI and do not prompt for ATMEL_EBI as it only triggers the probe for NAND.

---
Cc: Eugen Hristev <[email protected]>
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/memory/Kconfig       | 2 +-
 drivers/mtd/nand/raw/Kconfig | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/memory/Kconfig +1 -1
index eaee739c6aab..591d9d9c6569 100644
@@ -14,7 +14,7 @@ config MEMORY
    For now this uclass has no methods yet.
 
 config ATMEL_EBI
- bool "Support for Atmel EBI"
+ bool
  help
    Driver for Atmel EBI controller. This is a dummy
    driver. Doesn't provide an access to EBI controller. Select
drivers/mtd/nand/raw/Kconfig +0 -0
index aa4bb2a0595c..f083113486ed 100644

drivers/mtd/nand/raw/Kconfig config SYS_NAND_NO_SUBPAGE_WRITE · line 52

Quoted 3 lines
drivers/mtd/nand/raw/Kconfig +0 -0
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
 config DM_NAND_ATMEL
  bool "Support Atmel NAND controller with DM support"
  depends on ARCH_AT91

Which branch is this patch based on ?
I have a conflict because this line ^^ is missing in master ("depends on ARCH_AT91")
Is there another patch for that ?

Quoted 5 lines
Quoted 3 lines

Ugh, yes, sorry, this patch depends on:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Then maybe Dario can pick this up together with the dependency patch ?

Works for me, Dario?

--
Tom

Signature · 11 lines
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com