project/bcm63xx/u-boot.git
13 years agopowerpc/85xx: Rename P2040 id & SERDES to P2041
Kumar Gala [Thu, 21 Jul 2011 05:20:19 +0000 (00:20 -0500)]
powerpc/85xx: Rename P2040 id & SERDES to P2041

P2041 is the superset part that covers both P2040 & P2041.  The only
difference between the two devices is that P2041 supports 10g/XAUI and
has an L2 cache.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Adding configuration for DCSRCR to enable 32M access
Stephen George [Wed, 20 Jul 2011 14:47:26 +0000 (09:47 -0500)]
powerpc/85xx: Adding configuration for DCSRCR to enable 32M access

Configuring DCSRCR to define the DCSR space to be 1G instead
of the default 4M. DCSRCR only allows selection of either 4M
or 1G.
Most DCSR registers are within 4M but the Nexus trace buffer
is located at offset 16M within the DCSR.

Configuring the LAW to be 32M to allow access to the Nexus
trace buffer. No TLB modification is required since accessing
the Nexus trace buffer from within u-boot is not required.

Signed-off-by: Stephen George <stephen.george@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Fix setting of EPAPR_MAGIC value
Kumar Gala [Thu, 21 Jul 2011 21:50:22 +0000 (16:50 -0500)]
powerpc/85xx: Fix setting of EPAPR_MAGIC value

Had a typo in the ifdef for 85xx, should be CONFIG_MPC85xx for it to get
triggered.  Was pull in the non-BookE magic number.

Reported-by: John Cortell
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agocfb_console: fix build breakage
Andreas Bießmann [Fri, 29 Jul 2011 07:10:13 +0000 (09:10 +0200)]
cfb_console: fix build breakage

Commit 09c2e90c110ef99f1203685acd1059114a51b167 "unify version_string"
introduced a build breakage in cfb_console.c

---8<---
cfb_console.c:1497: warning: format '%s' expects type 'char *', but
argument 3 has type 'const char (*)[]'
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
13 years agopanic: remove warning "'noreturn' function does return"
Heiko Schocher [Tue, 26 Jul 2011 20:55:57 +0000 (20:55 +0000)]
panic: remove warning "'noreturn' function does return"

since commit

commit d2e8b911c0a0661d395ccac72156040702ac842d
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Jun 29 11:58:04 2011 +0000

    panic: add noreturn attribute

I see the following warnings:

vsprintf.c: In function 'panic':
vsprintf.c:730: warning: 'noreturn' function does return

for nearly all boards. This patch fixes this warning.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Mike Frysinger <vapier@gentoo.org>

13 years agopost, memory test: add memory_post_test() to include file
Heiko Schocher [Tue, 26 Jul 2011 20:31:08 +0000 (20:31 +0000)]
post, memory test: add memory_post_test() to include file

This include is needed, if this memory test is used "outside"
from post code, for example booting with nand_spl, and using
this memory test before copying u-boot code to RAM and jumping
to it.

Signed-off-by: Heiko Schocher <hs@denx.de>
13 years agoFix build error causes by "unify version_string"
Wolfgang Denk [Thu, 28 Jul 2011 20:14:26 +0000 (22:14 +0200)]
Fix build error causes by "unify version_string"

Commit 09c2e90 "unify version_string" introduced a build error,
fix it.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoRemoved obsolete Netstal boards
Niklaus Giger [Fri, 22 Jul 2011 14:10:18 +0000 (16:10 +0200)]
Removed obsolete Netstal boards

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
13 years agocleanup: Fix typos and misspellings in various files.
Mike Williams [Fri, 22 Jul 2011 04:01:30 +0000 (04:01 +0000)]
cleanup: Fix typos and misspellings in various files.

Recieve/Receive
recieve/receive
Interupt/Interrupt
interupt/interrupt
Addres/Address
addres/address

Signed-off-by: Mike Williams <mike@mikebwilliams.com>
13 years agorules.mk: replace GNU specific \w with POSIX equivalant
Jeroen Hofstee [Tue, 19 Jul 2011 10:41:50 +0000 (10:41 +0000)]
rules.mk: replace GNU specific \w with POSIX equivalant

If sed does not support the GNU \w regex extension, build attempts
lead to circular dependency warnings and finally build failure
(crc32.c not found). Build output before and after the patch on
FreeBSD is at:
http://lists.denx.de/pipermail/u-boot/2011-June/095235.html

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
13 years agomkconfig: also create CONFIG defines with BSD sed
Jeroen Hofstee [Wed, 20 Jul 2011 08:38:21 +0000 (08:38 +0000)]
mkconfig: also create CONFIG defines with BSD sed

