#define CONFIG_YYY_ETH_SPI_BUS 0 #define CONFIG_YYY_ETH_SPI_CS 0 代码流程 Uboot下PHYCHIP的驱动代码由一些函数构成,这些函数包含在文件PHYCHIP.c中,位于drivers/net/目录下,具体包含的函数以及含义如下: eth_init() eth_send() //链路层数据包发送 eth_rx() //链路层数据包接收 eth_halt() encRec...
void eth_halt(void) { struct udevice *current; struct eth_device_priv *priv; current = eth_get_dev(); if (!current || !eth_is_active(current)) return; eth_get_ops(current)->stop(current); priv = current->uclass_priv; if (priv) priv->state = ETH_STATE_PASSIVE; } 1. 2. 3....
注释掉下面2行 修正一直无法收到数据的错误,不要每次调用halt的时候都对PHY进行复位操作,否则会引起无法接受到数据的情况 [cpp]view plaincopyprint? void eth_halt(void) { DM9000_DBG("eth_halt\n"); /* RESET devie */ //phy_write(0, 0x8000); /* PHY RESET */ //DM9000_iow(DM9000_GPR, 0x01...
21 eth_halt(); 22 if (eth_init(bd) < 0) { 23 eth_halt(); 24 return(-1); 25 } 26 27 restart: 28 eth_getenv_enetaddr("ethaddr", NetOurEther); 29 /* 30 * Start the ball rolling with the given start function. From 31 * here on, this code is a state machine driven by...
542 eth_halt(); 543 else 544 eth_halt_state_only(); 545 546 eth_set_last_protocol(protocol); 547 548 ret = NetBootFileXferSize; 549 debug_cond(DEBUG_INT_STATE, "--- NetLoop Success!n"); 550 goto done; 551 552 case NETLOOP_FAIL: ...
(某些网络操作(ping / tftp / whatever...))eth_init() ops->start()eth_send() ops->send()eth_rx() ops->recv() (处理包) 如果 (ops->free_pkt) ops->free_pkt()eth_halt() ops->stop() CONFIG_PHYLIB / CONFIG_CMD_MII 如果你的设备支持在 MII 总线上使用任意值(几乎所有设备都支持),...
542 eth_halt(); 543 else 544 eth_halt_state_only(); 545 546 eth_set_last_protocol(protocol); 547 548 ret = NetBootFileXferSize; 549 debug_cond(DEBUG_INT_STATE, "--- NetLoop Success!"); 550 goto done; 551 552 case NETLOOP_FAIL: ...
542eth_halt(); 543else 544eth_halt_state_only(); 545 546eth_set_last_protocol(protocol); 547 548ret = NetBootFileXferSize; 549debug_cond(DEBUG_INT_STATE,'--- NetLoop Success!\n'); 550gotodone; 551 552caseNETLOOP_FAIL: 553net_cleanup_loop(); ...
修正一直无法收到数据的错误,不要每次调用halt的时候都对PHY进行复位操作,否则会引起无法接受到数据的情况 [cpp]view plaincopyprint? void eth_halt(void) { DM9000_DBG("eth_halt\n"); /* RESET devie */ //phy_write(0, 0x8000); /* PHY RESET */ ...
eth_halt(); return NetBootFileXferSize; case NETLOOP_FAIL: return (-1); } PingHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) { IPaddr_t tmp; volatile IP_t *ip = (volatile IP_t *)pkt; tmp = NetReadIP((void *)&ip->ip_src); ...