9
0
Fork 0
barebox/drivers/nor
Sascha Hauer 7eebd3b4c6 cfi flash: Fix alignment problem
The intel cfi buffer write has a problem with writing when
the alignment of the buffer in memory is smaller than the
flash bus width.

This patch fixes a alignment problem which may show during this
scenario:
- 32 or 64 attached NOR flash
- flashing an image directly from network to the nor flash

The involved network driver is "smc9111.c".

The data that comes from the network stack and should be written into
the flash isn't 32 bit aligned (at least with this network driver).
This is probably due to the 48 bit wide ethernet addresses.

However the "cfi_flash.c" driver doesn't handle this situation, and
accesses the not-aligned address with a 32 bit pointer.

This patch fixes the problem by reducing the access width if an
aligment problem between source and destination is found.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-05 10:58:02 +02:00
..
Kconfig remove unused Kconfig variable HAS_CFI 2011-12-07 13:04:54 +01:00
Makefile nor: Add SPI flash driver 2011-08-24 18:44:31 +02:00
cfi_flash.c cfi flash: fix flash_make_cmd for big endian access 2011-09-23 16:32:48 +02:00
cfi_flash.h cfi flash: use cpu native accessors 2011-09-23 16:32:48 +02:00
cfi_flash_amd.c cfi_flash: support of u32 cmd 2011-08-26 09:33:37 +02:00
cfi_flash_intel.c cfi flash: Fix alignment problem 2012-04-05 10:58:02 +02:00
m25p80.c m25p80: set the correct erasesize when we use OPCODE_BE_4K 2011-11-25 12:41:18 +01:00
m25p80.h nor: Add SPI flash driver 2011-08-24 18:44:31 +02:00