You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/03/27 04:40:51 UTC
[incubator-nuttx] branch master updated (eb505ed -> 96037f0)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from eb505ed xtensa/esp32: Fix DMA burst mode being unintendedly disabled
new d334279 xtensa/esp32: Fix wrong math round operation on DMA init
new 96037f0 xtensa/esp32: Clean up unused include headers from DMA driver
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/xtensa/src/esp32/esp32_dma.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
[incubator-nuttx] 01/02: xtensa/esp32: Fix wrong math round
operation on DMA init
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit d3342795a8de597f675fb4acb8637d6125932caf
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Mar 26 12:20:30 2021 -0300
xtensa/esp32: Fix wrong math round operation on DMA init
---
arch/xtensa/src/esp32/esp32_dma.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/src/esp32/esp32_dma.c b/arch/xtensa/src/esp32/esp32_dma.c
index b4b2d21..8bd2f31 100644
--- a/arch/xtensa/src/esp32/esp32_dma.c
+++ b/arch/xtensa/src/esp32/esp32_dma.c
@@ -43,6 +43,10 @@
# define MIN(a,b) (a < b ? a : b)
#endif
+#ifndef ALIGN_UP
+# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
+#endif
+
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -82,11 +86,9 @@ uint32_t esp32_dma_init(struct esp32_dmadesc_s *dmadesc, uint32_t num,
{
data_len = MIN(bytes, ESP32_DMA_DATALEN_MAX);
- /* Round the number of bytes to the nearest word, since the buffer
- * length must be word-aligned.
- */
+ /* Buffer length must be rounded to next 32-bit boundary. */
- buf_len = (data_len + sizeof(uintptr_t) - 1) / sizeof(uintptr_t);
+ buf_len = ALIGN_UP(data_len, sizeof(uintptr_t));
dmadesc[i].ctrl = (data_len << DMA_CTRL_DATALEN_S) |
(buf_len << DMA_CTRL_BUFLEN_S) |
[incubator-nuttx] 02/02: xtensa/esp32: Clean up unused include
headers from DMA driver
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 96037f01d573b85a7fb0fe909a124fb54be6e4dd
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Mar 26 12:21:39 2021 -0300
xtensa/esp32: Clean up unused include headers from DMA driver
---
arch/xtensa/src/esp32/esp32_dma.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/xtensa/src/esp32/esp32_dma.c b/arch/xtensa/src/esp32/esp32_dma.c
index 8bd2f31..d398f5b 100644
--- a/arch/xtensa/src/esp32/esp32_dma.c
+++ b/arch/xtensa/src/esp32/esp32_dma.c
@@ -24,13 +24,8 @@
#include <nuttx/config.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
#include <assert.h>
#include <sys/types.h>
-#include <nuttx/kmalloc.h>
-#include <nuttx/irq.h>
#include "hardware/esp32_dma.h"
#include "esp32_dma.h"