Parsing of boards.cfg fails on FreeBSD with the error:

sed: 1: "/=/ {s/=/\t/;q } ; { s/ ...": extra characters at the end
of q command

BSD sed expects commands to be on seperate 'lines', hence it expects
an additional ; before the closing brackets.
BSD sed does not support \t, replaced by literal tab.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoinclude/compiler.h: typedef ulong for FreeBSD
Jeroen Hofstee [Tue, 19 Jul 2011 10:41:48 +0000 (10:41 +0000)]
include/compiler.h: typedef ulong for FreeBSD

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
13 years agounify version_string
Andreas Bießmann [Mon, 18 Jul 2011 18:24:04 +0000 (20:24 +0200)]
unify version_string

This patch removes the architecture specific implementation of
version_string where possible. Some architectures use a special place
and therefore we provide U_BOOT_VERSION_STRING definition and a common
weak symbol version_string.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Peter Pan <pppeterpppan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoCorrect ih_os for u-boot.img
aneeshv [Sat, 16 Jul 2011 02:53:20 +0000 (02:53 +0000)]
Correct ih_os for u-boot.img

Provide appropriate '-O u-boot' while doing mkimage
for u-boot.img

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agomkimage: add UBL header support for booting davinci cpus
Heiko Schocher [Sat, 16 Jul 2011 00:06:42 +0000 (00:06 +0000)]
mkimage: add UBL header support for booting davinci cpus

creating an u-boot.ubl file, which contains the UBL Header
needed for booting from NAND with the RBL from TI. For more
information read doc/README.ublimage.

Signed-off-by: Heiko Schocher <hs@denx.de>
13 years agoMAINTAINERS: integrator+versatile boards
Linus Walleij [Fri, 15 Jul 2011 02:15:41 +0000 (02:15 +0000)]
MAINTAINERS: integrator+versatile boards

- Take maintainership of the unlisted integratorap board
- Orphan the boards maintained by Peter Pearse, as he has retired
  from ARM

Cc: Philippe Robin <philippe.robin@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
13 years agomv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
Michael Jones [Thu, 14 Jul 2011 23:09:44 +0000 (23:09 +0000)]
mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE

Doesn't make sense to provide this function to boards which defined
CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because
common/env_nowhere.c doesn't define saveenv().

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agofpga: support FPP Cyclone configuration
Michael Jones [Thu, 14 Jul 2011 23:09:41 +0000 (23:09 +0000)]
fpga: support FPP Cyclone configuration

Support FPGAs which use Fast Passive Parallel configuration

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
13 years agofpga: add #define for Altera Cyclone EP3C5
Michael Jones [Thu, 14 Jul 2011 23:09:40 +0000 (23:09 +0000)]
fpga: add #define for Altera Cyclone EP3C5

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
13 years agocmd_mac: fix help for 'mac read'
Michael Jones [Thu, 14 Jul 2011 22:09:31 +0000 (22:09 +0000)]
cmd_mac: fix help for 'mac read'

In the only implementation of 'mac read', it doesn't display the
contents of the eeprom as the help indicated unless compiled with
DEBUG. It only re-reads the contents of the EEPROM into memory.
Displaying the contents of the EEPROM is done by passing no
arguments to 'mac'.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agocmd_mac: cleanup help
Michael Jones [Thu, 14 Jul 2011 22:09:30 +0000 (22:09 +0000)]
cmd_mac: cleanup help

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoaltera: fix printf typo
Michael Jones [Thu, 14 Jul 2011 22:09:29 +0000 (22:09 +0000)]
altera: fix printf typo

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agocosmetic: spell fixes etc.
Michael Jones [Thu, 14 Jul 2011 22:09:28 +0000 (22:09 +0000)]
cosmetic: spell fixes etc.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoLet source cross-reference targets follow symbolic links
Horst Kronstorfer [Mon, 18 Jul 2011 01:21:18 +0000 (01:21 +0000)]
Let source cross-reference targets follow symbolic links

Tell 'find' to follow symbolic links, so that files under include/asm
and arch/$(ARCH)/include/asm/arch are added to the indexing file list.

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agokm/common: i2c deblock: enabled print of i2c deblock status
Stefan Bigler [Mon, 4 Jul 2011 22:24:02 +0000 (22:24 +0000)]
km/common: i2c deblock: enabled print of i2c deblock status

