Lines Matching refs:xEMACIndex

133 static BaseType_t prvGMACWaitLS( BaseType_t xEMACIndex,
157 NetworkInterface_t * pxZynq_FillInterfaceDescriptor( BaseType_t xEMACIndex,
246 BaseType_t xEMACIndex = ( BaseType_t ) pxInterface->pvArgument; in xZynqNetworkInterfaceInitialise() local
248 configASSERT( xEMACIndex >= 0 ); in xZynqNetworkInterfaceInitialise()
249 configASSERT( xEMACIndex < XPAR_XEMACPS_NUM_INSTANCES ); in xZynqNetworkInterfaceInitialise()
252 if( xEMACTaskHandles[ xEMACIndex ] == NULL ) in xZynqNetworkInterfaceInitialise()
256 pxMyInterfaces[ xEMACIndex ] = pxInterface; in xZynqNetworkInterfaceInitialise()
258 pxEMAC_PS = &( xEMACpsifs[ xEMACIndex ].emacps ); in xZynqNetworkInterfaceInitialise()
259 memset( &xEMACpsifs[ xEMACIndex ], '\0', sizeof( xEMACpsifs[ xEMACIndex ] ) ); in xZynqNetworkInterfaceInitialise()
261 …atus = XEmacPs_CfgInitialize( pxEMAC_PS, &( mac_configs[ xEMACIndex ] ), mac_configs[ xEMACIndex ]… in xZynqNetworkInterfaceInitialise()
284 NetworkInterface_t * pxInterface = pxMyInterfaces[ xEMACIndex ]; in xZynqNetworkInterfaceInitialise()
345 setup_isr( &( xEMACpsifs[ xEMACIndex ] ) ); in xZynqNetworkInterfaceInitialise()
346 init_dma( &( xEMACpsifs[ xEMACIndex ] ) ); in xZynqNetworkInterfaceInitialise()
347 start_emacps( &( xEMACpsifs[ xEMACIndex ] ) ); in xZynqNetworkInterfaceInitialise()
349 prvGMACWaitLS( xEMACIndex, xWaitLinkDelay ); in xZynqNetworkInterfaceInitialise()
355 if( xEMACIndex == 0 ) in xZynqNetworkInterfaceInitialise()
364 … configEMAC_TASK_STACK_SIZE, ( void * ) xEMACIndex, niEMAC_HANDLER_TASK_PRIORITY, &( xEMACTaskHand… in xZynqNetworkInterfaceInitialise()
369 prvGMACWaitLS( xEMACIndex, xWaitRelinkDelay ); in xZynqNetworkInterfaceInitialise()
385 BaseType_t xEMACIndex = ( BaseType_t ) pxInterface->pvArgument; in xZynqNetworkInterfaceOutput() local
387 configASSERT( xEMACIndex >= 0 ); in xZynqNetworkInterfaceOutput()
388 configASSERT( xEMACIndex < XPAR_XEMACPS_NUM_INSTANCES ); in xZynqNetworkInterfaceOutput()
422 if( ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_STATUS ) != 0UL ) in xZynqNetworkInterfaceOutput()
428 emacps_send_message( &( xEMACpsifs[ xEMACIndex ] ), pxBuffer, bReleaseAfterSend ); in xZynqNetworkInterfaceOutput()
440 static inline unsigned long ulReadMDIO( BaseType_t xEMACIndex, in ulReadMDIO() argument
446 … XEmacPs_PhyRead( &( xEMACpsifs[ 0 ].emacps ), phy_detected[ xEMACIndex ], ulRegister, &usValue ); in ulReadMDIO()
451 static BaseType_t prvGMACWaitLS( BaseType_t xEMACIndex, in prvGMACWaitLS() argument
470 ulPHYLinkStates[ xEMACIndex ] = ulReadMDIO( xEMACIndex, PHY_REG_01_BMSR ); in prvGMACWaitLS()
472 if( ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_STATUS ) != 0U ) in prvGMACWaitLS()
528 BaseType_t xEMACIndex = ( BaseType_t ) pxInterface->pvArgument; in xZynqGetPhyLinkStatus() local
530 if( ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_STATUS ) == 0U ) in xZynqGetPhyLinkStatus()
548 NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex, in pxFillInterfaceDescriptor() argument
551 pxZynq_FillInterfaceDescriptor( xEMACIndex, pxInterface ); in pxFillInterfaceDescriptor()
557 NetworkInterface_t * pxZynq_FillInterfaceDescriptor( BaseType_t xEMACIndex, in pxZynq_FillInterfaceDescriptor() argument
562 configASSERT( xEMACIndex >= 0 ); in pxZynq_FillInterfaceDescriptor()
563 configASSERT( xEMACIndex < XPAR_XEMACPS_NUM_INSTANCES ); in pxZynq_FillInterfaceDescriptor()
569 snprintf( pcNames[ xEMACIndex ], sizeof( pcNames[ xEMACIndex ] ), "eth%ld", xEMACIndex ); in pxZynq_FillInterfaceDescriptor()
572 pxInterface->pcName = pcNames[ xEMACIndex ]; /* Just for logging, debugging. */ in pxZynq_FillInterfaceDescriptor()
573 … pxInterface->pvArgument = ( void * ) xEMACIndex; /* Has only meaning for the driver functions. */ in pxZynq_FillInterfaceDescriptor()
591 BaseType_t xEMACIndex = ( BaseType_t ) pvParameters; in prvEMACHandlerTask() local
594 configASSERT( xEMACIndex >= 0 ); in prvEMACHandlerTask()
595 configASSERT( xEMACIndex < XPAR_XEMACPS_NUM_INSTANCES ); in prvEMACHandlerTask()
597 pxEMAC_PS = &( xEMACpsifs[ xEMACIndex ] ); in prvEMACHandlerTask()
608 FreeRTOS_printf( ( "prvEMACHandlerTask[ %ld ] started running\n", xEMACIndex ) ); in prvEMACHandlerTask()
630 xResult = emacps_check_rx( pxEMAC_PS, pxMyInterfaces[ xEMACIndex ] ); in prvEMACHandlerTask()
652 ulPHYLinkStates[ xEMACIndex ] |= niBMSR_LINK_STATUS; in prvEMACHandlerTask()
656 xStatus = ulReadMDIO( xEMACIndex, PHY_REG_01_BMSR ); in prvEMACHandlerTask()
658 … if( ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_STATUS ) != ( xStatus & niBMSR_LINK_STATUS ) ) in prvEMACHandlerTask()
660 ulPHYLinkStates[ xEMACIndex ] = xStatus; in prvEMACHandlerTask()
661 …OS_printf( ( "prvEMACHandlerTask: PHY LS now %d\n", ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_… in prvEMACHandlerTask()
666 if( ( ulPHYLinkStates[ xEMACIndex ] & niBMSR_LINK_STATUS ) != 0 ) in prvEMACHandlerTask()