From: Juergen Beisert Date: Thu, 14 Aug 2003 09:26:54 +0200 Subject: [U-Boot-Users] IDE and x86 port Message-ID: <200308140926.54274.jbeisert@eurodsn.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello all, is anybody out there who has a working IDE device on x86 port and u-boot? My u-boot prints: << Model: uSDnsi kDSFC-B 4 Firm: eR v.3010 Ser#: M 3T00580313 Type: Removable Hard Disk Capacitiy: 42188.8 MB = 41.2 GB (515899392 x 512) >> But the device is a "SunDisk SDCFB-4" and has a capacity of only 7872 sectors. 7872 = 0x0000'1EC0 -> 515899392 = 0x1EC0'0000 See: SunDisk SDCFB-4 uSDnsi kDSFC-B 4 It's confusing me, because long time ago I have written a small routine to read the hard disk device information. I read 256 words into a buffer, too. To get the right capacity value I have to swap the upper and lower word of the capacity long word. u-boot does the same, but after the swap capcity has the wrong value. I have compiled the cmd_ide.c with "gcc -E" to see, to what the macros get expanded and it seems ok. The swap seems the right way, but results into a wrong value (perhaps only on my port). Little endian <-> Big endian problem? Best regards Juergen Beisert -- ********************************* EuroDesign embedded technologies GmbH Waldstr. 4a 85414 Kirchdorf a.d. Amper/Germany Tel: +49/8166/99495-77 Fax: +49/8166/99495-81 EMAIL: jbeisert at eurodsn.de Web: http://www.eurodsn.de *********************************