全部博文(75)
分类: 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 0x
References:
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