Enable printout of i2c deblocking status if chips were in block
state or deblocking failed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: moved eeprom config to pbec specific part
Stefan Bigler [Mon, 4 Jul 2011 22:24:01 +0000 (22:24 +0000)]
km/common: moved eeprom config to pbec specific part

Moved eeprom config to specific part, to allow bigger eeprom write pages
for km_kirkwood designs. Write page only used for env eeprom in std use
cases. 24C128 has page size of 64bytes -> 8 time faster.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: use u-boot.kwb for u-boot update function on arm
Holger Brunck [Mon, 4 Jul 2011 22:24:00 +0000 (22:24 +0000)]
km/common: use u-boot.kwb for u-boot update function on arm

Now we use the standard u-boot make to build the Kirkwood binary.
The output file is u-boot.kwb. So use this name for the tftp
update function to avoid confusion, because this is the binary we
need on Kirkwood.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: add printings to boardid commands
Holger Brunck [Mon, 4 Jul 2011 22:23:59 +0000 (22:23 +0000)]
km/common: add printings to boardid commands

Be verbose if do_setboardid was called and print
correct names of variables in do_checkboardidhwk.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agoext2: Simplify partial sector access logic
Anton Staaf [Mon, 13 Jun 2011 11:40:40 +0000 (11:40 +0000)]
ext2: Simplify partial sector access logic

Previously reading or writing zero full sectors (reading the end of
one sector and the beginning of the next for example) was special
cased and involved stack allocating a second sector buffer.  This
change uses the same code path for this case as well as when there
are a non-zero number of full sectors to access.  The result is
easier to read and reduces the maximum stack used.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoext2: Fix checkpatch violations
Anton Staaf [Mon, 13 Jun 2011 11:40:39 +0000 (11:40 +0000)]
ext2: Fix checkpatch violations

Fix all checkpatch violations in the low level Ext2 block
device reading code.  This is done in preparation for cleaning
up the partial sector access code.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agocommon: move BUILD_BUG_ON define to common.h
Heiko Schocher [Wed, 8 Jun 2011 23:07:05 +0000 (23:07 +0000)]
common: move BUILD_BUG_ON define to common.h

see discussion also here:
http://patchwork.ozlabs.org/patch/75309/

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Holger Brunck <holger.brunck@keymile.com>

13 years agokm/common: enable cramfs and cramfs cmdline
Holger Brunck [Sun, 5 Jun 2011 22:22:21 +0000 (22:22 +0000)]
km/common: enable cramfs and cramfs cmdline

All the km boards uses CRAMFS images where the kernel is stored.
This isn't architecture specific because we use it on ARM and
POWERPC.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agopowerpc/km82xx: remove 82xx specific functions from common.c
Holger Brunck [Sun, 5 Jun 2011 22:22:20 +0000 (22:22 +0000)]
powerpc/km82xx: remove 82xx specific functions from common.c

Common code should be valid for more than one architecture,
therefore the km82xx specific code was removed from common.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: remove fdt_(gs)et_node_and_value
Holger Brunck [Sun, 5 Jun 2011 22:22:19 +0000 (22:22 +0000)]
km/common: remove fdt_(gs)et_node_and_value

This code is unused and therefore dead code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: move ivm functions from to ivm.c
Holger Brunck [Sun, 5 Jun 2011 22:22:18 +0000 (22:22 +0000)]
km/common: move ivm functions from to ivm.c

The file common.c grows in the past. So move the IVM specific
code into an ivm.c file.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: remove saveenv from do_checkboardidhwkey
Holger Brunck [Sun, 5 Jun 2011 22:22:17 +0000 (22:22 +0000)]
km/common: remove saveenv from do_checkboardidhwkey

This is unneeded here because we save the environment when
the board boots the first time. At this time we have set
the values already.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: force set ethaddr after reading IVM
Holger Brunck [Sun, 5 Jun 2011 22:22:16 +0000 (22:22 +0000)]
km/common: force set ethaddr after reading IVM

The ethaddr is stored inside the inventory eeprom. During
boottime this value was read out and the ethaddr variable was
set. Previously this was only done if it ethaddr == NULL but
this is wrong for our ARM boards. Because ethaddr is at this
stage never NULL for ARM due to the random calculation of a
MAC address in mvgbe.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: remove obsolete defines and header
Holger Brunck [Sun, 5 Jun 2011 22:22:15 +0000 (22:22 +0000)]
km/common: remove obsolete defines and header

