Skip to content

Commit

Permalink
tests: boards: esp32: Use smh in cache coex test
Browse files Browse the repository at this point in the history
Simplifies test by using smh API.

(cherry picked from commit ad70ff7)

Original-Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
GitOrigin-RevId: ad70ff7
Cr-Build-Id: 8738366835818535617
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8738366835818535617
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I1abe10e186e09c09c7e01452ddb4ebb7b0c49f92
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5822427
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
  • Loading branch information
LucasTambor authored and Chromeos LUCI committed Aug 29, 2024
1 parent abb1d9d commit 6bd1d49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/boards/espressif_esp32/cache_coex/prj.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CONFIG_ESP_SPIRAM=y
CONFIG_ESP_HEAP_MIN_EXTRAM_THRESHOLD=2048
CONFIG_HEAP_MEM_POOL_SIZE=98304
CONFIG_ESP_HEAP_SEARCH_ALL_REGIONS=n
CONFIG_FLASH=y
Expand Down
3 changes: 2 additions & 1 deletion tests/boards/espressif_esp32/cache_coex/src/cache_coex.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <zephyr/drivers/flash.h>
#include <zephyr/random/random.h>
#include <soc/soc_memory_layout.h>
#include <zephyr/multi_heap/shared_multi_heap.h>

/* definitions used in Flash & RAM operations */
#define SPIRAM_ALLOC_SIZE (24 * 1024)
Expand Down Expand Up @@ -201,7 +202,7 @@ static void psram_test(void)

static void psram_init(void)
{
mem = k_malloc(SPIRAM_ALLOC_SIZE);
mem = shared_multi_heap_aligned_alloc(SMH_REG_ATTR_EXTERNAL, 32, SPIRAM_ALLOC_SIZE);
if (!mem) {
TC_ERROR("SPIRAM allocation has failed\n");
}
Expand Down

0 comments on commit 6bd1d49

Please sign in to comment.