Andreas Bießmann [Thu, 18 Apr 2013 22:48:50 +0000 (22:48 +0000)]
lib: consolidate hang()
Delete all occurrences of hang() and provide a generic function.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
[trini: Modify check around puts() in hang.c slightly]
Signed-off-by: Tom Rini <trini@ti.com>
Andreas Bießmann [Thu, 18 Apr 2013 22:48:49 +0000 (22:48 +0000)]
tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT
In order to use the generic hang() later on pull libgeneric in SPL.
This has no impact on the SPL size.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Andreas Bießmann [Thu, 18 Apr 2013 22:48:48 +0000 (22:48 +0000)]
mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT
In order to use the generic hang() later on pull libgeneric in SPL.
This has no impact on the SPL size.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Andreas Bießmann [Thu, 18 Apr 2013 22:48:47 +0000 (22:48 +0000)]
nios2: fix style in board.c.
Make nios2's board.c checkpatch clean.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Andreas Bießmann [Thu, 18 Apr 2013 22:48:46 +0000 (22:48 +0000)]
microblaze: fix style in board.c
Make microblaze's board.c checkpatch clean.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Michal Simek <monstr@monstr.eu>
Egbert Eich [Tue, 9 Apr 2013 21:11:56 +0000 (21:11 +0000)]
part/dev_desc: Add log2 of blocksize to block_dev_desc data struct
log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 21:11:55 +0000 (21:11 +0000)]
fs/fat: Don't multiply fatsize with sector size
Bugfix:
Here at this place we need the fat size in sectors not bytes.
This was found during code review when adding support for storage
devices with blocksizes != 512.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 21:11:54 +0000 (21:11 +0000)]
disk/iso: Add Support for block sizes > 512 byte to ISO partition support
For ISO we check the block size of the device if this is != the CD sector
size we assume that the device has no ISO partition.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 06:03:36 +0000 (06:03 +0000)]
disk/gpt: Fix GPT partition handling for blocksize != 512
Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of
code in u-boot still assumes a 512 byte blocksize.
This patch fixes the handling of GPTs.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 05:46:14 +0000 (05:46 +0000)]
disk/part_dos: check harder for partition table
Devices that used to have a whole disk FAT filesystem but got then
partitioned will most likely still have a FAT or FAT32 signature
in the first sector as this sector does not get overwritten by
a partitioning tool (otherwise the tool would risk to kill the mbr).
The current partition search algorithm will erronously detects such
a device as a raw FAT device.
Instead of looking for the FAT or FAT32 signatures immediately we
use the same algorithm as used by the Linux kernel and first check
for a valid boot indicator flag on each of the 4 partitions.
If the value of this flag is invalid for the first entry we then
do the raw partition check.
If the flag for any higher partition is wrong we assume the device
is neiter a MBR nor PBR device.
Signed-off-by: Egbert Eich <eich@suse.com>
Simon Glass [Wed, 3 Apr 2013 08:54:30 +0000 (08:54 +0000)]
mmc: Define a constant for the maximum block size
The number 512 appears quite a bit in the mmc code. Add a constant for this
so that it can be used here and in other parts of the code (e.g. SPL code
which loads from mmc).
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:38 +0000 (23:50 +0000)]
amcc-common.h: enable support for "env grep", "setexpr", and regex.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:37 +0000 (23:50 +0000)]
amcc-common.h: minor white space cleanup
Align some comments.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:36 +0000 (23:50 +0000)]
m28evk: enable "env grep" and regexp support
Signed-off-by: Wolfgang Denk <wd@denx.de>
Conflicts:
include/configs/m28evk.h
Wolfgang Denk [Sat, 23 Mar 2013 23:50:35 +0000 (23:50 +0000)]
m28evk: white space cleanup
Change all "#define<TAB>" sequences into "#define<SPACE>"
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:34 +0000 (23:50 +0000)]
setexpr: add regex substring matching and substitution
Add "setexpr name gsub r s [t]" and "setexpr name sub r s [t]"
commands which implement substring matching for the regular
expression <r> in the string <t>, and substitution of the string <s>.
The result is assigned to the environment variable <name>. If <t> is
not supplied, the previous value of <name> is used instead. "gsub"
performs global substitution, while "sub" will replace only the first
substring.
Both commands are closely modeled after the gawk functions with the
same names.
Examples:
- Generate broadcast address by substituting the last two numbers of
the IP address by "255.255":
=> print ipaddr
ipaddr=192.168.1.104
=> setexpr broadcast sub "(.*\\.).*\\..*" "\\1255.255" $ipaddr
broadcast=192.168.255.255
- Depending on keyboard configuration (German vs. US keyboard) a
barcode scanner may initialize the MAC address as C0:E5:4E:02:06:DC
or as C0>E5>4E>02>06>DC. Make sure we always have a correct value:
=> print ethaddr
ethaddr=C0>E5>4E>02>06>DC
=> setexpr ethaddr gsub > :
ethaddr=C0:E5:4E:02:06:DC
- Do the same, but substitute one step at a time in a loop until no
futher matches:
=> setenv ethaddr C0>E5>4E>02>06>DC
=> while setexpr ethaddr sub > :
> do
> echo -----
> done
ethaddr=C0:E5>4E>02>06>DC
-----
ethaddr=C0:E5:4E>02>06>DC
-----
ethaddr=C0:E5:4E:02>06>DC
-----
ethaddr=C0:E5:4E:02:06>DC
-----
ethaddr=C0:E5:4E:02:06:DC
-----
C0:E5:4E:02:06:DC: No match
=> print ethaddr
ethaddr=C0:E5:4E:02:06:DC
etc.
To enable this feature, the CONFIG_REGEX option has to be defined in
the board config file.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:33 +0000 (23:50 +0000)]
setexpr: simplify code, improve help message
Simplify the argument checking for the "setexpr" command. This is
done mainly to make future extensions easier.
Also improve the help message for the one argument version of the
command - this does not "load an address", but a value, which in
this context may be a plain number or a pointer dereference.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:32 +0000 (23:50 +0000)]
"env grep" - add support for regular expression matches
When CONFIG_REGEX is enabled, the new option "-e" becomes available
which causes regular expression matches to be used. This allows for
example things like these:
- print all MAC addresses:
=> env grep -e eth.*addr
eth1addr=00:10:ec:80:c5:15
ethaddr=00:10:ec:00:c5:15
- print all variables that have at least 2 colons in their value:
=> env grep -v -e :.*:
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off
panic=1
eth1addr=00:10:ec:80:c5:15
ethaddr=00:10:ec:00:c5:15
ver=U-Boot 2013.04-rc1-00289-g497746b-dirty (Mar 22 2013 - 12:50:25)
etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:31 +0000 (23:50 +0000)]
Add SLRE - Super Light Regular Expression library
Downloaded from http://slre.sourceforge.net/
and adapted for U-Boot environment.
Used to implement regex operations on environment variables.
Code size is ~ 3.5 KiB on PPC.
To enable this code, define the CONFIG_REGEX option in your board
config file.
Note: There are more recent versions of the SLRE library available at
http://slre.googlecode.com ; unfortunately, the new code has a heavily
reorked API which makes it less usable for our purposes:
- the return code is strings, which are more difficult to process
- we don't get any information any more which sub-string of the data
was matched by the given regex
- it is much more cumbersome to work with arbitrary expressions, where
for example the number of substrings for capturing are not known at
compile time
Also, there does not seem to be any real changes or improvements of
the functionality.
Because of this, we deliberately stick with the older code.
Note 2: the test code (built when SLRE_TEST is defined) was modified
to allow for more extensive testing; now we can test the regexp
matching on all lines on a text file (instead of the whole data in the
file as a single block).
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:30 +0000 (23:50 +0000)]
"env grep" - add options to grep in name, value, or both.
Add options to "env grep" command:
-n : search only the envrironment variable names
-v : search only their values
-b : search both names and values (= default)
An option "--" will stop parsing options, so to print variables that
contain the striing "- " please use:
env grep -- "- "
Or to print all environment varioables which have a '-' in their name,
use:
env grep -n -- -
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:29 +0000 (23:50 +0000)]
"env grep" - reimplement command using hexport_r()
Also drop hstrstr_r() which is not needed any more.
The new code is way more flexible.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Sat, 23 Mar 2013 23:50:28 +0000 (23:50 +0000)]
hashtable: preparations to use hexport_r() for "env grep"
The output of "env grep" is unsorted, and printing is done by a
private implementation to parse the hash table. We have all the
needed code in place in hexport_r() alsready, so let's use this
instead. Here we prepare the code for this, without any functional
changes yet.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Peter Korsgaard [Thu, 21 Mar 2013 04:55:17 +0000 (04:55 +0000)]
spl_mmc: cleanup variable types
block_read returns unsigned long, so it doesn't make sense to check for
< 0. and neither does marking the header structure as const and then
casting away the constness to load data into it.
Also cleanup some unneeded pointer casting while we're at it.
Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Sat, 20 Apr 2013 08:42:52 +0000 (08:42 +0000)]
sandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FIT
Enable these options to use FITs on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:51 +0000 (08:42 +0000)]
sandbox: fs: Add support for saving files to host filesystem
This allows write of files from the host filesystem in sandbox. There is
currently no concept of overwriting the file and removing its existing
contents - all writing is done on top of what is there. This means that
writing 10 bytes to the start of a 1KB file will only update those 10
bytes, not truncate the file to 10 byte slong.
If the file does not exist it is created.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:50 +0000 (08:42 +0000)]
fs: Add support for saving data to filesystems
Add a new method for saving that filesystems can implement. This mirrors the
existing load method.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:49 +0000 (08:42 +0000)]
sandbox: Support 'source' command
Enhance the source command to work with sandbox, by using map_sysmem() to
convert a ulong address into a pointer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:48 +0000 (08:42 +0000)]
sandbox: Allow -c argument to provide a command list
This allows passing of entire scripts to sandbox with the -c argument,
which is useful for testing. Commands can be delimited with a newline
or semicolon.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:47 +0000 (08:42 +0000)]
Revert "fdt- Tell the FDT library where the device tree is"
This reverts commit
3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.
In practice it doesn't seem like a good idea to make the the working
FDT point to the control FDT. Now that we can access the control FDT
using the 'fdt' command, there is no need for this feature. Remove it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:46 +0000 (08:42 +0000)]
fdt: Skip checking FDT if the pointer is NULL
If we have no FDT, don't attempt to read from it. This allows sandbox to
run without an FDT if required.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:45 +0000 (08:42 +0000)]
sandbox: fdt: Support fdt command for sandbox
By using map_sysmem() we can get the fdt command to work correctly with
sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:44 +0000 (08:42 +0000)]
fdt: Allow fdt command to check and update control FDT
There is an existing fdt command to deal with the working FDT. Enhance this
to support the control FDT also (CONFIG_OF_CONTROL).
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:43 +0000 (08:42 +0000)]
Add getenv_hex() to return an environment variable as hex
This conversion is required in a number of places in U-Boot. Add a
standard function to provide this feature, so we avoid all the different
variations in the way it is coded.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:42 +0000 (08:42 +0000)]
fdt: Add a parameter to fdt_valid()
At present this only checks working_fdt, but we want to check other FDTs
also. So add the FDT to check as a parameter to fdt_valid().
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:41 +0000 (08:42 +0000)]
sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file
With sandbox it is tricky to add an FDT to the image at build time (or
later) since we build an ELF file, not a plain binary, and the address
space of the whole U-Boot is not accessible in the emulated memory map
of sandbox.
Sandbox can read files directly from the host, though, so add an option
to read an FDT from a host file on start-up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 26 Apr 2013 02:53:43 +0000 (02:53 +0000)]
sandbox: Switch over to generic board
Add generic board support for sandbox. and remove the old board init code.
Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Sat, 20 Apr 2013 08:42:37 +0000 (08:42 +0000)]
sandbox: Provide a way to map from host RAM to U-Boot RAM
In many cases, pointers to memory are passed around, and these pointers
refer to U-Boot memory, not host memory. This in itself is not a
problem.
However, in a few places, we cast that pointer back to a ulong (being
a U-Boot memory address). It is possible to convert many of these cases
to avoid this. However there are data structures (e.g. struct
bootm_headers) which use pointers. We could with a lot of effort adjust
the structs and all code that uses them to use ulong instead of pointers.
This seems like an unacceptable cost, since our objective with sandbox
is to minimise the impact on U-Boot code while maximising the features
available to sandbox.
Therefore, create a map_to_sysmem() function which converts from a
pointer to a U-Boot address. This can be used sparingly when needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 20 Apr 2013 08:42:36 +0000 (08:42 +0000)]
Trigger generic board error only when building
At present the generic board error can occur when configuring U-Boot, or
during distclean, but this is incorrect. The existing autoconf.mk may come
from an earlier U-Boot configuration which is about to be overwritten.
Make the error conditional so that it will only be triggered when we are
actually building U-Boot.
This avoids a problem where the system is being reconfigured to remove
CONFIG_SYS_GENERIC_BOARD on an architecture that does not support it.
Currently this will print an error and require the manual removal of
include/autoconf.mk.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Tue, 30 Apr 2013 13:58:28 +0000 (09:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Tue, 30 Apr 2013 13:58:03 +0000 (09:58 -0400)]
Merge branch 'microblaze' of git://denx.de/git/u-boot-microblaze
Anatolij Gustschin [Mon, 15 Apr 2013 04:01:07 +0000 (04:01 +0000)]
post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES
Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent
and the rule is not to report I2C POST failure for devices
in this list. Currently this doesn't work since probing for
these devices isn't done and thus they are not marked as
successfully probed. Ignore optional devices when checking
for devices that didn't respond.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Michal Simek [Mon, 22 Apr 2013 09:23:16 +0000 (11:23 +0200)]
watchdog: Add support for Xilinx Microblaze watchdog
Watchdog can be used on Microblaze, PPC and Zynq hw designs.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
Michal Simek [Wed, 7 Nov 2012 14:27:39 +0000 (15:27 +0100)]
microblaze: Disable all cpu features before reset
Fix microblaze soft reset function and disable
all cpu features. Especially disable caches because
IRQs were off by disable_interrupts().
Reported-by: John Williams <john.williams@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 10 Jun 2010 13:46:04 +0000 (15:46 +0200)]
microblaze: Enable netconsole
Setup environment and enable netconsole.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
Michal Simek [Fri, 2 Nov 2012 08:33:05 +0000 (09:33 +0100)]
microblaze: Fix reset function
Remove CONFIG_SYS_RESET_ADDRESS macro.
It was there from historical point of view
when soft reset was just jump to u-boot text start
(not used right now).
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 24 Apr 2013 07:31:40 +0000 (09:31 +0200)]
git-mailrc: Add trini shortcut
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
Easier for using with patman.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Mon, 22 Apr 2013 13:12:16 +0000 (09:12 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-cfi-flash
Tom Rini [Mon, 22 Apr 2013 13:11:25 +0000 (09:11 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-ppc4xx
Stefan Roese [Thu, 4 Apr 2013 13:53:14 +0000 (15:53 +0200)]
flash: Add optional verify-after-write feature
Sometimes it might make sense to verify the written data to NOR flash.
This patch adds this feature. To enable this verify-after-write, you
need to define CONFIG_FLASH_VERIFY in your board config header.
Please note that this option is useless in nearly all cases,
since such flash programming errors usually are detected earlier
while unprotecting/erasing/programming. Please only enable
this option if you really know what you are doing.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Fri, 8 Mar 2013 15:50:41 +0000 (16:50 +0100)]
ppc4xx: Add lcd4_lwmon5 support
This patch adds the fast booting LWMON5 derivat "lcd4_lwmon5".
Its a stripped down version of the full blown lwmon5 support,
without ECC, USB, POST and some other stuff. It used the newly
introduced SPL infrastrucure for SPL from NOR flash booting
on the PPC4xx.
By setting the environment variable "boot_os" to "yes", Linux
will be started from the SPL version. If not, the "normal"
U-Boot will be started.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Fri, 22 Feb 2013 10:36:50 +0000 (11:36 +0100)]
Makefile: Add target for combined u-boot.img & spl/u-boot.bin
This new make target "u-boot-img-spl-at-end.bin" consists of the
the real, full-blown U-Boot image and the U-Boot SPL binary
directly attached to it. The full-blown U-Boot image has the
mkimage header included, with its load-address and entry-point.
This will be used by the upcoming lwmon5 PPC440EPx derivate board
port.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Tue, 2 Apr 2013 08:37:04 +0000 (10:37 +0200)]
ppc4xx: Add SPL support
This patch adds SPL booting support (NOR flash) for the
PPC4xx platforms.
This SPL booting (Falcon mode) will be used by the upcoming
lcd4_lwmon5 board port (lwmon5 variant).
Signed-off-by: Stefan Roese <sr@denx.de>
Tom Rini [Fri, 19 Apr 2013 19:09:02 +0000 (15:09 -0400)]
feature-removal-schedule.txt: Add CONFIG_SYS_MTEST_START/END
With 'mtest' no longer a default command, we will have unused defines
which should be removed for the v2013.10 release.
Signed-off-by: Tom Rini <trini@ti.com>
Tom Rini [Fri, 19 Apr 2013 19:03:27 +0000 (15:03 -0400)]
config_cmd_default.h: Remove CONFIG_CMD_MEMTEST
As per doc/feature-removal-schedule.txt, remove CONFIG_CMD_MEMTEST from
default list of commands.
Signed-off-by: Tom Rini <trini@ti.com>
Tom Rini [Fri, 19 Apr 2013 14:25:43 +0000 (10:25 -0400)]
Prepare v2013.04
Signed-off-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 18 Apr 2013 10:25:51 +0000 (10:25 +0000)]
crc32: Correct endianness of crc32 result
When crc32 is handled by the hash library, it requires the data to be in
big-endian format, since it reads it byte-wise. Thus at present the 'crc32'
command reports incorrect data. For example, previously we might see:
Peach # crc32
40000000 100
CRC32 for
40000000 ...
400000ff ==>
0d968558
but instead with the hash library we see:
Peach # crc32
40000000 100
CRC32 for
40000000 ...
400000ff ==>
5885960d
Correct this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Andreas Bießmann [Mon, 15 Apr 2013 23:52:18 +0000 (23:52 +0000)]
patman: fix gitutil for decorations
The git config parameter log.decorate is quite useful when working with git.
Patman, however can not handle the decorated output when parsing the commit.
To prevent this use the '--no-decorate' switch for git-log.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini [Thu, 18 Apr 2013 20:16:01 +0000 (16:16 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm into HEAD
Quick manual fixup to merge the USB boot related defines and TPM related
defines.
Conflicts:
include/configs/exynos5250-dt.h
Signed-off-by: Tom Rini <trini@ti.com>
Simon Glass [Mon, 11 Mar 2013 06:30:27 +0000 (06:30 +0000)]
fdt: Ensure that libfdt_env.h comes from U-Boot
When building host utilities, we include libfdt.h from the host, not from
U-Boot. This in turn brings in libfdt_env.h from the host, which can mess
up the types and cause a build failure, depending on the host environment.
To fix this, force inclusion of U-Boot's libfdt_env.h so that the types
are correct.
Another way to fix this is to use -nostdinc and -idirafter to ensure that
system includes are included after U-Boot ones. Unfortunately this means
that U-Boot's errno.h gets included instead of the system one. This in
turn requires a hack to errno.h to redirect things, so all in all the
solution in this patch is probably cleaner.
Signed-off-by: Simon Glass <sjg@chromium.org>
Jaehoon Chung [Tue, 29 Jan 2013 22:58:16 +0000 (22:58 +0000)]
mmc: check the revision for sd3.0
Support to check whether the SD3.0 or not.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Rommel Custodio <sessyargc@gmail.com>
Jaehoon Chung [Tue, 29 Jan 2013 19:31:16 +0000 (19:31 +0000)]
mmc: support the correct card version for eMMC
eMMC vesrion is supported up to v4.5.
But bootloader isn't saw the exact eMMC version.
After applied this patch,
if use the mmcinfo command, then can see the exactly mmc version.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Rommel Custodio <sessyargc@gmail.com>
Maxime Larocque [Fri, 28 Sep 2012 05:00:13 +0000 (05:00 +0000)]
printenv: Correct out-of-memory condition check.
In common/cmd_nvedit.c, en env_print(), the wrong type is used for len.
hexport_r() returns -1 on error (like OOM), which is converted to
0xffffffff when put in an unsigned. Said value is obviously bigger then
0, and as a result an uninitialized string is then displayed. Other
usages of hexport_r() in the code correctly uses ssize_t to keep its
return value.
Signed-off-by: Maxime Larocque <maxmtl2002@yahoo.ca>
Simon Glass [Sat, 13 Apr 2013 04:26:42 +0000 (04:26 +0000)]
exynos: fdt: Add TMU node for snow
Snow is missing a TMU node, and with TMU support this is not allowed, so it
fails to boot. Add it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Simon Glass [Sat, 13 Apr 2013 04:26:41 +0000 (04:26 +0000)]
exynos: Correct use of 64-bit division
The current code is causing errors like this on my toolchains:
/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.22/
ld.bfd.real: failed to merge target specific data of file /usr/lib/gcc/
armv7a-cros-linux-gnueabi/4.7.x-google/libgcc.a(_divdi3.o)
Use do_div() to avoid this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Vivek Gautam [Mon, 28 Jan 2013 00:39:59 +0000 (00:39 +0000)]
Exynos5: Add support for USB download boot mode
Exynos5250 supports secondary USB device boot mode. If the iROM fails
to download u-boot from the primary boot device (such as SD or eMMC),
it will try to retrieve from the secondary boot device (such as USB).
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Tom Rini [Tue, 16 Apr 2013 20:12:33 +0000 (16:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 16 Apr 2013 14:56:55 +0000 (10:56 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Simon Glass [Mon, 15 Apr 2013 11:25:21 +0000 (11:25 +0000)]
x86: config: Init PCI before SPI
Since the ICH SPI controller uses PCI, we must ensure that PCI is available
before it is inited.
This fixes the current "ICH SPI: Cannot find device" message on boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 15 Apr 2013 11:25:20 +0000 (11:25 +0000)]
x86: Allow setup code to manage its own global data
Currently x86 has its own means of managing the global data and board data
(bd_t), and this code resides in start.S. With generic board, we need to
ensure that we leave this alone - i.e. don't clear it as we do on other
archs.
This fixes a problem where the memory init data is cleared which causes
the video driver to operate very slowly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 15 Apr 2013 11:22:49 +0000 (11:22 +0000)]
x86: Fix DRAM bank size init with generic board
The intention of the memory init code is that it should work the same with
CONFIG_SYS_GENERIC_BOARD and without. This is tricky because dram_init()
is called prior to relocation with generic board (matching other archs)
and after relocation without generic board.
Adjust the init sequence so that dram_init() is not called in the generic
board case, which seems like the easiest fix for now. Also ensure that
relocation addresses are still calculated.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Warren [Fri, 12 Apr 2013 18:20:51 +0000 (11:20 -0700)]
Tegra: T30: Beaver board support.
Beaver is a Tegra30 board that is nearly 100% compatible w/Cardhu.
Add a Beaver build so it can begin to be differentiated, if need be.
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tom Warren [Wed, 10 Apr 2013 17:32:32 +0000 (10:32 -0700)]
Tegra: Split tegra_get_chip_type() into soc & sku funcs
As suggested by Stephen Warren, use tegra_get_chip() to return
the pure CHIPID for a Tegra SoC (i.e. 0x20 for Tegra20, 0x30 for
Tegra30, etc.) and rename tegra_get_chip_type() to reflect its true
function, i.e. tegra_get_chip_sku(), which returns an ID like
TEGRA_SOC_T25, TEGRA_SOC_T33, etc.
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tom Warren [Wed, 3 Apr 2013 21:39:30 +0000 (14:39 -0700)]
Tegra: Fix MSELECT clock divisors for T30/T114.
A comparison of registers between our internal NV U-Boot and
u-boot-tegra/next showed some discrepancies in the MSELECT
clock divisor programming. T20 doesn't have a MSELECT clk src reg.
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tom Warren [Mon, 1 Apr 2013 22:48:54 +0000 (15:48 -0700)]
Tegra114: Initialize System Counter (TSC) with osc frequency
T114 needs the SYSCTR0 counter initialized so the TSC can be
read by the kernel. Do it in the bootloader since it's a write-once
deal (secure/non-secure mode dependent).
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tom Warren [Mon, 25 Mar 2013 23:22:26 +0000 (16:22 -0700)]
Tegra: Configure L2 cache control reg properly.
Without this change, kernel fails at calling function cache_clean_flush
during kernel early boot.
Aprocryphally, intended for T114 only, so I check for a T114 SoC.
Works (i.e. dalmore 3.8 kernel now starts printing to console).
Signed-off-by: Tom Warren <twarren@nvidia.com>
Thierry Reding [Wed, 3 Apr 2013 04:52:45 +0000 (04:52 +0000)]
Tegra: TEC: Enable boot script support
Boot script support brings TEC in line with other Tegra boards. To
enable booting a Linux kernel with initial ramdisk, also include support
for the new FIT image type.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Thierry Reding [Wed, 3 Apr 2013 04:52:44 +0000 (04:52 +0000)]
Tegra: Plutux: Enable NAND and boot script support
Boot script support brings Plutux in line with other Tegra boards. In
order to enable booting a Linux kernel with initial ramdisk, also add
support for the new FIT image type.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Thierry Reding [Wed, 3 Apr 2013 04:52:43 +0000 (04:52 +0000)]
Tegra: Medcom-Wide: Enable NAND and boot script support
Boot script support brings Medcom-Wide in line with other Tegra boards.
In order to enable booting a Linux kernel with initial ramdisk, also add
support for the new FIT image type.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Thierry Reding [Wed, 3 Apr 2013 04:52:42 +0000 (04:52 +0000)]
Tegra: All Tamonten-derived boards use onboard NAND
Move the nand-controller node to the tegra20-tamonten.dtsi so that it
can be shared between all derived boards.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tom Warren [Thu, 28 Mar 2013 17:03:22 +0000 (10:03 -0700)]
Tegra: Restore cp15 VBAR _start vector write for ARMv7
A start vector fix was added by AneeshV for OMAP4 (commit
0d479b53),
and caused the old monilithic Tegra builds to hang due to an undefined
instruction trap. Previously, the code needed to run on both the
AVP (ARM7TDI) and A9, and the AVP doesn't have a CP15 register.
I corrected this in commit
6d6c0bae w/#ifndef CONFIG_TEGRA, but
now that we use SPL, and boot the AVP w/o any ARMv7 code, I can
revert my change, and make Aneesh's change apply to Tegra.
Signed-off-by: Tom Warren <twarren@nvidia.com>
Tom Warren [Tue, 26 Mar 2013 17:39:33 +0000 (10:39 -0700)]
Tegra: enable verify support for the crc32 command
Some 3rd-party flash tools use the -v (verify) option of crc32 command.
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Stephen Warren [Wed, 27 Mar 2013 09:37:02 +0000 (09:37 +0000)]
ARM: tegra: support T33 SKU of Tegra30
Make U-Boot aware of the T33 SKU of Tegra30, and treat it identically
to any other Tegra30.
An alternative would be to simply remove the SKU checking from
tegra_get_chip_type(); most use of the value most likely simply wants
to know the current chip, not the specific SKU. Or, the function could
be split into separate tegra_get_chip() and tegra_get_sku() for the
cases where differentiation really is required.
I wonder whether tegra_get_chip_type() should printf() whenever any
unkown chip/SKU is found, although perhaps the function is called so
early that the printf() wouldn't actually make it to the UART anyway.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Andre Przywara [Tue, 2 Apr 2013 05:43:36 +0000 (05:43 +0000)]
ARMv7: start.S: stay in HYP mode if u-boot is entered in it
The KVM and Xen hypervisors for the Cortex-A15 virtualization
implementation need to be entered in HYP mode. Should the primary
board firmware already enter HYP mode (Calxeda firmware does that),
we should not deliberately drop back to SVC mode.
Since U-boot does not use the MMU, running in HYP mode is just fine.
Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Tom Rini [Mon, 15 Apr 2013 15:47:10 +0000 (11:47 -0400)]
Prepare v2013.04-rc3
Signed-off-by: Tom Rini <trini@ti.com>
Tom Rini [Mon, 15 Apr 2013 11:46:11 +0000 (07:46 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 15 Apr 2013 11:45:07 +0000 (07:45 -0400)]
Merge branch 'tpm' of git://git.denx.de/u-boot-x86
Albert ARIBAUD [Sun, 14 Apr 2013 04:48:38 +0000 (04:48 +0000)]
cosmetic: fix CONFIG_SPL_BSS_MAX_SIZE typo in README
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:33 +0000 (05:14 +0000)]
smdk5250, snow: convert to CONFIG_SPL_MAX_FOOTPRINT
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:32 +0000 (05:14 +0000)]
da850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:31 +0000 (05:14 +0000)]
cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Fri, 12 Apr 2013 05:14:30 +0000 (05:14 +0000)]
ARM: fix CONFIG_SPL_MAX_SIZE semantics
Remove SPL-related ASSERT() in arch/arm/cpu/u-boot.lds
as this file is never used for SPL builds.
Rewrite the ASSERT() in arch/arm/cpu/u-boot-spl.lds
to separately test image (text,data,rodata...) size,
BSS size, and full footprint each against its own max,
and make Tegra boards check full footprint.
Also, output section mmutable is not used in SPL builds.
Remove it.
Finally, update README regarding the (now homogeneous)
semantics of CONFIG_SPL_[BSS_]MAX_SIZE and add the new
CONFIG_SPL_MAX_FOOTPRINT macro.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Albert ARIBAUD [Sun, 14 Apr 2013 09:45:06 +0000 (11:45 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Andrew Gabbasov [Sun, 7 Apr 2013 23:06:08 +0000 (23:06 +0000)]
fsl_esdhc: Fix DMA transfer completion waiting loop
Rework the waiting for transfer completion loop condition
to continue waiting until both Transfer Complete and DMA End
interrupts occur. Checking of DLA bit in Present State register
looks not needed in addition to interrupts status checking,
so it can be removed from the condition. Also, DMA Error
condition is added to the list of data errors, checked in the loop.
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Eric Nelson [Wed, 3 Apr 2013 12:31:56 +0000 (12:31 +0000)]
fsl_esdhc: flush cache after IO completion
The cache should invalidate the read buffer for
the SD card interface after the transfer complete,
not command-complete.
Tested-by: Andrew Gabbasov <Andrew_Gabbasov@mentor.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Albert ARIBAUD [Sun, 14 Apr 2013 08:38:37 +0000 (10:38 +0200)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 11 Apr 2013 05:43:21 +0000 (05:43 +0000)]
ARM: Fix __bss_start and __bss_end in linker scripts
Commit
3ebd1cbc introduced compiler-generated __bss_start
and __bss_end__ and commit
c23561e7 rewrote all __bss_end__
as __bss_end. Their merge caused silent and harmless but
potentially bug-inducing clashes between compiler- and linker-
generated __bss_end symbols.
Make __bss_end and __bss_start compiler-only, and create
__bss_base and __bss_limit for linker-only use.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Fabio Estevam [Tue, 9 Apr 2013 13:06:25 +0000 (13:06 +0000)]
spi: mxc_spi: Set master mode for all channels
The glitch in the SPI clock line, which commit
3cea335c34 (spi: mxc_spi: Fix spi
clock glitch durant reset) solved, is back now and itwas re-introduced by
commit
d36b39bf0d (spi: mxc_spi: Fix ECSPI reset handling).
Actually the glitch is happening due to always toggling between slave mode
and master mode by configuring the CHANNEL_MODE bits in this reset function.
Since the spi driver only supports master mode, set the mode for all channels
always to master mode in order to have a stable, "glitch-free" SPI clock line.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Otavio Salvador [Wed, 10 Apr 2013 16:55:50 +0000 (16:55 +0000)]
mx6qsabre{sd, auto}: Fix environment as 'mmc rescan' takes no arguments
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
Tetsuyuki Kobayashi [Fri, 5 Apr 2013 00:12:51 +0000 (00:12 +0000)]
BUGFIX: arm: data abort in get_bad_stack_swi
When swi instruction is executed, it is expected to get message
"software interrupt" in console and dump registers and reboot, as
do_software_interrupt() in arch/arm/lib/interrupts.c.
But, actually it causes data abort accessing wrong address in get_bad_stack_swi
macro in arch/arm/cpu/v7/start.S.
This patch fixes this problem.
The same mistake in arch/arm/cpu/{arm1136,arm1176,pxa}/start.S.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Albert ARIBAUD [Sat, 13 Apr 2013 07:39:29 +0000 (09:39 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'