diff --git a/src/mod/cpsw_cpts_ioctl.c b/src/mod/cpsw_cpts_ioctl.c index 206f746bb..25853dffd 100644 --- a/src/mod/cpsw_cpts_ioctl.c +++ b/src/mod/cpsw_cpts_ioctl.c @@ -118,7 +118,7 @@ static int32_t CpswCpts_lookUpEstEvent(CpswCpts_Handle hCpts, uint32_t domain, CpswCpts_EstEvent *event); -static int32_t CpswCpts_handleEvents(CpswCpts_Handle hCpts, + int32_t CpswCpts_handleEvents(CpswCpts_Handle hCpts, CSL_cptsRegs *regs); /* ========================================================================== */ @@ -1148,7 +1148,7 @@ static int32_t CpswCpts_lookUpEstEvent(CpswCpts_Handle hCpts, return status; } -static int32_t CpswCpts_handleEvents(CpswCpts_Handle hCpts, +int32_t CpswCpts_handleEvents(CpswCpts_Handle hCpts, CSL_cptsRegs *regs) { CpswCpts_Event *evt; diff --git a/src/per/V1/cpsw.c b/src/per/V1/cpsw.c index a055b22f6..0611f408d 100644 --- a/src/per/V1/cpsw.c +++ b/src/per/V1/cpsw.c @@ -1091,16 +1091,16 @@ static int32_t Cpsw_registerIntrs(Cpsw_Handle hCpsw, { trigType = EnetSoc_getIntrTriggerType(enetType, instId, CPSW_INTR_STATS_PEND0); - hCpsw->hStatsIntr = EnetOsal_registerIntr(Cpsw_statsIsr, - statIntrNum, - cfg->intrPriority, - trigType, - &hCpsw->statsObj); - if (hCpsw->hStatsIntr == NULL) - { - ENETTRACE_ERR("Failed to register stats intr\r\n"); - status = ENET_EFAIL; - } +// hCpsw->hStatsIntr = EnetOsal_registerIntr(Cpsw_statsIsr, +// statIntrNum, +// cfg->intrPriority, +// trigType, +// &hCpsw->statsObj); +// if (hCpsw->hStatsIntr == NULL) +// { +// ENETTRACE_ERR("Failed to register stats intr\r\n"); +// status = ENET_EFAIL; +// } } /* Register MDIO interrupt */ @@ -1260,9 +1260,11 @@ static void Cpsw_cptsIsr(uintptr_t arg) Cpsw_Handle hCpsw = (Cpsw_Handle)arg; Enet_IoctlPrms prms; int32_t status; + CpswCpts_Handle hCpts = &hCpsw->cptsObj; ENET_IOCTL_SET_NO_ARGS(&prms); - status = CpswCpts_ioctl(&hCpsw->cptsObj, CPSW_CPTS_IOCTL_HANDLE_INTR, &prms); +// status = CpswCpts_ioctl(&hCpsw->cptsObj, CPSW_CPTS_IOCTL_HANDLE_INTR, &prms); + status = CpswCpts_handleEvents(hCpts ,(CSL_cptsRegs *)hCpts->virtAddr); /* TODO: Add ISR safe error: * ("Failed to handle CPTS intr: %d\r\n", status); */