summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-01-09 09:08:18 -0600
committerTom Rini <[email protected]>2026-01-09 10:19:57 -0600
commit1bcb2fe324180d0a8cfbdb0511737eba1d5b8550 (patch)
tree8b7449bae3c6c2202bab853f75813e9c43932bf1 /drivers/spi
parentcf51247c632fe6f1f6c29a6f7754b99915182142 (diff)
parent217cf656e249f698d390a7d8eaf255eb1a6c0230 (diff)
Merge patch series "Enable / require DEVRES for devm_.alloc usage outside xPL"
Tom Rini <[email protected]> says: As seen by a number of patches fixing memory leaks, U-Boot has a problem with developer expectations around devm_kmalloc and friends. Namely, whereas in Linux these memory allocations will be freed automatically in most cases, in U-Boot this is only true if DEVRES is enabled. Now, intentionally, in xPL phases, we do not (and do not offer as an option) enabling DEVRES. However in full U-Boot this is left either to the user, or some drivers have select'd DEVRES on their own. This inconsistency is a problem. This series goes and deals with two small issues that were shown by having all drivers that use devm_.alloc to allocate memory also select DEVRES and then we make DEVRES no longer be a prompted option and instead select'd as needed. We do not make this unconditional as it would result in growing the resulting binary on the many platforms which have no users of the devm_.alloc family of functions. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 63d61ccf8ed..8c6c095a8cf 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -35,6 +35,7 @@ config DM_SPI
config SPI_MEM
bool "SPI memory extension"
+ select DEVRES
help
Enable this option if you want to enable the SPI memory extension.
This extension is meant to simplify interaction with SPI memories
@@ -343,6 +344,7 @@ config MT7621_SPI
config MTK_SNOR
bool "Mediatek SPI-NOR controller driver"
depends on SPI_MEM
+ select DEVRES
help
Enable the Mediatek SPINOR controller driver. This driver has
better read/write performance with NOR.