]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agoARMv7: at91: enable ICache and DCache.
Wu, Josh [Mon, 19 May 2014 11:51:28 +0000 (19:51 +0800)]
ARMv7: at91: enable ICache and DCache.

For at91 armv7 SoC (SAMA5D3x), only LCD and macb used DMA.
Now as the lcd and macb driver already support dcache. So we can
enable dcache now.

Also we can enable icache without any problem.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agovideo: atmel_hlcdfb: enable dcache support
Wu, Josh [Mon, 19 May 2014 11:51:27 +0000 (19:51 +0800)]
video: atmel_hlcdfb: enable dcache support

To support dcache, we need flush DMA descriptor buffer before enable lcd
DMA.

Also we need call lcd_set_flush_dcache(1) to make lcd driver flush the
lcd buffer if there is any change.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agonet: macb: enable dcache in macb
Wu, Josh [Tue, 27 May 2014 08:31:05 +0000 (16:31 +0800)]
net: macb: enable dcache in macb

Add to code to flush the dcache after we writing in DMA buffer.
Also we need invalidate the dcache before we check the status in the
DMA buffer.

Tested in SAMA5D3x-EK with gmac0. Tftp download speed shows in below:
Disable DCache: 1.1 MiB/s
Enable DCache: 1.6 MiB/s
Increase speed with about 40%.

The code should have no impact with the boards which are not
enable_dcache().
Tested in AT91SAM9M10G45EK.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agomacb: make checkpatch clean
Andreas Bießmann [Mon, 26 May 2014 20:55:18 +0000 (22:55 +0200)]
macb: make checkpatch clean

This also renames the CONFIG_SYS_MACB_xx defines. They are used just local and
therefore don't need the CONFIG_SYS_ prefix.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Josh Wu <josh.wu@atmel.com>
9 years agoavr32: migrate cache functions
Andreas Bießmann [Thu, 12 Jun 2014 20:07:52 +0000 (22:07 +0200)]
avr32: migrate cache functions

