Commit Graph

69 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD cc4a0ceeac drivers/mtd/nand: Move conditional compilation to Makefile
rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:43 +02:00
Scott Wood dfbf617ff0 NAND read/write fix
Implement block-skipping read/write, based on a patch from
Morten Ebbell Hestens <morten.hestnes@tandberg.com>.

Signed-off-by: Morten Ebbell Hestnes <morten.hestnes@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:28 -05:00
Scott Wood 984e03cdf1 NAND: Always skip blocks on read/write/boot.
Use of the non-skipping versions was almost always (if not always)
an error, and no valid use case has been identified.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:27 -05:00
Stefan Roese deac913eff NAND: Fix compilation warning and small coding style issue
Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-12 11:31:23 -05:00
William Juul 9ad754fef5 make nand dump and nand dump.oob work
Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:22 -05:00
William Juul 3043c045d5 Whitespace cleanup and marking broken code.
Changes requested by maintainer Stefan Roese after
posting patch to U-boot mailing list.

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:17 -05:00
William Juul 5e1dae5c3d Fixing coding style issues
- Fixing leading white spaces
 - Fixing indentation where 4 spaces are used instead of tab
 - Removing C++ comments (//), wherever I introduced them

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:17 -05:00
William Juul 4cbb651b29 Remove white space at end.
Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:16 -05:00
William Juul cfa460adfd Update MTD to that of Linux 2.6.22.1
A lot changed in the Linux MTD code, since it was last ported from
Linux to U-Boot. This patch takes U-Boot NAND support to the level
of Linux 2.6.22.1 and will enable support for very large NAND devices
(4KB pages) and ease the compatibility between U-Boot and Linux
filesystems.

This patch is tested on two custom boards with PPC and ARM
processors running YAFFS in U-Boot and Linux using gcc-4.1.2
cross compilers.

MAKEALL ppc/arm has some issues:
 * DOC/OneNand/nand_spl is not building (I have not tried porting
   these parts, and since I do not have any HW and I am not familiar
   with this code/HW I think its best left to someone else.)

Except for the issues mentioned above, I have ported all drivers
necessary to run MAKEALL ppc/arm without errors and warnings. Many
drivers were trivial to port, but some were not so trivial. The
following drivers must be examined carefully and maybe rewritten to
some degree:
 cpu/ppc4xx/ndfc.c
 cpu/arm926ejs/davinci/nand.c
 board/delta/nand.c
 board/zylonite/nand.c

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Stig Olsen <stig.olsen@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:15 -05:00
Wolfgang Denk 9b55a25369 Fix some more print() format errors.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 01:16:00 +02:00
Stefan Roese e870690bdc MTD/NAND: Fix printf format warning in nand code
This patch fixes NAND related printf format warning. Those warnings are
now visible since patch dc4b0b38d4
[Fix printf errors.] by Andrew Klossner has been applied. Thanks, this is
really helpful.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-07-10 10:46:13 +02:00
Marian Balakowicz 3bab76a26e Delay FIT format check on sector based devices
Global FIT image operations like format check cannot be performed on
a first sector data, defer them to the point when whole FIT image was
uploaded to a system RAM.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Partial ('cmd_nand' case) Acked-by: Grant Erickson <gerickson@nuovations.com>
NAND and DOC bits Acked-by: Scott Wood <scottwood@freescale.com>
2008-06-30 22:52:43 +02:00
Stelian Pop 5922db6c09 Cleanup nand_info[] declaration.
The nand_info array is declared as extern in several .c files.
Those days, nand.h contains a reference to the array, so there is
no need to declare it elsewhere.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-05-28 11:06:25 -05:00
Wolfgang Denk 42ffcec3f9 cmd_nand.c: fix another 'incompatible pointer type' warning.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-30 17:46:26 +02:00
Wolfgang Denk c71abba3cb cmd_nand.c: fix "differ in signedness" problem
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 14:55:12 +02:00
Wolfgang Denk 4ca79f477e NAND: fix some strict-aliasing compiler warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 12:08:18 +02:00
Marian Balakowicz 1372cce2b9 [new uImage] Use show_boot_progress() for new uImage format
This patch allocates a set of show_boot_progress() IDs for new uImage format
and adds show_boot_progress() calls in new uImage format handling code.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:33:01 +01:00
Marian Balakowicz 09475f7527 [new uImage] Add new uImage format handling to other bootm related commands
Updated commands:

docboot  - cmd_doc.c
fdcboot  - cmd_fdc.c
diskboot - cmd_ide.c
nboot    - cmd_nand.c
scsiboot - cmd_scsi.c
usbboot  - cmd_usb.c

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:33:01 +01:00
Marian Balakowicz 9a4daad0a3 [new uImage] Update naming convention for bootm/uImage related code
This patch introduces the following prefix convention for the
image format handling and bootm related code:

genimg_		- dual format shared code
image_		- legacy uImage format specific code
fit_		- new uImage format specific code
boot_		- booting process related code

Related routines are renamed and a few pieces of code are moved around and
re-grouped.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 14:58:34 +01:00
Marian Balakowicz d5934ad775 [new uImage] Add dual format uImage support framework
This patch adds framework for dual format images. Format detection is added
and the bootm controll flow is updated to include cases for new FIT format
uImages.

When the legacy (image_header based) format is detected appropriate
legacy specific handling is invoked. For the new (FIT based) format uImages
dual boot framework has a minial support, that will only print out a
corresponding debug messages. Implementation of the FIT specific handling will
be added in following patches.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-25 15:53:49 +01:00
Marian Balakowicz 2242f53698 [new uImage] Rename and move print_image_hdr() routine
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-21 17:27:41 +01:00
Marian Balakowicz b97a2a0a21 [new uImage] Define a API for image handling operations
- Add inline helper macros for basic header processing
- Move common non inline code common/image.c
- Replace direct header access with the API routines
- Rename IH_CPU_* to IH_ARCH_*

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0a1e03bcad cmd_nand : fix compiler warning.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-01-13 15:57:48 +01:00
Harald Welte 62d4f43653 Re-introduce the 'nand read.oob' and 'nand write.oob' commands
that used to exist with the legacy NAND code

Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-01-09 13:23:50 +01:00
Matthias Fuchs 5bd7fe9aeb Fix do_div() usage in nand process output
Fix usage of do_div() in nand erase|read|write process output.

The last patch to nand_util.c introduced do_div() instead of libgcc's
implementation. But do_div() returns the quotient in its first
macro parameter and not as result.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-09-15 21:38:38 +02:00
Matthias Fuchs c750d2e669 NAND: Add CFG_NAND_QUIET option
This config option sets the default for the progress information
output behavior that can also be configured through the 'quiet'
environment variable.

The legacy NAND code does not print the current progress info
on the console. So this option is for backward compatibility for
units that are in the field and where setting the quiet variable
is not an option. With CFG_NAND_QUIET set to '1' the console
progress info is turned off. This can still be overwritten
through the environment variable.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-09-15 21:05:33 +02:00
Stefan Roese b706d63559 Merge with git://www.denx.de/git/u-boot.git 2007-08-15 21:06:27 +02:00
Wolfgang Denk f2c2a937d8 Merge with /home/wd/git/u-boot/custodian/u-boot-testing 2007-08-06 01:11:08 +02:00
Andy Fleming 6bf6f114dc Merge branch 'testing' into working
Conflicts:

	CHANGELOG
	fs/fat/fat.c
	include/configs/MPC8560ADS.h
	include/configs/pcs440ep.h
	net/eth.c
2007-08-03 02:23:23 -05:00
Heiko Schocher fad6340715 make show_boot_progress () weak.
Signed-off-by: Heiko Schocher <hs@denx.de>
2007-07-13 09:54:17 +02:00
Jon Loeliger c76fe47425 common/cmd_[i-n]*: Remove obsolete references to CONFIG_COMMANDS.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-08 18:02:23 -05:00
Thomas Knobloch 10e038932f [NAND] Bad block skipping for command nboot
The old implementation of command nboot does not support reading the image from
NAND flash with skipping of bad blocks. The patch implements a new version of
the nboot command: by calling nboot.jffs2 from the u-boot command line the
command will load the image from NAND flash with respect to bad blocks (by using
nand_read_opts()). This is similar to e.g. the NAND read command: "nand
read.jffs2 ...".

Signed-off-by: Thomas Knobloch <knobloch@siemens.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2007-07-06 14:58:39 +02:00
Jon Loeliger 65c450b47a common/cmd_[i-z]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04 00:23:09 +02:00
Heiko Schocher 566a494f59 [PCS440EP] upgrade the PCS440EP board:
- Show on the Status LEDs, some States of the board.
                - Get the MAC addresses from the EEProm
                - use PREBOOT
                - use the CF on the board.
                - check the U-Boot image in the Flash with a SHA1
                  checksum.
                - use dynamic TLB entries generation for the SDRAM

Signed-off-by: Heiko Schocher <hs@denx.de>
2007-06-22 19:11:54 +02:00
Wolfgang Denk dd520bf314 Code cleanup. 2006-11-30 18:02:20 +01:00
Stefan Roese 856f054410 [PATCH] NAND: Partition name support added to NAND subsystem
chpart, nboot and NAND subsystem related commands now accept also partition
name to specify offset.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2006-10-28 17:11:10 +02:00
Stefan Roese 43a2b0e76a Add board/cpu specific NAND chip select function to 440 NDFC
Based on idea and implementation from Jeff Mann
Patch by Stefan Roese, 20 Oct 2006
2006-10-20 15:17:55 +02:00
Wolfgang Denk 87621bc247 Fix spelling; minor code cleanup. 2006-10-12 11:43:47 +02:00
Stefan Roese 752d6837c3 Cleanup of NAND update patch (remove changelog from cmd_nand.c)
Patch by Guido Classen, 10 Oct 2006
2006-10-11 17:04:11 +02:00
Stefan Roese 2255b2d204 * Several improvements to the new NAND subsystem:
- JFFS2 related commands implemented in mtd-utils style
  - Support for bad blocks
  - Bad block testing commands
  - NAND lock commands
  Please take a look at doc/README.nand for more details
  Patch by Guido Classen, 10 Oct 2006
2006-10-10 12:38:50 +02:00
Wolfgang Denk dc013d4640 Add loads of ntohl() in image header handling
Patch by Steven Scholz, 10 Jun 2005
2006-03-12 01:59:35 +01:00
Wolfgang Denk bfc81252c0 Minor code cleanup 2006-03-06 13:03:37 +01:00
Bartlomiej Sieka addb2e1650 Re-factoring the legacy NAND code (legacy NAND now only in board-specific
code and in SoC code). Boards using the old way have CFG_NAND_LEGACY and
BOARDLIBS = drivers/nand_legacy/libnand_legacy.a added. Build breakage for
NETTA.ERR and NETTA_ISDN - will go away when the new NAND support is
implemented for these boards.
2006-03-05 18:57:33 +01:00
Bartlomiej Sieka 038ccac511 Merge with /home/wd/git/u-boot/testing-NAND/ to add new NAND handling. 2006-02-24 09:37:22 +01:00
Wolfgang Denk 77ddac9480 Cleanup for GCC-4.x 2005-10-13 16:45:02 +02:00
Wolfgang Denk ac7eb8a315 Update of new NAND code
Patch by Ladislav Michl, 13 Sep 2005
2005-09-14 23:53:32 +02:00
Wolfgang Denk 932394ac43 Rewrite of NAND code based on what is in 2.6.12 Linux kernel
Patch by Ladislav Michl, 29 Jun 2005
2005-08-17 12:55:25 +02:00
Stefan Roese 9bcf2ab41f Fix problem in cmd_nand.c (only when defined CFG_NAND_SKIP_BAD_DOT_I)
Patch by Matthias Fuchs, 4 May 2005
2005-08-12 16:46:35 +02:00
wdenk 9dd41a7b0c * Fix debug code in omap5912osk flash driver
* Add support for MPC8247 based "IDS8247" board.
2005-05-12 22:48:09 +00:00
stroese 81b83c9ecc * Patch by Matthias Fuchs, 03 May 2005:
Added missing variable declaration in cmd_nand.c
  Modified CFG_PCI_PTM1MS in configs/PLU405.h to map 128MB ram
2005-05-03 06:12:20 +00:00