]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-ti
Tom Rini [Fri, 29 Aug 2014 17:47:42 +0000 (13:47 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ti

9 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 29 Aug 2014 15:15:18 +0000 (11:15 -0400)]
Merge git://git.denx.de/u-boot-usb

9 years agoMerge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Fri, 29 Aug 2014 15:07:35 +0000 (11:07 -0400)]
Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Fri, 29 Aug 2014 15:07:10 +0000 (11:07 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Fri, 29 Aug 2014 15:06:51 +0000 (11:06 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Fri, 29 Aug 2014 15:06:26 +0000 (11:06 -0400)]
Merge branch 'master' of http://git.denx.de/u-boot-sunxi

9 years agousb: hub: don't check CONNECTION in hub_port_reset()
Stephen Warren [Thu, 7 Aug 2014 23:07:59 +0000 (17:07 -0600)]
usb: hub: don't check CONNECTION in hub_port_reset()

One specific USB 3.0 device behaves strangely when reset by
usb_new_device()'s call to hub_port_reset(). For some reason, the device
appears to briefly drop off the bus when this second bus reset is
executed, yet if we retry this loop, it'll eventually come back after
another two resets.

If USB bus reset is executed over and over within usb_new_device()'s call
to hub_port_reset(), I see the following sequence of results, which
repeats as long as you want:

1) STAT_C_CONNECTION = 1 STAT_CONNECTION = 0  USB_PORT_STAT_ENABLE 0
2) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0
3) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1

The device in question is a SanDisk Ultra USB 3.0 16GB memory stick with
USB VID/PID 0x0781/0x5581.

In order to allow this device to work with U-Boot, ignore the
{C_,}CONNECTION bits in the status/change registers, and only use the
ENABLE bit to determine if the reset was successful.

To be honest, extensive investigation has failed to determine why this
problem occurs. I'd love to know! I don't know if it's caused by:
* A HW bug in the device
* A HW bug in the Tegra USB controller
* A SW bug in the U-Boot Tegra USB driver
* A SW bug in the U-Boot USB core