These defines and the header keymile_hdlc_enet.h are obsolete
due to the removed hdlc code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: simplify debug environment
Holger Brunck [Mon, 4 Jul 2011 21:52:52 +0000 (21:52 +0000)]
km/common: simplify debug environment

The debug environment which is stored in textfiles in the
scripts directory was reworked. Two usecase are now present
which can be executed simply from the default environment:
run develop: this configures the environment to setup the
             rootfs via nfs
run ramfs: this configures the environment to setup the
           rootfs in ram

Each architecture now has a "arch" variable which is used
to load the architecture specific debug scripts and to set
the rootpath for NFS.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agokm/common: add test sw starting variable
Thomas Herzmann [Sun, 5 Jun 2011 22:22:13 +0000 (22:22 +0000)]
km/common: add test sw starting variable

The test SW is started when the test_bank variable is set.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
13 years agokm/common: rework and simplify default environment
Holger Brunck [Mon, 4 Jul 2011 21:27:16 +0000 (21:27 +0000)]
km/common: rework and simplify default environment

This is the second step to simplify and decrease the default
environment for the keymile boards. The release usecase formaly
used to set the production environment was removed and the default
configuration is now the production environment. So the formar
environment variable "release" which has done a lot of things
in the past, simply erase the current environment and do a reset
which forces u-boot to setup the default environment again.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>

13 years agopart_dos: fix crash with big sector size
Sergei Shtylyov [Fri, 3 Jun 2011 09:37:43 +0000 (09:37 +0000)]
part_dos: fix crash with big sector size

Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it
tries to read the MBR into 512-byte buffer situated on stack. Instead use the
variable length arrays to be safe with any large sector size.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
13 years agopost, memorytest: add support for none powerpc archs
Heiko Schocher [Thu, 2 Jun 2011 19:38:24 +0000 (19:38 +0000)]
post, memorytest: add support for none powerpc archs

change bd->bi_memsize to gd->ram_size, as this is defined
on all archs, so this post test can used on none powerpc
archs too.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <hs@denx.de>
cc: Mike Frysinger <vapier@gentoo.org>

13 years agopost, memorytest: fix if vstart is not = 0x0
Heiko Schocher [Tue, 31 May 2011 20:24:05 +0000 (20:24 +0000)]
post, memorytest: fix if vstart is not = 0x0

Signed-off-by: Heiko Schocher <hs@denx.de>
13 years agonet: Add SMSC89128 support
Phil Edworthy [Tue, 31 May 2011 03:53:11 +0000 (03:53 +0000)]
net: Add SMSC89128 support

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agodigsy_mtc: move board into vendor dir and add vendor logo
Anatolij Gustschin [Sat, 16 Jul 2011 10:26:50 +0000 (10:26 +0000)]
digsy_mtc: move board into vendor dir and add vendor logo

Signed-off-by: Anatolij Gustschin <agust@denx.de>
13 years agompc5200: digsy_mtc: add support for writing 'appreg' value
Anatolij Gustschin [Sun, 29 May 2011 21:18:51 +0000 (21:18 +0000)]
mpc5200: digsy_mtc: add support for writing 'appreg' value

Up to now only reading 'appreg' value was implemented in the
digsyMTC special 'mtc appreg' command. Extend the command to
support writing appreg value, too.

Signed-off-by: Werner Pfister <Pfister_Werner@intercontrol.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agompc5200: digsy_mtc: add support for graphic extension board
Anatolij Gustschin [Sun, 29 May 2011 21:16:20 +0000 (21:16 +0000)]
mpc5200: digsy_mtc: add support for graphic extension board

Add detection and initialisation for graphic extension board
and support splash screen when booting. Enable "bmp" command
in the board configuration and provide "disp" command to
be able to switch the display on/off.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agophylib: Detect link on 10G devices correctly
Andy Fleming [Wed, 18 May 2011 13:44:19 +0000 (13:44 +0000)]
phylib: Detect link on 10G devices correctly

gen10g_startup() had 2 bugs:

1) It had a boolean logic error in checking the MMD mask, and
always checked all of them.

2) It checked devices which don't actually report link state, which
meant that it would never believe the link was fully up.

