Sascha Hauer
f880d7bc87
nand bb: add proper bb remove function
...
The old way happily removed cdev entries which were no bb dev
at all. Fix this by checking if the given device actually is
a bb device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:56 +02:00
Sascha Hauer
e7c06800ee
nand bb: switch to cdev operations
...
The cdev operations are available without the complete file API,
so they are more suitable for internal usage.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:56 +02:00
Sascha Hauer
027db60302
nand: move bb handling code to drivers/mtd/nand
...
It's good to seperate the code which others can use from commands.
This way other users do not depend on the command being compiled in.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:56 +02:00
Sascha Hauer
3efa8f7bed
devfs: remove unused struct filep* argument from open/close
...
the cdev layer is under the file layer, so it should not use
struct filep*.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:07 +02:00
Sascha Hauer
eb133335e6
nand: Make write support optional
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 16:41:32 +02:00
Sascha Hauer
8527af99a2
nand: fix printf compiler warnings
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:37:52 +01:00
Juergen Beisert
c6f4ea0dcf
Make some help comments less confusing
...
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-18 08:11:06 +01:00
Sascha Hauer
922bb41a47
remove typedef cmd_tbl_t and replace it with struct command
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer
c0f46a1d3d
commands/nand.c: Fix memory hole
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 11:13:25 +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
Sascha Hauer
9af2cfb9ef
nand bb: Be sure that fd is at the beginning when erasing
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer
420a3173f0
commands: remove maxargs
...
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer
63e01b4969
call getopt_reset only once
...
instead of calling getopt_reset in each command,
call it only once before calling the command.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer
0c45663798
nand bb: fix handling of two subsequent bad blocks
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-12 19:32:33 +02:00
Sascha Hauer
2ee3e596c5
nand bb: fix removal of bb devices
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-11 09:13:28 +02:00
Sascha Hauer
33a6b5abca
nand bb: fix check when erasing a bb device
...
We can actually partly erase a bb device, so fix the check.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-11 09:13:22 +02:00
Sascha Hauer
7d27f77b6e
nand bb: Fix writing of nand page unaligned data
...
We used to write the data in nand_bb_write directly to the
NAND flash. If we do not write a whole NAND page at once, this
resulted in multiple writes of one page which corrupted the
ecc data.
Fix this by collecting 4096 bytes of data before actually
writing the data to the flash.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-13 10:43:06 +02:00
Sascha Hauer
4b34297cfb
Get rid of remaining DEVICE_TYPE_* usage
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +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
dba6c8ed44
fix compiler warning
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 18:23:48 +01:00
Nishanth Menon
aec8bdd7e5
Commands:NAND: Rmove unwanted prints remove unwanted prints which can interfere with protocols such as kermit downloads
...
Signed-off-by: Nishanth Menon <x0nishan@ti.com>
2008-09-15 10:11:04 +02:00
Sascha Hauer
2f6ccbb9f8
NAND: Calculate size of bb devices
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-03 14:53:26 +02:00
Sascha Hauer
f118d1a103
NAND: fix reading of bad block aware devices
...
When reading from bad block aware devices we must make sure not
to read beyond eraseblock boundaries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-03 14:04:15 +02:00
Sascha Hauer
9fc8c4e9bb
nand: add nand -b for marking blocks as bad
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-09-02 17:22:46 +02:00
Sascha Hauer
1fbb5f65d6
nand: Allow adding/removing of more than one bad block aware device at once
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:15 +02:00
Sascha Hauer
ccd76741c4
NAND: nand command updates
...
- allow removal of bad block aware devices
- turn printfs into debug
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:14 +02:00
Sascha Hauer
3d45abb7c4
[NAND] continue to make it work. Now works partly on at91sam9260
2008-06-06 09:30:39 +02:00
Sascha Hauer
f3351ebd78
add basic at91sam9260 support. Currently only second stage
...
bootloader is supported:
- No SDRAM initialisation
- No UART init / baudrate change
2008-06-06 09:30:32 +02:00