drivers: dma: stm32_bdma: fix comments
Some comments were not updated following the change in how uncached memory regions are defined in devicetree. Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
This commit is contained in:
parent
32f0a15486
commit
e71b50244e
1 changed files with 5 additions and 5 deletions
|
|
@ -806,20 +806,20 @@ static int bdma_stm32_init(const struct device *dev)
|
||||||
((struct bdma_stm32_data *)dev->data)->dma_ctx.dma_channels = 0;
|
((struct bdma_stm32_data *)dev->data)->dma_ctx.dma_channels = 0;
|
||||||
((struct bdma_stm32_data *)dev->data)->dma_ctx.atomic = 0;
|
((struct bdma_stm32_data *)dev->data)->dma_ctx.atomic = 0;
|
||||||
|
|
||||||
/* The BDMA can only access SRAM4 and assumes it's nocachable
|
/* The BDMA can only access SRAM4 and assumes it's uncached
|
||||||
* This check verifies that the non-cachable flag is set in the DTS.
|
* This check verifies that the nocache memory attribute is set in the devicetree.
|
||||||
* For example:
|
* For example:
|
||||||
* &sram4 {
|
* &sram4 {
|
||||||
* zephyr,memory-attr = "RAM_NOCACHE";
|
* zephyr,memory-attr = <DT_MEM_ARM_MPU_RAM_NOCACHE>;
|
||||||
* };
|
* };
|
||||||
*/
|
*/
|
||||||
#if DT_NODE_HAS_PROP(DT_NODELABEL(sram4), zephyr_memory_attr)
|
#if DT_NODE_HAS_PROP(DT_NODELABEL(sram4), zephyr_memory_attr)
|
||||||
if ((DT_PROP(DT_NODELABEL(sram4), zephyr_memory_attr) & DT_MEM_ARM_MPU_RAM_NOCACHE) == 0) {
|
if ((DT_PROP(DT_NODELABEL(sram4), zephyr_memory_attr) & DT_MEM_ARM_MPU_RAM_NOCACHE) == 0) {
|
||||||
LOG_ERR("SRAM4 is not set as non-cachable.");
|
LOG_ERR("SRAM4 is not set as uncached.");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#error "BDMA driver expects SRAM4 to be set as RAM_NOCACHE in DTS"
|
#error "BDMA driver expects SRAM4 to be set as uncached in devicetree"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue