u-boot-2011.03在mini2440/micro2440上的移植(三)——支持DM9000
来源:互联网 发布:clover软件怎么卸载 编辑:程序博客网 时间:2024/05/23 18:39
3.1 include/configs/micro2440.h
删除
#define CONFIG_CS8900 /* we have a CS8900 on-board */
#define CONFIG_CS8900_BASE 0x19000300
#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 10.0.0.110
#define CONFIG_SERVERIP 10.0.0.1
添加
#define CONFIG_CMD_NET
#define CONFIG_DRIVER_DM9000 1
#define CONFIG_DM9000_NO_SROM 1
#define CONFIG_DM9000_BASE 0x20000300
#define DM9000_IO CONFIG_DM9000_BASE
#define DM9000_DATA (CONFIG_DM9000_BASE + 4)
#define CONFIG_CMD_PING
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b //开发板MAC地址
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.10.126 //开发板IP地址
#define CONFIG_SERVERIP 192.168.10.124 //主机IP地址
【说明】
IP地址要根据实际情况自己设置, CONFIG_SERVERIP用于制定tftp等下载时的主机IP
3.2 board/samsung/micro2440/micro2440.c
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_CS8900
rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
#endif
#ifdef CONFIG_DRIVER_DM9000
rc = dm9000_initialize(bis);
#endif
return rc;
}
#endif
【说明】
到此,DM9000已经能初始化了,但是使用ping命令时,串口一直打印 "raise: Signal # 8 caught",下一步直接将该打印语句注释掉,经测试没有影响。
3.3 arch/arm/lib/eabi_compat.c
int raise (int signum)
{
#ifndef CONFIG_MICRO2440
printf("raise: Signal # %d caught/n", signum);
#endif
return 0;
}
【说明】
到这一步后可以ping通,但是总是出现了一个"could not establish link"的提示。按照下一步修改,这样修改的结果是第一次不能ping通,需使用Ctrl+C结束,以后即可ping通并使用tftp下载。
3.4 drivers/net/dm9000x.c
static int dm9000_init(struct eth_device *dev, bd_t *bd)
{
……
#ifndef CONFIG_MICRO2440
i = 0;
while (!(phy_read(1) & 0x20)) { /* autonegation complete bit */
udelay(1000);
i++;
if (i == 10000) {
printf("could not establish link/n");
return 0;
}
}
#endif
……
}
static void dm9000_halt(struct eth_device *netdev)
{
DM9000_DBG("%s/n", __func__);
#ifndef CONFIG_MICRO2440
/* RESET devie */
phy_write(0, 0x8000); /* PHY RESET */
DM9000_iow(DM9000_GPR, 0x01); /* Power-Down PHY */
DM9000_iow(DM9000_IMR, 0x80); /* Disable all interrupt */
DM9000_iow(DM9000_RCR, 0x00); /* Disable RX */
#endif
}
- u-boot-2011.03在mini2440/micro2440上的移植(三)——支持DM9000
- u-boot-2011.03在mini2440/micro2440上的移植(四)——支持内核启动
- u-boot-2011.03在mini2440/micro2440上的移植(五)——支持Nand Flash
- u-boot-2011.03在mini2440/micro2440上的移植(六)——支持yaffs下载
- u-boot-2011.03在mini2440/micro2440上的移植(七)——支持Nand Flash启动
- u-boot-2011.03在mini2440/micro2440上的移植(一)——准备工作
- u-boot-2011.03在mini2440/micro2440上的移植(二)——在RAM中运行
- u-boot-2011.03在mini2440/micro2440上的移植(八)——结束语及资源下载
- U-boot-200908在FL2440上的移植(三)--移植DM9000
- u-boot-2009.08在mini2440上的移植(四)---增加DM9000驱动和命令自动补全功能 ——调试心得
- u-boot-2010-06在mini2440上的移植(三)
- u-boot-2009.08在mini2440上的移植 增加DM9000网卡驱动
- u-boot-2009.08在mini2440上的移植(四)---增加DM9000驱动和命令自动补全功能
- u-boot-2009.08在飞凌OK2440/FL2440上的移植(三)——让u-boot支持DM9000A
- u-boot-2009.08在mini2440上的移植(三)---增加nand flash功能——调试心得
- u-boot-2013.07在mini2440上的移植(三):时钟体系的设置
- u-boot-2009.08在mini2440上的移植(三)---增加nand flash功能
- u-boot移植第四弹——2013.10u-boot增加dm9000的支持
- Asp.net IIS 7.5 怎么配置伪静态?
- Android中AsyncTask的简单用法 .
- u-boot-2011.03在mini2440/micro2440上的移植(二)——在RAM中运行
- sql经典常用大全
- 关于CString::IsEmpty()的返回值
- u-boot-2011.03在mini2440/micro2440上的移植(三)——支持DM9000
- S2SH获取oralce的date类型,显示在web页面带时间方法
- u-boot-2011.03在mini2440/micro2440上的移植(四)——支持内核启动
- shell 程序设计1--- 那些年我们一起学习linux程序设计
- jQuery 教程
- apache日志格式定义及示例说明
- sql语句导入导出大全
- 如何学习和理解Android系统
- u-boot-2011.03在mini2440/micro2440上的移植(五)——支持Nand Flash