9
0
Fork 0
Commit Graph

19 Commits

Author SHA1 Message Date
Sascha Hauer e6b8bdc0c5 cfi_flash: move include/cfi_flash.c next to driver
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>
2010-02-08 14:37:50 +01:00
Sascha Hauer 582da05383 cfi_flash: remove old driver and switch to new one
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-08 14:37:49 +01:00
Sascha Hauer 8b82899341 cfi_flash_new: make code more readable, return is not a function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-08 14:37:49 +01:00
Sascha Hauer 089066237d cfi_flash_new: generate flash erase dots in common function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-08 14:37:49 +01:00
Sascha Hauer 146ba46d41 cfi_flash_new: Safe indention level by bailing out earlier in error case
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-08 14:37:49 +01:00
Sascha Hauer 4e459d98ef cfi_flash_new: Fix Intel chips
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>
2010-02-08 14:37:49 +01:00
Marc Kleine-Budde 1e658639f1 cfi_flash: fix alignment problem
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 alligned (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-alligned address with a 32 bit pointer.

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

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 16:27:35 +01:00
Matthias Kaehlcke b36552fafd New CFI flash driver: Fix misleading trace when unprotecting a sector
When (un)protecting a flash sector with the new CFI flash driver a trace
"protect 0x..." is generated, independently of the type of operation. This is
misleading in case of an unprotect. Tell the truth when unprotecting a sector.

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-05 13:14:37 +01:00
Matthias Kaehlcke cd1e08850f CFI flash driver: Fix misleading trace when unprotecting a sector
When (un)protecting a flash sector with the CFI flash driver a trace
"protect 0x..." is generated, independently of the type of operation. This is
misleading in case of an unprotect. Tell the truth when unprotecting a sector.

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-05 13:14:37 +01:00
Marc Kleine-Budde ca8ec6c9d5 Cleanup some more collateral damage from renaming
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-15 21:23:42 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD c495fe0fcd cfi new: fix new disabling buffer support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-20 15:02:31 +02:00
Sascha Hauer 02ba8a0542 get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:47 +02:00
Sascha Hauer a2b7cd183b introduce cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:44 +02:00
Sascha Hauer 31c25dd6a3 new cfi driver: change function order to a more common one
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-25 16:52:28 +02:00
Sascha Hauer 42c9801f66 cfi driver: change function order to a more common one
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-05-25 16:52:24 +02:00
Karsten Schwinne f75a8a68f3 [cfi] add autoprobing, use cfi size for flash chips size
If a flash chip has been added with the size of "0" the cfi's size is
used for the flash chip.

Signed-off-by: Karsten Schwinne <kartsten.schwinne@de.bucurus.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-05-18 16:20:04 +02:00
Sascha Hauer db572dce5f cfi driver: Limit device size to actual size
When probing CFI, limit the device size to the actual probed size of
the flash

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-17 18:18:44 +01:00
Sascha Hauer 313a618ce0 Move cfi flash drivers to drivers/nor as suggested by Nishanth Menon
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-25 09:31:04 +02:00