[U-Boot-Users] Intel Strataflash in 8-bit mode

Hi
I am porting the board/ppmc8260/strataflash.c to my custom board, which is based on a MPC8245 with Intel 28F640J3A in 8-bit mode. The 28F640J3A can be configured as 8 bit or 16 bit wide. flash_detect_cfi() returns 16 bit portwidth (FLASH_CFI_16BIT) and 8 bit chipwidth (FLASH_CFI_BY8), while my configuration is 8 bit portwidth and 8 bit chipwidth (BYTE# pin is tied low => the device is in 8 bit mode). The 28F640J3A does not use A0 when reading identifier codes, so using 16 bit portwidth returns the correct results from the query structure. But using 16 bit portwidth in write_buff(), the result is that my data is written to just word aligned addresses. My quick and dirty fix is to set portwidth to 8 bit when entering write_buff() and restoring portwidth to 16 bit when leaving write_buff(). Also the flash_get_size() reports twice as much flash memory. Is there a way to detect if the device is in 8 or 16 bit mode? Has anyone used this device in 8 bit mode and already solved the problems that I experience?
Regards Rune Raknerud Cargoscan AS

In message 83C81A3C5FC2454CB3A5FBACC527D083058030@server2.cargoscan.com you wrote:
I am porting the board/ppmc8260/strataflash.c to my custom board, which is based on a MPC8245 with Intel 28F640J3A in 8-bit mode. The 28F640J3A can be configured as 8 bit or 16 bit wide. flash_detect_cfi() returns 16 bit portwidth (FLASH_CFI_16BIT) and 8 bit chipwidth (FLASH_CFI_BY8),
...
mode? Has anyone used this device in 8 bit mode and already solved the problems that I experience?
You may notice that there are three (3 !!!) other implementations of the very same driver in the U-Boot source tree:
board/esd/cpci440/strataflash.c board/esd/pmc405/strataflash.c board/ppmc8260/strataflash.c board/zpc1900/flash.c
Maybe we should make an attempt and clean up this mess a bit?
Stefan, two of these files are in your realm - do you have any resources available to take the lead?
Best regards,
Wolfgang Denk

You may notice that there are three (3 !!!) other implementations of the very same driver in the U-Boot source tree:
board/esd/cpci440/strataflash.c board/esd/pmc405/strataflash.c board/ppmc8260/strataflash.c board/zpc1900/flash.c
Maybe we should make an attempt and clean up this mess a bit?
Stefan, two of these files are in your realm - do you have any resources available to take the lead?
Sorry, no time and no hardware at the moment!
Ciao, Stefan.
participants (3)
-
Rune Raknerud
-
Stefan Roese
-
Wolfgang Denk