
thanks,you are right, it really init the chip through UBL. BUT, there is also one question: DM9000a 's driver has 8 bit accessing function:
#define CONFIG_DM9000_BASE 0x04000000 #define DM9000_IO CONFIG_DM9000_BASE #define DM9000_DATA (CONFIG_DM9000_BASE+2) // (BA1,it's the 16bit least significant bit (effective) ) #define DM9000_outb(d,r) ( *(volatile u8 *)r = d ) #define DM9000_inb(r) (*(volatile u8 *)r) static u8 DM9000_ior(int reg) { DM9000_outb(reg, DM9000_IO); return DM9000_inb(DM9000_DATA); }
/* Write a byte to I/O port */ static void DM9000_iow(int reg, u8 value) { DM9000_outb(reg, DM9000_IO); DM9000_outb(value, DM9000_DATA); } and the davinci's chipselect space is 16bit. when accessing it as 8bit ,the last bit(may be A-2 ?) will be effective, but the least significant bit(BA1) will not be effective, am i wrong? how does it work?
2010/7/19 Stefano Babic sbabic@denx.de
yaojin liu wrote:
hi: dm9000a works as 16bit bus width. however, i have not seen any init code
for
the dm355's chipselect. and by default ,the cs1 is 8bit bus width at reset. how doew it work?
I think the setup is done by the UBL provided by TI. U-boot is a 3-rd stage bootloader for DM355. The RBL (Rom Bootloader) loads the UBL from storage, that sets up the required peripherals (RAM / AEMIF), and then loads u-boot.
u-boot does not set the a2cr register in the AEMIF interface, but the UBL has already configured it for 16-bit access.
Best regards, Stefano Babic
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================