<div>I have ported U-Boot 1.1.5 on S3C44B0, it can run on my custom board now.</div> <div>but the rtl8019 network driver doesn't work.I want rtl8019 to work in 16bit mode.but U-Boot 1.1.5 only surpport 8bit mode.</div> <div>the physical level send function is in u-boot-1.1.5\drivers\rtl8019.c,I list below:</div> <div>extern int eth_send (volatile void *<STRONG><FONT color=#c00000>packet,</FONT></STRONG> int length)<BR>{<BR> <STRONG><FONT color=#c00000>volatile unsigned char *p;</FONT></STRONG><BR> unsigned int pn;</div> <div> pn = length;<BR> p = (volatile unsigned char *) packet;</div> <div> while (get_reg (RTL8019_COMMAND) == RTL8019_TRANSMIT);</div> <div> put_reg (RTL8019_REMOTESTARTADDRESS0, 0);<BR> put_reg (RTL8019_REMOTESTARTADDRESS1, RTL8019_TPSTART);<BR> put_reg (RTL8019_REMOTEBYTECOUNT0, (pn & 0xff));<BR> put_reg (RTL8019_REMOTEBYTECOUNT1, ((pn >> 8) & 0xff));</div>
<div> put_reg (RTL8019_COMMAND, RTL8019_REMOTEDMAWR);<BR> while (pn > 0) {<BR> <STRONG><FONT color=#c00000>put_reg (RTL8019_DMA_DATA, *p++);</FONT></STRONG><BR> pn--;<BR> }</div> <div> pn = length;</div> <div> while (pn < 60) { /*Padding */<BR> put_reg (RTL8019_DMA_DATA, 0);<BR> pn++;<BR> }</div> <div> while (!(get_reg (RTL8019_INTERRUPTSTATUS)) & 0x40);</div> <div> put_reg (RTL8019_INTERRUPTSTATUS, 0x40);<BR> put_reg (RTL8019_TRANSMITPAGE, RTL8019_TPSTART);<BR> put_reg (RTL8019_TRANSMITBYTECOUNT0, (pn & 0xff));<BR> put_reg (RTL8019_TRANSMITBYTECOUNT1, ((pn >> 8 & 0xff)));<BR> put_reg (RTL8019_COMMAND, RTL8019_TRANSMIT);</div> <div> return 0;<BR>}</div> <div> </div> <div>since RTL8019 work in 8bit mode,the pointer "p" in "<FONT color=#c00000><STRONG>put_reg (RTL8019_DMA_DATA, *p++)"</STRONG> </FONT><FONT
color=#000000>is unsigned char type.</FONT></div> <div> </div> <div>if I let RTL8019 work in 16bit mode,i think i should change the pointer "p" to unsigned int type in order to transmit a 16bit word a time,then I run into a byte alignment problem.since the argument "<STRONG><FONT color=#c00000>packet</FONT></STRONG>" isn't always a even number.</div> <div>how to solve the problem?</div> <div>and I wonder the RTL8019 receive data package through interrupt mode or polling mode ,I guess it work in polling mode,am I right?</div> <div> </div> <div>best regarts</div> <div>jinrong</div><p> 
                <hr size=1><a href="http://music.yahoo.com.cn/?source=mail_mailbox_footer" target=blank>
Mp3疯狂搜-新歌热歌高速下
</a>