Fix the boolean logic, and then mask the MMD mask so only link-reporting
devices are checked.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Reported-by: Ed Swarthout <Ed.Swarthout@freescale.com>
13 years agobootp: add ntpserver option to bootp request
Luuk Paulussen [Mon, 16 May 2011 18:29:19 +0000 (18:29 +0000)]
bootp: add ntpserver option to bootp request

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>
Acked-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agoadd command fitupd to run an update from a FIT image
Andreas Pretzsch [Sat, 16 Jul 2011 05:51:00 +0000 (05:51 +0000)]
add command fitupd to run an update from a FIT image

Command calls update_tftp() analogous to automatic update described
in doc/README.update.

Usage:
fitupd [addr]
        - run update from FIT image at addr
          or from tftp 'updatefile'

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
13 years agoautomatic update from FIT image: add optional address parameter
Andreas Pretzsch [Sat, 16 Jul 2011 05:50:59 +0000 (05:50 +0000)]
automatic update from FIT image: add optional address parameter

Current update_tftp() flow:
  1.) fetch "updatefile" from defined TFTP server
  2.) check if FIT format
  3.) flash contained images

Add an address parameter to update_tftp(). If this address is non-zero,
skip the TFTP transfer and use the image at this address.
Also extend update_tftp() to return success/fail.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
13 years agopost: fix indendation/brace confusion
James Kosin [Thu, 14 Jul 2011 08:15:06 +0000 (08:15 +0000)]
post: fix indendation/brace confusion

The post.c code is missing braces around the pass case, and as a
result, the diagnostic function will post both fail and pass for
a failed test.  The reason for this bug is probably the incorrect
indentation used, so when reading the code it seems like there
are proper braces.

Indent the code to the correct depth and put proper braces around
the "else" branch of the "if" statement.

Signed-off-by: James Kosin <jkosin@intcomgrp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agofix unconfigured out-of-tree building of tools
Mike Frysinger [Thu, 30 Jun 2011 16:56:20 +0000 (16:56 +0000)]
fix unconfigured out-of-tree building of tools

Now that the tools target requires the generated version header file, we
need to make sure that the directory it writes to exists.  In a configured
tree, this is taken care of for us.  But in an unconfigured one, the dir
does not yet exist causing a build error like so:

/bin/sh: line 5: ..../u-boot_build/include/version_autogenerated.h.tmp: No such file or directory

So create the dir for this file before we attempt to generate it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopanic: add noreturn attribute
Mike Frysinger [Wed, 29 Jun 2011 11:58:04 +0000 (11:58 +0000)]
panic: add noreturn attribute

Since panic() never returns, we should add an appropriate attribute to
let gcc improve optimization around it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosimplify clobber behavior with out-of-tree builds
Mike Frysinger [Fri, 24 Jun 2011 18:37:55 +0000 (18:37 +0000)]
simplify clobber behavior with out-of-tree builds

The targets/prerequisites are the same here; the rules only differ in
the recipes.  So move the if logic protection to the recipe part so we
can keep the rest the same.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost: new nor flash test
Mike Frysinger [Tue, 10 May 2011 13:35:40 +0000 (13:35 +0000)]
post: new nor flash test

This adds a simple flash test to automatically verify erasing,
writing, and reading of sectors.  The code is based on existing
Blackfin tests but generalized for everyone to use.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost: use ARRAY_SIZE
Mike Frysinger [Tue, 10 May 2011 07:28:35 +0000 (07:28 +0000)]
post: use ARRAY_SIZE

We've got a handy dandy macro already for calculating the number of
elements in an array, so use it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost: add gpio hotkey support
Mike Frysinger [Tue, 10 May 2011 07:01:21 +0000 (07:01 +0000)]
post: add gpio hotkey support

Now that we have the generic GPIO layer, we can easily provide a common
implementation for the post_hotkeys_pressed() function based on it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoserial: implement common uart post test
Mike Frysinger [Sat, 14 May 2011 06:56:15 +0000 (06:56 +0000)]
serial: implement common uart post test

The current arch/driver specific UART posts basically boil down to setting
the UART to loop back mode, then reading and writing data.  If we ignore
the loop back part, the rest can be built upon the existing common serial
API.  So let's do just that.

First add a call back for serial drivers to implement loop back control.
Then write a post test that walks all of the serial drivers, puts them
into loop back mode, and verifies that reading/writing at all the diff
baud rates is OK.

If a serial driver doesn't support loop back mode (either it can't or
it hasn't done so yet), then skip it.  This should allow for people to
easily migrate to the new post test with existing serial drivers.

