Wolfgang Denk [Sat, 30 Jul 2011 13:33:49 +0000 (13:33 +0000)]
fpga: constify to fix build warning
Fix compiler warning:
cmd_fpga.c:318: warning: passing argument 3 of 'fit_image_get_data'
from incompatible pointer type
Adding the needed 'const' here entails a whole bunch of additonal
changes all over the FPGA code.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andre Schwarz <andre.schwarz@matrix-vision.de> Cc: Murray Jensen <Murray.Jensen@csiro.au> Acked-by: Andre Schwarz<andre.schwarz@matrix-vision.de>
Signed-off-by: Zhong hongbo <bocui107@gmail.com>
Changed commit message Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.aribaud@free.fr>
Wolfgang Denk [Fri, 29 Jul 2011 23:39:14 +0000 (01:39 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians:
powerpc/8xxx: Remove dependency on <usb.h>
powerpc/85xx: enable USB2 gadget mode for corenet ds board
powerpc/85xx: verify the device tree before booting Linux
MPC8xxx: drop redundant boot messages
powerpc/85xx: Fix build failure for P1023RDS
powerpc/p2041rdb: Enable SATA support
powerpc/85xx: Cleanup handling of PVR detection for e500/e500mc/e5500
powerpc/85xx: Fix up clock_freq property in CAN node of dts
85xx: enable FDT support for STX SSA board
powerpc/85xx: provide 85xx flush_icache for cmd_cache
powerpc/p2041rdb: Enable backside L2 cache support
powerpc/85xx: Handle the lack of L2 cache on P2040/P2040E
powerpc/85xx: Add support for P2041[e] XAUI in SERDES
powerpc/85xx: Rename P2040 id & SERDES to P2041
powerpc/85xx: Adding configuration for DCSRCR to enable 32M access
powerpc/85xx: Fix setting of EPAPR_MAGIC value
Kumar Gala [Fri, 29 Jul 2011 13:51:26 +0000 (08:51 -0500)]
powerpc/8xxx: Remove dependency on <usb.h>
We used <usb.h> for USB_MAX_DEVICE. However this requires we actual
build in support for USB into u-boot (which should not be required for
device tree fixup).
At this time no FSL SoC that utilizies this code (83xx/85xx) has more
than 2 USB controllers. So we replace USB_MAX_DEVICE with a local
define FSL_MAX_NUM_USB_CTRLS.
If/when a device shows up with more than 2 controllers we can easily
bump this value or refactor into a proper define per SoC.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
powerpc/85xx: enable USB2 gadget mode for corenet ds board
to make USB2 worked in gadget mode, we need to set it's 'dr_mode' to
'peripheral' in hwconfig, but driver starts scan from 'usb1', it'll break
out if it cannot find 'usb1', so drop the 'else' clause to make driver scan
all the 'usbx'.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Tue, 3 May 2011 18:24:08 +0000 (13:24 -0500)]
powerpc/85xx: verify the device tree before booting Linux
Introduce ft_verify_fdt(), a function that is called after the device tree
has been fixed up, that displays warning messages if there is a mismatch
between the physical addresses of some devices that U-Boot has configured
with what the device tree says the addresses are.
This is a particular problem when booting a 36-bit device tree from a
32-bit U-Boot (or vice versa), because the physical address of CCSR is
wrong in the device tree. When the operating system boots, no messages are
displayed, so the user generally has no idea what's wrong.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Thu, 28 Jul 2011 19:34:30 +0000 (14:34 -0500)]
powerpc/85xx: Fix build failure for P1023RDS
When we added the fman fdt fixup we forgot to fixup the P1023RDS
platform. So we would get:
fdt.c: In function 'fdt_fixup_fman_firmware':
fdt.c:465:15: error: 'CONFIG_SYS_FMAN_FW_LENGTH' undeclared (first use in this function)
fdt.c:465:15: note: each undeclared identifier is reported only once for each function it appears in
Add the needed #defines in P1023RDS.h to fix this.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Thu, 21 Jul 2011 05:20:21 +0000 (00:20 -0500)]
powerpc/85xx: Handle the lack of L2 cache on P2040/P2040E
The P2040/P2040E have no L2 cache. So we utilize the SVR to determine
if we are one of these devices and skip the L2 init code in cpu_init.c
and release. For the device tree we skip the updating of the L2 cache
properties but we still update the chain of caches so the CPC/L3 node
can be properly updated.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Thu, 21 Jul 2011 05:20:20 +0000 (00:20 -0500)]
powerpc/85xx: Add support for P2041[e] XAUI in SERDES
We add XAUI_FM1 into the SERDES tables for P2041[e] devices. However
for the P2040[e] devices that dont support XAUI we handle this at
runtime via SVR checks. If we are on a P2040[e] device the SERDES
functions will behave as follows:
is_serdes_prtcl_valid() will always report invalid if prtcl passed in is
XAUI_FM1.
serdes_get_prtcl() will report NONE if the prtcl in the table is set to
XAUI_FM1.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
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>
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>
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.
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
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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>
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.
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.
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.
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.
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>
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>
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.
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.
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.
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.
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()