Commit Graph

867 Commits

Author SHA1 Message Date
Kumar Gala
81673e9ae1 Make sure common.h is the first include.
If common.h isn't first we can get CONFIG_ options defined in the
board config file ignored.  This can cause an issue if any of those
config options impact the size of types of data structures
(eg CONFIG_PHYS_64BIT).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-06-03 19:42:05 +02:00
Marian Balakowicz
95d449ad4d 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-06-03 19:34:19 +02:00
Wolfgang Denk
912810eeca Merge remote branch 'u-boot-at91/for-1.3.4' 2008-06-03 00:24:36 +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
Jean-Christophe PLAGNIOL-VILLARD
42fd5f87b1 Merging Stelian Pop AT91 patches
Merge branch 'testing-V2'

Conflicts:

	board/atmel/at91cap9adk/Makefile
                Fixing copyright
	board/atmel/at91sam9260ek/Makefile
                Fixing copyright
	board/atmel/at91sam9260ek/u-boot.lds
                Delete no more needed ld script

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-24 12:56:53 +02:00
Christian Eggers
c918261c6d USB: replace old swap_ with proper endianess conversion macros
Signed-off-by: Christian Eggers <ceggers@gmx.de>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-05-22 17:29:32 +02:00
Wolfgang Denk
eddc7c46c6 Merge branch 'lwmon5' of /home/wd/git/u-boot/projects 2008-05-21 01:13:39 +02:00
Wolfgang Denk
53677ef18e Big white-space cleanup.
This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).

Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-21 00:14:08 +02:00
Yuri Tikhonov
0e15ddd11f POST: replace the LOGBUFF_INITIALIZED flag in gd->post_log_word (1 << 31) with the GD_FLG_LOGINIT flag in gd->flags.
This way we become able to utilize the full post_log_word for POST
activities (overwise, POST ECC, which has 0x8000 ID, could be
erroneously treated as started in post_output_backlog() even if there
was actually no POST ECC run (because of OCM POST failure, for
example).

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-05-20 23:24:38 +02:00
Hebbar
727f633346 common/usb.c: fix incorrect escape sequence
Signed off by: Gururaja Hebbar <gururajakr@sanyo.co.in>
2008-05-20 11:28:09 +02:00
Wolfgang Denk
a8409f4f1a environment: cleanup prototype declarations of env functions.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-14 12:22:49 +02:00
Stelian Pop
54694a9142 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: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-13 21:49:04 +02:00
Wolfgang Denk
ee0cfa7080 Revert "Avoid initrd and logbuffer area overlaps"
This reverts commit 1b5605ca57
which breaks building on all PPC boards that don't use a log buffer.
2008-05-12 00:56:28 +02:00
Nick Spence
02b9b22446 Fix offset calculation for multi-type legacy images.
Calculation of tail was incorrect when size % 4 == 0.

New code removes the conditional and does the same thing but with arithmetic

Signed-off-by: Nick Spence <nick.spence@freescale.com>
2008-05-12 00:44:24 +02:00
Wolfgang Denk
c9dca3c3f3 Revert "Change env_get_char from a global function ptr to a function."
This reverts commit c0559be371
which is known to break booting from dataflash and NAND.
2008-05-12 00:40:58 +02:00
Stelian Pop
39cf480484 Add ATMEL LCD driver
This patch adds support for the ATMEL LCDC driver which is used on some
AT91 and AVR platforms.

Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and
AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-10 11:44:55 +02:00
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