This issue only occurs when the device's USB3 pins are attached to the
host; if only the USB2 pins are connected the issue does not occur. The
USB3 controller on Tegra is in reset, so is not actively communicating
with the device at all - a USB3 analyzer confirms this. Slightly
unplugging the device (so the USB3 pins don't contact) or using a USB2
cable or hub as an intermediary avoids the problem. For some reason,
the Linux kernel (either on the same Tegra board, or on an x86 host)
has no issue with the device, and I observe no disconnections during
reset.

This change won't affect any USB device that already works, since such
devices could not currently be triggering the error return this patch
removes, or they wouldn't be working currently.

However, this patch is quite reliable in practice, hence I hope it's
acceptable to solve the problem.

The only potential fallout I can see from this patch is:

* A broken device that triggers C_CONNECTION/!CONNECTION now causes the
  loop in hub_port_reset() to run multiple times. If it never succeeds,
  this will cause "usb start" to take roughly 1s extra to execute.

* If the user unplugs a device while hub_port_reset() is executing, and
  very quickly swaps in a new device, hub_port_reset() might succeed on
  the new device. This would mean that any information cached about the
  original device (from the descriptor read in usb_new_device(), which
  simply caches the max packet size) might be invalid, which would cause
  problems talking to the new device. However, without this change, the
  new device wouldn't work anyway, so this is probably not much of a
  loss.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agousb: Handle -ENODEV from usb_lowlevel_init()
Marek Vasut [Fri, 1 Aug 2014 01:09:53 +0000 (03:09 +0200)]
usb: Handle -ENODEV from usb_lowlevel_init()

As we support both Host and Device mode operation, an OTG controller
can return -ENODEV on a port which it found to be in Device mode during
Host mode scan for devices. In case -ENODEV is returned, print that the
port is not available and continue instead of screaming a bloody error
message.

Signed-off-by: Marek Vasut <marex@denx.de>
9 years agoREADME.kconfig: document backward compatibility "make *_config"
Masahiro Yamada [Thu, 28 Aug 2014 01:56:55 +0000 (10:56 +0900)]
README.kconfig: document backward compatibility "make *_config"

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
restored "<board>_config" target for backward compatibility.
It should be documented.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
9 years agotools/genboardscfg.py: change shebang into /usr/bin/env python2
Masahiro Yamada [Wed, 27 Aug 2014 05:05:51 +0000 (14:05 +0900)]
tools/genboardscfg.py: change shebang into /usr/bin/env python2

This tool only works on python 2 (python 2.6 or lator).

Change the shebang to make sure the script is run by python 2
and clearly say the supported version in the comment block.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agonet: cpsw: am335x: Drop constant link checking from rx/tx path's
Stefan Roese [Mon, 25 Aug 2014 09:26:19 +0000 (11:26 +0200)]
net: cpsw: am335x: Drop constant link checking from rx/tx path's

We noticed on the DXR2 platform (AM335x with a SMSC LAN9303 switch connected
to the CPSW MAC) that the network performance in U-Boot is quite poor. Only
when the transfer is started without a cable connected, and the cable is
plugged after the first timeout "T" occured, an increased in performance
can be seen. Debugging has revealed, that the cpsw driver has constant
link checking builtin into the rx and tx functions. This results in the
bad performance and seems to be unnecessary. The link has already been
checked in the init function, before the transfer is started. This usually
is sufficient.

BTW: I have seen no other network driver in U-Boot so far, that constantly
checks for link in the rx / tx functions.

The performance numbers on the DXR2 board are:

0.56 MiB/s cpsw_check_link() in rx and tx path
0.87 MiB/s cpsw_check_link() only in tx path
1.0  MiB/s cpsw_check_link() only in rx path
2.7  MiB/s no cpsw_check_link() in rx and tx path

So with this patch the network performance on DXR2 increases from 0.56
to 2.7 MiB/s (nearly 5 times as fast).

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Samuel Egli <samuel.egli@siemens.com>
Tested-by: Heiko Schocher <hs@denx.de>
Cc: Vladimir Koutny <vladimir.koutny@streamunlimited.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Tom Rini <trini@ti.com>
9 years agotools/genboardscfg.py: improve performance
Masahiro Yamada [Mon, 25 Aug 2014 03:39:48 +0000 (12:39 +0900)]
tools/genboardscfg.py: improve performance

I guess some developers are already getting sick of this tool
because it generally takes a few minites to generate the boards.cfg
on a reasonable computer.

The idea popped up on my mind was to skip Makefiles and
to run script/kconfig/conf directly.
This tool should become about 4 times faster.
You might still not be satisfied, but better than doing nothing.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: check if the boards.cfg is up to date
Masahiro Yamada [Mon, 25 Aug 2014 03:39:47 +0000 (12:39 +0900)]
tools/genboardscfg.py: check if the boards.cfg is up to date

It looks silly to regenerate the boards.cfg even when it is
already up to date.

The tool should exit with doing nothing if the boards.cfg is newer
than any of defconfig, Kconfig and MAINTAINERS files.

Specify -f (--force) option to get the boards.cfg regenerated
regardless its time stamp.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: fix minor problems on termination
Masahiro Yamada [Mon, 25 Aug 2014 03:39:46 +0000 (12:39 +0900)]
tools/genboardscfg.py: fix minor problems on termination

This tool deletes the incomplete boards.cfg
if it encounters an error or is is terminated by the user.

I notice some problems even though they rarely happen.

[1] The boards.cfg is removed if the program is terminated
during __gen_boards_cfg() function but before boards.cfg
is actually touched.  In this case, the previous boards.cfg
should be kept as it is.

[2] If an error occurs while deleting the incomplete boards.cfg,
the program throws another exception.  This hides the privious
exception and we will not be able to know the real cause.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: wait for unfinished subprocesses before error-out
Masahiro Yamada [Mon, 25 Aug 2014 03:39:45 +0000 (12:39 +0900)]
tools/genboardscfg.py: wait for unfinished subprocesses before error-out

When an error occurs or the program is terminated by the user
on the way, the destructer __del__ of class Slot is invoked and
the work directories are removed.

We have to make sure there are no subprocesses (in this case,
"make O=<work_dir> ...") using the work directories before
removing them.  Otherwise the subprocess spits a bunch of error
messages possibly causing more problems.  Perhaps some users
may get upset to see too many error messages.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: be tolerant of insane Kconfig
Masahiro Yamada [Mon, 25 Aug 2014 03:39:44 +0000 (12:39 +0900)]
tools/genboardscfg.py: be tolerant of insane Kconfig

The tools/genboardscfg.py expects all the Kconfig and defconfig are
written correctly.  Imagine someone accidentally has broken a board.
Error-out just for one broken board is annoying for the other
developers.  Let the tool skip insane boards and continue processing.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: be tolerant of missing MAINTAINERS
Masahiro Yamada [Mon, 25 Aug 2014 03:39:43 +0000 (12:39 +0900)]
tools/genboardscfg.py: be tolerant of missing MAINTAINERS

tools/genboardscfg.py expects all the boards have MAINTAINERS.
If someone adds a new board but misses to add its MAINTAINERS file,
tools/genboardscfg.py fails to generate the boards.cfg file.
It is annoying for the other developers.

This commit allows tools/genboardscfg.py to display warning messages
and continue processing even if some MAINTAINERS files are missing
or have broken formats.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools/genboardscfg.py: ignore defconfigs starting with a dot
Masahiro Yamada [Mon, 25 Aug 2014 03:39:42 +0000 (12:39 +0900)]
tools/genboardscfg.py: ignore defconfigs starting with a dot

Kconfig in U-Boot creates a temporary file configs/.tmp_defconfig
during processing "make <board>_defconfig".  The temporary file
might be left over for some reasons.

Just in case, tools/genboardscfg.py should make sure to
not read such garbage files.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoCorrect sandbox filesystem commands in FIT image test
Simon Glass [Fri, 22 Aug 2014 20:26:44 +0000 (14:26 -0600)]
Correct sandbox filesystem commands in FIT image test

The host filesystem name has changed, so update the tests. The tests now
run again correctly:

$ make O=b/sandbox sandbox_defconfig all
...
$ test/image/test-fit.py -u b/sandbox/u-boot
FIT Tests

=========
Kernel load
Kernel + FDT load
Kernel + FDT + Ramdisk load

Tests passed
Caveat: this is only a sanity check - test coverage is poor

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoFix test failure caused by bad handling of ramdisk
Simon Glass [Fri, 22 Aug 2014 20:26:43 +0000 (14:26 -0600)]
Fix test failure caused by bad handling of ramdisk

Commit e3a5bbce broke the FIT image tests by not loading a ramdisk even if
a load address is provided in the FIT. The rationale was that a load address
of 0 should be considered to mean 'do not load'.

Add a new load operation which supports this feature, so that the ramdisk
will be loaded if a non-zero load address is provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Masahiro Yamada [Fri, 22 Aug 2014 10:42:29 +0000 (19:42 +0900)]
kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE

Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
and adjust the help document.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoscripts: refetch scripts/setlocalversion from Linux 3.16
Masahiro Yamada [Fri, 22 Aug 2014 10:42:28 +0000 (19:42 +0900)]
scripts: refetch scripts/setlocalversion from Linux 3.16

Now we have CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
in Kconfig so we can use scripts/setlocalversion without
any adjustment.  Copy it from Linux 3.16 as is.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
Masahiro Yamada [Fri, 22 Aug 2014 10:42:27 +0000 (19:42 +0900)]
kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO

Copy Kconfig options from "init/Kconfig" of Linux v3.16 tag
and adjust some parts of the help document.

Move CONFIG_SPL, CONFIG_TPL, ... etc. to "Boot images" menu.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agobuildman: run genboardscfg.py all the time
Masahiro Yamada [Fri, 22 Aug 2014 05:33:41 +0000 (14:33 +0900)]
buildman: run genboardscfg.py all the time

This commit makes sure boards.cfg is up to date before starting
the build tests.  tools/genboardscfg.py exits immediately printing
"boards.cfg is up to date. Nothing to do." when boards.cfg is
already new.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMAKEALL: run genboardscfg.py all the time
Masahiro Yamada [Fri, 22 Aug 2014 05:33:40 +0000 (14:33 +0900)]
MAKEALL: run genboardscfg.py all the time

This commit makes sure boards.cfg is up to date before starting
the build tests.  tools/genboardscfg.py exits immediately printing
"boards.cfg is up to date. Nothing to do." when boards.cfg is
already new.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agotools/genboardscfg.py: fix a bug of MAINTAINERS handling
Masahiro Yamada [Fri, 22 Aug 2014 05:10:43 +0000 (14:10 +0900)]
tools/genboardscfg.py: fix a bug of MAINTAINERS handling

This patch fixes a minor problem:
If a block without "F:   configs/*_defconfig" is followed by another
block with "F:   configs/*_defconfig", the maintainers from the
former block are squashed into the latter.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agosamsung: s5p_goni: fix: Add missing definitions for G_DNL_UMS gadget
Łukasz Majewski [Fri, 22 Aug 2014 07:12:58 +0000 (09:12 +0200)]
samsung: s5p_goni: fix: Add missing definitions for G_DNL_UMS gadget

The commit (SHA1: 8fc171318e352) reintroduced correct values for vendor and
product IDs required for UMS gadget to work properly either at Windows or
Linux.

This data was missing for GONI target, so this commit corrects this mistake.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Thu, 28 Aug 2014 17:03:25 +0000 (13:03 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoMerge branch 'patman' of http://git.denx.de/u-boot-x86
Tom Rini [Thu, 28 Aug 2014 15:49:12 +0000 (11:49 -0400)]
Merge branch 'patman' of http://git.denx.de/u-boot-x86

9 years agopatman: Support the 'reverse' option for 'git log'
Simon Glass [Fri, 15 Aug 2014 03:59:11 +0000 (21:59 -0600)]
patman: Support the 'reverse' option for 'git log'

This option is currently not supported, but needs to be, for buildman to
operate as expected.

Reported-by: York Sun <yorksun@freescale.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomtd,ubi,ubifs: sync with linux v3.15
Heiko Schocher [Tue, 15 Jul 2014 14:08:43 +0000 (16:08 +0200)]
mtd,ubi,ubifs: sync with linux v3.15

snyc with linux v3.15:

commit 1860e379875dfe7271c649058aeddffe5afd9d0d
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Jun 8 11:19:54 2014 -0700

    Linux 3.15

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
9 years agomtd, ubi, ubifs: update for the sync with linux v3.14
Heiko Schocher [Tue, 15 Jul 2014 14:08:42 +0000 (16:08 +0200)]
mtd, ubi, ubifs: update for the sync with linux v3.14

while playing with the new mtd/ubi/ubifs sync, found some
small updates for it:

- add del_mtd_partition() to include/linux/mtd/mtd
- mtd: add a debug_printf
- remove some not used functions

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
9 years agomtd, ubi, ubifs: resync with Linux-3.14
Heiko Schocher [Tue, 24 Jun 2014 08:10:04 +0000 (10:10 +0200)]
mtd, ubi, ubifs: resync with Linux-3.14

resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>
9 years agolib, linux: move linux specific defines to linux/compat.h
Heiko Schocher [Tue, 24 Jun 2014 08:10:03 +0000 (10:10 +0200)]
lib, linux: move linux specific defines to linux/compat.h

- move linux specific defines from usb and video code
  into linux/compat.h
- move common linux specific defines from include/ubi_uboot.h
  to linux/compat.h
- add for new mtd/ubi/ubifs sync new needed linux specific
  defines to linux/compat.h

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
[trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
usb/lin_gadet_compat.h]
Signed-off-by: Tom Rini <trini@ti.com>
9 years agolinux include: add ERR_CAST
Heiko Schocher [Tue, 24 Jun 2014 08:10:02 +0000 (10:10 +0200)]
linux include: add ERR_CAST

add missing ERR_CAST to linux/err.h as it is needed for ubi/ubifs support

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agolib, list_sort: add list_sort from linux 3.14
Heiko Schocher [Tue, 24 Jun 2014 08:10:01 +0000 (10:10 +0200)]
lib, list_sort: add list_sort from linux 3.14

from linux 3.14:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

Needed for the MTD/UBI/UBIFS resync

Just copied the files from Linux, and added in the c-file
the "#define __UBOOT__" for adding U-Boot special code. In
this case we use this just for adding including U-Boot
headers.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
9 years agolib, rbtree: resync with Linux-3.14
Heiko Schocher [Tue, 24 Jun 2014 08:10:00 +0000 (10:10 +0200)]
lib, rbtree: resync with Linux-3.14

resync with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

Needed for the MTD/UBI/UBIFS resync

Just copied the files from Linux, changed the license file header,
and add in the c-file:

+#define __UBOOT__
 #include <linux/rbtree_augmented.h>
+#ifndef __UBOOT__
 #include <linux/export.h>
+#else
+#include <ubi_uboot.h>
+#endif

so, it compiles for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
9 years agopcm051: use ti_am335x_common.h config
Matwey V. Kornilov [Sat, 26 Jul 2014 14:48:45 +0000 (18:48 +0400)]
pcm051: use ti_am335x_common.h config

Include general configs/ti_am335x_common.h and drop redundant #defines.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
9 years agoARM: DRA: Enable VTT regulator
Lokesh Vutla [Mon, 4 Aug 2014 14:12:24 +0000 (19:42 +0530)]
ARM: DRA: Enable VTT regulator

DRA7 evm REV G and later boards uses a vtt regulator for DDR3 termination
and this is controlled by gpio7_11. Configuring gpio7_11.
The pad A22(offset 0x3b4) is used by gpio7_11 on REV G and later boards,
and left unused on previous boards, so it is safe enough to enable gpio
on all DRA7 boards.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoam335x_evm: Convert CONFIG_CONS_INDEX into a menu choice
Tom Rini [Fri, 1 Aug 2014 13:53:24 +0000 (09:53 -0400)]
am335x_evm: Convert CONFIG_CONS_INDEX into a menu choice

- Drop CONFIG_SERIAL[1-6] and use CONFIG_CONS_INDEX tests instead
- Add choice and help text to board/ti/am335x/Kconfig
- Correct comment about IDK in board/ti/am335x/mux.c
- Remove am335x_evm_uart* defconfig files as they're just variations
  on a config option now.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agocm-t54: convert to generic board
Dmitry Lifshitz [Thu, 31 Jul 2014 11:30:41 +0000 (14:30 +0300)]
cm-t54: convert to generic board

Use generic board setup functions by defining
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
9 years agocm-t54: fix eMMC boot mode check
Dmitry Lifshitz [Thu, 31 Jul 2014 11:30:40 +0000 (14:30 +0300)]
cm-t54: fix eMMC boot mode check

Boot from eMMC boot partition corresponds to BOOT_DEVICE_MMC2
omap_bootmode, while BOOT_DEVICE_MMC2_2 corresponds to the user
data partition boot.

Fix mmc_get_env_part() boot mode check to use a correct value.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
9 years agocm-t54: fix EEPROM read return value check
Dmitry Lifshitz [Thu, 31 Jul 2014 11:30:39 +0000 (14:30 +0300)]
cm-t54: fix EEPROM read return value check

Fix cl_eeprom_read_mac_addr() return value check.
Fix long line codding style issue in board_init().

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
9 years agoARM: DRA7: Enable software leveling for dra7
Sricharan R [Thu, 31 Jul 2014 06:35:50 +0000 (12:05 +0530)]
ARM: DRA7: Enable software leveling for dra7

Currently hw leveling is enabled by default on DRA7/72.
But the hardware team suggested to use sw leveling as hw leveling
is not characterized and seen some test case failures.
So enabling sw leveling on all DRA7 platforms.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoSOM: tam3517: convert to generic board
Jeroen Hofstee [Mon, 28 Jul 2014 21:34:42 +0000 (23:34 +0200)]
SOM: tam3517: convert to generic board

Cc: Raphael Assenat <raph@8d.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agokeystone2: use EFUSE_BOOTROM information to configure PLLs
Vitaly Andrianov [Fri, 25 Jul 2014 19:23:19 +0000 (22:23 +0300)]
keystone2: use EFUSE_BOOTROM information to configure PLLs

This patch reads EFUSE_BOOTROM register to see the maximum supported
clock for CORE and TETRIS PLLs and configure them accordingly.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
9 years agoboard/ti/dra7xx: add support for parallel NOR
pekon gupta [Tue, 22 Jul 2014 10:33:24 +0000 (16:03 +0530)]
board/ti/dra7xx: add support for parallel NOR

This patch adds support for parallel NOR device (S29GL512S10) present on J6-EVM.
The Flash device is connected to GPMC controller on chip-select[0] and accessed
as memory-mapped device. It has data-witdh=x16, capacity-64MBytes(512Mbits) and
is CFI compatible.

As multiple devices are share GPMC pins on this board, so following board
settings are required to detect NOR device:
     SW5.1 (NAND_BOOTn) = OFF (logic-1)
     SW5.2 (NOR_BOOTn)  = ON  (logic-0) /* Active-low */
     SW5.3 (eMMC_BOOTn) = OFF (logic-1)
     SW5.4 (QSPI_BOOTn) = OFF (logic-1)

And also set appropriate SYSBOOT configurations:
     SW3.1 (SYSBOOT[ 8])= ON  (logic-1) /* selects SYS_CLK1 speed */
     SW3.2 (SYSBOOT[ 9])= OFF (logic-0) /* selects SYS_CLK1 speed */
     SW3.3 (SYSBOOT[10])= ON  (logic-1) /* wait-pin monitoring = enabled */
     SW3.4 (SYSBOOT[11])= OFF (logic-0) /* device type: Non Muxed */
     SW3.5 (SYSBOOT[12])= OFF (logic-0) /* device type: Non Muxed */
     SW3.6 (SYSBOOT[13])= ON  (logic-1) /* device bus-width: 1(x16) */
     SW3.7 (SYSBOOT[14])= OFF (logic-0) /* reserved */
     SW3.8 (SYSBOOT[15])= ON  (logic-1) /* reserved */

Also, following changes are required to enable NOR Flash support in
dra7xx_evm board profile:

9 years agoboard/ti/dra7xx: add support for parallel NAND
pekon gupta [Tue, 22 Jul 2014 10:33:23 +0000 (16:03 +0530)]
board/ti/dra7xx: add support for parallel NAND

This patch adds support for x16 NAND device (MT29F2G16AAD) connected to GPMC
chip-select[0] on DRA7xx EVM.
As GPMC pins are shared by multiple devices, so in addition to this patch
following board settings are required for NAND device detection [1]:

  SW5.9 (GPMC_WPN)   = OFF (logic-1)
  SW5.1 (NAND_BOOTn) = ON  (logic-0) /* Active-low */
  SW5.2 (NOR_BOOTn)  = OFF (logic-1)
  SW5.3 (eMMC_BOOTn) = OFF (logic-1)
  SW5.4 (QSPI_BOOTn) = OFF (logic-1)

And also set appropriate SYSBOOT configurations
  SW2.1 (SYSBOOT[0]) = ON  (logic-1) /* selects NAND Boot */
  SW2.2 (SYSBOOT[1]) = OFF (logic-0) /* selects NAND Boot */
  SW2.3 (SYSBOOT[2]) = OFF (logic-0) /* selects NAND Boot */
  SW2.4 (SYSBOOT[3]) = OFF (logic-0) /* selects NAND Boot */
  SW2.5 (SYSBOOT[4]) = ON  (logic-1) /* selects NAND Boot */
  SW2.6 (SYSBOOT[5]) = ON  (logic-1) /* selects NAND Boot */
  SW2.7 (SYSBOOT[6]) = OFF (logic-0) /* reserved */
  SW2.8 (SYSBOOT[7]) = OFF (logic-0) /* reserved */

  SW3.1 (SYSBOOT[ 8])= ON  (logic-1) /* selects SYS_CLK1 speed */
  SW3.2 (SYSBOOT[ 9])= OFF (logic-0) /* selects SYS_CLK1 speed */
  SW3.3 (SYSBOOT[10])= ON  (logic-1) /* wait-pin monitoring = enabled */
  SW3.4 (SYSBOOT[11])= OFF (logic-0) /* device type: Addr/Data Muxed */
  SW3.5 (SYSBOOT[12])= ON  (logic-1) /* device type: Addr/Data Muxed */
  SW3.6 (SYSBOOT[13])= ON  (logic-1) /* device bus-width: 1(x16) */
  SW3.7 (SYSBOOT[14])= OFF (logic-0) /* reserved */
  SW3.8 (SYSBOOT[15])= ON  (logic-1) /* reserved */

Following changes are required in board.cfg to enable NAND on J6-EVM:

9 years agoboard/ti/am43xx: add support for parallel NAND
pekon gupta [Tue, 22 Jul 2014 10:33:22 +0000 (16:03 +0530)]
board/ti/am43xx: add support for parallel NAND

This patch adds support for NAND device connected to GPMC chip-select on
following AM43xx EVM boards.

am437x-gp-evm: On this board, NAND Flash signals are muxed with eMMC, thus at a
  time either eMMC or NAND can be enabled. Selection between eMMC and NAND is
  controlled by:
  (a) Statically using Jumper on connecter (J89) present on board.
  (a) If Jumper on J89 is NOT used, then selection can be dynamically controlled
      by driving SPI2_CS0[MUX_MODE=GPIO] pin via software:
      SPI2_CS0 == 0: NAND (default)
      SPI2_CS0 == 1: eMMC

am43x-epos-evm: On this board, NAND Flash control lines are muxed with QSPI,
  Thus only one of the two can be used at a time. Selection is controlled by:
  (a) Dynamically driving following GPIO pin from software
      GPMC_A0(GPIO) == 0 NAND is selected (default)

NAND device (MT29F4G08AB) on these boards has:
 - data-width=8bits
 - blocksize=256KB
 - pagesize=4KB
 - oobsize=224 bytes
For above NAND device, ROM code expects the boot-loader to be flashed in BCH16
ECC scheme for NAND boot, So by default BCH16 ECC is enabled for AM43xx EVMs.

Signed-off-by: Pekon Gupta <pekon@ti.com>
9 years agoboard/ti/am335x: add support for beaglebone NOR Cape
pekon gupta [Tue, 22 Jul 2014 10:33:21 +0000 (16:03 +0530)]
board/ti/am335x: add support for beaglebone NOR Cape

This patch adds support of NOR cape[1] for both Beaglebone (white) and
Beaglebone(Black) boards. NOR Flash on this cape is connected to GPMC
chip-select[0] and accesses as external memory-mapped device.
This cape has 128Mbits(16MBytes), x16, CFI compatible NOR Flash device.

As GPMC chip-select[0] can be shared by multiple capes so NOR profile is
not enabled by default in boards.cfg. Following changes are required to
enable NOR cape detection when building am335x_boneblack board profile.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoboard/ti/am335x: add support for beaglebone NAND cape
pekon gupta [Tue, 22 Jul 2014 10:33:20 +0000 (16:03 +0530)]
board/ti/am335x: add support for beaglebone NAND cape

Beaglebone Board can be connected to expansion boards to add devices to them.
These expansion boards are called 'capes'. This patch adds support for
following versions of Beaglebone(AM335x) NAND capes
(a) NAND Device with bus-width=16, block-size=128k, page-size=2k, oob-size=64
(b) NAND Device with bus-width=16, block-size=256k, page-size=4k, oob-size=224
Further information and datasheets can be found at [1] and [2]

* How to boot from NAND using Memory Expander + NAND Cape ? *
 - Important: As BOOTSEL values are sampled only at POR, so after changing any
   setting on SW2 (DIP switch), disconnect and reconnect all board power supply
   (including mini-USB console port) to POR the beaglebone.

 - Selection of ECC scheme
  for NAND cape(a), ROM code expects BCH8_HW ecc-scheme
  for NAND cape(b), ROM code expects BCH16_HW ecc-scheme

 - Selction of boot modes can be controlled via  DIP switch(SW2) present on
   Memory Expander cape.
   SW2[SWITCH_BOOT] == OFF  follow default boot order  MMC-> SPI -> UART -> USB
   SW2[SWITCH_BOOT] == ON   boot mode selected via DIP switch(SW2)
   So to flash NAND, first boot via MMC or other sources and then switch to
   SW2[SWITCH_BOOT]=ON to boot from NAND Cape.

 - For NAND boot following switch settings need to be followed
   SW2[ 1] = OFF  (SYSBOOT[ 0]==1: NAND boot mode selected )
   SW2[ 2] = OFF  (SYSBOOT[ 1]==1:       -- do --          )
   SW2[ 3] = ON   (SYSBOOT[ 2]==0:       -- do --          )
   SW2[ 4] = ON   (SYSBOOT[ 3]==0:       -- do --          )
   SW2[ 5] = OFF  (SYSBOOT[ 4]==1:       -- do --          )
   SW2[ 6] = OFF  (SYSBOOT[ 8]==1: 0:x8 device, 1:x16 device )
   SW2[ 7] = ON   (SYSBOOT[ 9]==0: ECC done by ROM  )
   SW2[ 8] = ON   (SYSBOOT[10]==0: Non Muxed device )
   SW2[ 9] = ON   (SYSBOOT[11]==0:    -- do --      )

[1] http://beagleboardtoys.info/index.php?title=BeagleBone_Memory_Expansion
[2] http://beagleboardtoys.info/index.php?title=BeagleBone_4Gb_16-Bit_NAND_Module

*IMPORTANT NOTE*
As Beaglebone board shares the same config as AM335x EVM, so following
changes are required in addition to this patch for Beaglebone NAND cape.
(1) Enable NAND in am335x_beaglebone board profile
(2) Add CONFIG_SYS_NAND_BUSWIDTH_16BIT to board config because:
 -  AM335x EVM has NAND device with datawidth=8, whereas
 -  Beaglebone NAND cape has NAND device with data-width=16

9 years agoboard/ti/am335x: update configs for parallel NAND
pekon gupta [Tue, 22 Jul 2014 10:33:19 +0000 (16:03 +0530)]
board/ti/am335x: update configs for parallel NAND

This patch
- consolidate CONFIG_SYS_NAND_xx and CONFIG_SPL_NAND_xx from various
  configuration files into single file.
- update MTD Partition table to match AM335x_EVM DT in linux-kernel
- segregate CONFIGs based on different boot modes (like SPL and U-Boot)

Signed-off-by: Pekon Gupta <pekon@ti.com>
9 years agoam335x_evm: Enable CONFIG_SPL_ENV_SUPPORT on EMMC_BOOT
Tom Rini [Fri, 18 Jul 2014 15:51:35 +0000 (11:51 -0400)]
am335x_evm: Enable CONFIG_SPL_ENV_SUPPORT on EMMC_BOOT

When we're using EMMC_BOOT that means we have environment on eMMC so
we can make use of CONFIG_SPL_ENV_SUPPORT within Falcon Mode.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agocommon/Makefile: Consolidate SPL ENV options, correct inclusion
Tom Rini [Fri, 18 Jul 2014 15:51:34 +0000 (11:51 -0400)]
common/Makefile: Consolidate SPL ENV options, correct inclusion

CONFIG_SPL_NET_SUPPORT is not the only time we want SPL to ahve
environment, CONFIG_SPL_ENV_SUPPORT is when we want it.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agotseries: Set CONFIG_ENV_IS_NOWHERE for SPL+NAND
Tom Rini [Fri, 18 Jul 2014 15:51:33 +0000 (11:51 -0400)]
tseries: Set CONFIG_ENV_IS_NOWHERE for SPL+NAND

In the case of SPL on these boards we only need environment for
SPL_USBETH, so it's safe to normally use ENV_IS_NOWHERE and SPL+NAND
does not support environment today.

Cc: Hannes Petermaier <oe5hpm@oevsv.at>
Signed-off-by: Tom Rini <trini@ti.com>
9 years agoTI:armv7: Change CONFIG_SPL_STACK to not be CONFIG_SYS_INIT_SP_ADDR
Tom Rini [Fri, 18 Jul 2014 15:51:32 +0000 (11:51 -0400)]
TI:armv7: Change CONFIG_SPL_STACK to not be CONFIG_SYS_INIT_SP_ADDR

There are times where we may need more than a few kilobytes of stack
space.  We also will not be using CONFIG_SPL_STACK location prior to DDR
being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick
a good location within DDR for this to be.  Tested on
OMAP4/AM335x/OMAP5/DRA7xx.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoam335x_evm: Move SPL network defines
Tom Rini [Fri, 18 Jul 2014 15:51:31 +0000 (11:51 -0400)]
am335x_evm: Move SPL network defines

On am335x_evm we only support USBETH for a networking SPL option so move
the rest of the defines under that area as that's the only time we need
(and want) environment support here.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Tom Rini [Mon, 25 Aug 2014 12:34:39 +0000 (08:34 -0400)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging

9 years agonios2: remove EPCS driver
Thomas Chou [Sat, 23 Aug 2014 01:10:34 +0000 (09:10 +0800)]
nios2: remove EPCS driver

The Altera EPCS is SPI flash. We have been using SPI flash driver
to access EPCS for years. The old EPCS driver could be removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: add generic board support
Thomas Chou [Fri, 22 Aug 2014 03:36:47 +0000 (11:36 +0800)]
nios2: add generic board support

This patch implements the generic board init as described in
doc/README.generic-board.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agonios2: remove obsolete PCI5441 and PK1C20 boards
Thomas Chou [Thu, 21 Aug 2014 06:36:30 +0000 (14:36 +0800)]
nios2: remove obsolete PCI5441 and PK1C20 boards

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: Fix printf size_t format related warnings (again...)
Vasili Galka [Thu, 14 Aug 2014 14:42:05 +0000 (17:42 +0300)]
nios2: Fix printf size_t format related warnings (again...)

When compiling the current code on GCC 4.8.3, the following warnings
appear:

warning: format '%zu' expects argument of type 'size_t', but argument
2 has type 'long unsigned int' [-Wformat=]

There were many mails about such warnings on different architectures.
This patch limits itself to the nios2 architecture.

The problem is that for the size_t (%zu, %zd, ...) arguments of
printf GCC does not verify the type match to size_t type. It verifies
the type match to the compiler-defined __SIZE_TYPE__ type. Thus, if
size_t is defined different from __SIZE_TYPE__ - warnings inevitably
appear.

There is a comment by Thomas Chou to the (rejected) patch:
http://patchwork.ozlabs.org/patch/272102/
which explains that the older GCC toolchains (gcc-3.4.6 and gcc-4.1.2)
expect size_t to be "unsigned long" and the newer expect it to be
"unsigned int". Thus, no matter how we define size_t - either way
warnings appear when using some GCC version.

By rejecting that patch, a choice was made to prefer older GCC versions
and leave the warnings when building with the newer toolchains.
Personally, I disagree with this choice...

In any case, this patch proposes a way to fix the warnings for any GCC
version. Just define size_t using the __SIZE_TYPE__ compiler-defined
type and the type verification will pass.

I tested that this fixes the warning on GCC 4.8.3. I don't have an
older toolchain to test with, but __SIZE_TYPE__ was definitely defined
in GCC 3.4.6, so it should work there too.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agobuildman: refactor help message
Masahiro Yamada [Fri, 22 Aug 2014 10:12:41 +0000 (19:12 +0900)]
buildman: refactor help message

"buildman [options]" is displayed by default.

Append the rest of help messages to parser.usage
instead of replacing it.

Besides, "-b <branch>" is not mandatory since commit fea5858e.
Drop it from the usage.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agogit-mailrc: add patman and buildman alias
Masahiro Yamada [Thu, 21 Aug 2014 05:35:44 +0000 (14:35 +0900)]
git-mailrc: add patman and buildman alias

It's easier to Cc Simon on patches related to Patman or Buildman.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
9 years agopatman: refactor help message
Masahiro Yamada [Thu, 21 Aug 2014 05:28:03 +0000 (14:28 +0900)]
patman: refactor help message

"patman [options]" is displayed by default.

Append the rest of help messages to parser.usage
instead of replacing it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: convert Kconfig helper script into a shell script
Masahiro Yamada [Thu, 21 Aug 2014 02:44:34 +0000 (11:44 +0900)]
kconfig: convert Kconfig helper script into a shell script

Commit 51148790 added scripts/multiconfig.py written in Python 2
to adjust Kconfig for U-Boot.

It has been hard for Python 3 users because Python 2 and Python 3
are not compatible with each other.

We are not happy about adding a new host tool dependency
(in this case, Python version dependency) for the core build process.
After some discussion, we decided to use only basic tools.

The script may get a bit more unreadable by shell scripting,
but we believe it is worthwhile.

In addition, this commit revives "<board>_config" target that is
equivalent to "<board>_defconfig" for backwards compatibility.
It is annoying to adjust various projects which use U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Stephen Warren <swarren@nvidia.com>
9 years agoMakefile: remove generated boards.cfg within make distclean
Roger Meier [Wed, 20 Aug 2014 20:10:29 +0000 (22:10 +0200)]
Makefile: remove generated boards.cfg within make distclean

Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
9 years agonet: More BOOTP retry timeout improvements
Thierry Reding [Tue, 19 Aug 2014 08:21:24 +0000 (10:21 +0200)]
net: More BOOTP retry timeout improvements

It's not unusual for DHCP servers to take a couple hundred milliseconds
to respond to DHCP discover messages. One possible reason for the delay
can be that the server checks (typically using an ARP request) that the
IP it's about to hand out isn't in use yet. To make matters worse, some
servers may also queue up requests and process them sequentially, which
can cause excessively long delays if clients retry too fast.

Commit f59be6e850b3 ("net: BOOTP retry timeout improvements") shortened
the retry timeouts significantly, but the BOOTP/DHCP implementation in
U-Boot doesn't handle that well because it will ignore incoming replies
to earlier requests. In one particular setup this increases the time it
takes to obtain a DHCP lease from 630 ms to 8313 ms.

This commit attempts to fix this in two ways. First it increases the
initial retry timeout from 10 ms to 250 ms to give DHCP servers some
more time to respond. At the same time a cache of outstanding DHCP
request IDs is kept so that the implementation will know to continue
transactions even after a retransmission of the DISCOVER message. The
maximum retry timeout is also increased from 1 second to 2 seconds. An
ID cache of size 4 will keep DHCP requests around for 8 seconds (once
the maximum retry timeout has been reached) before dropping them. This
should give servers plenty of time to respond. If it ever turns out
that this isn't enough, the size of the cache can easily be increased.

With this commit the DHCP lease on the above-mentioned setup still takes
longer (1230 ms) than originally, but that's an acceptable compromise to
improve DHCP lease acquisition time for a broader range of setups.

To make it easier to benchmark DHCP in the future, this commit also adds
the time it took to obtain a lease to the final "DHCP client bound to
address x.x.x.x" message.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agobootm: make sure pass NULL when argc < 1
Bryan Wu [Fri, 15 Aug 2014 23:51:39 +0000 (16:51 -0700)]
bootm: make sure pass NULL when argc < 1

arg[0] might not be NULL even if argc < 1, so fix this as before.

Signed-off-by: Bryan Wu <pengw@nvidia.com>
9 years agoimage: fix bootm failure for FIT image
Bryan Wu [Fri, 15 Aug 2014 23:51:38 +0000 (16:51 -0700)]
image: fix bootm failure for FIT image

Commit b3dd64f5d537 "bootm: use genimg_get_kernel_addr()" introduced
a bug for booting FIT image. It's because calling fit_parse_config()
twice will give us wrong value in img_addr.

Add a new function genimg_get_kernel_addr_fit() whichl will always
return fit_uname_config and fit_uname_kernel for CONFIG_FIT.
genimg_get_kernel_addr() will ignore those to parameters.

Reported-by: York Sun <yorksun@freescale.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
9 years agokconfig: remove DEFCONFIG_LIST
Masahiro Yamada [Fri, 15 Aug 2014 17:50:12 +0000 (02:50 +0900)]
kconfig: remove DEFCONFIG_LIST

CONFIG_DEFCONFIG_LIST specifies the default defconfig.
It is used by "make savedefconfig" when .config is missing.
But that's it.  I could not find other useful cases.

As a side effect, CONFIG_DEFCONFIG_LIST="configs/sandbox_defconfig"
is contained in .config of every target board, which some people
think is odd.  So, let's remove it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
9 years agoscripts/Lindent: import from Linux 3.16
Masahiro Yamada [Fri, 15 Aug 2014 16:06:15 +0000 (01:06 +0900)]
scripts/Lindent: import from Linux 3.16

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMakefile: Use Kbuild style for system_map.o generation step
Vasili Galka [Thu, 14 Aug 2014 09:40:55 +0000 (12:40 +0300)]
Makefile: Use Kbuild style for system_map.o generation step

The command generating the "common/system_map.o" file was always shown
during the build making the output messy. Now it is called using the
Kbuild "cmd" macro, so that the full command is shown only when
building in verbose mode.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agoadd header for Android sparse image format
Colin Cross [Tue, 12 Aug 2014 17:59:27 +0000 (10:59 -0700)]
add header for Android sparse image format

Add a BSD-3 relicensed version of the Android sparse format image
header from:
https://android.googlesource.com/platform/system/core/+/28fa5bc347390480fe190294c6c385b6a9f0d68b/libsparse/sparse_format.h
Unchanged except for the license header.

Cc: Tom Rini <trini@ti.com>
Signed-off-by: Colin Cross <ccross@android.com>
9 years agoapi: fix build without CMD_NET support
Jeroen Hofstee [Sat, 9 Aug 2014 22:30:55 +0000 (00:30 +0200)]
api: fix build without CMD_NET support

Provide stubs in case that no NET interface is supported.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoe1000: add i210 support
Marek Vasut [Fri, 8 Aug 2014 14:41:39 +0000 (07:41 -0700)]
e1000: add i210 support

Add i210 support to the e1000 driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
9 years agoe1000: Implement dcache support
Marek Vasut [Fri, 8 Aug 2014 14:41:38 +0000 (07:41 -0700)]
e1000: Implement dcache support

Implement proper support for cache flushing and invalidation into the
Intel e1000 NIC driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
9 years agotools/genboardscfg.py: no exception if columns undetectable
Roger Meier [Thu, 7 Aug 2014 14:19:58 +0000 (16:19 +0200)]
tools/genboardscfg.py: no exception if columns undetectable

The existing terminalsize detection raised an exception on build
server. Just removes the exception. This also deactivates the
progress indicator.

Remove a trainling whitespace.

Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
CC: Masahiro Yamada <yamada.m@jp.panasonic.com>
CC: Tom Rini <trini@ti.com>
9 years agotools/genboardscfg.py: Do not output SPLCPU field
Masahiro Yamada [Wed, 6 Aug 2014 04:42:34 +0000 (13:42 +0900)]
tools/genboardscfg.py: Do not output SPLCPU field

Prior to Kconfig, the CPU field of boards.cfg could optionally have
":SPLCPU", like "armv7:arm720t".
(Actually this syntax was only used for Tegra platform.)

Now it is not necessary at all because CPU is defined by
CONFIG_SYS_CPU in Kconfig.

For Tegra platform, the Kconfig option is described as follows:

  config SYS_CPU
          string
          default "arm720t" if SPL_BUILD
          default "armv7" if !SPL_BUILD

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopxe: Allow use of environment variables in append string
Hans de Goede [Wed, 6 Aug 2014 07:37:39 +0000 (09:37 +0200)]
pxe: Allow use of environment variables in append string

Use cli_simple_process_macros, so that environment
variables (e.g. ${console}) can be used in append strings.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agocli: Export cli_simple_process_macros for use outside of cli_simple
Hans de Goede [Wed, 6 Aug 2014 07:37:38 +0000 (09:37 +0200)]
cli: Export cli_simple_process_macros for use outside of cli_simple

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agodavinci: orphan some Davinci boards
Masahiro Yamada [Wed, 6 Aug 2014 04:08:23 +0000 (13:08 +0900)]
davinci: orphan some Davinci boards

Emails to Sandeep Paulraj <s-paulraj@ti.com>
have been bouncing.

Please assign new maintainer(s) to get these boards
back to Maintained.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agopowerpc: mpc8xx: remove FLAGADM board support
Masahiro Yamada [Wed, 6 Aug 2014 03:59:55 +0000 (12:59 +0900)]
powerpc: mpc8xx: remove FLAGADM board support

This board has been orphaned for a while and old enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc: mpc8xx: remove GEN860T, GEN806T_SC board support
Masahiro Yamada [Wed, 6 Aug 2014 03:59:54 +0000 (12:59 +0900)]
powerpc: mpc8xx: remove GEN860T, GEN806T_SC board support

These boards have been orphaned for a while and old enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc: mpc8xx: remove SXNI855T board support
Masahiro Yamada [Wed, 6 Aug 2014 03:59:53 +0000 (12:59 +0900)]
powerpc: mpc8xx: remove SXNI855T board support

This board has been orphaned for a while and old enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc: mpc8xx: remove svm_sc8xx board
Masahiro Yamada [Wed, 6 Aug 2014 03:59:52 +0000 (12:59 +0900)]
powerpc: mpc8xx: remove svm_sc8xx board

This board has been orphaned for a while and old enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc: mpc8xx: remove stxxtc board support
Masahiro Yamada [Wed, 6 Aug 2014 03:59:51 +0000 (12:59 +0900)]
powerpc: mpc8xx: remove stxxtc board support

This board has been orphaned for a while and old enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoomap: remove omap5912osk board support
Masahiro Yamada [Wed, 6 Aug 2014 03:17:49 +0000 (12:17 +0900)]
omap: remove omap5912osk board support

Emails to the board maintainer
"Rishi Bhattacharya <rishi@ti.com>"
have been bouncing.

Tom suggested to remove this board.

Remove also omap1510_udc.c because this is the last board
to enable it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
9 years agoscripts: objdiff: sync with Linux 3.16
Masahiro Yamada [Tue, 5 Aug 2014 06:56:45 +0000 (15:56 +0900)]
scripts: objdiff: sync with Linux 3.16

Import scripts/objdiff improvements from Linux v3.16, which
consists of 7 commits written by me.

  commit 7fa0e6db3cedc9b70d68a4170f1352e2b1aa0f90
  scripts: objdiff: support directories for the augument of record command

  commit 8ac28bee76eec006aac5ba5c418878a607d53a9b
  scripts: objdiff: fix a comment

  commit 8b5d0f20d64f00ffd5685879f8eb3659379f5aaa
  scripts: objdiff: change the extension of disassembly from .o to .dis

  commit 18165efa8203a34d82f60a1831ea290e7304c654
  scripts: objdiff: improve path flexibility for record command

  commit 1ecc8e489abfdaa6d8d1689f7ff62fdf1adda30c
  scripts: objdiff: remove unnecessary code

  commit 5ab370e91af70d5f1b1dbaec78798a2ff236a2d5
  scripts: objdiff: direct error messages to stderr

  commit fd6e12423311697860f30d10398a0f9eb91977d2
  scripts: objdiff: get the path to .tmp_objdiff more simply

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: sync mixed targets handling with Linux 3.16
Masahiro Yamada [Tue, 5 Aug 2014 06:56:44 +0000 (15:56 +0900)]
kbuild: sync mixed targets handling with Linux 3.16

"make %_config all" was supported for the first time in U-Boot:
  commit 53bca5ab
  kbuild: support simultaneous board configuration and "make all"

Surprisingly it had not been working in Linux Kernel for a long time.

So I sent back the patch to the Linux Kbuild community and it was
accepted with a little code improvement, at commit 9319f453.

Now, you can do "make defconfig all" or "make %_defconfig all"
in Linux too.

This commit updates some scripts to fill the code-diff
between Linux and U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: move extra gcc checks to scripts/Makefile.extrawarn
Masahiro Yamada [Tue, 5 Aug 2014 06:56:43 +0000 (15:56 +0900)]
kbuild: move extra gcc checks to scripts/Makefile.extrawarn

This commit was imported from Linux Kernel:
commit a86fe353 written by me.

W=... provides extra gcc checks.

Having such code in scripts/Makefile.build results in the same flags
being added to KBUILD_CFLAGS multiple times becuase
scripts/Makefile.build is invoked every time Kbuild descends into
the subdirectories.

Since the top Makefile is already too cluttered, this commit moves
all of extra gcc check stuff to a new file scripts/Makefile.extrawarn,
which is included from the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodrivers: net: remove dead drivers
Masahiro Yamada [Sun, 3 Aug 2014 23:11:37 +0000 (08:11 +0900)]
drivers: net: remove dead drivers

The following configs are not defined at all:

 - CONFIG_INCA_IP_SWITCH
 - CONFIG_PBL2800_ETHER
 - CONFIG_PHY_ICPLUS

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agotools, scripts: refactor error-out statements of Python scripts
Masahiro Yamada [Fri, 15 Aug 2014 15:59:26 +0000 (00:59 +0900)]
tools, scripts: refactor error-out statements of Python scripts

In Python, sys.exit() function can also take an object other
than an integer.

If an integer is given to the argument, Python exits with the return
code of it.  If a non-integer argument is given, Python outputs it
to stderr and exits with the return code of 1.

That means,

    print >> sys.stderr, "Blah Blah"
    sys.exit(1)

is equivalent to

    sys.exit("Blah Blah")

The latter is a useful shorthand.

Note:
Some error messages in Buildman and Patman were output to stdout.
But they should go to stderr.  They are also fixed by this commit.
This is a nice side effect.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoREADME.kconfig: add initial version of Kconfig document
Masahiro Yamada [Fri, 15 Aug 2014 15:50:30 +0000 (00:50 +0900)]
README.kconfig: add initial version of Kconfig document

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 20 Aug 2014 20:07:34 +0000 (16:07 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

9 years agokmp204x: reset the Zarlink clocking chips at power up only
Valentin Longchamp [Tue, 19 Aug 2014 13:40:04 +0000 (15:40 +0200)]
kmp204x: reset the Zarlink clocking chips at power up only

There is the requirement on the chassis's backplane that when the clocks
have been enabled, they then should not disappear.

Resetting the Zarlink clocking chips at unit reset violates this
requirement because the backplane clocks are not supplied during the
reset time.

To avoid this side effect, both the Zarlink clocking chips are reset
only at power up.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/t4qds: Move doc/README.t4240qds under board/freescale/t4qds
York Sun [Wed, 13 Aug 2014 17:54:44 +0000 (10:54 -0700)]
powerpc/t4qds: Move doc/README.t4240qds under board/freescale/t4qds

Board specific README file should be moved to board folder.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/T4240QDS/eth: some fix for XFI
Shaohui Xie [Wed, 13 Aug 2014 10:19:15 +0000 (18:19 +0800)]
powerpc/T4240QDS/eth: some fix for XFI

XFI is supported on T4QDS-XFI board, which removed slot3, and four LANEs
of serdes2 are routed to a SFP+ cages, which to house fiber cable or
direct attach cable(copper), the copper cable is used to emulate the
10GBASE-KR scenario.

So, for XFI usage, there are two scenarios, one will use fiber cable,
another will use copper cable. For fiber cable, there is NO PHY, while
for copper cable, we need to use internal PHY which exist in Serdes to
do auto-negotiation and link training, which implemented in kernel.
We use hwconfig to define cable type for XFI, and fixup dtb based on the
cable type.

For copper cable, set below env in hwconfig:

fsl_10gkr_copper:<10g_mac_name>

the <10g_mac_name> can be fm1_10g1, fm1_10g2, fm2_10g1, fm2_10g2. The
four <10g_mac_name>s do not have to be coexist in hwconfig. For XFI ports,
if a given 10G port will use the copper cable for 10GBASE-KR, set the
<10g_mac_name> of the port in hwconfig, otherwise, fiber cable will be
assumed to be used for the port.

For ex. if four XFI ports will both use copper cable, the hwconfig
should contain:

fsl_10gkr_copper:fm1_10g1,fm1_10g2,fm2_10g1,fm2_10g2

For fiber cable:

1. give PHY address to a XFI port, otherwise, the XFI ports will not be
available in U-boot, there is no PHY physically for XFI when using fiber
cable, this is just to make U-boot happy and we can use the XFI ports
in U-boot.
2. fixup dtb to use fixed-link in case of fiber cable which has no PHY.
Kernel requests that a MAC must have a PHY or fixed-link.

When using XFI protocol, the MAC 9/10 on FM1 should init as 10G interface.

Change serdes 2 protocol 56 to 55 which has same feature as 56 since 56
is not valid any longer.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agokm-powerpc: define CONFIG_PRAM to protect PHRAM and PNVRAM
Valentin Longchamp [Wed, 13 Aug 2014 08:24:04 +0000 (10:24 +0200)]
km-powerpc: define CONFIG_PRAM to protect PHRAM and PNVRAM

When u-boot initializes the RAM (early in boot) it looks for the "pram"
env variable to know which is area it cannot use. If the "pram" env variable
is not found, the default CONFIG_PRAM value is used.

This value used to be 0 (no protection at all). This patch sets it to a
value that covers PHRAM and PNVRAM that must be protected in our case.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/qe: update status of QE microcode
Vijay Rai [Wed, 23 Jul 2014 13:03:16 +0000 (18:33 +0530)]
driver/qe: update status of QE microcode

This Patch updates error print for QE which should be easily understood

Signed-off-by: Vijay Rai <vijay.rai@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>