Commit Graph

851 Commits

Author SHA1 Message Date
Marian Balakowicz
1b5605ca57 Avoid initrd and logbuffer area overlaps
Add logbuffer to reserved LMB areas to prevent initrd allocation
from overlaping with it.

Make sure to use correct logbuffer base address.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10 00:16:13 +02:00
Marian Balakowicz
273c37d843 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled
Recent modifcations to LOGBUFFER handling code were incorrecly
introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45.

This patch cleans up this merge issue.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10 00:11:25 +02:00
James Yang
597f6c26a1 Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating
When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer() doesn't
work before relocating to RAM because command history is written into
a global array that is not writable before relocation.  This patch
defers to the no-editing and no-history code in readline_into_buffer()
if it is called before relocation.

Signed-off-by: James Yang <James.Yang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-05-09 22:18:15 +02:00
Marcel Ziswiler
1df368aed3 ide: Remove spurious second include of io.h
Removed the second include, with all the #ifdef around as suggested by Wolfgang.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-05-09 20:55:57 +02:00
Grant Erickson
e419e12d04 Recognize 'powerpc' As an Alias for IH_ARCH_PPC
Add support for the recognition of 'powerpc' as an alias for the PowerPC
architecture type since Linux is already trending in that direction,
preferring 'powerpc' to 'ppc'.

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
2008-05-09 20:48:16 +02:00
Mike Frysinger
4acc2a108a fix building when saveenv is disabled in some setups
If you enable environment in the flash, but disable the embedded
option, and you disable the saveenv command, then the #if nested
logic will trigger a compile failure:
env_flash.c: In function 'env_relocate_spec':
env_flash.c:399: error: 'flash_addr' undeclared (first use in this function)
The fix is to add CMD_SAVEENV ifdef protection like everywhere else.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-05-04 00:22:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD
12bc4e9425 cmd_nand: fix warning: str2long ncompatible pointer type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-30 22:58:47 +02:00
dirk.behme@googlemail.com
378e7ec95d Fix warning in env_nand.c if compiled for DaVinci Schmoogie
Fix warnings

nv_nand.c: In function 'saveenv':
env_nand.c:200: warning: passing argument 3 of 'nand_write' from incompatible pointer type
env_nand.c: In function 'env_relocate_spec':
env_nand.c:275: warning: passing argument 3 of 'nand_read' from incompatible pointer type

if compiled for davinci_schmoogie_config.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Ack by: Sergey Kubushyn <ksi@koi8.net>
2008-04-30 22:34:42 +02:00
Wolfgang Denk
f7b16a0a4d common/env_nand.c: fix one more incompatible pointer type issue
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-29 23:32:20 +02:00
Guennadi Liakhovetski
413bf58626 IDE: fix compiler warnings
The IDE driver can use 32-bit addresses in LBA mode, in which case it
spits multiple warnings during compilation. Fix them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-04-28 20:42:51 +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
Bartlomiej Sieka
7590378fb9 Use watchdog-aware functions when calculating hashes of images - take two
Some files didn't get updated properly with the "Use watchdog-aware
functions when calculating hashes of images" commit, this commit
fixes this.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 14:05:21 +02:00
Wolfgang Denk
4b7a6dd896 Merge branch 'master' of /home/wd/git/u-boot/lwmon5
Conflicts:

	common/cmd_bootm.c
	common/cmd_log.c
	include/common.h
	post/board/lwmon5/Makefile
	post/board/lwmon5/dsp.c
	post/board/lwmon5/dspic.c
	post/board/lwmon5/fpga.c
	post/board/lwmon5/gdc.c
	post/board/lwmon5/sysmon.c
	post/board/lwmon5/watchdog.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 11:32:01 +02:00
Bartlomiej Sieka
edbed247a1 Memory footprint optimizations
As suggested by Wolfgang Denk:
- image printing functions:
  - remove wrappers
  - remove indentation prefix from functions' signatures
- merge getenv_verify and getenv_autostart into one parametrized function

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-04-24 17:21:55 +02:00
Mike Frysinger
89cdab788f crc32: use uint32_t rather than unsigned long
The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-24 13:18:17 +02:00
Sergei Poselenov
a6e6fc610e Added watchdog triggering calls in the "mtest" test function.
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-04-22 15:21:37 +02:00
Wolfgang Denk
1e01477aea Fix build breakage casued by commit c0559be371
Change env_get_char from a global function ptr to a function.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-18 11:44:27 -07:00
Mike Frysinger
a49864593e allow ports to override go behavior
Split the arch-specific logic out of the common go code and into a dedicated
weak function called do_go_exec() that lives in cpu directories.  This will
need review from i386/nios people to make sure I didn't break them.
2008-04-18 00:31:41 -07:00
Mike Frysinger
017e9b7925 allow ports to override bootelf behavior
Change the bootelf setup function into a dedicated weak function called
do_bootelf_exec.  This way ports can control the behavior however they
like before/after calling the ELF entry point.
2008-04-18 00:30:42 -07:00
Marian Balakowicz
cb1c489690 Restore the ability to continue booting after legacy image overwrite
Before new uImage code was merged, bootm code allowed for the kernel image to
get overwritten during decompresion. new uImage introduced a check for image
overwrites and refused to boot the image that got overwritten. This patch
restores the old behavior. It also adds a warning when the image overwriten is
a multi-image file, because in such case accessing componentes other than the
first one will fail.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-04-17 23:59:05 -07:00
Martin Krause
e175eacc87 IDE: fix bug in reset sequence
According to the ata (ata5) specification the RESET- signal
shall be asserted for at least 25 us. Without this patch,
the RESET- signal is asserted on some boards for only < 1 us
(e. g. on the TQM5200). This patch adds a general delay of
25 us to the RESET- signal.