I haven't touched the few already existing uart post tests as I don't
the hardware or knowledge of converting them over.  So I've marked the
new test as weak which will allow the existing tests to override the
default until they are converted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoserial: drop useless ctlr field
Mike Frysinger [Fri, 29 Apr 2011 18:03:31 +0000 (18:03 +0000)]
serial: drop useless ctlr field

The multi serial support has a "ctlr" field which almost no one uses,
but everyone is forced to set to useless strings.  So punt it.

Funny enough, the only code that actually reads this field (the mpc8xx
driver) has a typo where it meant to look for the SCC driver.  Fix it
while converting the check to use the name field.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Heiko Schocher <hs@denx.de>
CC: Anatolij Gustschin <agust@denx.de>
CC: Tom Rix <Tom.Rix@windriver.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
CC: Craig Nauman <cnauman@diagraph.com>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Prafulla Wadaskar <prafulla@marvell.com>
CC: Mahavir Jain <mjain@marvell.com>
13 years agoserial: drop serial_register return value
Mike Frysinger [Fri, 29 Apr 2011 18:03:30 +0000 (18:03 +0000)]
serial: drop serial_register return value

The serial_register function never fails (always return 0), so change it
to a void function to avoid wasting overhead on it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoserial: push default_serial_console to drivers
Mike Frysinger [Fri, 29 Apr 2011 18:03:29 +0000 (18:03 +0000)]
serial: push default_serial_console to drivers

Rather than sticking arch/board/driver specific logic in the common
serial code, push it all out to the respective drivers.  The serial
drivers declare these funcs weak so that boards can still override
things with their own definition.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Heiko Schocher <hs@denx.de>
CC: Anatolij Gustschin <agust@denx.de>
CC: Tom Rix <Tom.Rix@windriver.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
CC: Craig Nauman <cnauman@diagraph.com>
CC: Prafulla Wadaskar <prafulla@marvell.com>
CC: Mahavir Jain <mjain@marvell.com>
Tested-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agodisable security warning flags when possible
Mike Frysinger [Mon, 25 Apr 2011 08:06:40 +0000 (08:06 +0000)]
disable security warning flags when possible

Some toolchains enable security warning flags by default, but these don't
really make sense in the u-boot world.  Such as forcing changes like:
-printf(foo);
+printf("%s", foo);

So disable the flags when the compiler supports them.  Linux has already
merged a similar change in their build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd_usage: constify
Mike Frysinger [Sat, 23 Apr 2011 23:43:24 +0000 (23:43 +0000)]
cmd_usage: constify

The usage helper doesn't modify the command, so constify its input arg.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoconstify default env
Mike Frysinger [Sat, 23 Apr 2011 23:43:21 +0000 (23:43 +0000)]
constify default env

I can't see any obvious needs for the default environment to be writable,
so make it const.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoenv: allow people to force envcrc building
Mike Frysinger [Fri, 8 Jul 2011 10:44:25 +0000 (10:44 +0000)]
env: allow people to force envcrc building

For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: sst: support newer standardized flashes
Mike Frysinger [Mon, 25 Apr 2011 06:59:54 +0000 (06:59 +0000)]
sf: sst: support newer standardized flashes

Newer SST flashes have dropped the Auto Address Increment (AAI) word
programming (WP) modes in favor of the standard page programming mode
that most flashes now support.  So add a flags field to the different
flashes to support both modes with new and old styles.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify write disable commands
Mike Frysinger [Mon, 25 Apr 2011 06:59:53 +0000 (06:59 +0000)]
sf: unify write disable commands

Every spi flash uses the same write disable command, so unify this in
the common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Fixed commit message.
Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agosf: eon/stmicro: inline useless ID defines
Mike Frysinger [Sat, 23 Apr 2011 23:05:58 +0000 (23:05 +0000)]
sf: eon/stmicro: inline useless ID defines

These defines are used in only one place, so just inline them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: kill off now-unused local state
Mike Frysinger [Tue, 28 Jun 2011 07:38:10 +0000 (07:38 +0000)]
sf: kill off now-unused local state

Now that the common spi_flash structure tracks all the info that these
drivers need, kill off their local state indirection and use just what
the common code provides.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify write funcs
Mike Frysinger [Mon, 25 Apr 2011 06:58:29 +0000 (06:58 +0000)]
sf: unify write funcs

