summaryrefslogtreecommitdiffstats
path: root/drivers/nor/cfi_flash_intel.c
Commit message (Collapse)AuthorAgeFilesLines
* cfi flash: Fix alignment problemSascha Hauer2012-04-051-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cfi flash: Fix loop count calculationSascha Hauer2012-04-051-1/+1
| | | | | | | | 'reduce the number of loops by the width of the port' means a simple len / width. Do not try to be clever by shifting and doing it wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash: support of u32 cmdTeresa Gámez2011-08-261-1/+1
| | | | | | | | | | | | Some NOR flash chips have commands with length greater than the maximum value size of uchar. Based on an U-Boot Patch by Vasiliy Leoenenko <vasiliy.leonenko@mail.ru> Only tested with little endian on an intel cfi_flash. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash: introduce flash cmdset fixupJean-Christophe PLAGNIOL-VILLARD2010-12-031-0/+12
| | | | | | | | | | | | Move fixing up like geometry reversal into separate functions. The geometry reversal fixup is now performed by altering the qry structure directly, which makes the sector init code slightly cleaner. based on U-Boot Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cfi_flash: move reset command assigment to specific chipset init functionJean-Christophe PLAGNIOL-VILLARD2010-12-031-2/+3
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cfi_flash: Introduce read and write accessorsJean-Christophe PLAGNIOL-VILLARD2010-12-031-8/+10
| | | | | | | | | | | | Introduce flash_read{8,16,32,64) and flash_write{8,16,32,64} and use them to access the flash memory. This makes it clearer when the flash is actually being accessed; merely dereferencing a volatile pointer looks just like any other kind of access. based on U-Boot Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cfi_flash: update manufacturer id flash supportJean-Christophe PLAGNIOL-VILLARD2010-12-031-2/+2
| | | | | | | | several first banks can contain 0x7f instead of actual ID support as done in linux Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cfi_flash: move intel real protect flash support to cfi_flash_intel.cJean-Christophe PLAGNIOL-VILLARD2010-12-031-0/+13
| | | | | | let an empty function for amd as we will add later atmel real protect flash Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cfi_flash: Do not typedef struct flash_infoSascha Hauer2010-07-051-6/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash: move include/cfi_flash.c next to driverSascha Hauer2010-02-081-1/+1
| | | | | | | | This file has no useful things for others than the driver, so move it next to the driver and remove the corresponding include from other files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash: remove old driver and switch to new oneSascha Hauer2010-02-081-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash_new: generate flash erase dots in common functionSascha Hauer2010-02-081-8/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash_new: Safe indention level by bailing out earlier in error caseSascha Hauer2010-02-081-21/+24
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi_flash_new: Fix Intel chipsSascha Hauer2010-02-081-39/+3
| | | | | | | There was some mixup when to to a full status check and when to do a status check only. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cfi new: fix new disabling buffer supportJean-Christophe PLAGNIOL-VILLARD2009-10-201-0/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Move cfi flash drivers to drivers/nor as suggested by Nishanth MenonSascha Hauer2008-08-251-0/+175
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>