From: Tuma Date: Wed, 21 Oct 2009 13:40:36 +0400 Subject: [U-Boot] cmd_onenand.c, onenand_block_read (...) In-Reply-To: <200910201727.04299.chernigovskiy@spb.gs.ru> References: <200910201727.04299.chernigovskiy@spb.gs.ru> Message-ID: <200910211340.36701.chernigovskiy@spb.gs.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Sorry, that was just printf format error. =) I've corrected everything, works fine. On Tuesday 20 October 2009 17:27:04 Tuma wrote: > Hi, All! > > It seems I have a trouble. > I want to use onenand_block_read function. So I've written a cover for it: > > int OneNANDBlockRead (loff_t _from, ssize_t _len, > ssize_t *_retlen, u_char *_buf, int _oob) > { > int lRet; > > return lRet; > } > > When I do from this fuction: > printf ("Reading from: 0x%X, Length: 0x%X\n", _from, _len); > I get _len and _form swapped. > What's wrong? > > I tryed to pass _from and _len as pointers - pointer addresses are correct > but printf ("Reading from: 0x%X\n", *_from); > printf ("Reading Length: 0x%X\n", *_len); > return swapped result again. > > This is how I call OneNANDBlockRead function: > static const ssize_t lLen = 0x20; > static const ulong lLT = 0x00260000; > OneNANDBlockRead (&lLT, &lLen, &retlen, lEnvironment, 0); > > > I don't understand it. > Can someone help me please. > > Of course if you need some more information on my problem - you can ask me. -- Software Developer General Satellite Corp.