Re: [U-Boot] SPI flash writing

2012-03-14 Thread Mike Frysinger
On Wednesday 14 March 2012 20:02:27 Tom Rini wrote: > On Tue, Mar 13, 2012 at 10:31:02PM +0100, Falauto, Gerlando wrote: > > Can't the same command also be used for burning something *other than* > > u-boot (e.g. a kernel, config section, or something like that)? So the > > size of the flash *does

Re: [U-Boot] SPI flash writing

2012-03-14 Thread Mike Frysinger
On Wednesday 14 March 2012 02:44:45 Gerlando Falauto wrote: > The thing is, if you issue e write (or erase) and accidentally cross the > flash size boundary, you get a wraparound (or aliasing, or whatever you > want to call it) so that you end up overwriting (e.g. zeroing out bits) > the initial se

Re: [U-Boot] SPI flash writing

2012-03-14 Thread Tom Rini
On Tue, Mar 13, 2012 at 10:31:02PM +0100, Falauto, Gerlando wrote: > > >-Original Message- > >From: Mike Frysinger [mailto:vap...@gentoo.org] > >Sent: Tue 13.03.2012 21:35 > >To: Jason Cooper > >Cc: Falauto, Gerlando; u-boot; Brunck, Holger > >

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Gerlando Falauto
On 03/14/2012 03:18 AM, Simon Glass wrote: Hi Gerlando, On Tue, Mar 13, 2012 at 11:25 AM, Gerlando Falauto wrote: Hi everyone, [I took the liberty to Cc: Mike and Simon as they have provided patches in the area] I struggled for a while trying to update a Kirkwood-based board to the latest u

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Gerlando Falauto
On 03/14/2012 03:16 AM, Mike Frysinger wrote: On Tuesday 13 March 2012 17:31:02 Falauto, Gerlando wrote: From: Mike Frysinger [mailto:vap...@gentoo.org] On Tuesday 13 March 2012 16:17:52 Jason Cooper wrote: On Tue, Mar 13, 2012 at 04:11:29PM -0400, Mike Frysinger wrote: On Tuesday 13 March 20

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Simon Glass
Hi Gerlando, On Tue, Mar 13, 2012 at 11:25 AM, Gerlando Falauto wrote: > Hi everyone, > > [I took the liberty to Cc: Mike and Simon as they have provided patches in > the area] > > I struggled for a while trying to update a Kirkwood-based board to the > latest u-boot (with Keymile's patches). > >

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Mike Frysinger
On Tuesday 13 March 2012 17:31:02 Falauto, Gerlando wrote: > From: Mike Frysinger [mailto:vap...@gentoo.org] > >On Tuesday 13 March 2012 16:17:52 Jason Cooper wrote: > >> On Tue, Mar 13, 2012 at 04:11:29PM -0400, Mike Frysinger wrote: > >> > On Tuesday 13 March 2012 14:25:07 Gerlando Falauto wrote:

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Falauto, Gerlando
>-Original Message- >From: Mike Frysinger [mailto:vap...@gentoo.org] >Sent: Tue 13.03.2012 21:35 >To: Jason Cooper >Cc: Falauto, Gerlando; u-boot; Brunck, Holger >Subject: Re: [U-Boot] SPI flash writing >On Tuesday 13 March 2012 16:17:52 Jason Cooper wrote: >>

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Mike Frysinger
On Tuesday 13 March 2012 16:17:52 Jason Cooper wrote: > On Tue, Mar 13, 2012 at 04:11:29PM -0400, Mike Frysinger wrote: > > On Tuesday 13 March 2012 14:25:07 Gerlando Falauto wrote: > > > 2) an out-of-boundary-check againts the flash size so at least a > > > warning is issued when you use too big a

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Jason Cooper
On Tue, Mar 13, 2012 at 04:11:29PM -0400, Mike Frysinger wrote: > On Tuesday 13 March 2012 14:25:07 Gerlando Falauto wrote: > > 2) an out-of-boundary-check againts the flash size so at least a warning > > is issued when you use too big a size value > > i'm not sure about this. if you want to do s

Re: [U-Boot] SPI flash writing

2012-03-13 Thread Mike Frysinger
On Tuesday 13 March 2012 14:25:07 Gerlando Falauto wrote: > As it turned out, our update procedure: > > sf probe 0;sf erase 0 5;sf write ${load_addr_r} 0 ${filesize} > > mistakenly expects a maximum size of 0x5 (327680) bytes for > u-boot.kwb. Sadly, the latest u-boot trunk results in a b

[U-Boot] SPI flash writing

2012-03-13 Thread Gerlando Falauto
Hi everyone, [I took the liberty to Cc: Mike and Simon as they have provided patches in the area] I struggled for a while trying to update a Kirkwood-based board to the latest u-boot (with Keymile's patches). As it turned out, our update procedure: sf probe 0;sf erase 0 5;sf write ${lo