From: Scott Wood Date: Mon, 27 Jul 2009 10:12:12 -0500 Subject: [U-Boot] [PATCH] update nand.h to support address more than 0x80000000 In-Reply-To: <20090718232007.3848A832E416@gemini.denx.de> References: <92b05840906020427k3612221fp21eb23ce9dfa6751@mail.gmail.com> <20090602201923.GA4549@b07421-ec1.am.freescale.net> <20090718232007.3848A832E416@gemini.denx.de> Message-ID: <20090727151212.GA6855@b07421-ec1.am.freescale.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Jul 19, 2009 at 01:20:07AM +0200, Wolfgang Denk wrote: > Dear Scott Wood, > > In message <20090602201923.GA4549@b07421-ec1.am.freescale.net> you wrote: > > On Tue, Jun 02, 2009 at 07:27:01PM +0800, adrian wen wrote: > > > Hi all, > > > > > > I found a bug in nand.h which prevent UBOOT to supprt large NAND chip. > > > > > > The bug description as below: > > > In the original implementation, we use a wrapper function in > > > nand.h to facilitate nand_base function usage in other files, > > > like cmd_nand.c, nand_util.c etc. > > > > > > However, the wrapper in nand.h is using off_t which is long type. > > > If we pass a address like 0x80000000, which is allowed by nand_base.c, > > > the wrapper would recognize it as a negative num. So we would get a > > > huge num when this parameter get into nand_base.c > > > > > > Fix it by replacing off_t to loff_t type. > > > > > > Signed-off-by: Lei Wen > > > > A substantially similar patch was posted here: > > http://lists.denx.de/pipermail/u-boot/2009-May/052847.html > > > > I'm fine with this change, but it should also handle large erases. > > What happened out of this? I see a question asked by Adrian, but I > cannot find a reply from you? The previous patch (linked above) was applied. Large erase is still to be done. -Scott