自制的板子
在uboot下,dhcp不成功 set ipaddr 固定ip地址,能ping通
但是tftp 速度非常慢
同样的网络环境,beaglebone的tftp速度却非常快
这是什么原因呢?
ps:phy是ksz8041
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
自制的板子
在uboot下,dhcp不成功 set ipaddr 固定ip地址,能ping通
但是tftp 速度非常慢
同样的网络环境,beaglebone的tftp速度却非常快
这是什么原因呢?
ps:phy是ksz8041
一个是查下给phy供时钟的晶振,看是否稳定。
另外,看下phy所需要的电阻配置是否正确。
static int cpsw_recv(struct eth_device *dev)
{
struct cpsw_priv *priv = dev->priv;
void *buffer;
int len;
cpsw_update_link(priv);
while (cpdma_process(priv, &priv->rx_chan, &buffer, &len) >= 0) {
invalidate_dcache_range((unsigned long)buffer,
(unsigned long)buffer + PKTSIZE_ALIGN);
NetReceive(buffer, len);
cpdma_submit(priv, &priv->rx_chan, buffer, PKTSIZE);
}
return 0;
}
把标红的部分注释掉,我用Lan8710,注释掉以前大概150KB/s,注释掉后达到500KB/S
不过我以前用的AT91RM9200可以达到700KB/s
测过了,同样的网络环境下,内核下面,传输一个3m的文件,需要13秒左右,而在uboot下面需要230秒。
谢谢你的回复,我刚试过了,还是不行,不过还是谢谢你的回复
我觉得kernel下速度比U-boot下速度快的原因是,U-boot下的cache和MMU没有打开,导致整个CPU系统运行速度慢
Jian Zhou: 您好,U-boot下的cache和MMU,如何开启呢?
U-boot源代码下:\ arch\arm\cpu\armv7\start.s中有个cpu_init_cp15()函数,里面禁用了MMU和cache,把这段代码注掉试试
在uboot中,已经有代码打开cache,可以参考附件中的patch,然后用命令 dcache on打开。