Sascha Hauer
d03831887e
imx_nand: use memcpy for copying from/to buffer
...
We do not need to use memcpy32 in read_buf/write_buf because
in these functions we only access SDRAM and not the internal SRAM
buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Sascha Hauer
d5578b8179
nand_imx: Speed up sequential read
...
When reading a page from nand prefetch the next page afterwards to
keep the controller busy. This way we can improve sequential reading
from NAND which is the common case for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Sascha Hauer
9d9be6ba9b
nand_imx: use optimized memcpy
...
The internal SRAM buffer of the i.MX NAND controller does not
allow byte accesses. We use the memcpy32 function to handle this.
If we have assembler optimized string functions we can do better
because they won't do byte accesses when source and target are word
aligned.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02: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
6cbf70a01a
Merge branch 'pu'
2010-02-01 17:25:59 +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
Ivo Clarysse
512a1c80ce
Fix nand_imx for i.MX21
...
Recent changes to the nand_imx driver broke it for i.MX21 systems;
the i.MX21 NAND controller is more akin to the one in i.MX27/i.MX31,
than to the one in i.MX25/i.MX35.
Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-29 09:33:02 +01:00
Robert P. J. Day
cbba91e07a
MTD: Correct typo in preprocessor directive.
...
Configuration directive should obviously start with "CONFIG_".
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 15:24:38 +01:00
Robert P. J. Day
9edcbdc9f3
NAND: Free asprintf()-allocated space upon mtd device deletion.
...
Given that add_mtd_device() invokes asprintf() thusly:
mtd->cdev.name = asprintf("nand%d", mtd->class_dev.id);
...
mtd->param_size.value = asprintf("%u", mtd->size);
...
mtd->cdev_oob.name = asprintf("nand_oob%d", mtd->class_dev.id);
make sure del_mtd_device() frees that in the reverse order.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 11:43:47 +01:00
Sascha Hauer
4c96c0e1a4
i.MX nand: mx21 has a v1 type controller
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-18 16:44:58 +01:00
Juergen Beisert
dac84c7b9d
documentation updates
...
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 11:32:02 +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
Eric Benard
59be9021d8
nand_imx.c : remove unused code
...
Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 15:35:22 +01:00
Eric Benard
68176ca7bb
nand_imx.c : add reset command
...
The RESET command was removed during the nand_imx.c driver rework.
The reset commant is necessary in order to get Micron Nand running
as they need a RESET command before being able to get any command.
Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 15:35:22 +01:00
Sascha Hauer
d177626ede
nand: do not write empty pages. Needed for writing UBI images
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Sascha Hauer
2c84734970
nand: refuse to write data if not beginning on a page boundary
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Sascha Hauer
c6f639fafb
NAND: Allow to read oob data
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 10:46:47 +01:00
Sascha Hauer
13d2d38aa2
i.MX: remove obsolete V2 Nand driver
...
Use the generic v1 driver instead
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 10:46:47 +01:00
Sascha Hauer
6986aa092e
i.MX Nand: Set correct datawidth/pagesize in CCM module
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 10:46:47 +01:00
Marc Kleine-Budde
a4b37431be
nand: print size parameter as unsinged not as signed
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-11-23 10:55:56 +01:00
Sascha Hauer
40a5f3de4e
Merge branch 'for-sascha' of git://uboot.jcrosoft.org/u-boot-v2 into from-jean
...
Conflicts:
board/a9m2440/a9m2440.c
board/pcm043/pcm043.c
drivers/nand/nand_imx.c
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-28 10:10:56 +01:00
Sascha Hauer
e6c306669b
imx_nand: add i.MX25/i.MX35 to Kconfig
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 15:45:04 +01:00
Sascha Hauer
5c6f33faa3
mxc_nand: add nand boot support for i.MX35
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 15:43:18 +01:00
Sascha Hauer
0ab9959f5a
mxc_nand: set proper spas / ecc size
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 15:42:49 +01:00
Sascha Hauer
a30b9d4872
IMX_NAND_BASE -> IMX_NFC_BASE
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:12:00 +01:00
Sascha Hauer
a968fad1cd
imx_nand: allow flash based bbt
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
422fbc0a28
mxc_nand: Add NFC V2 support
...
The v2 version of this controller is used on i.MX35/25 SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
ca479dcadd
mxc_nand: Make main/spare areas runtime configurable
...
The main/spare areas are on different addresses on later versions
of the controller, so make them configurable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
55d3a71dff
imx_nand: make oob read work on 512b page nands
...
Seems READOOB isn't valid on 512b page NANDs also.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
ef0aa39fb4
imx_nand: add booting from 2k NAND support
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
011f6dca89
mxc_nand: determine page and block size depending on NFMS bit
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:02 +01:00
Sascha Hauer
9a9477323d
mxc_nand: remove unused defines
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
0596c0f8b7
mxc nand: modify send_page to send all pages, not only one
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
a0446d65ca
mxc_nand: simplify command processing
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
c90018407f
mxc_nand: remove debug param
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
7bbb4c0c8e
mxc_nand: use buffers
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
1987ee65ab
mxc_nand: introduce mxc_do_addr_cycle
...
This factors the address cycle to a seperate function. This
becomes useful in a later patch where we can simplify the
command processing by making use of this function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
5c8b2a423b
nand_imx: merge send_read_page and send_prog_page
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Sascha Hauer
e9a313518a
nand_imx: fix largepage layout
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-26 13:06:01 +01:00
Eric Benard
8b05f7528c
imx-nand : remove wrong part of commit ca326e8882
...
previous fix for 2k pages was wrong so remove it
Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-23 09:42:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD
f6a579da9c
[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD
7ac3805353
at91: add cpu devices common api
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-20 15:02:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD
81362c2b2a
at91sam9: move to at91
...
this will allow to add at91rm9200 with the same api as done in the kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-20 15:02:36 +02: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
87e01f28cc
commands: return COMMAND_ERROR_USAGE
...
instead of calling u_boot_cmd_usage in each command to safe
space.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-19 10:18:52 +02:00
Sascha Hauer
16019c2ff9
nand_imx_v2: Use generic bbt scan function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-05 10:14:41 +02:00
Sascha Hauer
762ba0dac5
nand_imx_v2: Use a two staged scan process
...
With the in between initialised writesize values we can
further initialise our nand controller.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-05 10:13:39 +02:00
Sascha Hauer
cfc0e32d25
nand_imx_v2: abstract i.MX25 specific stuff properly
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-05 09:14:07 +02:00
Sascha Hauer
d571b52a96
nand_imx_v2: make nand_boot_test command more flexible
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-05 08:36:16 +02:00
Sascha Hauer
261fdae6db
nand_imx_v2: use xzalloc for data buffers
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-05 08:33:37 +02:00