Commit Graph

933 Commits

Author SHA1 Message Date
William Juul 90ef117b68 Incorporate yaffs2 into U-boot
To use YAFFS2 define CONFIG_YAFFS2

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:19 -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
Kumar Gala 902ca09246 85xx: Rename CONFIG_NR_CPUS to CONFIG_NUM_CPUS
Use CONFIG_NUM_CPUS to match existing define used by 86xx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Jon Loeliger <jdl@freescale.com>
2008-08-12 00:09:29 +02:00
Kumar Gala 3216ca9692 Fix fallout from autostart revert
The autostart revert caused a bit of duplicated code as well as
code that was using images->autostart that needs to get removed so
we can build again.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-12 00:06:34 +02:00
Gururaja Hebbar K R a9fe0c3e7c common/cmd_load.c - Minor code & Coding Style cleanup
- os_data_header Variable is a carry over feature
   & unused. So removed all instance of this variable
 - Minor Code Style Update

Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-11 00:13:27 +02:00
dirk.behme@googlemail.com aa5ffa16d7 OneNAND: Remove base address offset usage
While locally preparing some U-Boot patches for ARM based OMAP3 boards, some
using OneNAND and some using NAND, we found some differences in OneNAND and
NAND command address handling.

As this might confuse users (it already confused us), we like to align OneNAND
and NAND address handling.

The issue is that cmd_onenand.c subtracts the onenand base address from the
addresses you type into the u-boot command line so, unlike nand, you can't
use addresses relative to the start of the onenand part e.g. this won't work:

onenand read 82000000 280000 400000

you have to use:

onenand read 82000000 20280000 400000

Looking at recent git, the only board currently using OneNAND is Apollon, and
for this the OneNAND base address is 0 (apollon.h)

#define	CFG_ONENAND_BASE	0x00000000

so patch below won't break any existing boards and will align OneNAND and NAND
handling on boards where OneNAND base address is != 0.

Signed-off-by: Steve Sakoman <sakoman@gmail.com>
Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
2008-08-10 22:45:04 +02:00
Wolfgang Denk 0bf202ec58 Revert "[new uImage] Add autostart flag to bootm_headers structure"
This reverts commit f5614e7926.

The commit was based on a misunderstanding of the (documented)
meaning of the 'autostart' environment variable. It might cause
boards to hang if 'autostart' was used, with the potential to brick
them. Go back to the documented behaviour.

Conflicts:

	common/cmd_bootm.c
	common/image.c
	include/image.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-10 01:26:26 +02:00
Peter Tyser 41266c9b5a FIT: Fix handling of images without ramdisks
boot_get_ramdisk() should not treat the case when a FIT image does
not contain a ramdisk as an error.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Michal Simek <monstr@monstr.eu>
2008-08-09 17:36:06 +02:00
Wolfgang Denk 21f971ec26 TQM823L: re-enable logo support; update LCD_INFO text
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-08 16:43:01 +02:00
Mark Jackson 1464eff77e Fix bitmap display for atmel lcd controller
The current lcd_display_bitmap() function does not work properly
for the Atmel LCD controller.

2 fixes need to be done:-

(a) when setting the colour map, use the lcd_setcolreg() function
    as provided by the Atmel driver
(b) the data is never actually written to the lcd framebuffer !!

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-08-01 12:42:50 +02:00
Wolfgang Denk 2bb6a1044f Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master 2008-07-31 17:50:37 +02:00
Mark Jackson a48311557d Add gzipped logo support
The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows:

  If this option is set, additionally to standard BMP
  images, gzipped BMP images can be displayed via the
  splashscreen support or the bmp command.

However, the splashscreen function *only* supports standard BMP images.

This patch adds the documented gzip support.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-07-31 17:48:50 +02:00
Guennadi Liakhovetski 2e752be39d Uncompressed images loaded to their start address shall set load_end too
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Bartlomiej Sieka <tur@semihalf.com>
2008-07-31 17:41:00 +02:00
Wolfgang Denk c37207d7f5 Fix printf() format problems with configurable prompts
U-Boot allows for configurable prompt strings using the
CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far,
the assumption was that any such user defined problts would contain
exactly one "%d" format specifier. But some boards did not.

