]> www.infradead.org Git - users/willy/xarray.git/commit
soc: fsl: qe: Add resource-managed muram allocators
authorHerve Codina <herve.codina@bootlin.com>
Thu, 8 Aug 2024 07:11:25 +0000 (09:11 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 3 Sep 2024 05:49:20 +0000 (07:49 +0200)
commitc6f39c7c165fce8fe1a41327da02dcca0a3cac25
treee8ef32c6357011328bd7997b031593a4f8190045
parentb741b66f1cc83105fdea9ac5503c5ac106a37494
soc: fsl: qe: Add resource-managed muram allocators

Introduce devm_cpm_muram_alloc() and devm_cpm_muram_alloc_fixed(), the
resource-managed version of cpm_muram_alloc and cpm_muram_alloc_fixed().

These resource-managed versions simplify the user avoiding the need to
call cpm_muram_free(). Indeed, the allocated area returned by these
functions will be automatically freed on driver detach.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20240808071132.149251-33-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/soc/fsl/qe/qe_common.c
include/soc/fsl/qe/qe.h