Unfortunately the avr32 cache implementation has another API than the one
described in common.h. Migrate the flush/invalidate dcache functions to the
common API to be usable in device drivers.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Josh Wu <josh.wu@atmel.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Thu, 12 Jun 2014 13:02:23 +0000 (09:02 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

9 years agommc: free allocated memory on initialization errors
Darwin Rambo [Mon, 26 May 2014 20:31:12 +0000 (13:31 -0700)]
mmc: free allocated memory on initialization errors

Cleanup to balance malloc/free calls.

Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Steve Rae <srae@broadcom.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agocmd_mmc: make mmc dev always re-probe the HW
Stephen Warren [Fri, 23 May 2014 19:24:47 +0000 (13:24 -0600)]
cmd_mmc: make mmc dev always re-probe the HW

Currently, U-Boot behaves as follows:

- Begin with no SD card inserted in "mmc 1"
- Execute: mmc dev 1
- This fails, since there is no card
- User plugs in an SD card
- Execute: mmc dev 1
- This still fails, since the HW isn't reprobed.

With this change, U-Boot behaves as follows:

- Begin with no SD card inserted in "mmc 1"
- Execute: mmc dev 1
- This fails, since there is no card
- User plugs in an SD card
- Execute: mmc dev 1
- The newly present SD card is detected

I know that "mmc rescan" will force the HW to be reprobed, but I feel it
makes more sense if "mmc dev" always reprobes the HW after selecting the
current MMC device. This allows scripts to just execute "mmc dev", and
not have to also execute "mmc rescan" to check for media presense.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agocmd_mmc: Use init_mmc_device() from do_mmc_rescan()
Stephen Warren [Fri, 23 May 2014 19:24:46 +0000 (13:24 -0600)]
cmd_mmc: Use init_mmc_device() from do_mmc_rescan()

The body of init_mmc_device() is now identical to that of do_mmc_rescan()
except for the error codes returned. Modify do_mmc_rescan() to simply
call init_mmc_device() and convert the error codes, to avoid code
duplication.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agocmd_mmc: add force_init parameter to init_mmc_device()
Stephen Warren [Fri, 23 May 2014 19:24:45 +0000 (13:24 -0600)]
cmd_mmc: add force_init parameter to init_mmc_device()

This allows callers to inject mmc->has_init = 0 between finding the
MMC device, and calling mmc_init(), which forces mmc_init() to rescan
the HW. Future changes will use this feature.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agodisk: default to HW partition 0 if not specified
Stephen Warren [Fri, 23 May 2014 18:48:11 +0000 (12:48 -0600)]
disk: default to HW partition 0 if not specified

Currently, get_device()/get_dev_hwpart() for MMC devices does not select
an explicit HW partition unless the user explicitly requests one, i.e. by
requesting device "mmc 0.0" rather than just "mmc 0". I think it makes
more sense if the default is to select HW partition 0 (main data area)
if the user didn't request a specific partition. Otherwise, the following
happens, which feels wrong:

Select HW partition 1 (boot0):
mmc dev 0 1

Attempts to access SW partition 1 on HW partition 1 (boot0), rather than
SW partition 1 on HW partition 0 (main data area):
ls mmc 0:1 /

With this patch, the second command above re-selects the main data area.

Many device types don't support HW partitions at all, so if HW partition
0 is selected (either explicitly or as the default) and there's no
select_hwpart function, we simply skip attempting to select a HW
partition.

Some MMC devices (i.e. SD cards) don't support HW partitions. However,
this patch still works, since mmc_start_init() sets the current
partition number to 0, and mmc_select_hwpart() succeeds if the requested
partition is already selected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agocmd_mmc: default to HW partition 0 if not specified
Stephen Warren [Fri, 23 May 2014 18:48:10 +0000 (12:48 -0600)]
cmd_mmc: default to HW partition 0 if not specified

Currently, "mmc dev 0" does not change the selected HW partition. I
think it makes more sense if "mmc dev 0" is an alias for "mmc dev 0 0",
i.e. that HW partition 0 (main data area) is always selected by default
if the user didn't request a specific partition. Otherwise, the following
happens, which feels wrong:

Select HW partition 1 (boot0):
mmc dev 0 1

Doesn't change the HW partition, so it's still 1 (boot0):
mmc dev 0

With this patch, the second command above re-selects the main data area.

Note that some MMC devices (i.e. SD cards) don't support HW partitions.
However, this patch still works, since mmc_start_init() sets the current
partition number to 0, and mmc_select_hwpart() succeeds if the requested
partition is already selected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agommc: return meaningful error codes from mmc_select_hwpart
Stephen Warren [Fri, 23 May 2014 18:47:06 +0000 (12:47 -0600)]
mmc: return meaningful error codes from mmc_select_hwpart

Rather than just returning -1 everywhere, try to return something
meaningful from mmc_select_hwpart(). Note that most other MMC functions
don't do this, including functions called from mmc_select_hwpart(), so
I'm not sure how effective this will be. Still, it's one less place with
hard-coded -1.

Suggested-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agoi2c: kona: Resolve Kona I2C driver issue
Steve Rae [Mon, 26 May 2014 19:33:29 +0000 (12:33 -0700)]
i2c: kona: Resolve Kona I2C driver issue

- "i2c mw" command hangs (with some compilers)

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocommon/xyzModem.c: move empty statements to newline
Jeroen Hofstee [Tue, 10 Jun 2014 23:04:42 +0000 (01:04 +0200)]
common/xyzModem.c: move empty statements to newline

To prevent a warning for clang the loop without a body
is made more clear by moving it to a line of its own.
This prevents a clang warning.

cc: sbabic@denx.de
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agojffs2:jffs2_1pass.c: remove double braces
Jeroen Hofstee [Tue, 10 Jun 2014 22:40:25 +0000 (00:40 +0200)]
jffs2:jffs2_1pass.c: remove double braces

Clang interpretes an if condition like  "if ((a = b) == NULL)
as it tries to assign a value in a statement. Hence if you do
"if ((something)) it warns you that you might be confused.
Hence drop the double braces for plane if statements.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoboard:keymile: remove unnecessary double braces
Jeroen Hofstee [Tue, 10 Jun 2014 22:34:39 +0000 (00:34 +0200)]
board:keymile: remove unnecessary double braces

Clang interpretes an if condition like  "if ((a = b) == NULL)
as it tries to assign a value in a statement. Hence if you do
"if ((something)) it warns you that you might be confused.
Hence drop the double braces for plane if statements.

cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agocommon/cli_hush.c: remove unnecessary double braces
Jeroen Hofstee [Tue, 10 Jun 2014 22:28:47 +0000 (00:28 +0200)]
common/cli_hush.c: remove unnecessary double braces

Clang interpretes an if condition like  "if ((a = b) == NULL)
as it tries to assign a value in a statement. Hence if you do
"if ((something)) it warns you that you might be confused.
Hence drop the double braces for plane if statements.

Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoLzmaTools: don't self assign values
Jeroen Hofstee [Tue, 10 Jun 2014 21:37:23 +0000 (23:37 +0200)]
LzmaTools: don't self assign values

It seems the code tries to trick the compiler the argument
is actually used. However compilers became too smart to
fool them so easily an now warn. Gcc and clang don't seem
to emit a warning when the argument is unused. If so it
should be decorated with unused / (void).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoimximage_hynix.cfg: fix unterminated comment
Jeroen Hofstee [Tue, 10 Jun 2014 21:16:09 +0000 (23:16 +0200)]
imximage_hynix.cfg: fix unterminated comment

cc: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agocosmetic: board: pm9263 rewrite old style stuct init
Jeroen Hofstee [Tue, 10 Jun 2014 21:12:04 +0000 (23:12 +0200)]
cosmetic: board: pm9263 rewrite old style stuct init

this prevent some warnings when compiling with clang

cc: Stelian Pop <stelian@popies.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agotps6586x.h: fix inclusion guard
Jeroen Hofstee [Tue, 10 Jun 2014 21:01:58 +0000 (23:01 +0200)]
tps6586x.h: fix inclusion guard

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoRemove ${objtree}/include/asm/proc/ link
Vasili Galka [Tue, 10 Jun 2014 13:16:14 +0000 (16:16 +0300)]
Remove ${objtree}/include/asm/proc/ link

mkconfig links ${objtree}/include/asm/proc/ to
${srctree}/arch/${arch}/include/asm/proc-armv/. This seems to be a
remnant from the past. Ever since its introduction in 2003 it is used
only in ARM build and always links to same place, so let's simplify
the code, remove it and reference directly where needed.

Successful MAKEALL for ARM and PowerPC verified on Linux.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agocosmetic: Whitespace fix
Vasili Galka [Tue, 10 Jun 2014 13:06:52 +0000 (16:06 +0300)]
cosmetic: Whitespace fix

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agocosmetic: atmel: replace old style struct init
Jeroen Hofstee [Mon, 9 Jun 2014 22:16:23 +0000 (00:16 +0200)]
cosmetic: atmel: replace old style struct init

This prevents some warnings when building with clang.
cc:: andreas.devel@googlemail.com
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoext4: correctly zero filename
Jeroen Hofstee [Mon, 9 Jun 2014 13:29:00 +0000 (15:29 +0200)]
ext4: correctly zero filename

Since ALLOC_CACHE_ALIGN_BUFFER declares a char* for filename
sizeof(filename) is not the size of the buffer. Use the already
known length instead.

cc: Uma Shankar <uma.shankar@samsung.com>
cc: Manjunatha C Achar <a.manjunatha@samsung.com>
cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Marek Vasut <marex@denx.de>
9 years agocommon: hash: zero end the string instead of the pointer
Jeroen Hofstee [Mon, 9 Jun 2014 09:02:02 +0000 (11:02 +0200)]
common: hash: zero end the string instead of the pointer

if algo->digest_size is zero nothing is set in the str_output
buffer. An attempt is made to zero end the buffer, but the
pointer to the buffer is set to zero instead. I am unaware if
it causes any actual problems, but solves the following warning:

common/hash.c:217:13: warning: expression which evaluates to zero treated as
a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
                str_ptr = '\0';
                          ^~~~

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agokbuild: move spl/Makefile to scripts/Makefile.spl
Masahiro Yamada [Mon, 9 Jun 2014 06:14:11 +0000 (15:14 +0900)]
kbuild: move spl/Makefile to scripts/Makefile.spl

All files under spl/ and tpl/ are generated during the build process
except spl/Makefile.

We can simplify clean-rule and git-ignore by moving spl/Makefile
to somewhere else.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agom68k: Fix warnings with gcc 4.6
Simon Glass [Sun, 8 Jun 2014 04:07:58 +0000 (22:07 -0600)]
m68k: Fix warnings with gcc 4.6

Most of the warnings seem to be related to using 'int' for size_t. Change
this and fix up the remaining warnings and problems. For bootm, the warning
was masked by others, and there is an actual bug in the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodocs: driver-model: Fix spelling
Chris Packham [Fri, 6 Jun 2014 22:35:55 +0000 (10:35 +1200)]
docs: driver-model: Fix spelling

Signed-off-by: Chris Packham <judge.packham@gmail.com>
9 years ago.gitignore: move *.exe pattern to the top gitignore for Cygwin
Masahiro Yamada [Fri, 6 Jun 2014 11:46:45 +0000 (20:46 +0900)]
.gitignore: move *.exe pattern to the top gitignore for Cygwin

GCC on Cygwin generates executables with .exe extension,
for example:
 scripts/basic/fixdep.exe
 scripts/docproc.exe

To ignore them, *.exe pattern should be moved
from tools/.gitignore to ./.gitignore

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: remove unnecessary adjustment for Cygwin
Masahiro Yamada [Fri, 6 Jun 2014 11:46:44 +0000 (20:46 +0900)]
kbuild: remove unnecessary adjustment for Cygwin

"SFX = .exe" was originally added for Cygwin environment.

It is true that GCC on Cygwin spits executables with .exe extention.

For example,

  gcc -o foo foo.c

will generate "foo.exe", not "foo".

But GNU make is also nicely adjusted for Cygwin.

For example,

  foo: foo.c
          gcc -o $@ $<

will compare the timestamp between "foo.exe" and "foo.c".

You do not have to tweak Makefiles like this:

  foo$(SFX): foo.c
          gcc -o $@ $<

And "make clean" works as well without adjustment for Cygwin because
the command "rm foo" on Cygwin will delete both "foo" and "foo.exe".

In conclusion, makefiles do not need special care for Cygwin.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years ago.gitignore: drop *.dts.tmp pattern
Masahiro Yamada [Fri, 6 Jun 2014 11:18:37 +0000 (20:18 +0900)]
.gitignore: drop *.dts.tmp pattern

This pattern was added by commit cc4f427b to ignore the intermidiate
file for generating DTB.

When Kbuild was introduced, dts/Makefile was totally re-written.
This ignore pattern is already useless.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild, tools: generate wrapper C sources automatically by Makefile
Masahiro Yamada [Fri, 6 Jun 2014 05:04:32 +0000 (14:04 +0900)]
kbuild, tools: generate wrapper C sources automatically by Makefile

There are many source files shared between U-boot image and tools.
Instead of adding a lot of dummy wrapper files that just include
the corresponding file in lib/ or common/ directory,
Makefile should automatically generate them.

The original inspiration for this came from
scripts/Makefile.asm-generic of Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agodisk: part_dos.c: Add a PBR check when MBR checking fails
Darwin Dingel [Fri, 6 Jun 2014 03:48:26 +0000 (15:48 +1200)]
disk: part_dos.c: Add a PBR check when MBR checking fails

Bug: SDCard with a messed up partition but still has a FAT signature
intact is readable in Linux but unreadable in uboot with 'fatls'.

Fix: When partition info checking fails, there is no checking for a
FAT signature (DOS_PBR) which will fail 'fatls'. FAT signature checking
is done when no valid partition is found in partition table. If FAT
signature is found, the disk will be read as PBR and continue
processing.

Signed-off-by: Darwin Dingel <darwin.dingel@alliedtelesis.co.nz>
9 years agokbuild: export HOSTCXX and HOSTCXXFLAGS
Masahiro Yamada [Fri, 6 Jun 2014 01:15:27 +0000 (10:15 +0900)]
kbuild: export HOSTCXX and HOSTCXXFLAGS

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoUse run_command_repeatable()
Thomas Betker [Thu, 5 Jun 2014 18:07:58 +0000 (20:07 +0200)]
Use run_command_repeatable()

Replace run_command() by run_command_repeatable() in places which
depend on the return code to indicate repeatability.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agoAdd run_command_repeatable()
Thomas Betker [Thu, 5 Jun 2014 18:07:57 +0000 (20:07 +0200)]
Add run_command_repeatable()

run_command() returns 0 on success and 1 on error. However, there are some
invocations which expect 0 or 1 for success (not repeatable or repeatable)
and -1 for error; add run_command_repeatable() for this purpose.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agoCheck run_command() return code properly
Thomas Betker [Thu, 5 Jun 2014 18:07:56 +0000 (20:07 +0200)]
Check run_command() return code properly

run_command() returns 0 for success, 1 for failure. Fix places which
assume that failure is indicated by a negative return code.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
9 years agoam33xx/omap: Add a new board to enable verified boot
Simon Glass [Tue, 3 Jun 2014 04:04:57 +0000 (22:04 -0600)]
am33xx/omap: Add a new board to enable verified boot

Enable verified boot functionality for a new am335x_boneblack_vboot target.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoam33xx/omap: Enable FIT support
Simon Glass [Tue, 3 Jun 2014 04:04:56 +0000 (22:04 -0600)]
am33xx/omap: Enable FIT support

Enable booting a FIT containing a kernel/device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoam33xx/omap: Enable CONFIG_OF_CONTROL
Simon Glass [Tue, 3 Jun 2014 04:04:55 +0000 (22:04 -0600)]
am33xx/omap: Enable CONFIG_OF_CONTROL

Add support for device tree control and add device tree files for the
beaglebone black initially.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoarm: ti: Increase malloc size to 16MB for armv7 boards
Simon Glass [Tue, 3 Jun 2014 04:04:54 +0000 (22:04 -0600)]
arm: ti: Increase malloc size to 16MB for armv7 boards

The current size of 1MB is not enough use to use DFU. Increase it for
ARMv7 boards, all of which should have 32MB or more SDRAM.

With this change it is possible to do 'dfu mmc 0' on a Beaglebone Black.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomkimage: Automatically make space in FDT when full
Simon Glass [Tue, 3 Jun 2014 04:04:53 +0000 (22:04 -0600)]
mkimage: Automatically make space in FDT when full

When adding hashes or signatures, the target FDT may be full. Detect this
and automatically try again after making 1KB of space.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoImprove error handling in fit_common
Simon Glass [Tue, 3 Jun 2014 04:04:52 +0000 (22:04 -0600)]
Improve error handling in fit_common

Make the error handling common, and make sure the file is always closed
on error. Rename the parameter to be more description and add comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Update functions which write to an FDT to return -ENOSPC
Simon Glass [Tue, 3 Jun 2014 04:04:51 +0000 (22:04 -0600)]
fdt: Update functions which write to an FDT to return -ENOSPC

When writing values into an FDT it is possible that there will be
insufficient space. If the caller gets a useful error then it can
potentially deal with the situation.

Adjust these functions to return -ENOSPC when the FDT is full.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add DEV_TREE_BIN option to specify a device tree binary file
Simon Glass [Tue, 3 Jun 2014 04:04:50 +0000 (22:04 -0600)]
fdt: Add DEV_TREE_BIN option to specify a device tree binary file

In some cases, an externally-built device tree binary is required to be
attached to U-Boot. An example is when using image signing, since in that
case the .dtb file must include the public keys.

Add a DEV_TREE_BIN option to the Makefile, and update the documentation.

Usage is something like:

make DEV_TREE_BIN=boot/am335x-boneblack-pubkey.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agohash: Export the function to show a hash
Simon Glass [Tue, 3 Jun 2014 04:04:49 +0000 (22:04 -0600)]
hash: Export the function to show a hash

This function is useful for displaying a hash value, so export it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoam33xx/omap: Allow cache enable for all Sitara/OMAP
Simon Glass [Tue, 3 Jun 2014 04:04:48 +0000 (22:04 -0600)]
am33xx/omap: Allow cache enable for all Sitara/OMAP

Enable the cache for all devices, unless CONFIG_SYS_DCACHE_OFF is defined.
This speeds up the Beaglebone Black boot considerable.

(Tested only on Beaglebone Black with SD card boot)

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoCheck that u-boot.bin size looks correct
Simon Glass [Tue, 3 Jun 2014 04:04:47 +0000 (22:04 -0600)]
Check that u-boot.bin size looks correct

Check that the image size matches the size we get from u-boot.bin. If it
doesn't, that generally means that some extra sections are being added to
u-boot.bin, meaning that it is not possible to access data appended to
the U-Boot binary. This is used for device tree, so needs to work.

This problem was introduced by commit b02bfc4. By adding a test we can
prevent a reccurence.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomx31ads: Fix the U-Boot binary output
Simon Glass [Tue, 3 Jun 2014 04:04:46 +0000 (22:04 -0600)]
mx31ads: Fix the U-Boot binary output

Correct the binary output so that image_binary_size is really at the
end of the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agocm_t335: Fix the U-Boot binary output
Simon Glass [Tue, 3 Jun 2014 04:04:45 +0000 (22:04 -0600)]
cm_t335: Fix the U-Boot binary output

Correct the binary output so that image_binary_size is really at the
end of the image.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoti: am335x: Fix the U-Boot binary output
Simon Glass [Tue, 3 Jun 2014 04:04:44 +0000 (22:04 -0600)]
ti: am335x: Fix the U-Boot binary output

This should include the hash so that image_binary_size is really at the
end of the image, and not some 300 bytes earlier.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotools: include u-boot version of sha256.h
Jeroen Hofstee [Fri, 30 May 2014 13:45:28 +0000 (15:45 +0200)]
tools: include u-boot version of sha256.h

When building tools the u-boot specific sha256.h is required, but the
host version of sha256.h is used when present. This leads to build errors
on FreeBSD which does have a system sha256.h include. Like libfdt_env.h
explicitly include u-boot's sha256.h.

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMakefile: fix clang warnings due to clang support
Jeroen Hofstee [Fri, 30 May 2014 13:45:27 +0000 (15:45 +0200)]
Makefile: fix clang warnings due to clang support

Building u-boot tools with clang as a host compiler e.g. on
FreeBSD with `gmake HOSTCC=clang CONFIG_USE_PRIVATE_LIBGCC=y tools`
leads to many warnings [1] for every compiler invocation since
commit 598e2d33. Part of mentioned commit imports linux patches:

 - kbuild: LLVMLinux: Adapt warnings for compilation with clang
 - kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang

No version of clang supports the gcc fno-delete-null-pointer-checks
though, but it is only passed to clang. Gcc does not have the clang
specific Qunused-arguments for the target. Furthermore several
warnings are disabled which aren't encountered in u-boot. Since such
a build has worked for quite some time and works after removing these
changes, just remove the clang specific handling to restore normal
building with clang as hostcc.

[1] Actual warnings
-------------------
  GEN     include/autoconf.mk.dep
arm-freebsd-gcc: unrecognized option '-Qunused-arguments'

  HOSTCC  scripts/basic/fixdep
clang: warning: argument unused during compilation:
                '-fno-delete-null-pointer-checks'

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Wed, 11 Jun 2014 15:40:11 +0000 (11:40 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 11 Jun 2014 00:37:00 +0000 (20:37 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

9 years agodfu: Disable default calculation of CRC32
Lukasz Majewski [Tue, 10 Jun 2014 10:25:59 +0000 (12:25 +0200)]
dfu: Disable default calculation of CRC32

Patch (SHA1: bd694244db7bc969954)
dfu: Introduction of the "dfu_hash_algo" env variable for checksum method
setting

already introduced more generic handling of the crc32 calculation.
Up till now the CRC32 of received data was calculated unconditionally.
This patch changes this and from now - by default the crc32 is NOT
calculated anymore.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
9 years agousb: ci_udc: terminate ep0 INs with a zlp when required
Stephen Warren [Tue, 10 Jun 2014 21:27:39 +0000 (15:27 -0600)]
usb: ci_udc: terminate ep0 INs with a zlp when required

Sometimes, a zero-length packet is required at the end of an IN
transaction so that the host knows the device is done sending data.
Enhance ci_udc to send a zlp when necessary. See the comments for
more details.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agousb: ci_udc: clean up all allocations in unregister
Stephen Warren [Tue, 10 Jun 2014 17:02:38 +0000 (11:02 -0600)]
usb: ci_udc: clean up all allocations in unregister

usb_gadget_unregister_driver() is called to tear down the USB device mode
stack. Fix the driver to stop the USB HW (which causes any attached host
to notice the disappearance of the device), and free all allocations
(which obviously prevents memory leaks).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agousb: ci_udc: fix probe error cleanup
Stephen Warren [Tue, 10 Jun 2014 17:02:37 +0000 (11:02 -0600)]
usb: ci_udc: fix probe error cleanup

If allocation of the ep0 req fails, clean up all the allocations that
were made in ci_udc_probe().

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agousb: ci_udc: fix freeing of ep0 req
Stephen Warren [Tue, 10 Jun 2014 17:02:36 +0000 (11:02 -0600)]
usb: ci_udc: fix freeing of ep0 req

ci_ep_alloc_request() avoids allocating multiple request objects for ep0
by keeping a record of the first req allocated for ep0, and always
returning that instead of allocating a new req. However, if this req is
ever freed, the record of the previous allocation is not cleared, so
ci_ep_alloc_request() will keep returning this stale pointer. Fix
ci_ep_free_request() to clear the record of the previous allocation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agousb: ci_udc: call udc_disconnect() from ci_pullup()
Stephen Warren [Tue, 10 Jun 2014 17:02:35 +0000 (11:02 -0600)]
usb: ci_udc: call udc_disconnect() from ci_pullup()

ci_pullup()'s !is_on path contains a cut/paste copy of udc_disconnect().
Remove the duplication by simply calling udc_disconnect() instead.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agoarm: rmobile: lager: Remove NOR-Flash support from boards.cfg
Nobuhiro Iwamatsu [Wed, 28 May 2014 23:21:19 +0000 (08:21 +0900)]
arm: rmobile: lager: Remove NOR-Flash support from boards.cfg

Lager board has NOR-Flash function. But this is not used basically.
SPI-ROM is used instead. NOR-Flash support code has been removed, but
this remains in the boards.cfg.
This commit removes config of NOR-Flash from boards.cfg.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: koelsch: Remove NOR-Flash support from boards.cfg
Nobuhiro Iwamatsu [Wed, 28 May 2014 23:21:19 +0000 (08:21 +0900)]
arm: rmobile: koelsch: Remove NOR-Flash support from boards.cfg

Koelsch board has NOR-Flash function. But this is not used basically.
SPI-ROM is used instead. NOR-Flash support code has been removed, but
this remains in the boards.cfg.
This commit removes config of NOR-Flash from boards.cfg.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoPrepare v2014.07-rc3 v2014.07-rc3
Tom Rini [Tue, 10 Jun 2014 15:55:44 +0000 (11:55 -0400)]
Prepare v2014.07-rc3

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoarm: bcm281xx: Add CONFIG_SYS_GENERIC_BOARD
Steve Rae [Wed, 14 May 2014 21:18:09 +0000 (14:18 -0700)]
arm: bcm281xx: Add CONFIG_SYS_GENERIC_BOARD

convert to generic board

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agonet: sh-eth: Fix typo from rESR_RTLF to EESR_RTLF
Nobuhiro Iwamatsu [Wed, 22 Jan 2014 22:52:20 +0000 (07:52 +0900)]
net: sh-eth: Fix typo from rESR_RTLF to EESR_RTLF

'r' of rESR_RTLF is a mistake of E.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agonet: sh-eth: Fix coding style
Nobuhiro Iwamatsu [Wed, 22 Jan 2014 22:52:19 +0000 (07:52 +0900)]
net: sh-eth: Fix coding style

This fixes checkpatch's warning.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agonet: sh-eth: Add support R7S72100 of rmobile
Nobuhiro Iwamatsu [Wed, 22 Jan 2014 22:52:18 +0000 (07:52 +0900)]
net: sh-eth: Add support R7S72100 of rmobile

The R7S72100 of ARM SoC that Renesas manufactured has one Ether port.
This has the same IP SH-Ether. This patch adds support of the R7S72100
in SH-Ether.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: fix a double-definition error of _start symbol
Masahiro Yamada [Tue, 27 May 2014 02:16:29 +0000 (11:16 +0900)]
arm: fix a double-definition error of _start symbol

The symbol "_start" is defined twice in arch/arm/lib/vectors.S:
around line 48 and line 54.

If CONFIG_SYS_DV_NOR_BOOT_CFG is defined (as on calimain board),
build fails:

  arch/arm/lib/vectors.S: Assembler messages:
  arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
  make[1]: *** [arch/arm/lib/vectors.o] Error 1
  make: *** [arch/arm/lib] Error 2

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agoarm64: zero cntvoff_el2
Mark Rutland [Wed, 21 May 2014 13:29:23 +0000 (14:29 +0100)]
arm64: zero cntvoff_el2

Currently cntvoff_el2 is initialised with an arbitrary bag of bits
derived from the initial value of cnthctl_el2 on the current CPU. This is
somewhat odd and problematic as some of these bits are UNKNOWN at reset
and may differ across CPUs (which may cause an OS at EL1 to observe time
going backwards across CPUs).

This patch instead initialises cntvoff_el2 with xzr, giving the register
a consistent value of zero on all CPUs.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: David Feng <fenghua@phytium.com.cn>
Cc: Tom Rini <trini@ti.com>
Acked-by: David.Feng <fenghua@phytium.com.cn>
9 years agoarm: vf610: Add QSPI support for VF610TWR
Chao Fu [Tue, 6 May 2014 01:13:03 +0000 (09:13 +0800)]
arm: vf610: Add QSPI support for VF610TWR

Add QSPI support for VF610TWR, such as clock and iomux.

Signed-off-by: Alison Wang <Huan.Wang@freescale.com>
Signed-off-by: Chao Fu <b44548@freescale.com>
9 years agoarm: imx: Add two macros for VF610 in IOMUX_PAD structure
Alison Wang [Tue, 6 May 2014 01:13:02 +0000 (09:13 +0800)]
arm: imx: Add two macros for VF610 in IOMUX_PAD structure

Add PAD_CTL_DSE_150ohm and PAD_CTL_PUS_22K_UP for VF610 in
IOMUX_PAD structure.

Signed-off-by: Alison Wang <Huan.Wang@freescale.com>
9 years agoarm: vf610: Add QSPI driver support
Alison Wang [Tue, 6 May 2014 01:13:01 +0000 (09:13 +0800)]
arm: vf610: Add QSPI driver support

Add Freescale QSPI driver support for VF610.

Signed-off-by: Alison Wang <Huan.Wang@freescale.com>
Signed-off-by: Chao Fu <b44548@freescale.com>
9 years agosf: probe: Fix quad bit set path
Poddar, Sourav [Wed, 23 Apr 2014 13:27:03 +0000 (18:57 +0530)]
sf: probe: Fix quad bit set path

Currently, flash quad bit is set in "spi_flash_validate_params" and later
at the end in the same api, we write 0 to status register for few flashes,
thereby overriding the quad bit set. This fix moves the quad bit setting
outside this api in "spi_flash_probe_slave"

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
9 years agospi: soft_spi: Support NULL din/dout buffers
Andrew Ruder [Thu, 24 Apr 2014 18:39:32 +0000 (13:39 -0500)]
spi: soft_spi: Support NULL din/dout buffers

This mirrors the conventions used in other SPI drivers (kirkwood,
davinci, atmel, et al) where the din/dout buffer can be NULL when the
received/transmitted data isn't important.  This reduces the need for
allocating additional buffers when write-only/read-only functionality is
needed.

In the din == NULL case, the received data is simply not stored.  In the
dout == NULL case, zeroes are transmitted.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
9 years agosf: params: Added support for Spansion S25FL512S_512K
Siva Durga Prasad Paladugu [Fri, 25 Apr 2014 13:47:13 +0000 (15:47 +0200)]
sf: params: Added support for Spansion S25FL512S_512K

Added support for Spansion chip "S25FL512S_512K".

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Sun, 8 Jun 2014 11:58:41 +0000 (07:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sun, 8 Jun 2014 07:14:19 +0000 (09:14 +0200)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

9 years agoarm:am43xx: Add TPS65218 support to scale voltages up
Tom Rini [Thu, 5 Jun 2014 15:15:30 +0000 (11:15 -0400)]
arm:am43xx: Add TPS65218 support to scale voltages up

This family is supported by the TPS65218 PMIC.  Implement a scale_vcores
to set the MPU and CORE voltage correctly to the max frequency that is
supported (and what we will be scaling them to in setup_dplls()).

Signed-off-by: Tom Rini <trini@ti.com>
9 years agopower: Add support for the TPS65218 PMIC
Tom Rini [Thu, 5 Jun 2014 15:15:29 +0000 (11:15 -0400)]
power: Add support for the TPS65218 PMIC

Add a driver for the TPS65218 PMIC which is used by TI AM43xx SoCs and
may be used by TI AM335x SoCs.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoarm:am33xx: Add a scale_vcores() hook
Tom Rini [Thu, 5 Jun 2014 15:15:28 +0000 (11:15 -0400)]
arm:am33xx: Add a scale_vcores() hook

Similar to OMAP4/5 we need to scale the voltage up prior to changing the
clock frequencies up higher.  Add a similar hook to start with.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoam43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR
Tom Rini [Thu, 5 Jun 2014 15:15:27 +0000 (11:15 -0400)]
am43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoboard/BuR/tseries: cosmetic changes
Hannes Petermaier [Wed, 4 Jun 2014 08:37:12 +0000 (10:37 +0200)]
board/BuR/tseries: cosmetic changes

Cc: trini@ti.com
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/common: Add CONFIG_CMD_I2C
Hannes Petermaier [Wed, 4 Jun 2014 08:28:39 +0000 (10:28 +0200)]
board/BuR/common: Add CONFIG_CMD_I2C

in almost all cases we need the i2c commands within the u-boot shell.
So we enable them within the common section.

Cc: trini@ti.com
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: only run gpmc_init(...) in NAND-build
Hannes Petermaier [Wed, 4 Jun 2014 08:26:29 +0000 (10:26 +0200)]
board/BuR/tseries: only run gpmc_init(...) in NAND-build

if we have no NAND-Chip, we don't need the gpmc-controller and therefore
is no need to init it.

Cc: trini@ti.com
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: Add support for using 8-bit on eMMC
Hannes Petermaier [Wed, 4 Jun 2014 08:25:32 +0000 (10:25 +0200)]
board/BuR/tseries: Add support for using 8-bit on eMMC

Cc: trini@ti.com
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/common: introduce usage of CONFIG_SYS_GENERIC_BOARD
Hannes Petermaier [Wed, 4 Jun 2014 08:22:07 +0000 (10:22 +0200)]
board/BuR/common: introduce usage of CONFIG_SYS_GENERIC_BOARD

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoarch-am33xx: Add defines for timer0-7
Hannes Petermaier [Wed, 4 Jun 2014 08:19:26 +0000 (10:19 +0200)]
arch-am33xx: Add defines for timer0-7

For usage of timer6 within B&R we need this defines to enable clock
modules and clk-source.

Also the 'Timer register bits' are expanded.

By the way we add defines for all timers within AM335x SoC.

Cc: trini@ti.com
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoARM: AM43xx: Fix UART clocks enabling
Lokesh Vutla [Mon, 2 Jun 2014 05:19:03 +0000 (10:49 +0530)]
ARM: AM43xx: Fix UART clocks enabling

After enabling a module, SW has to wait on IDLEST bit
until it is Fully functional. This wait is missing for UART module
and there is a immediate access of UART registers after this. So there
is a chance of hang on this module( This can happen when we are running
from MPU SRAM). So waiting for IDLEST bit.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoARM: AM43xx: Fix mmcboot command in EXTRA_ENV_SETTINGS
Lokesh Vutla [Mon, 2 Jun 2014 05:15:38 +0000 (10:45 +0530)]
ARM: AM43xx: Fix mmcboot command in EXTRA_ENV_SETTINGS

loadbootenv expects devtype variable to be set. This is missing in
mmcboot command. With this the following error comes:
U-Boot# run mmcboot
mmc0 is current device
SD/MMC found on device 0
** Bad device usb 0 **
** Bad device usb 0 **
Fixing this by setting devtype as mmc.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agotam3517: fix NAND detection
Jeroen Hofstee [Sat, 31 May 2014 15:08:30 +0000 (17:08 +0200)]
tam3517: fix NAND detection

commit a0a37183bd7 "ARM: omap: merge GPMC initialization code for
all platform" needs CONFIG_NOR, CONFIG_NAND or CONFIG_CMD_ONENAND
to be set to access flash. Add CONFIG_NAND for tam3517 derived
boards to prevent the following error: "nand: error: Unable to
find NAND settings in GPMC Configuration - quitting"

cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agokeystone: k2hk: enable support of nand ecclayout command
WingMan Kwok [Thu, 29 May 2014 15:58:16 +0000 (18:58 +0300)]
keystone: k2hk: enable support of nand ecclayout command

Enable support of nand ecclayout command.

Acked-By: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agokeystone: init: enable UART1 to be able use it from kernel
Murali Karicheri [Thu, 29 May 2014 15:57:12 +0000 (18:57 +0300)]
keystone: init: enable UART1 to be able use it from kernel

Currently PWREMU_MGMT is not configured in the Linux generic UART
driver as this register seems to be specific TI UART IP. So this
needs to be enabled in u-boot to use UART1 from kernel space.

Acked-By: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoarm:am33xx: Rework s_init and add board_early_init_f
Tom Rini [Wed, 21 May 2014 16:57:22 +0000 (12:57 -0400)]
arm:am33xx: Rework s_init and add board_early_init_f

With the changes to the i2c framework (and adopting the omap24xx_i2c
driver to them) we can no longer call i2c functions prior to gd having
been set and cleared.  When SPL booting, this is handled by setting gd
to point to SRAM in s_init.  However in the cases where we are loaded
directly by ROM (memory mapped NOR or QSPI) we need to make use of the
normal hooks to slightly delay these calls.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoarm:am33xx: Make dram_init call sdram_init() in some contexts
Tom Rini [Wed, 21 May 2014 16:57:21 +0000 (12:57 -0400)]
arm:am33xx: Make dram_init call sdram_init() in some contexts

We have two contexts for booting these platforms.  One is SPL which is
roughly: reset, cpu_init_crit, lowlevel_init, s_init, sdram_init, _main,
board_init_f from SPL, ... then U-Boot loads.  The other is a
memory-mapped XIP case (NOR or QSPI) where we do not run an SPL.  In
this case we go, roughly: reset, cpu_init_crit, lowlevel_init, s_init,
_main, regular board_init_f.

In the first case s_init will set a valid gd and then be able to call
sdram_init which in many cases will need i2c (which needs a valid gd for
gd->cur_i2c_bus).  In this second case we must (and are able to and
should) defer sdram_init() into dram_init() called by board_init_f as gd
will have been set in _main and cleared in board_init_f.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoti: qspi: populate slave device to set flash quad bit.
Sourav Poddar [Mon, 19 May 2014 20:53:38 +0000 (16:53 -0400)]
ti: qspi: populate slave device to set flash quad bit.

The patch populates the slave data which will be used by flash driver to
set the  flash quad enable bit.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
9 years agoam43xx_evm: Add qspiboot target
Sourav Poddar [Mon, 19 May 2014 20:53:37 +0000 (16:53 -0400)]
am43xx_evm: Add qspiboot target

The ePOS EVM and EVM SK have QSPI as an option to boot.  Add a qspiboot
target that utilizes QSPI for env and so forth as an example of best
practices.  As QSPI is booted from directly we need to chang
CONFIG_SYS_TEXT_BASE.

Note that on ePOS EVM the QSPI and NAND are mutually exclusive choices
we need to handle that elsewhere, once NAND support is also added.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
9 years agoam335x: update README for BCH16
pekon gupta [Mon, 2 Jun 2014 11:44:43 +0000 (17:14 +0530)]
am335x: update README for BCH16

updates documentation with explanation on how to select ECC schemes.

Signed-off-by: Pekon Gupta <pekon@ti.com>