Once we add a new page_size field for write lengths, we can unify the
write methods for most of the spi flash drivers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: unify write enable commands
Mike Frysinger [Sat, 23 Apr 2011 23:05:55 +0000 (23:05 +0000)]
sf: unify write enable commands

Every spi flash uses the same write enable command, so unify this in
the common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMAKEALL: add -h/--help options
Mike Frysinger [Thu, 21 Apr 2011 22:01:43 +0000 (22:01 +0000)]
MAKEALL: add -h/--help options

Convert all the comments at the top of the file into help text for people
to easily get at with standard -h/--help options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoTimer: Remove reset_timer_masked()
Graeme Russ [Fri, 15 Jul 2011 02:21:14 +0000 (02:21 +0000)]
Timer: Remove reset_timer_masked()

In some circumstances, reset_timer_masked() was called be timer_init() in
order to perform architecture specific timer initialisation. In such
cases, the required code in reset_timer_masked() has been moved into
timer_init()

13 years agoTimer: Fix at91rm9200/spi.c timer usage
Graeme Russ [Fri, 15 Jul 2011 02:20:40 +0000 (02:20 +0000)]
Timer: Fix at91rm9200/spi.c timer usage

13 years agoTimer: Remove reset_timer() for non-Nios2 arches
Graeme Russ [Fri, 15 Jul 2011 02:19:44 +0000 (02:19 +0000)]
Timer: Remove reset_timer() for non-Nios2 arches

13 years agoTimer: Allow reset_timer() only for systems with low resolution timers
Graeme Russ [Fri, 15 Jul 2011 02:18:56 +0000 (02:18 +0000)]
Timer: Allow reset_timer() only for systems with low resolution timers

13 years agoTimer: Remove set_timer completely
Graeme Russ [Fri, 15 Jul 2011 02:18:12 +0000 (02:18 +0000)]
Timer: Remove set_timer completely

13 years agoRemove calls to set_timer outside arch/
Graeme Russ [Tue, 28 Jun 2011 01:40:55 +0000 (01:40 +0000)]
Remove calls to set_timer outside arch/

There is no need to use set_timer(). Replace with appropriate use of
get_timer()

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
13 years agospl: add support for omap-common libraries
Daniel Schwierzeck [Wed, 13 Jul 2011 05:11:09 +0000 (05:11 +0000)]
spl: add support for omap-common libraries

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agospl: Add support for common libraries and drivers
Daniel Schwierzeck [Wed, 13 Jul 2011 05:11:08 +0000 (05:11 +0000)]
spl: Add support for common libraries and drivers

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agoreplace CONFIG_PRELOADER with CONFIG_SPL_BUILD
Aneesh V [Wed, 13 Jul 2011 05:11:07 +0000 (05:11 +0000)]
replace CONFIG_PRELOADER with CONFIG_SPL_BUILD

replace all occurences of CONFIG_PRELOADER with CONFIG_SPL_BUILD

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoscaled down version of generic libraries for SPL
Aneesh V [Wed, 13 Jul 2011 05:11:06 +0000 (05:11 +0000)]
scaled down version of generic libraries for SPL

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarm: adjust PLATFORM_LIBS for SPL
Aneesh V [Tue, 19 Jul 2011 05:51:41 +0000 (05:51 +0000)]
arm: adjust PLATFORM_LIBS for SPL

Signed-off-by: Aneesh V <aneesh@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
13 years agoHook SPL build-system into toplevel Makefile
Daniel Schwierzeck [Wed, 13 Jul 2011 05:11:04 +0000 (05:11 +0000)]
Hook SPL build-system into toplevel Makefile

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agoExtend build-system for SPL framework
Daniel Schwierzeck [Mon, 18 Jul 2011 06:09:15 +0000 (06:09 +0000)]
Extend build-system for SPL framework

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agospl: add initial support for a generic SPL framework
Daniel Schwierzeck [Mon, 18 Jul 2011 07:48:07 +0000 (07:48 +0000)]
spl: add initial support for a generic SPL framework

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agoUse ALL-y style instead of ifeq blocks for better readability
Daniel Schwierzeck [Wed, 13 Jul 2011 05:11:01 +0000 (05:11 +0000)]
Use ALL-y style instead of ifeq blocks for better readability

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agoFix: watchdog timed out, if using md5 command
Jens Scharsig [Mon, 18 Jul 2011 12:39:11 +0000 (14:39 +0200)]
Fix: watchdog timed out, if using md5 command

