Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642802
  • 博文数量: 75
  • 博客积分: 7001
  • 博客等级: 少将
  • 技术积分: 1465
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-11 17:39
文章分类

全部博文(75)

文章存档

2010年(1)

2009年(25)

2008年(49)

我的朋友

分类: LINUX

2008-06-24 19:46:35

Analysis to Ethernet controller in u-boot

 

There are two methods to initialize Ethernet controller in u-boot. Firstly, the initialization to Ethernet controller is implemented by invoking “eth_initialize() “, which is called by “start_armboot()” and in which board specific initializations to Ethernet controllers are discriminated by corresponding macros, respectively . This is a normal way. The other method may be not fit for people’s thought, which is accomplished by means of parsing some u-boot commands refering to some network protocols, then intializing Ethernet controller as needed. Take “tftpboot” command for an example. The related functions are as follows:

do_tftpb()->netboot_common()->NetLoop()->eth_halt(),eth_init(),TftpStart()->TftpSend()……

 

As to our board, the later method is adopted. I found out that the control and status registers are based on the base address of Ethernet controller to some degree, which is defined as 0x12000000 in reading code. Unfortunately, it’s difficult for me to understand its origin. To be worst, there is no more information on our datasheet.

 

 

References:

[1] http://www.jollen.org/blog/2006/09/uboot_driver.html

[2] http://blog.chinaunix.net/u2/68846/showart_694712.html

阅读(1845) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

edwinrong2008-06-26 10:19:17

Afer reading Ethernet spec <<91c96>> and the Hardware schematics for our board, the "AEN" pin is used to determine the base address of Ethernet controller. "AEN/nREG/nAS, in LOCAL BUS mode- Address enable input. Used as an addess qualifier. Address decoding is only enabled when AEN is low." quoted from <<91c96>>, p16. On our board, the AEN is controlled by A24, so, in my view, the base address should be 0x1000000. but the driver from Indian side is set 0x12000000, in which scenario, the ethern