You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/11/06 15:19:58 UTC
[incubator-nuttx] branch master updated (d370064 -> 2f612a2)
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from d370064 sched/sched/sched_waitid.c: Allow WNOHANG
new 6c37d9f xtensa/esp32: Avoid init PSRAM when SPIRAM is not enabled
new d11f02d xtensa/esp32: Fix remaining SEPARATE typo
new 2f612a2 xtensa/esp32: Move #if defined(SPIRAM) to inside function
The 3 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/common/xtensa_initialize.c | 2 +-
arch/xtensa/src/common/xtensa_mm.h | 2 +-
arch/xtensa/src/esp32/Kconfig | 1 +
arch/xtensa/src/esp32/Make.defs | 2 +-
arch/xtensa/src/esp32/esp32_allocateheap.c | 6 ++++--
arch/xtensa/src/esp32/esp32_spi.c | 10 +++++-----
arch/xtensa/src/esp32/esp32_spiflash.c | 8 ++++----
7 files changed, 17 insertions(+), 14 deletions(-)
[incubator-nuttx] 02/03: xtensa/esp32: Fix remaining SEPARATE typo
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit d11f02d772e6270fbc8a9d6ac671da88f3aec931
Author: Alan C. Assis <ac...@gmail.com>
AuthorDate: Thu Nov 5 17:35:01 2020 -0300
xtensa/esp32: Fix remaining SEPARATE typo
---
arch/xtensa/src/common/xtensa_initialize.c | 2 +-
arch/xtensa/src/common/xtensa_mm.h | 2 +-
arch/xtensa/src/esp32/Make.defs | 2 +-
arch/xtensa/src/esp32/esp32_spi.c | 10 +++++-----
arch/xtensa/src/esp32/esp32_spiflash.c | 8 ++++----
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c
index 9a5b8c6..5bf57ad 100644
--- a/arch/xtensa/src/common/xtensa_initialize.c
+++ b/arch/xtensa/src/common/xtensa_initialize.c
@@ -150,7 +150,7 @@ void up_initialize(void)
/* Initialize the internal heap */
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
xtensa_imm_initialize();
#endif
diff --git a/arch/xtensa/src/common/xtensa_mm.h b/arch/xtensa/src/common/xtensa_mm.h
index 81a60cb..bfb75b5 100644
--- a/arch/xtensa/src/common/xtensa_mm.h
+++ b/arch/xtensa/src/common/xtensa_mm.h
@@ -34,7 +34,7 @@
* Pre-processor Macros
****************************************************************************/
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
# define UMM_MALLOC(s) xtensa_imm_malloc(s)
# define UMM_MEMALIGN(a,s) xtensa_imm_memalign(a,s)
# define UMM_FREE(p) xtensa_imm_free(p)
diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs
index f214634..fd34a7c 100644
--- a/arch/xtensa/src/esp32/Make.defs
+++ b/arch/xtensa/src/esp32/Make.defs
@@ -99,7 +99,7 @@ endif
CHIP_CSRCS += esp32_rtc.c
-ifeq ($(CONFIG_XTENSA_USE_SEPERATE_IMEM),y)
+ifeq ($(CONFIG_XTENSA_USE_SEPARATE_IMEM),y)
CHIP_CSRCS += esp32_imm.c
endif
diff --git a/arch/xtensa/src/esp32/esp32_spi.c b/arch/xtensa/src/esp32/esp32_spi.c
index fa38e99..494f1d1 100644
--- a/arch/xtensa/src/esp32/esp32_spi.c
+++ b/arch/xtensa/src/esp32/esp32_spi.c
@@ -869,14 +869,14 @@ static void esp32_spi_dma_exchange(FAR struct esp32_spi_priv_s *priv,
uint8_t *rp;
uint32_t n;
uint32_t regval;
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
uint8_t *alloctp;
uint8_t *allocrp;
#endif
/* If the buffer comes from PSRAM, allocate a new one from DRAM */
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(txbuffer))
{
alloctp = xtensa_imm_malloc(total);
@@ -890,7 +890,7 @@ static void esp32_spi_dma_exchange(FAR struct esp32_spi_priv_s *priv,
tp = (uint8_t *)txbuffer;
}
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(rxbuffer))
{
allocrp = xtensa_imm_malloc(total);
@@ -962,7 +962,7 @@ static void esp32_spi_dma_exchange(FAR struct esp32_spi_priv_s *priv,
rp += n;
}
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(rxbuffer))
{
memcpy(rxbuffer, allocrp, total);
@@ -970,7 +970,7 @@ static void esp32_spi_dma_exchange(FAR struct esp32_spi_priv_s *priv,
}
#endif
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(txbuffer))
{
xtensa_imm_free(alloctp);
diff --git a/arch/xtensa/src/esp32/esp32_spiflash.c b/arch/xtensa/src/esp32/esp32_spiflash.c
index cd95afc..eb077c7 100644
--- a/arch/xtensa/src/esp32/esp32_spiflash.c
+++ b/arch/xtensa/src/esp32/esp32_spiflash.c
@@ -1051,7 +1051,7 @@ static ssize_t esp32_read(FAR struct mtd_dev_s *dev, off_t offset,
finfo("esp32_read(%p, 0x%x, %d, %p)\n", dev, offset, nbytes, buffer);
#endif
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(buffer))
{
tmpbuff = xtensa_imm_malloc(nbytes);
@@ -1085,7 +1085,7 @@ static ssize_t esp32_read(FAR struct mtd_dev_s *dev, off_t offset,
#endif
error_with_buffer:
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(buffer))
{
memcpy(buffer, tmpbuff, (ret == OK) ? nbytes : 0);
@@ -1170,7 +1170,7 @@ static ssize_t esp32_write(FAR struct mtd_dev_s *dev, off_t offset,
return -EINVAL;
}
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(buffer))
{
tmpbuff = xtensa_imm_malloc(nbytes);
@@ -1210,7 +1210,7 @@ static ssize_t esp32_write(FAR struct mtd_dev_s *dev, off_t offset,
#endif
error_with_buffer:
-#ifdef CONFIG_XTENSA_USE_SEPERATE_IMEM
+#ifdef CONFIG_XTENSA_USE_SEPARATE_IMEM
if (esp32_ptr_extram(buffer))
{
xtensa_imm_free(tmpbuff);
[incubator-nuttx] 01/03: xtensa/esp32: Avoid init PSRAM when SPIRAM
is not enabled
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6c37d9ff80672dee8f0d8bf3adf27b7b27ebeb86
Author: Alan C. Assis <ac...@gmail.com>
AuthorDate: Thu Nov 5 17:34:00 2020 -0300
xtensa/esp32: Avoid init PSRAM when SPIRAM is not enabled
---
arch/xtensa/src/esp32/Kconfig | 1 +
arch/xtensa/src/esp32/esp32_allocateheap.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 1c92d7b..8825571 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -579,6 +579,7 @@ endchoice # ESP32_SPIRAM_SPEED
config ESP32_SPIRAM_BOOT_INIT
bool "Initialize SPI RAM during startup"
+ depends on ESP32_SPIRAM
default "y"
help
If this is enabled, the SPI RAM will be enabled during initial
diff --git a/arch/xtensa/src/esp32/esp32_allocateheap.c b/arch/xtensa/src/esp32/esp32_allocateheap.c
index 098a31c..41d1bee 100644
--- a/arch/xtensa/src/esp32/esp32_allocateheap.c
+++ b/arch/xtensa/src/esp32/esp32_allocateheap.c
@@ -93,7 +93,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
*
****************************************************************************/
-#if CONFIG_MM_REGIONS > 1
+#if CONFIG_MM_REGIONS > 1 && defined(CONFIG_ESP32_SPIRAM)
void xtensa_add_region(void)
{
/* Check for any additional memory regions */
[incubator-nuttx] 03/03: xtensa/esp32: Move #if defined(SPIRAM) to
inside function
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 2f612a20771af76bd7c3d11777d6a77f41f60a8e
Author: Alan C. Assis <ac...@gmail.com>
AuthorDate: Fri Nov 6 10:05:26 2020 -0300
xtensa/esp32: Move #if defined(SPIRAM) to inside function
---
arch/xtensa/src/esp32/esp32_allocateheap.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/xtensa/src/esp32/esp32_allocateheap.c b/arch/xtensa/src/esp32/esp32_allocateheap.c
index 41d1bee..efb57ec 100644
--- a/arch/xtensa/src/esp32/esp32_allocateheap.c
+++ b/arch/xtensa/src/esp32/esp32_allocateheap.c
@@ -93,13 +93,15 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
*
****************************************************************************/
-#if CONFIG_MM_REGIONS > 1 && defined(CONFIG_ESP32_SPIRAM)
+#if CONFIG_MM_REGIONS > 1
void xtensa_add_region(void)
{
+#if defined(CONFIG_ESP32_SPIRAM)
/* Check for any additional memory regions */
-#if defined(CONFIG_HEAP2_BASE) && defined(CONFIG_HEAP2_SIZE)
- umm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+# if defined(CONFIG_HEAP2_BASE) && defined(CONFIG_HEAP2_SIZE)
+ umm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE);
+# endif
#endif
}
#endif