mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-20 23:47:14 +08:00
remove redundant code in zynqmp-r5-axu4ev bsp
This commit is contained in:
parent
41d55a4d47
commit
b57278f830
@ -55,11 +55,7 @@ struct xemac_s {
|
|||||||
enum xemac_types type;
|
enum xemac_types type;
|
||||||
int topology_index;
|
int topology_index;
|
||||||
void *state;
|
void *state;
|
||||||
#if 0
|
|
||||||
sys_sem_t sem_rx_data_available;
|
|
||||||
#else
|
|
||||||
struct eth_device *rt_eth_device;
|
struct eth_device *rt_eth_device;
|
||||||
#endif
|
|
||||||
#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5)
|
#if defined(OS_IS_FREERTOS) && defined(__arm__) && !defined(ARMR5)
|
||||||
TimerHandle_t xTimer;
|
TimerHandle_t xTimer;
|
||||||
#endif
|
#endif
|
||||||
|
@ -197,29 +197,6 @@ xemac_add(struct netif *netif,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
|
||||||
* The input thread calls lwIP to process any received packets.
|
|
||||||
* This thread waits until a packet is received (sem_rx_data_available),
|
|
||||||
* and then calls xemacif_input which processes 1 packet at a time.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
xemacif_input_thread(struct netif *netif)
|
|
||||||
{
|
|
||||||
struct xemac_s *emac = (struct xemac_s *)netif->state;
|
|
||||||
while (1) {
|
|
||||||
/* sleep until there are packets to process
|
|
||||||
* This semaphore is set by the packet receive interrupt
|
|
||||||
* routine.
|
|
||||||
*/
|
|
||||||
sys_sem_wait(&emac->sem_rx_data_available);
|
|
||||||
|
|
||||||
/* move all received packets to lwIP */
|
|
||||||
xemacif_input(netif);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
xemacif_input(struct netif *netif)
|
xemacif_input(struct netif *netif)
|
||||||
{
|
{
|
||||||
|
@ -353,9 +353,6 @@ static err_t low_level_init(struct netif *netif)
|
|||||||
netif->flags |= NETIF_FLAG_IGMP;
|
netif->flags |= NETIF_FLAG_IGMP;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
sys_sem_new(&xemac->sem_rx_data_available, 0);
|
|
||||||
#endif
|
|
||||||
/* obtain config of this emac */
|
/* obtain config of this emac */
|
||||||
mac_config = (XEmacPs_Config *)xemacps_lookup_config((unsigned)(UINTPTR)netif->state);
|
mac_config = (XEmacPs_Config *)xemacps_lookup_config((unsigned)(UINTPTR)netif->state);
|
||||||
|
|
||||||
|
@ -513,11 +513,7 @@ void emacps_recv_handler(void *arg)
|
|||||||
/* free up the BD's */
|
/* free up the BD's */
|
||||||
XEmacPs_BdRingFree(rxring, bd_processed, rxbdset);
|
XEmacPs_BdRingFree(rxring, bd_processed, rxbdset);
|
||||||
setup_rx_bds(xemacpsif, rxring);
|
setup_rx_bds(xemacpsif, rxring);
|
||||||
#if 0
|
|
||||||
sys_sem_signal(&xemac->sem_rx_data_available);
|
|
||||||
#else
|
|
||||||
eth_device_ready(xemac->rt_eth_device);
|
eth_device_ready(xemac->rt_eth_device);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OS_IS_FREERTOS
|
#ifdef OS_IS_FREERTOS
|
||||||
|
@ -108,14 +108,6 @@ void Xil_DCacheInvalidate(void)
|
|||||||
currmask = mfcpsr();
|
currmask = mfcpsr();
|
||||||
mtcpsr(currmask | IRQ_FIQ_MASK);
|
mtcpsr(currmask | IRQ_FIQ_MASK);
|
||||||
|
|
||||||
#if 0
|
|
||||||
stack_end = (u32 )&_stack_end;
|
|
||||||
stack_start = (u32 )&__undef_stack;
|
|
||||||
stack_size = stack_start-stack_end;
|
|
||||||
|
|
||||||
/* Flush stack memory to save return address */
|
|
||||||
Xil_DCacheFlushRange(stack_end, stack_size);
|
|
||||||
#endif
|
|
||||||
mtcp(XREG_CP15_CACHE_SIZE_SEL, 0);
|
mtcp(XREG_CP15_CACHE_SIZE_SEL, 0);
|
||||||
|
|
||||||
/*invalidate all D cache*/
|
/*invalidate all D cache*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user