To allow for flexible boot prompts without adding too complex code we
now allow to specify the whole list of printf() arguments in the user
definition. This is powerful, but requires a responsible user who
really understands what he is doing, as he needs to know for exanple
which variables are available in the respective context.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-31 17:08:27 +02:00
Kumar Gala 57c219ad5d Fix compile warnings in dlmalloc
The origional code was using on odd reference to get to the first
real element in av_[].  The first two elements of the array are
not used for actual bins, but for house keeping.  If we are more
explicit about how use the first few elements we can get rid of the
warnings:

dlmalloc.c: In function 'malloc_extend_top':
dlmalloc.c:1971: warning: dereferencing type-punned pointer will break strict-aliasing rules
dlmalloc.c:1999: warning: dereferencing type-punned pointer will break strict-aliasing rules
dlmalloc.c:2029: warning: dereferencing type-punned pointer will break strict-aliasing rules
...

The logic of how this code came to be is:
	bin_at(0) = (char*)&(av_[2]) - 2*SIZE_SZ

SIZE_SZ is the size of pointer, and av_ is arry of pointers so:
	bin_at(0) = &(av_[0])

Going from there to bin_at(0)->fd or bin_at(0)->size should be straight forward.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-31 11:21:15 +02:00
Stefan Roese ebb86c4ecd cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'
A recent patch used '#if (CONFIG_CMD_USB)' instead of
'#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes
common/bootm.c compile again.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-07-31 10:44:26 +02:00
Jean-Christophe PLAGNIOL-VILLARD c14eefcc48 Fix more printf() format warnings
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-30 00:54:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD 936897d4d1 Fix remaining CFG_CMD_ define, ifdef and comments
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-30 00:48:07 +02:00
Heiko Schocher 36d59bd9da Fix warnings if compiling with IDE support.
cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior
cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-07-30 00:29:52 +02:00
Michal Simek 1953d128fd microblaze: Fix printf() format issues
Signed-off-by: Michal Simek <monstr@monstr.eu>
2008-07-20 23:10:34 +02:00
Stefan Roese 97a3bf268d ide: Use CFG_64BIT_LBA instead of CFG_64BIT_STRTOUL
This is needed for boards that define CFG_64BIT_STRTOUL but don't define
CFG_64BIT_LBA.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-07-20 22:59:32 +02:00
Wolfgang Denk 699f051255 Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort Makefile
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-15 22:22:44 +02:00
Wolfgang Denk 1d28d48e3d Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2008-07-15 21:37:23 +02:00
Kim Phillips 6b70ffb9d1 fdt: add crypto node handling for MPC8{3, 5}xxE processors
Delete the crypto node if not on an E-processor.  If on 8360 or 834x family,
check rev and up-rev crypto node (to SEC rev. 2.4 property values)
if on an 'EA' processor, e.g. MPC8349EA.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-07-14 17:01:29 -05:00
Kumar Gala 348753d416 Fix some more printf() format problems.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-14 23:01:01 +02:00
Wolfgang Denk d0ff51ba5d Code cleanup: fix old style assignment ambiguities like "=-" etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-14 15:19:07 +02:00
Wolfgang Denk b64f190b7a Fix printf() format issues with sizeof_t types by using %zu
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-14 15:06:35 +02:00
Wolfgang Denk d5996dd555 Fix some more printf() format problems.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-13 19:51:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0a5676befb Fix some more printf() format issues.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-13 16:55:00 +02:00
Michal Simek c78fce699c FIS: repare incorrect return value with ramdisk handling
Microblaze and PowerPC use boot_get_ramdisk for loading
ramdisk to memory with checking return value.
Return 0 means success. Return 1 means failed.
Here is correspond part of code from bootm.c which check
return code.

ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_PPC,
		&rd_data_start, &rd_data_end);
