zephyr/drivers/dma/Kconfig.mcux_lpc
Declan Snyder 191ad08154 drivers: dma_mcux_lpc: Add Kconfig to reduce data
Add a Kconfig to have the ability to fine tune the amount of RAM that
the driver uses based on the number of channels expected to be used.

Most of the code is already there but just need this Kconfig to get the
benefit of it by reducing the size of the statically created arrays.

Also change the number of channels field in the configuration to a byte
instead of a 32 bit integer because that should be sufficient to
describe the number of DMA channels.

Rename LPC DMA Driver Kconfigs with namespace to MCUX_LPC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-07-17 13:06:01 -05:00

35 lines
1.2 KiB
Plaintext

# Copyright (c) 2020-2023, NXP
# SPDX-License-Identifier: Apache-2.0
config DMA_MCUX_LPC
bool "MCUX LPC DMAC driver"
default y
depends on DT_HAS_NXP_LPC_DMA_ENABLED
help
DMA driver for MCUX LPC MCUs.
if DMA_MCUX_LPC
config DMA_MCUX_LPC_NUMBER_OF_DESCRIPTORS
int "Number of DMA descriptors to use"
default 16
help
Each DMA descriptor can be used to transfer (1024*width) bytes of data.
Increase or decrease this value depending on the max number of data
transferred by the application.
config DMA_MCUX_LPC_NUMBER_OF_CHANNELS_ALLOCATED
int "Number of DMA channels to allocate memory for in driver"
default 0
help
The MCUX LPC DMA driver can save memory by not allocating static data
depending on this value. So, the application can save some data memory
space by setting this value to suit its needs. The meaning of the value
is "total number of unique DMA channels ever expected to be used, maximum
out of all DMA controllers". A value of 0 (default) means to allocate
as many channel data structures as the maximum number of DMA channels
in any DMA controller hardware. About 1 KB per 3-4 channels unused can
be saved by fine tuning this Kconfig.
endif # DMA_MCUX_LPC