summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7fa62a6)
raw | patch | inline | side by side (parent: 7fa62a6)
author | Eric Ruei <e-ruei1@ti.com> | |
Thu, 29 Oct 2020 17:48:56 +0000 (13:48 -0400) | ||
committer | Sivaraj R <sivaraj@ti.com> | |
Thu, 5 Nov 2020 07:55:02 +0000 (01:55 -0600) |
Replace local cache line size definitions and macros with the CSL ones
Signed-off-by: Eric Ruei <e-ruei1@ti.com>
Signed-off-by: Eric Ruei <e-ruei1@ti.com>
packages/ti/drv/edma/examples/edma_memcpy_test/main.c | [changed mode: 0755->0644] | patch | blob | history |
packages/ti/drv/edma/unit_test/edma_ut/main.c | patch | blob | history |
diff --git a/packages/ti/drv/edma/examples/edma_memcpy_test/main.c b/packages/ti/drv/edma/examples/edma_memcpy_test/main.c
#include <ti/sysbios/knl/Task.h>
#endif
+/* CSL Header files */
+#include <ti/csl/soc.h>
+#include <ti/csl/csl_types.h>
+
/* Driver Include files. */
#include <ti/osal/osal.h>
#include <ti/drv/edma/edma.h>
#define TEST_BUF_LENGTH (2000U)
-#define TF_CACHE_LINESZ (128U)
-#define TF_ROUND_UP(x, y) (((x) + ((y)-1))/(y)*(y))
+/*
+ * Define the CACHE_LINSEZ based on system Cache configuration
+ * TPR12 use case: only L1 cache is enabled
+ */
+#define TF_CACHE_LINESZ CSL_CACHE_L1D_LINESIZE
+#define TF_ROUND_UP(x, y) CSL_NEXT_MULTIPLE_OF_POW2(x,y)
#define TEST_TIMEOUT_CYCLES (1000000U)
diff --git a/packages/ti/drv/edma/unit_test/edma_ut/main.c b/packages/ti/drv/edma/unit_test/edma_ut/main.c
index 5dffe0d5cb1ef2fd3ff4a40413bad32d5d79bf0d..a8a74b5c2b0e286f04997e177296c30a23e36442 100644 (file)
#endif
#include <ti/csl/soc.h>
+#include <ti/csl/csl_types.h>
#include "ti/osal/osal.h"
#include "ti/osal/CycleprofilerP.h"
/* ========================================================================== */
/* Global Variables */
/* ========================================================================== */
-#define TF_CACHE_LINESZ (128U)
-#define TF_ROUND_UP(x, y) (((x) + ((y)-1))/(y)*(y))
+/*
+ * Define the CACHE_LINSEZ based on system Cache configuration
+ * TPR12 use case: only L1 cache is enabled
+ */
+#define TF_CACHE_LINESZ CSL_CACHE_L1D_LINESIZE
+#define TF_ROUND_UP(x, y) CSL_NEXT_MULTIPLE_OF_POW2(x,y)
/**
* @brief