summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 78c8ec0)
raw | patch | inline | side by side (parent: 78c8ec0)
author | Sivaraj R <sivaraj@ti.com> | |
Mon, 13 May 2019 10:31:41 +0000 (16:01 +0530) | ||
committer | Sivaraj R <sivaraj@ti.com> | |
Mon, 13 May 2019 10:31:41 +0000 (16:01 +0530) |
Signed-off-by: Sivaraj R <sivaraj@ti.com>
test/src/main_osal_test.c | patch | blob | history |
index 234799c0fe2069c5a0dae1e6ba47dcd898b611dd..0b4b8e5e354e9cc52ec11fd010bd6545ce5a2878 100644 (file)
HwiP_Params hwiParams;
HwiP_Handle handle;
volatile int intCount = 0;
- int32_t ret;
+ int32_t ret;
bool test_pass=true;
HwiP_Params_init(&hwiParams);
OSAL_log("HwiP_post unsupported/failed!\n");
test_pass=false;
break;
- }
+ }
/* Wait for software timeout, ISR should hit
* otherwise return the test as failed */
break;
}
}
- /* Wait is over - did not get any interrupts posted/received
+ /* Wait is over - did not get any interrupts posted/received
* declare the test as fail
*/
if (gTestlocalTimeout == 0)
volatile int32_t i;
uint32_t prevCount, ctrlBitmap = OSAL_HWATTR_SET_OSALDELAY_TIMER_BASE ;
bool ret = true;
- int32_t osal_ret;\r
+ int32_t osal_ret;
#if (defined (SOC_AM437x) || defined (SOC_AM335x))
*(unsigned int*)CM_DPLL_CLKSEL_TIMER3_CLK = 0x1; /* high frequency input clock */
timerParams.startMode = TimerP_StartMode_USER;
timerParams.periodType = TimerP_PeriodType_MICROSECS;
timerParams.period = OSAL_TEST_TIMER_PERIOD;
-
+
#if defined(BUILD_C66X_1)
timerParams.eventId = 22;
id = 2;
{
return(false);
}
-
+
/* delete the semaphore block */
osal_ret = SemaphoreP_delete(semHandle);
if (osal_ret != (SemaphoreP_Status) SemaphoreP_OK)
{
return(false);
}
-
+
/* delete the hwi block */
osal_ret = HwiP_delete(hwiHandle);
if (osal_ret != (HwiP_Status) HwiP_OK)
#ifndef BARE_METAL
+
+#if defined (__C7100__)
+#include <ti/sysbios/family/c7x/Mmu.h>
+void InitMmu(void)
+{
+ Bool retVal;
+ Mmu_MapAttrs attrs;
+
+ Mmu_initMapAttrs(&attrs);
+
+ attrs.attrIndx = Mmu_AttrIndx_MAIR0;
+
+ retVal = Mmu_map(0x00000000, 0x00000000, 0x20000000, &attrs);
+ if(retVal==FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ retVal = Mmu_map(0x20000000, 0x20000000, 0x20000000, &attrs);
+ if(retVal==FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ retVal = Mmu_map(0x40000000, 0x40000000, 0x20000000, &attrs);
+ if(retVal==FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ retVal = Mmu_map(0x60000000, 0x60000000, 0x10000000, &attrs);
+ if(retVal==FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ attrs.attrIndx = Mmu_AttrIndx_MAIR7;
+
+ retVal = Mmu_map(0x80000000, 0x80000000, 0x20000000, &attrs); /* ddr */
+ if(retVal == FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ retVal = Mmu_map(0xA0000000, 0xA0000000, 0x20000000, &attrs); /* ddr */
+ if(retVal == FALSE)
+ {
+ goto mmu_exit;
+ }
+
+ retVal = Mmu_map(0x70000000, 0x70000000, 0x10000000, &attrs); /* msmc */
+ if(retVal == FALSE)
+ {
+ goto mmu_exit;
+ }
+
+mmu_exit:
+ if(retVal == FALSE)
+ {
+ System_printf(" ERROR: MMU init failed (status = %d) !!!", retVal);
+ }
+
+ return;
+}
+#endif /* #if defined (__C7100__) */
+
#if (defined(SOC_AM65XX)||defined(SOC_J721E)) && defined (__aarch64__)
#include <ti/sysbios/family/arm/v8a/Mmu.h>
goto mmu_exit;
}
-#if defined(SOC_J721E)
+#if defined(SOC_J721E)
mapIdx++;
retVal = Mmu_map(0x01800000, 0x01800000, 0x00200000, &attrs); /* gicv3 */
if (retVal == FALSE)
{
goto mmu_exit;
}
-
+
/* SCICLIENT UDMA */
mapIdx++;
retVal = Mmu_map(0x20000000ul, 0x20000000ul, 0x10000000ul, &attrs);
goto mmu_exit;
}
#endif
-
+
mapIdx++;
retVal = Mmu_map(0x02400000, 0x02400000, 0x000c0000, &attrs); /* dmtimer */
if (retVal == FALSE)
{
goto mmu_exit;
}
-
+
mapIdx++;
retVal = Mmu_map(0x02800000, 0x02800000, 0x00001000, &attrs); /* uart */
if (retVal == FALSE)
}
-
+
}
#ifdef ENABLE_GET_TIME_TEST
OSAL_log("\n Running Osal_getTime test:");
-
+
if(Osal_getTime_test() == true)
{
OSAL_log("\n Osal_getTime tests have passed. \n");
cfgClec.extEvtNum = 0;
cfgClec.c7xEvtNum = corepackEvent;
CSL_clecConfigEvent(clecBaseAddr, input, &cfgClec);
-
+
Hwi_setPriority(14, 1);
input = 1249; /* Used for Timer Interrupt */
cfgClec.extEvtNum = 0;
cfgClec.c7xEvtNum = corepackEvent;
CSL_clecConfigEvent(clecBaseAddr, input, &cfgClec);
-
+
Hwi_setPriority(15, 1);
}
void sysIdleLoop(void)
{
- __asm(" IDLE");
+ __asm(" IDLE");
}
#endif
/* To set C66 timer interrupts on J7ES VLAB */
C66xTimerInterruptInit();
#endif
-
+
#ifdef BUILD_C7X_1
C7x_ConfigureTimerOutput();
#endif