Hello All: Thanks a lot for the prompt answers, unlike this e-mail. I've been off from the office since my post, so sorry for it.
I now notice I failed to provide sufficient details about the issue at discussion. The flash uses is a 16bit data width, but it is connected using just 8 bit width. Only the lower data byte is output by the chip and the A-1 address line is used. So in summary, one 16bit width flash chip used as 8bit width by a 8bit data width processor. On Thursday 14 May 2009 22:31:08 Michael Schwingen wrote: > Raúl Sánchez Siles wrote: > > Hello all: > > > > I have noticed some issues on CFI flash driver related to chip and bus > > width affecting read and writes. > > > > The system I'm dealing with is based on a Vitesse switch chip which > > embeds an ARM926ejs processor. It additionally provides RAM and flash > > controller. In this case we are using an spansion S29GL128 16MB flash > > chip, using a 8bit width data bus layout, so on each read/write cycle we > > can only retrieve 1byte at once. The flash chip data bus width is 16bit. > > > > I declare the flash like this: > > > > flash bank cfi 0x80000000 0x1000000 1 2 0 > > You mean you have *two* of those flash chips, each connected to one > 8-bit half of the 16-bit bus? No, read above. > > > => 1st problem (writing): > > [...] > > I guess the x16_as_x8 option defined but not used should be aimed at > > handling this, but this is unimplemented currently. > > Um - no. The x16_as_x8 option is used for 16-bit flashes that can be > used with an 8-bit data bus. The reason for that option is that in that > mode, the "magic" address values used for commands is shifted 1 bit > against what is used on "real" 8-bit flashs. The option should only tell > that a 16-bit flash chip is connected to a 8-bit bus - having multiple > such chips in parallel must be handled by the chip/bus geometry handling. And again, I think this is the point. I'll try to implement this parameter. Looks like what I only need is that "magic", it's only that so far I wasn't able to make the flash work any other way. I think I aim that the following line works: flash bank cfi 0x80000000 0x1000000 1 1 0 x16_as_x8 Please, correct me if I'm wrong. > > You might have a look at the CFI code in u-boot, which I *think* does > handle this situation correct, however, I have no board with such a > flash layout, so I can't really tell. Thanks, I'll take a look. > > cu > Michael > Regards, -- Raúl Sánchez Siles Departamento de Montaje INFOGLOBAL, S. A. * C/ Virgilio, 2. Ciudad de la Imagen. 28223 Pozuelo de Alarcón (Madrid), España * T: +34 91 506 40 00 * F: +34 91 506 40 01 _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development