Without this patch a Platinum 4 GiB CF card is not recognised
properly on boards with a TQM5200 (STK52xx, TB5200).

Signed-off-by: Martin Krause <martin.krause@tqs.de>
2008-04-17 14:26:48 -07:00
Jean-Christophe PLAGNIOL-VILLARD
a253b38bf5 cmd_log.c: Fix assignment differ in signedness
In function 'logbuff_init_ptrs':
cmd_log.c:79: warning: pointer targets in assignment differ in signedness

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-17 14:05:22 -07:00
Joakim Tjernlund
c0559be371 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-04-17 13:20:14 -07:00
Kyungmin Park
a9da2b4107 Fix OneNAND erase command
It mis-calculates the block address.
Also fix DECLARE_GLOBAL_DATA_PTR in env_onenand.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2008-04-13 23:10:39 -07:00
TsiChung Liew
0f3ba7e978 Add CONFIG_MII_INIT support to related boards
Replace CONFIG_8xx and CONFIG_MCF532x to CONFIG_MII_INIT in
cmd_init.c. Add CONFIG_MII_INIT to board configuration files
that use mii_init() in cmd_init.c.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2008-04-13 23:03:02 -07:00
Andy Fleming
20a14a42a2 Rename include/md5.h to include/u-boot/md5.h
Some systems have md5.h installed in /usr/include/. This isn't the
desired file (we want the one in include/md5.h). This will avoid the
conflict. This fixes the host tools building problem by creating a new
directory for U-Boot specific header files.

[Patch by Andy Fleming, modified to use separate directory by Wolfgang
Denk]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Timur Tabi <timur@freescale.com>
2008-04-13 17:02:51 -07:00
eran liberty
3c735e7437 Altera Stratix II support
Adds Support for Altera's Stratix II.

Within your board specific init file you will have to call

1. fpga_init (/* relocated code offset. usually => */ gd->reloc_off);
2. fpga_add (fpga_altera, (Altera_desc*)&altera_desc);

Altera_desc* contines (for example):
	{
	 Altera_StratixII,	/* part type */
	 passive_serial,	/* interface type */
	 1,			/* bytes of data part can accept */
	 (void *)(&funcs),	/* interface function table */
	 0L,			/* base interface address */
	 0			/* implementation specific cookie */
	 }

funcs is the interface. It is of type altera_board_specific_func.
It looks like this:
altera_board_specific_func func = {
	pre_fn,
	config_fn,
	status_fn,
	done_fn,
	clk_fn,
	data_fn,
	abort_fn,
	post_fn,
};

you will have to implement these functions, which is usually bit
banging some gpio.

Signed-off-by: Eran Liberty <liberty@extricom.com>
2008-04-13 14:52:48 -07:00
Mike Frysinger
1f1d88dd40 disable caches before booting an app for Blackfin apps
It isn't generally save to execute applications outside of U-Boot with caches
enabled due to the way the Blackfin processor handles caches (requires
software assistance).  This patch disables caches before booting an ELF or
just booting raw code.  The previous discussion on the patch was that we
wanted to use weaks instead, but that proved to not be feasible when multiple
symbols are involved, which puts us back at the ifdef solution.  I've
minimized the ugliness by moving the setup step outside of the main function.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-04-13 13:53:45 -07:00
Wolfgang Denk
1aeed8d71a Coding Style cleanup; update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-13 09:59:26 -07:00
Daniel Hellstrom
2a2fa797e6 SPARC/LEON3: Added AMBA Bus Plug&Play information print command (ambapp). It can print available cores (type: AHB Master, AHB Slave, APB Slave), their address ranges, IRQ number and version.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2008-04-08 07:58:32 +00:00
Daniel Hellstrom
bf3d8b3116 SPARC: added SPARC support for new uimage in common code.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2008-04-08 07:58:32 +00:00
Daniel Hellstrom
00ab32c854 SPARC: added SPARC board information to the command bdinfo.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2008-04-08 07:58:32 +00:00
Wolfgang Denk
aeff6d503b Merge branch 'master' of git://www.denx.de/git/u-boot-fdt 2008-04-08 00:20:52 +02:00
Wolfgang Denk
a1b215e2a2 Merge branch 'master' of git://www.denx.de/git/u-boot-at91 2008-04-08 00:16:36 +02:00
Andy Fleming
4abd844d8e Fix fdt set command to conform to dts spec
The fdt set command was treating properties specified as <00> and <0011>
as byte streams, rather than as an array of cells.  As we already have
syntax for expressing the desire for a stream of bytes ([ xx xx ...]),
we should use the <> syntax to describe arrays of cells, which are always
32-bits per element.  If we imagine this likely (IMHO) scenario:

> fdt set /ethernet-phy@1 reg <1>

With the old code, this would create a bad fdt, since the reg cell would be
made to be one byte in length.  But the cell must be 4 bytes, so this would
break mysteriously.

Also, the dts spec calls for constants inside the angle brackets (<>)
to conform to C constant standards as they pertain to base.
Take this scenario:

> fdt set /ethernet@f00 reg <0xe250000\ 0x1000>

The old fdt command would complain that it couldn't parse that.  Or, if you
wanted to specify that a certain clock ran at 33 MHz, you'd be required to
do this:

> fdt set /mydev clock <1f78a40>

Whereas the new code will accept decimal numbers.

While I was in there, I extended the fdt command parser to handle property
strings which are split across multiple arguments:

> fdt set /ethernet@f00 interrupts < 33 2 34 2 36 2 >
> fdt p /ethernet@f00
ethernet@f00 {
	interrupts = <0x21 0x2 0x22 0x2 0x24 0x2>;
};

Lastly, the fdt print code was rearranged slightly to print arrays of cells
if the length of the property is a multiple of 4 bytes, and to not print
leading zeros.

Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-04-02 11:07:15 -04:00
Kim Phillips
6fe2946f19 remove remaining CONFIG_OF_HAS_{UBOOT_ENV,BD_T} code
finish off what commit 43ddd9c820,
"Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_T"
started.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-04-01 19:46:44 -04:00
Stelian Pop
880cc4381e Fix CFG_NO_FLASH compilation.
Many Atmel boards have no "real" (NOR) flash on board, and rely only
on DataFlash and NAND memories. This patch enables CFG_NO_FLASH to
be present in a board configuration file, while still enabling flash
commands like 'flinfo', 'protect', etc.

Signed-off-by: Stelian Pop <stelian@popies.net>
2008-03-30 21:19:40 +02:00
Ben Warren
bb8e3cf25b Fix macro typo in common/cmd_mii.c
This typo was introduced in commit 233a8bcd94.  I
actually applied the wrong patch.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-03-30 11:34:34 -04:00
Tsi-Chung Liew
233a8bcd94 Add CONFIG_MII_INIT in cmd_mii.c
Provide common configuration in do_mii() to execute mii_init()
for all cpu architectures

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-03-30 00:15:35 -04:00
Wolfgang Denk
38b189fe74 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2008-03-27 00:16:34 +01:00
Wolfgang Denk
0207fefa4d Merge branch 'master' of git://www.denx.de/git/u-boot-usb 2008-03-27 00:16:18 +01:00
Dave Liu
c7057b529c ata: add the support for SATA framework
- add the SATA framework
- add the SATA command line

Signed-off-by: Dave Liu <daveliu@freescale.com>
2008-03-26 23:38:51 +01:00
Dave Liu
9eef62804d ata: merge the ata_piix driver
move the cmd_sata.c from common/ to drivers/ata_piix.c,
the cmd_sata.c have some part of ata_piix controller drivers.
consolidate the driver to have better framework.

Signed-off-by: Dave Liu <daveliu@freescale.com>
2008-03-26 23:38:48 +01:00
Markus Klotzbuecher
b9e749e953 USB, Storage: fix a bug introduced in commit
f6b44e0e4d that will cause usb_stor_info
to only print only information on one storage device, but not for
multiple.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-03-26 18:26:43 +01:00
Kumar Gala
79679d8002 85xx: Update multicore boot mechanism to ePAPR v0.81 spec
The following changes are needed to be inline with ePAPR v0.81:

* r4, r5 and now always set to 0 on boot release
* r7 is used to pass the size of the initial map area (IMA)
* EPAPR_MAGIC value changed for book-e processors
* changes in the spin table layout
* spin table supports a 64-bit physical release address

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-26 11:43:04 -05:00
Kumar Gala
ec2b74ffd3 85xx: Added support for multicore boot mechanism
Added the cpu command that provides a generic mechanism to get status,
reset, and release secondary cores in multicore processors.

Added support for using the ePAPR defined spin-table mechanism on 85xx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-26 11:43:03 -05:00
Wolfgang Denk
b951f8d317 Merge branch 'master_merge_new-image' of /home/tur/git/u-boot 2008-03-26 10:41:48 +01:00
Bartlomiej Sieka
27f33e9f45 Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:

	common/cmd_bootm.c
	cpu/mpc8xx/cpu.c

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-26 09:38:06 +01:00
Aras Vaichas
f6b44e0e4d USB Storage, add meaningful return value
This patch changes the "usb storage" command to return success if it
finds a USB storage device, otherwise it returns error.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-03-26 09:23:23 +01:00