if (ret)
	goto error;

Signed-off-by: Michal Simek <monstr@monstr.eu>
2008-07-13 15:23:12 +02: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
Kim Phillips 4109df6f75 silence misc printf formatting compiler warnings
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-07-10 22:12:09 +02:00
Markus Klotzbücher 3d71c81a9b USB: shutdown USB before booting
This patch fixes a potentially serious issue related to USB which was
discouvered by Martin Krause <martin.krause@tqs.de> and fixed for
ARM920T. Martin wrote:

  Turn off USB to prevent the host controller from writing to the
  SDRAM while Linux is booting. This could happen, because the HCCA
  (Host Controller Communication Area) lies within the SDRAM and the
  host controller writes continously to this area (as busmaster!), for
  example to increase the HccaFrameNumber variable, which happens
  every 1 ms.

This is a slightly modified version of the patch in order to shutdown
USB when booting on all architectures.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-07-10 21:47:44 +02:00
Wolfgang Denk e0320b1ebe Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master 2008-07-10 13:16:34 +02:00
Wolfgang Denk 06c53beae1 Fix some more print() format errors.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-10 13:16:09 +02:00
Christian Eggers d4b5f3fa00 Fix "usb part" command
Only print partition for selected device if user supplied the <dev>
arg with the "usb part [dev]" command.

Signed-off-by: Christian Eggers <ceggers@gmx.de>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-07-10 12:24:29 +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
Wolfgang Denk 40234535ee Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flash 2008-07-10 00:59:04 +02:00
Harald Welte 5bb12dbd7a Remove code duplication for setting the default environment
common/env_common.c (default_env): new function that resets the environment to
		    the default value
common/env_common.c (env_relocate): use default_env instead of own copy
common/env_nand.c (env_relocate_spec): use default_env instead of own copy
include/environment.h: added default_env prototype

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-07-10 00:28:20 +02:00
Marcel Ziswiler 99c2b434d3 NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c.
The writeenv() and readenv() calls introduced by the recently added bad block
management for environment variables were missing casts therefore producing
compile time warnings.
While at it fixing some typo in a comment and indentation.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-07-09 17:24:47 -05:00
Joakim Tjernlund b502611b51 Change env_get_char from a global function ptr to a function
This avoids an early global data reference.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2008-07-09 23:59:30 +02:00
Andrew Klossner dc4b0b38d4 Fix printf errors.
The compiler will help find mismatches between printf formats and
arguments if you let it.  This patch adds the necessary attributes to
declarations in include/common.h, then begins to correct the resulting
compiler warnings.  Some of these were bugs, e.g., "$d" instead of
"%d" and incorrect arguments.  Others were just annoying, like
int-long mismatches on a system where both are 32 bits.  It's worth
fixing the annoying errors to catch the real ones.

Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
2008-07-09 23:55:46 +02:00
Michal Simek 9fea65a6c4 ppc4xx: Rename CONFIG_XILINX_ML300 to CONFIG_XILINX_405
This change helps with better handling with others
Xilinx based platform.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stefan Roese <sr@denx.de>
2008-07-06 22:39:14 +02:00
Detlev Zundel 5981ebd320 fdt: Fix typo in variable name.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-07-02 16:49:52 +02:00
Steven A. Falco f6a69559d6 cmd_nvedit.c: clean up syntax highlighting
My text-editor (vim) has a bit of trouble syntax-highlighting the
cmd_nvedit.c file, because it apparently does not parse C
ifdef/else/endif. The following patch does not change the behavior of
the code at all, but does allow the editor to properly
syntax-highlight the file.

Signed-off-by: Steve Falco <sfalco@harris.com>
2008-07-01 23:06:53 +02:00
Steven A. Falco 75678c807a Make setenv() return status
Currently, the setenv function does not return an error code.
This patch allows to test for errors.

Signed-off-by: Steve Falco <sfalco@harris.com>
2008-07-01 23:03:14 +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