Lines Matching refs:hw

41     NETC_SocGetBaseResource(&handle->hw, si);  in EP_GetBaseResource()
191 if (NETC_EnetcHasManagement(handle->hw.base) && (getSiNum(handle->cfg.si) == 0U)) in EP_DescriptorInit()
198 …if (NETC_SIConfigTxBDR(handle->hw.si, ring + idxStart, &bdrConfig->txBdrConfig[ring]) != kStatus_S… in EP_DescriptorInit()
208 … if (NETC_SIConfigRxBDR(handle->hw.si, ring, &bdrConfig->rxBdrConfig[ring]) != kStatus_Success) in EP_DescriptorInit()
228 NETC_SIRxRingEnable(handle->hw.si, ring, true); in EP_DescriptorInit()
259 NETC_SISetRxBDRGroup(handle->hw.si, (uint8_t)epConfig->siConfig.rxBdrGroupNum, in EP_SISetup()
261 NETC_SISetDefaultRxBDRGroup(handle->hw.si, epConfig->siConfig.defaultRxBdrGroup); in EP_SISetup()
264 result = NETC_EnetcConfigureSI(handle->hw.base, si, &epConfig->siConfig); in EP_SISetup()
276 NETC_SIEnableVlanToIpv(handle->hw.si, (bool)epConfig->siConfig.valnToIpvEnable); in EP_SISetup()
286 NETC_SIMapVlanToIpv(handle->hw.si, i, epConfig->siConfig.vlanToIpvMap[i]); in EP_SISetup()
299 NETC_SIMapIpvToRing(handle->hw.si, i, epConfig->siConfig.ipvToRingMap[i]); in EP_SISetup()
304 NETC_EnetcEnableSI(handle->hw.base, si, true); in EP_SISetup()
305 NETC_SIEnable(handle->hw.si, true); in EP_SISetup()
322 uint32_t *msixTable = (uint32_t *)(uintptr_t)handle->hw.msixTable; in EP_MSIXSetEntryTable()
328 result = NETC_EnetcSetMsixEntryNum(handle->hw.base, siNum, config->entryNum); in EP_MSIXSetEntryTable()
335 …((handle->hw.si->SIPCAPR1 & ENETC_SI_SIPCAPR1_NUM_MSIX_MASK) >> ENETC_SI_SIPCAPR1_NUM_MSIX_SHIFT) … in EP_MSIXSetEntryTable()
362 … handle->hw.func.pf->PCI_CFC_MSIX_MSG_CTL = ENETC_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_MSIX_EN_MASK; in EP_MSIXSetEntryTable()
366 … handle->hw.func.vf->PCI_CFC_MSIX_MSG_CTL = ENETC_VF_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_MSIX_EN_MASK; in EP_MSIXSetEntryTable()
372 handle->hw.si->SIMSIVR = (uint32_t)config->siComEntryIdx & ENETC_SI_SIMSIVR_VECTOR_MASK; in EP_MSIXSetEntryTable()
374 … handle->hw.si->SITMRMSIVR = (uint32_t)config->timerSyncEntryIdx & ENETC_SI_SITMRMSIVR_VECTOR_MASK; in EP_MSIXSetEntryTable()
375 handle->hw.si->SICMSIVR = (uint32_t)config->cmdBdEntryIdx & ENETC_SI_SICMSIVR_VECTOR_MASK; in EP_MSIXSetEntryTable()
382 … handle->hw.func.pf->PCI_CFC_MSIX_MSG_CTL = ENETC_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_FUNC_MASK_MASK; in EP_MSIXSetEntryTable()
386 … handle->hw.func.vf->PCI_CFC_MSIX_MSG_CTL = ENETC_VF_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_FUNC_MASK_MASK; in EP_MSIXSetEntryTable()
481 … handle->hw.func.vf->PCI_CFC_PCIE_DEV_CTL |= ENETC_VF_PCI_TYPE0_PCI_CFC_PCIE_DEV_CTL_INIT_FLR_MASK; in EP_Init()
482 …while ((handle->hw.func.pf->PCI_CFC_PCIE_DEV_CTL & ENETC_VF_PCI_TYPE0_PCI_CFC_PCIE_DEV_CTL_INIT_FL… in EP_Init()
486 handle->hw.func.vf->PCI_CFH_CMD |= ENETC_VF_PCI_TYPE0_PCI_CFH_CMD_BUS_MASTER_EN_MASK; in EP_Init()
488 NETC_EnetcGetCapability(handle->hw.base, &handle->capability); in EP_Init()
490 …handle->hw.base->NUM_SI[siNum].PSICFGR1 = NETC_ENETC_PSICFGR1_TC7_MAP(config->siConfig.vsiTcToTC[7… in EP_Init()
511 handle->hw.func.pf->PCI_CFH_CMD |= in EP_Init()
514 if (!NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_Init()
516 handle->hw.portGroup.port->POR |= (NETC_PORT_POR_TXDIS_MASK | NETC_PORT_POR_RXDIS_MASK); in EP_Init()
518 NETC_PortSoftwareResetEthMac(handle->hw.portGroup.eth); in EP_Init()
533 … handle->hw.func.pf->PCI_CFC_PCIE_DEV_CTL |= ENETC_PCI_TYPE0_PCI_CFC_PCIE_DEV_CTL_INIT_FLR_MASK; in EP_Init()
534 …while ((handle->hw.func.pf->PCI_CFC_PCIE_DEV_CTL & ENETC_PCI_TYPE0_PCI_CFC_PCIE_DEV_CTL_INIT_FLR_M… in EP_Init()
539 handle->hw.func.pf->PCI_CFH_CMD |= in EP_Init()
544 handle->hw.func.pf->PCIE_CFC_SRIOV_CTL |= in EP_Init()
547 NETC_EnetcGetCapability(handle->hw.base, &handle->capability); in EP_Init()
550 result = NETC_PortConfig(handle->hw.portGroup.port, &config->port.common); in EP_Init()
556 if (!NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_Init()
558 result = NETC_PortConfigEthMac(handle->hw.portGroup.eth, &config->port.ethMac); in EP_Init()
567 … handle->hw.portGroup.pseudo->PPMCR = NETC_PSEUDO_LINK_PPMCR_TXPAD(config->port.enPseudoMacTxPad); in EP_Init()
571 handle->hw.base->PVCLCTR = NETC_ENETC_PVCLCTR_OAI(config->enOuterAsInner); in EP_Init()
573 handle->hw.base->PPAUONTR = NETC_ENETC_PPAUONTR_THRESH(config->pauseOnThr); in EP_Init()
574 handle->hw.base->PPAUOFFTR = NETC_ENETC_PPAUOFFTR_THRESH(config->pauseOffThr); in EP_Init()
576 handle->hw.base->PRIO2TCMR0 = NETC_ENETC_PRIO2TCMR0_PRIO7TC(config->txPrioToTC[7]) | in EP_Init()
585 NETC_EnetcSetParser(handle->hw.base, &config->parserCfg); in EP_Init()
587 NETC_EnetcPortSetNativeVLAN(handle->hw.base, &config->rxOuterVLANCfg, true); in EP_Init()
588 NETC_EnetcPortSetNativeVLAN(handle->hw.base, &config->rxInnerVLANCfg, false); in EP_Init()
594 … if ((config->port.ethMac.rxMaxFrameSize >= 1024U) && NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_Init()
616 handle->hw.portGroup.port->POR &= ~(NETC_PORT_POR_TXDIS_MASK | NETC_PORT_POR_RXDIS_MASK); in EP_Init()
618 if (NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_Init()
672 result = NETC_SocPreInitVsi(&handle->hw, config->si); in EP_Init()
682 NETC_EnetcEnableSI(handle->hw.base, siNum, false); in EP_Deinit()
683 NETC_SIEnable(handle->hw.si, false); in EP_Deinit()
684 if (!NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_Deinit()
686 NETC_PortEthMacGracefulStop(handle->hw.portGroup.port); in EP_Deinit()
700 if ((siNum == 0U) && (!NETC_PortIsPseudo(handle->hw.portGroup.port))) in EP_Up()
702 miiMode = NETC_PortGetMIIMode(handle->hw.portGroup.eth); in EP_Up()
703 result = NETC_PortSetMII(handle->hw.portGroup.eth, miiMode, speed, duplex); in EP_Up()
710 NETC_EnetcEnableSI(handle->hw.base, siNum, true); in EP_Up()
711 NETC_SIEnable(handle->hw.si, true); in EP_Up()
718 NETC_EnetcEnableSI(handle->hw.base, getSiNum(handle->cfg.si), false); in EP_Down()
719 NETC_SIEnable(handle->hw.si, false); in EP_Down()
732 NETC_PortSetMacAddr(handle->hw.portGroup.port, macAddr); in EP_SetPrimaryMacAddr()
736 NETC_EnetcSetSIMacAddr(handle->hw.base, siNum, macAddr); in EP_SetPrimaryMacAddr()
845 … (uint32_t)((handle->hw.si->BDR[hwRing].TBIER & ENETC_SI_TBIER_TXFIE_MASK) != 0U); in EP_SendFrameCommon()
876 NETC_SISetTxProducer(handle->hw.si, hwRing, txBdRing->producerIndex); in EP_SendFrameCommon()
893 if (NETC_EnetcHasManagement(handle->hw.base) && (getSiNum(handle->cfg.si) == 0U)) in EP_SendFrame()
941 uint16_t consumer = NETC_SIGetTxConsumer(handle->hw.si, hwRing); in EP_ReclaimTxDescCommon()
1002 consumer = NETC_SIGetTxConsumer(handle->hw.si, hwRing); in EP_ReclaimTxDescCommon()
1023 if (NETC_EnetcHasManagement(handle->hw.base) && (getSiNum(handle->cfg.si) == 0U)) in EP_ReclaimTxDescriptor()
1135 bool isPseudoPort = NETC_PortIsPseudo(handle->hw.portGroup.port); in EP_GetRxFrameAttribute()
1200 NETC_SISetRxConsumer(handle->hw.si, ring, index); in EP_DropFrame()
1294 NETC_SISetRxConsumer(handle->hw.si, ring, index); in EP_ReceiveFrameCopyCommon()
1397 NETC_SISetRxConsumer(handle->hw.si, ring, index); in EP_ReceiveFrameCommon()
1513 result = NETC_CmdBDRInit((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR, config); in EP_CmdBDRInit()
1531 return NETC_CmdBDRDeinit((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR); in EP_CmdBDRDeinit()
1536 NETC_IPFInit(handle->hw.common, &config->dosCfg); in EP_RxIPFInit()
1537 NETC_PortSetIPF(handle->hw.portGroup.port, &config->portConfig); in EP_RxIPFInit()
1547 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxIPFAddTableEntry()
1558 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxIPFUpdateTableEntry()
1569 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxIPFDelTableEntry()
1580 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxIPFResetMatchCounter()
1591 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxIPFGetMatchedCount()
1602 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddSGITableEntry()
1613 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPUpdateSGITableEntry()
1624 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelSGITableEntry()
1635 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPGetSGIState()
1646 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddSGCLTableEntry()
1657 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelSGCLTableEntry()
1668 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPGetSGCLGateList()
1679 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPGetSGCLState()
1690 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddRPTableEntry()
1701 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPUpdateRPTableEntry()
1712 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddOrUpdateRPTableEntry()
1723 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelRPTableEntry()
1734 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPGetRPStatistic()
1746 …handle->hw.func.pf->PCI_CFC_MSIX_MSG_CTL |= (uint16_t)ENETC_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_FUNC_MA… in EP_MsixSetGlobalMask()
1750 handle->hw.func.pf->PCI_CFC_MSIX_MSG_CTL &= in EP_MsixSetGlobalMask()
1758 handle->hw.func.vf->PCI_CFC_MSIX_MSG_CTL |= in EP_MsixSetGlobalMask()
1763 handle->hw.func.vf->PCI_CFC_MSIX_MSG_CTL &= in EP_MsixSetGlobalMask()
1777 handle->hw.msixTable[entryIdx].control = (uint32_t)mask; in EP_MsixSetEntryMask()
1802 …((handle->hw.func.pf->PCI_CFC_MSIX_MSG_CTL & ENETC_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_MSIX_EN_MASK) !=… in EP_MsixGetPendingStatus()
1807 …((handle->hw.func.vf->PCI_CFC_MSIX_MSG_CTL & ENETC_VF_PCI_TYPE0_PCI_CFC_MSIX_MSG_CTL_MSIX_EN_MASK)… in EP_MsixGetPendingStatus()
1814 …*status = *(uint64_t *)((uintptr_t)handle->hw.msixTable + NETC_MSIX_TABLE_PBA_OFFSET + 8U * pbaIdx… in EP_MsixGetPendingStatus()
1835 NETC_EnetcEnablePromiscuous(handle->hw.base, siNum, config->macUCPromis, config->macMCPromis); in EP_RxL2MFInit()
1836 NETC_SIEnablePromisc(handle->hw.si, kNETC_PacketUnicast, config->rejectUC); in EP_RxL2MFInit()
1837 NETC_SIEnablePromisc(handle->hw.si, kNETC_PacketMulticast, config->rejectMC); in EP_RxL2MFInit()
1838 NETC_SIEnablePromisc(handle->hw.si, kNETC_PacketBroadcast, config->rejectBC); in EP_RxL2MFInit()
1863 NETC_EnetcAddMacAddrHash(handle->hw.base, siNum, type, hashIndex); in EP_RxL2MFAddHashEntry()
1909 NETC_EnetcDelMacAddrHash(handle->hw.base, siNum, type, hashIndex); in EP_RxL2MFDelHashEntry()
1924 NETC_EnetcDelMacAddrHash(handle->hw.base, siNum, type, hashIndex); in EP_RxL2MFDelHashEntry()
1952 …return NETC_CmdBDSendCommand((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR, &handle->cmdBd… in EP_RxL2MFAddEMTableEntry()
1974 …return NETC_CmdBDSendCommand((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR, &handle->cmdBd… in EP_RxL2MFDelEMTableEntry()
1980 NETC_EnetcConfigureVlanFilter(handle->hw.base, getSiNum(handle->cfg.si), config); in EP_RxL2VFInit()
1994 NETC_EnetcAddVlanHash(handle->hw.base, siNum, hashIndex); in EP_RxL2VFAddHashEntry()
2021 NETC_EnetcDelVlanHash(handle->hw.base, siNum, hashIndex); in EP_RxL2VFDelHashEntry()
2046 …return NETC_CmdBDSendCommand((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR, &handle->cmdBd… in EP_RxL2VFAddEMTableEntry()
2068 …return NETC_CmdBDSendCommand((netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR, &handle->cmdBd… in EP_RxL2VFDelEMTableEntry()
2083 handle->hw.portGroup.port->PTGSCR |= NETC_PORT_PTGSCR_TGE_MASK; in EP_TxPortTGSEnable()
2101 handle->hw.portGroup.port->PTGSCR &= ~NETC_PORT_PTGSCR_TGE_MASK; in EP_TxPortTGSEnable()
2113 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_TxTGSConfigAdminGcl()
2117 if (0U != (handle->hw.portGroup.port->PTGAGLSR & NETC_PORT_PTGAGLSR_CFG_PEND_MASK)) in EP_TxTGSConfigAdminGcl()
2129 if (0U != (handle->hw.portGroup.port->PTGAGLSR & NETC_PORT_PTGAGLSR_TG_MASK)) in EP_TxTGSConfigAdminGcl()
2179 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_TxtTGSGetOperGcl()
2191 if (!NETC_PortIsPseudo(handle->hw.portGroup.port)) in EP_TxTrafficClassConfig()
2193 …temp = handle->hw.portGroup.port->PFPCR & (~((uint32_t)1U << (uint32_t… in EP_TxTrafficClassConfig()
2194 … handle->hw.portGroup.port->PFPCR = temp | ((uint32_t)config->enPreemption << (uint32_t)tcIdx); in EP_TxTrafficClassConfig()
2196 …temp = handle->hw.portGroup.port->PDGSR & (~((uint32_t)1U << (uint32_t… in EP_TxTrafficClassConfig()
2197 handle->hw.portGroup.port->PDGSR = temp | ((uint32_t)config->enTcGate << (uint32_t)tcIdx); in EP_TxTrafficClassConfig()
2199 (void)NETC_EnetcPortEnableTSD(handle->hw.base, tcIdx, config->enableTsd); in EP_TxTrafficClassConfig()
2201 reseult = NETC_PortConfigTcMaxSDU(handle->hw.portGroup.port, tcIdx, &config->sduCfg); in EP_TxTrafficClassConfig()
2204 reseult = NETC_PortConfigTcCBS(handle->hw.portGroup.port, tcIdx, &config->cbsCfg); in EP_TxTrafficClassConfig()
2214 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddISITableEntry()
2225 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelISITableEntry()
2236 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddISTableEntry()
2247 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPUpdateISTableEntry()
2258 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelISTableEntry()
2269 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddISFTableEntry()
2280 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPUpdateISFTableEntry()
2291 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPDelISFTableEntry()
2302 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPAddISCTableEntry()
2313 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPGetISCStatistic()
2324 cdbrHandle.base = (netc_cbdr_hw_t *)(uintptr_t)&handle->hw.si->SICBDRMR; in EP_RxPSFPResetISCStatistic()
2336 NETC_SIPsiEnableInterrupt(handle->hw.si, mask, enable); in EP_PsiEnableInterrupt()
2343 return NETC_SIPsiGetStatus(handle->hw.si); in EP_PsiGetStatus()
2353 NETC_SIPsiClearStatus(handle->hw.si, mask); in EP_PsiClearStatus()
2360 return NETC_SIPsiSendMsg(handle->hw.si, msg, vsi); in EP_PsiSendMsg()
2367 return NETC_SIPsiCheckTxBusy(handle->hw.si, vsi); in EP_PsiCheckTxBusy()
2374 return NETC_SIPsiSetRxBuffer(handle->hw.si, vsi, buffAddr); in EP_PsiSetRxBuffer()
2381 return NETC_SIPsiGetRxMsg(handle->hw.si, vsi, msgInfo); in EP_PsiGetRxMsg()
2388 NETC_SIVsiEnableInterrupt(handle->hw.si, mask, enable); in EP_VsiEnableInterrupt()
2395 return NETC_SIVsiGetStatus(handle->hw.si); in EP_VsiGetStatus()
2402 NETC_SIVsiClearStatus(handle->hw.si, mask); in EP_VsiClearStatus()
2409 return NETC_SIVsiSendMsg(handle->hw.si, msgAddr, msgLen); in EP_VsiSendMsg()
2416 NETC_SIVsiCheckTxStatus(handle->hw.si, status); in EP_VsiCheckTxStatus()
2423 return NETC_SIVsiReceiveMsg(handle->hw.si, msg); in EP_VsiReceiveMsg()