* Fix: if using md5 command watchdog timed out
* change function call md5(..) to the watchdog-safe variant
  md5_wd(..) to support watchdog reset

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
13 years agoFix: watchdog timed out, if using sha1 command
Jens Scharsig [Mon, 18 Jul 2011 12:39:07 +0000 (14:39 +0200)]
Fix: watchdog timed out, if using sha1 command

* Fix: if using sha1 command watchdog timed out
* change function call sha1_csum(..) to the watchdog-safe variant
  sha1_csum_wd(..) to support watchdog reset

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
13 years agocommand/cmd_cache.c: Add optional flush arguments
Matthew McClintock [Tue, 24 May 2011 10:09:05 +0000 (10:09 +0000)]
command/cmd_cache.c: Add optional flush arguments

It might be desirable to have the ability to flush icache/dcache
within u-boot, this patch gives each arch the ability to provide
a flush_dcache/flush_icache function to let u-boot flush caches
from the prompt

Signed-off-by: Matthew McClintock <msm@freescale.com>
13 years agocommon/cmd_ximg.c: add ifdef protection for gzip uncompression
Matthew McClintock [Tue, 24 May 2011 05:48:26 +0000 (05:48 +0000)]
common/cmd_ximg.c: add ifdef protection for gzip uncompression

Print a message if we do not have the ability to uncompress a gzip
image. Before, u-boot would just assume the routines were available

Signed-off-by: Matthew McClintock <msm@freescale.com>
13 years agodisk/part.c: Make features optional
Matthew McClintock [Tue, 24 May 2011 05:31:19 +0000 (05:31 +0000)]
disk/part.c: Make features optional

If we don't want to build support for any partition types we can now
add #undef CONFIG_PARTITIONS in a board config file to keep this from
being compiled in. Otherwise boards assume this is compiled in by
default

Signed-off-by: Matthew McClintock <msm@freescale.com>
13 years agomiiphy: use strncpy() not sprintf()
Laurence Withers [Thu, 14 Jul 2011 23:21:45 +0000 (23:21 +0000)]
miiphy: use strncpy() not sprintf()

In miiphy_register() the new device's name was initialised by passing a
string parameter as the format string to sprintf(). As this would cause
problems if it ever contained a '%' symbol, switch to using strncpy()
instead.

Signed-off-by: Laurence Withers <lwithers@guralp.com>
Cc: Andy Fleming <afleming@freescale.com>
13 years agopowerpc: Fix device tree padding associated with ramdisk
Kumar Gala [Wed, 6 Jul 2011 15:16:28 +0000 (15:16 +0000)]
powerpc: Fix device tree padding associated with ramdisk

When booting with a ramdisk we bump the amount of memory reserved for
the device tree by FDT_RAMDISK_OVERHEAD.  However we did not increase
the actual size in the device tree blob to match.

Its possible on boundary cases that we dont have enough memory according
to the device tree blob and get errors like:

WARNING: could not set linux,initrd-end FDT_ERR_NOSPACE

We can easily fix this by setting the device tree size at the same time
we bump the amount of memory reserved for the device tree.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
13 years agoRevert "post, memory test: add memory_post_test() to include file"
Wolfgang Denk [Tue, 26 Jul 2011 11:53:35 +0000 (13:53 +0200)]
Revert "post, memory test: add memory_post_test() to include file"

This reverts commit f18714dd61331b48ab9dc0ef717d61f1441a0e17
which cuases compile errors on a number of boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoFix: if using crc32 command watchdog timed out
Jens Scharsig [Mon, 18 Jul 2011 06:46:26 +0000 (08:46 +0200)]
Fix: if using crc32 command watchdog timed out

* Fix: if using crc32 command watchdog timed out
* change function call crc32(..) to the watchdog-safe variant
  crc_32_wd(..) to support watchdog reset

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
13 years agomemcpy/memmove: Do not copy to same address
Matthias Weisser [Sun, 22 May 2011 23:03:55 +0000 (23:03 +0000)]
memcpy/memmove: Do not copy to same address

In some cases (e.g. bootm with a elf payload which is already at the right
position) there is a in place copy of data to the same address. Catching this
saves some ms while booting.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
13 years agoscsi/ahci: add support for non-PCI controllers
Rob Herring [Wed, 6 Jul 2011 16:13:36 +0000 (16:13 +0000)]
scsi/ahci: add support for non-PCI controllers

Add support for AHCI controllers that are not PCI based.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Wolfgang Denk <wd@denx.de>