[U-Boot] [PATCH v4 0/5] Devres (Managed Device Resource) for U-Boot
Masahiro Yamada
yamada.masahiro at socionext.com
Sat Jul 25 14:52:33 CEST 2015
This is version 4 of Devres series.
Simon, Albert and I discussed whether we need (want) to
get this framework in.
Looks like our agreement is that we can add Devres, but
keeping it optional. The DM core part still sticks to the
manual malloc() and free().
With CONFIG_DEVRES disabled, devres APIs fall back to
normal memory allocators, so there is no overhead.
Masahiro Yamada (5):
dm: add DM_FLAG_BOUND flag
devres: introduce Devres (Managed Device Resource) framework
devres: add devm_kmalloc() and friends (managed memory allocators)
devres: make Devres optional with CONFIG_DEVRES
devres: add debug command to dump device resources
drivers/core/Kconfig | 24 ++++
drivers/core/Makefile | 1 +
drivers/core/device-remove.c | 8 ++
drivers/core/device.c | 7 ++
drivers/core/devres.c | 259 +++++++++++++++++++++++++++++++++++++++++
include/dm/device-internal.h | 32 +++++
include/dm/device.h | 269 +++++++++++++++++++++++++++++++++++++++++++
include/dm/util.h | 9 ++
test/dm/cmd_dm.c | 12 +-
9 files changed, 620 insertions(+), 1 deletion(-)
create mode 100644 drivers/core/devres.c
--
1.9.1
More information about the U-Boot
mailing list