]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
9 years agoinput: Add the keycode translation tables separately
Simon Glass [Mon, 19 Oct 2015 03:17:13 +0000 (21:17 -0600)]
input: Add the keycode translation tables separately

Require the caller to add the keycode translation tables separately so that
it can select which ones to use. In a later patch we will add the option to
add German tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoinput: Return -ENOSPC when there is not space
Simon Glass [Mon, 19 Oct 2015 03:17:12 +0000 (21:17 -0600)]
input: Return -ENOSPC when there is not space

Return a useful error instead of -1 when something goes wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoinput: Add a device pointer to the input config
Simon Glass [Mon, 19 Oct 2015 03:17:11 +0000 (21:17 -0600)]
input: Add a device pointer to the input config

The read_keys() method in input is passed a struct input_config. Add a
device pointer there so that we can find out the device that is referred
to with driver model.

Once all drivers are converted we can update the input structure to use
driver model instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: input: Create a keyboard uclass
Simon Glass [Mon, 19 Oct 2015 03:17:10 +0000 (21:17 -0600)]
dm: input: Create a keyboard uclass

Add a uclass for keyboard input, mirroring the existing stdio methods.
This is enabled by a new CONFIG_DM_KEYBOARD option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: usb: Add support for USB keyboards with driver model
Simon Glass [Tue, 8 Sep 2015 17:15:11 +0000 (11:15 -0600)]
dm: usb: Add support for USB keyboards with driver model

Switch USB keyboards over to use driver model instead of scanning with the
horrible usb_get_dev_index() function. This involves creating a new uclass
for keyboards, although so far there is no API.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agorockchip: Turn on CONFIG_DEBUG_UART_NS16550 in defconfigs
Ariel D'Alessandro [Mon, 16 Nov 2015 11:15:50 +0000 (08:15 -0300)]
rockchip: Turn on CONFIG_DEBUG_UART_NS16550 in defconfigs

No UART driver was specified in defconfig, thus
DEBUG_UART_ALTERA_JTAGUART was incorrectly selected by default since
commit 220e8021af96741bd7149ca9895e1f0c8a38d0bb added a new Altera UART
driver.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Thu, 19 Nov 2015 18:27:26 +0000 (13:27 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

9 years agoMerge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 19 Nov 2015 16:25:36 +0000 (11:25 -0500)]
Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 19 Nov 2015 14:06:44 +0000 (09:06 -0500)]
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze

9 years agocommon: mii: Do not allow to exceed max phy limit
Michal Simek [Mon, 19 Oct 2015 13:13:34 +0000 (15:13 +0200)]
common: mii: Do not allow to exceed max phy limit

Phy can have addresses 0-31. Check this boundary to ensure that user
can't call commands on phy address 32 and more.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agozynq: sdhci: Define max clock by macro
Michal Simek [Mon, 28 Sep 2015 23:27:13 +0000 (01:27 +0200)]
zynq: sdhci: Define max clock by macro

zc1571 with silicon can operate on 200MHz maximum frequency. Setup this
frequency by default and fix setting for ep108.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: zynq: Fix MDC setting for zynq
Michal Simek [Tue, 8 Sep 2015 15:07:01 +0000 (17:07 +0200)]
net: zynq: Fix MDC setting for zynq

Based on spec:
"MDC must not exceed 2.5 MHz (MDC is only active during MDIO read and
write operations)"
Zynq is running on 111MHz. Current setting is 32 which is 111/32=3.47
which is above of 2.5MHz.
Using 48 divider will give us correct setting according spec
(111/48=2.31).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Remove unused MDCCLKDIV2 macro
Michal Simek [Tue, 8 Sep 2015 14:54:39 +0000 (16:54 +0200)]
net: zynq: Remove unused MDCCLKDIV2 macro

Driver cleanup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Fix mdc clock division setting for 100Mbit/s
Michal Simek [Tue, 8 Sep 2015 14:55:42 +0000 (16:55 +0200)]
net: zynq: Fix mdc clock division setting for 100Mbit/s

Using set and clear macro is incorrect because it is not overwritting
origin mdc clock division setup.
For example origin setup is 8(0b001) and new setup is 64(0b100) which
means 0b101 is setup which is 96 divider.
Using writel to rewrite all setting like for 1000Mbit/s case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Wait till packet is sent
Michal Simek [Mon, 17 Aug 2015 07:57:46 +0000 (09:57 +0200)]
net: zynq: Wait till packet is sent

Wait till BD is processed to ensure that packet was sent successfully.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: zynq: Disable secondary queues
Edgar E. Iglesias [Sat, 26 Sep 2015 06:50:07 +0000 (23:50 -0700)]
net: zynq: Disable secondary queues

Zynq has no priority queues.
ZynqMP has one priority queue and this change is required
to get ethernet working.
This patch was not needed on ep108 for uknown reason even
it should be used.
Tested on Zynq and ZynqMP.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: zynq: Add dummy packet to fix packet duplication issue
Michal Simek [Mon, 17 Aug 2015 07:58:54 +0000 (09:58 +0200)]
net: zynq: Add dummy packet to fix packet duplication issue

Target is duplicating packets. IP prefetches another BD and process it
when the first one is sent. Adding one dummy BD to the chain fix the
problem with packet duplication.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Do not report TX underrun
Michal Simek [Mon, 17 Aug 2015 07:51:34 +0000 (09:51 +0200)]
net: zynq: Do not report TX underrun

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Setup BD when structures are filled
Michal Simek [Mon, 17 Aug 2015 07:50:09 +0000 (09:50 +0200)]
net: zynq: Setup BD when structures are filled

Fix incorrect sequence in BD handling.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Allocate BD_SPACE in connection to RX_BUF
Michal Simek [Mon, 17 Aug 2015 07:45:53 +0000 (09:45 +0200)]
net: zynq: Allocate BD_SPACE in connection to RX_BUF

BD_SEPRN_SPACE should not have hard coded value and it will be
calculated based on the number of buffer descriptors that we
would like to use.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: sf: Add support for all targets which requires MANUAL_RELOC
Michal Simek [Tue, 27 Oct 2015 12:52:47 +0000 (13:52 +0100)]
dm: sf: Add support for all targets which requires MANUAL_RELOC

It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)
to update function pointers for DM.

Using post_bind is not ideal but it is one on current option what can be
used. Variable reloc_done has to be used do not call relocation after
every bind. Maybe new core functions should be introduced for this case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Add missing entries for manual relocation
Michal Simek [Tue, 27 Oct 2015 12:48:08 +0000 (13:48 +0100)]
dm: core: Add missing entries for manual relocation

Patches:
"dm: core: Add a post_bind method for parents"
(sha1: 0118ce79577f9b0881f99a6e4f8a79cd5014cb87)
"dm: core: Add a uclass pre_probe() method for devices"
(sha1: 02c07b3741f1b825934b1a6eb8f23530532dc426)
"dm: core: Allow the uclass to set up a device's child after binding"
(sha1: 081f2fcbd9a95ba10677065359791f8fea3f8c58)
"dm: core: Allow uclass to set up a device's child before it is probed"
(sha1: 83c7e434c9dd3ca81f8b763e23c1881b973bcf2f)

Adds new entries to struct driver and struct uclass_driver without
extending code for manual relocation. This patch fixes it for all
architectures which requires MANUAL_RELOC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: spi: Add support for all targets which requires MANUAL_RELOC
Michal Simek [Tue, 27 Oct 2015 12:36:42 +0000 (13:36 +0100)]
dm: spi: Add support for all targets which requires MANUAL_RELOC

It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba058b07be5ca82763aa2b72063540ef3)
to update function pointers for DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agomicroblaze: Fix C99/gnu99 compatiblity for inline functions
Nathan Rossi [Fri, 6 Nov 2015 09:25:06 +0000 (19:25 +1000)]
microblaze: Fix C99/gnu99 compatiblity for inline functions

'extern inline' is not portable across various C standards. To ensure
compatiblity with various standards/compilers change the functions to
static inline. This is a portable construct and serves as a comparable
definition to 'extern inline' from the gnu90 standard.

Additionally remove the function prototypes as they are not required due
to the functions being declared static and functions are correctly
ordered based on dependence.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Fix style issues in header files
Nathan Rossi [Fri, 6 Nov 2015 09:25:05 +0000 (19:25 +1000)]
microblaze: Fix style issues in header files

Fix various style issues in MicroBlaze header files. Specifically fixing
style voilations including '__inline__', 'foo * bar' and 'void foo ('.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: zynq: Fix clearing statistic
Michal Simek [Mon, 5 Oct 2015 10:49:48 +0000 (12:49 +0200)]
net: zynq: Fix clearing statistic

Previous loop was completely bogus. Iterration should go just over
statistic counters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Extend register description with offsets
Michal Simek [Mon, 5 Oct 2015 09:49:43 +0000 (11:49 +0200)]
net: zynq: Extend register description with offsets

Extend comments with register offset to help with debuggging.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Add support for different PHY interface types
Michal Simek [Wed, 7 Oct 2015 14:42:56 +0000 (16:42 +0200)]
net: zynq: Add support for different PHY interface types

MII is setup by default for all cases. The most of boards are using
RGMII but PHY drivers are not doing any specific setting that's why MII
setting was working fine. With TI DP83867 is necessary to setup
paramaters based on interface type.

Use one setting per board for it which is something what will be removed
when driver is moved to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: zynq: Add debug message to phyread/phywrite
Michal Simek [Wed, 7 Oct 2015 14:34:51 +0000 (16:34 +0200)]
net: zynq: Add debug message to phyread/phywrite

Add debug messages to phyread/write to help with PHY debug.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: zynq: Add target for building bootable SPL image for Zynq
Nathan Rossi [Tue, 17 Nov 2015 12:56:57 +0000 (22:56 +1000)]
ARM: zynq: Add target for building bootable SPL image for Zynq

Add a build target to generate 'boot.bin' which includes SPL. This is
used by the platforms BootROM to load SPL directly.

This change also conditionally changes what the 'boot.bin' target
generates depending on the SoC. Leaving the behaviour unchanged for the
AT91 targets.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agotools: zynqimage: Add Xilinx Zynq boot header generation to mkimage
Nathan Rossi [Tue, 17 Nov 2015 12:56:56 +0000 (22:56 +1000)]
tools: zynqimage: Add Xilinx Zynq boot header generation to mkimage

As with other platforms vendors love to create their own boot header
formats. Xilinx is no different and for the Zynq platform/SoC there
exists the "boot.bin" which is read by the platforms bootrom. This
format is described to a useful extent within the Xilinx Zynq TRM.

This implementation adds support for the 'zynqimage' to mkimage. The
implementation only considers the most common boot header which is
un-encrypted and packed directly after the boot header itself (no
XIP, etc.). However this implementation does take into consideration the
other fields of the header for image dumping use cases (vector table and
register initialization).

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM64: zynqmp: Enable TI phy by default
Michal Simek [Tue, 10 Nov 2015 09:48:05 +0000 (10:48 +0100)]
ARM64: zynqmp: Enable TI phy by default

Enable TI phy for Xilinx ZynqMP platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: phy: Add support for Texas Instruments DP83867
Edgar E. Iglesias [Sat, 26 Sep 2015 06:46:08 +0000 (23:46 -0700)]
net: phy: Add support for Texas Instruments DP83867

Code is taken from Linux kernel driver (v4.2).

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoARM: zynq: Choose boot image based on OF_SEPARATE macro
Michal Simek [Mon, 9 Nov 2015 09:39:44 +0000 (10:39 +0100)]
ARM: zynq: Choose boot image based on OF_SEPARATE macro

OF_CONTROL is enabled by default for all Zynq boards.
The difference between two boot images is done by OF_SEPARATE
or OF_EMBED macros.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agozynqmp: mp: Add support for booting R5 from any address
Michal Simek [Fri, 22 May 2015 11:28:23 +0000 (13:28 +0200)]
zynqmp: mp: Add support for booting R5 from any address

Put jump trampoline to TCM at 0 and setup R5 reset address to 0.
Jump trampoline ensures that jump to the right location.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoenv_ubi.c: Correct pointer error in env load
Kevin Smith [Fri, 23 Oct 2015 17:51:47 +0000 (17:51 +0000)]
env_ubi.c: Correct pointer error in env load

The variable "buf" in this function is a char array, and the
function ubi_volume_read is expecting a char *.  In the call, the
address of the pointer is being taken, incorrectly passing a
char **.  The compiler warning was being silenced by the cast.
Remove the address operator and the cast.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoitest: add missing break statements to evalexp()
Stephen Warren [Tue, 17 Nov 2015 17:29:08 +0000 (10:29 -0700)]
itest: add missing break statements to evalexp()

The commit mentioned below replaced return statements inside a switch so
that other code could be called after the switch. However, it didn't add
any break statements, causing the cases to run together. Fix this.

Reported-by: Coverity (CID 132282, 132283)
Fixes: 7861204c9af7 ("itest: make memory access work under sandbox")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agotest: fat: add error-checking to non-contig test
Stephen Warren [Tue, 17 Nov 2015 17:29:07 +0000 (10:29 -0700)]
test: fat: add error-checking to non-contig test

Check the result code of all command that are executed. Without this,
if the fallocate invocation fails (this feature is not supported on ext3
filesystems for example) then a zero-length output file will be created,
and subsequent the mkfs and mount invocations will fail, which will cause
the subsequent dd invocation to attempt to fill up the host's entire free
disk space. That's not a nice user experience!

Related, if fallocate does fail, try to create the test disk image using
dd instead. That should work everywhere.

Fixes: 4a28274227d0 ("test: fat: add test of non-contiguous file reads")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
9 years agoFix sandbox build on Ubuntu 10.04
Stephen Warren [Sun, 15 Nov 2015 06:53:49 +0000 (23:53 -0700)]
Fix sandbox build on Ubuntu 10.04

gcc 4.4.3 (which is the default native compiler on x86-64 Ubuntu 10.04)
doesn't seem to like initializers for sub-fields of anonymous unions.
Solve this by replacing the initialization with an assignment. This
fixes:

lib/lz4_wrapper.c: In function ‘ulz4fn’:
lib/lz4_wrapper.c:97: error: unknown field ‘raw’ specified in initializer

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokm/powerpc: fix ft_board_setup prototype for km82xx & km83xx
Valentin Longchamp [Tue, 17 Nov 2015 09:53:38 +0000 (10:53 +0100)]
km/powerpc: fix ft_board_setup prototype for km82xx & km83xx

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/83xx: add support for kmtegr1 board
Valentin Longchamp [Tue, 17 Nov 2015 09:53:37 +0000 (10:53 +0100)]
powerpc/83xx: add support for kmtegr1 board

This board uses the same CPU (8309) as VECT1. The memory however is
different since it has NAND Flash, the NOR Flash partitioning is
different and of course the FPGAs as well.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
9 years agokm8309: change the default QE_FW address
Valentin Longchamp [Tue, 17 Nov 2015 09:53:36 +0000 (10:53 +0100)]
km8309: change the default QE_FW address

It should be after the u-boot reserved sectors and before the env
sectors, since the solution used for kmvect1 (tell the linker to put the
firmware into the u-boot produced binary, at the end of the area) should
be the exception.

The #define is only "conditional" so that we can still support kmvect1.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm83xx: use CONFIG_ENV_ADDR for the newenv env command
Valentin Longchamp [Tue, 17 Nov 2015 09:53:35 +0000 (10:53 +0100)]
km83xx: use CONFIG_ENV_ADDR for the newenv env command

The hardcoded value are bad, since the address could change between
different boards.

Furthermore, the relevant #defines are set only if #undefined here, so
that they can be changed by some boards if required.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agoboard/keymile/km82xx: setting dip_switch 3 and 4 will run bootloader
Bagavathiannan Palanisamy [Tue, 17 Nov 2015 09:53:34 +0000 (10:53 +0100)]
board/keymile/km82xx: setting dip_switch 3 and 4 will run bootloader

Setting dip_switch 3 and 4 also will run bootloader in COGE3 and COGE6
It is required remove local mgmt IP address, when DIP Switch PIN3 is
enabled. DIP Switch 4 also enabled to avoid u-boot update in future
for DIP switch enhancements.

Signed-off-by: Bagavathiannan Palanisamy <Bagavathiannan.Palanisamy@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/km8360: fix the ODT parameters for CS0
Valentin Longchamp [Tue, 17 Nov 2015 09:53:33 +0000 (10:53 +0100)]
powerpc/km8360: fix the ODT parameters for CS0

The ODT parameters for km8360 set the ODT_WR_ACS bit in u-boot KM-2011.09
that is used in the release bootpackage for kmcoge5ne. During the
transition from the kmeter1 to km8360 this was changed to
ODT_RD_ONLY_CURRENT, which is uncorrect and causes faulty RAM accesses at
low temperatures.

This is now changed to ODT_WR_ONLY_CURRENT which is the equivalent of
ODT_WR_ACS.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/km8309: define CONFIG_SYS_DDRCDR
Valentin Longchamp [Tue, 17 Nov 2015 09:53:32 +0000 (10:53 +0100)]
powerpc/km8309: define CONFIG_SYS_DDRCDR

For consistency with all the other km83xx plaforms, this should also be
defined for km8309. The same settings as for km8321 are taken.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/km8321: define CONFIG_SYS_DDRCDR
Valentin Longchamp [Tue, 17 Nov 2015 09:53:31 +0000 (10:53 +0100)]
powerpc/km8321: define CONFIG_SYS_DDRCDR

On the km8321 boards is CONFIG_SYS_DDRCDR not defined, which leads to
the DDRCDR not being configured at startup and still containing the
reset value.

The required settings for our km8321 hardware designs are different than
the reset value and must be set with CONFIG_SYS_DDRCDR, that is used
by mpc83xx's cpu_init_f function at early CPU initialization.

The important settings are the DDR2 internal voltage level and the
half-strength "drivers".

In our case where the DRAM chips are soldered on board and the routing
for these signals under control, half-strength is sufficient as a few
measurements done in the lasts have shown. Since all the hardware
qualification tests have been performed with half strength, the nominal
strength settings are removed in favor of the default reset half
strength settings.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm/powerpc82xx: remove unused function
Holger Brunck [Tue, 17 Nov 2015 09:53:30 +0000 (10:53 +0100)]
km/powerpc82xx: remove unused function

commit 0a4f88b98 removed the usage of our setports function, but the
function itself were not removed. So toss it it's dead code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm/powerpc: remove unneeded defines
Holger Brunck [Tue, 17 Nov 2015 09:53:29 +0000 (10:53 +0100)]
km/powerpc: remove unneeded defines

We use CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP on all our powerpc
targets, so there is no need to check these defines within our C code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm/powerpc: move open firmware defines to km-powerpc.h
Holger Brunck [Tue, 17 Nov 2015 09:53:28 +0000 (10:53 +0100)]
km/powerpc: move open firmware defines to km-powerpc.h

We use the same settings for open firmware defines on all our powerpc
targets, so move them from the CPU specific headers to the common
powerpc header.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm/powerpc: increase space for kernel imange and FDT blob
Holger Brunck [Tue, 17 Nov 2015 09:53:27 +0000 (10:53 +0100)]
km/powerpc: increase space for kernel imange and FDT blob

128kByte and 3,986MB may be in the future too little for kernel the fdt
blob respectively the kernel image. So increase the reserved areas here,
we have the space for this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/82xx/km: add testpin detection for mgcoge3ne
Holger Brunck [Tue, 17 Nov 2015 09:53:26 +0000 (10:53 +0100)]
powerpc/82xx/km: add testpin detection for mgcoge3ne

On mgcoge3ne we also want to start the test application if the testpin
is asserted. But we don't have a full POST test support yet. So simply
add a function to read the testpin value.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/82xx: make set/get_pin for km82xx more flexible
Holger Brunck [Tue, 17 Nov 2015 09:53:25 +0000 (10:53 +0100)]
powerpc/82xx: make set/get_pin for km82xx more flexible

The get_pin and set_pin funciton was only used for pins on Port D and
therefore the value was hard coded in the function. Enhance this with a
parameter, that we are able to use this functions for other ports too.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agopowerpc/83xx: add support for kmtepr2 board
Christoph Dietrich [Tue, 17 Nov 2015 09:53:24 +0000 (10:53 +0100)]
powerpc/83xx: add support for kmtepr2 board

This board is similar to TUXX1, but it has differend FPGAs.

Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agokm/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode
Tobias Müller [Fri, 13 Nov 2015 15:15:22 +0000 (16:15 +0100)]
km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode

Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM)
at the TFTP server instead of the u-boot boardname.

Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agokm/scripts: load fdt_bid_kwkey.dtb when working with tftp
Holger Brunck [Fri, 13 Nov 2015 15:15:21 +0000 (16:15 +0100)]
km/scripts: load fdt_bid_kwkey.dtb when working with tftp

When loading the dtb file via tftp we should load the one which matches
boardId and hwKey and not a common one for the boardname. We have boards
were different hwKeys are used and then we may load an incorrect dtb
file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agokm: update the boot script to check for a DTB
Valentin Longchamp [Fri, 13 Nov 2015 15:15:20 +0000 (16:15 +0100)]
km: update the boot script to check for a DTB

If a DTB is found with cramfsls, the bootscript continues as expected.
If none is found, the cramfsloadfdt and boot subbootcmds are updated to
not load the DTB from cramfs and not pass it to the kernel. The kernel
thus must have an appended DTB otherwise the boot will fail.

This is required for the km_kirkwood boards that must support .esw where
the DTB sometimes is appended (for backwards compatibility) and sometimes
is passed correctly (as we do now for all newer boards).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agokm/common: stop u-boot only if someone press <SPACE>
Holger Brunck [Fri, 13 Nov 2015 15:15:19 +0000 (16:15 +0100)]
km/common: stop u-boot only if someone press <SPACE>

To prevent u-boot to stop accidently e.g. due to line noise on the
serial line, we now use the option CONFIG_AUTOBOOT_KEYED. We choose the
<SPACE> key for this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoarm/km_kirkwood: fix the #ifdef for KM_COGE5UN dip switch
Valentin Longchamp [Fri, 13 Nov 2015 14:01:17 +0000 (15:01 +0100)]
arm/km_kirkwood: fix the #ifdef for KM_COGE5UN dip switch

There was a small typo for KM_COGE5UN that resulted in the dip switch
not to behave as expected.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agoarm/mgcoge3un: check dip_switch at startup
Holger Brunck [Fri, 13 Nov 2015 14:01:16 +0000 (15:01 +0100)]
arm/mgcoge3un: check dip_switch at startup

Similar to kmcoge5un we need to check the dip switch at startup
connected to the kirkwood at MPP43. If it's set we need to set the
actual_bank to zero to boot from SW bank zero. Additional to kmcoge5un
we need to check also the pin in misc_init to decide wether we wait for
the ne to start or not. If the dip_switch is set we don't wait and
continue immediately.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agoarm/km: Fix LED configuration for 88E1118R PHY (PIGGY3)
Tobias Müller [Fri, 13 Nov 2015 14:01:15 +0000 (15:01 +0100)]
arm/km: Fix LED configuration for 88E1118R PHY (PIGGY3)

Configure PHY LED register for Marvell 88E1118R PHY used on PIGGY3 to
match with printed descriptions on PCB

Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[trini: Fix typo, CRTL_PAGE -> CTRL_PAGE]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoarm/km_kirkwood: remove KM_ENV_BUS and use CONFIG_I2C_ENV_EEPROM_BUS
Valentin Longchamp [Fri, 13 Nov 2015 14:01:14 +0000 (15:01 +0100)]
arm/km_kirkwood: remove KM_ENV_BUS and use CONFIG_I2C_ENV_EEPROM_BUS

KM_ENV_BUS was used for nothing else than an direct assignment to
CONFIG_I2C_ENV_EEPROM_BUS. To avoid this, directly use
CONFIG_I2C_ENV_EEPROM_BUS instead.

Patchwork: http://patchwork.ozlabs.org/patch/399411/
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
9 years agoboard/ti/am335x: add support for BeagleBone Green
robertcnelson@gmail.com [Wed, 11 Nov 2015 15:10:52 +0000 (09:10 -0600)]
board/ti/am335x: add support for BeagleBone Green

SeeedStudio BeagleBone Green (BBG) is clone of the BeagleBone Black (BBB) minus
the HDMI port and addition of two Grove connectors (i2c2 and usart2).

This board can be identified by the 1A value after A335BNLT (BBB) in the at24 eeprom:
1A: [aa 55 33 ee 41 33 33 35  42 4e 4c 54 1a 00 00 00 |.U3.A335BNLT....|]

http://beagleboard.org/green
http://www.seeedstudio.com/wiki/Beaglebone_green

In Mainline Kernel as of:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=79a4e64c679d8a0b1037da174e4aea578c80c4e6

Patch tested on BeagleBone Black (rev C) and BeagleBone Green (production model)

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agocommon: add CMD_GPIO to Kconfig
Thomas Chou [Wed, 11 Nov 2015 13:39:33 +0000 (21:39 +0800)]
common: add CMD_GPIO to Kconfig

Add CMD_GPIO to Kconfig and run tools/moveconfig.py .

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agogit-mailrc: Add Bin as a maintainer of x86
Bin Meng [Wed, 11 Nov 2015 02:13:34 +0000 (18:13 -0800)]
git-mailrc: Add Bin as a maintainer of x86

This updates git-mailrc to add me as a maintainer of x86.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoomap3: cm-t3517: add board specific get_board_rev()
Dmitry Lifshitz [Tue, 10 Nov 2015 13:17:44 +0000 (15:17 +0200)]
omap3: cm-t3517: add board specific get_board_rev()

CM-T3517 has several HW revisions.
Add board specific get_board_rev() callback to retrieve revision number.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Reviewed-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agospl: mmc: add support for BOOT_DEVICE_MMC2
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:54 +0000 (17:11 +0200)]
spl: mmc: add support for BOOT_DEVICE_MMC2

Currently the mmc device that SPL looks at is always mmc0, regardless
of the BOOT_DEVICE_MMCx value. This forces some boards to
implement hacks in order to boot from other mmc devices.

Make SPL take into account the correct mmc device.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoarm: mx6: cm-fx6: define fallback boot devices for spl
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:53 +0000 (17:11 +0200)]
arm: mx6: cm-fx6: define fallback boot devices for spl

Use spl alternate boot device feature to define fallback to
the main boot device as it is defined by hardware.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
9 years agospl: announce boot devices
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:52 +0000 (17:11 +0200)]
spl: announce boot devices

Now that we support alternative boot devices, it can sometimes be
unclear which boot devices was actually used. Provide a function to
announce which boot devices are attempted during boot.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agospl: add support for alternative boot device
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:51 +0000 (17:11 +0200)]
spl: add support for alternative boot device

Introduce spl_boot_list array, which defines a list of boot devices
that SPL will try before hanging. By default this list will consist
of only spl_boot_device(), but board_boot_order() can be overridden
by board code to populate the array with custom values.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agocommon: spl: move image load to its own function
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:50 +0000 (17:11 +0200)]
common: spl: move image load to its own function

Refactor spl image load code out of board_init_r and into its own
function. This is a preparation for supporting alternative boot
devices.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: change return values of spl_*_load_image()
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:49 +0000 (17:11 +0200)]
spl: change return values of spl_*_load_image()

Make spl_*_load_image() functions return a value instead of
hanging if a problem is encountered. This enables main spl code
to make the decision whether to hang or not, thus preparing
it to support alternative boot devices.

Some boot devices (namely nand and spi) do not hang on error.
Instead, they return normally and SPL proceeds to boot the
contents of the load address. This is considered a bug and
is rectified by hanging on error for these devices as well.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans De Goede <hdegoede@redhat.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agospl: mmc: get rid of emmc boot code duplication
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:48 +0000 (17:11 +0200)]
spl: mmc: get rid of emmc boot code duplication

Get rid of emmc boot code duplication in spl_mmc_load_image() using a switch
case fallthrough into MMCSD_MODE_RAW. Since the #ifdef CONFIG_SUPPORT_EMMC_BOOT
check is not really necessary, remove it in the process.

No functional changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: mmc: move fs boot into its own function
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:47 +0000 (17:11 +0200)]
spl: mmc: move fs boot into its own function

Move the code that handles fs boot out of spl_mmc_load_image() and into its
own function to reduce the #ifdef complexity of spl_mmc_load_image().

No functional changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: mmc: get rid of #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION check
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:46 +0000 (17:11 +0200)]
spl: mmc: get rid of #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION check

Implement defaults for the raw partition image loading so that the #ifdef
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION in spl_mmc_load_image() will no
longer be necessary.

This change makes it possible for mmc_load_image_raw_partition() and
mmc_load_image_raw_sector() to coexist.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:45 +0000 (17:11 +0200)]
spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check

Implement default versions of falcon mode functions to make the
CONFIG_SPL_OS_BOOT check in spl_mmc_load_image() unnecessary, thus reducing
its #ifdef complexity.

No functional changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: mmc: refactor device location code to its own function
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:44 +0000 (17:11 +0200)]
spl: mmc: refactor device location code to its own function

Simplify spl_mmc_load_image() code by moving the part that finds the mmc device
into its own function spl_mmc_find_device(), available in two flavors: DM and
non-DM.

This refactor fixes a bug in which an error in the device location sequence
does not necessarily aborts the rest of the code. With this refactor, we fail
the moment there is an error.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: mmc: add break statements in spl_mmc_load_image()
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:43 +0000 (17:11 +0200)]
spl: mmc: add break statements in spl_mmc_load_image()

The original intention of the mmc load_image() function was to try multiple
boot modes before failing. This is evident by the lack of break statements
in the switch, and the following line in the default case:
puts("spl: mmc: no boot mode left to try\n");

This implementation is problematic because:
- The availability of alternative boot modes is very arbitrary since it
depends on the specific order of the switch cases. If your boot mode happens to
be the first case, then you'll have a bunch of other boot modes as alternatives.
If it happens to be the last case, then you have none.
- Opting in/out is tied to config options, so the only way for you to prevent an
alternative boot mode from being attempted is to give up on the feature completely.
- This implementation makes the code more complicated and difficult to
understand.

Address these issues by inserting a break statements between the cases to make the
function try only one boot mode.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agospl: nand: remove code duplication
Nikita Kiryanov [Sun, 8 Nov 2015 15:11:42 +0000 (17:11 +0200)]
spl: nand: remove code duplication

Remove code duplication in spl_nand_load_image().

No functional changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Add back cast to unsigned long of spl_image.load_addr]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoAllow fw env tools to be available as library
Stefano Babic [Fri, 30 Oct 2015 13:57:04 +0000 (14:57 +0100)]
Allow fw env tools to be available as library

Sometimes it can be useful to link the fw_ tools instead
of having the fw_setenv/fw_printenv installed.
Patch exports the tool as library and allowes to link it
with own programs.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoboard: ti: beagle_x15: Rename to indicate support for TI am57xx evms
Kipisz, Steven [Thu, 29 Oct 2015 21:50:43 +0000 (16:50 -0500)]
board: ti: beagle_x15: Rename to indicate support for TI am57xx evms

BeagleBoard X15 (http://beagleboard.org/x15) support in u-boot does
actually support two different platform configuration offered by
TI. In addition to BeagleBoard X15, it also supports the TMDXEVM5728
(or more commonly known as AM5728-evm).

Information about the TI AM57xx EVM can be found here
http://www.ti.com/tool/tmdxevm5728

The EVM configuration is 1-1 compatible with BeagleBoard X15 with the
additional support for mPCIe, mSATA, LCD, touchscreen, Camera, push
button and TI's wlink8 offering.

Hence, we rename the beagle_x15 directory to am57xx to support TI
EVMs that use the AM57xx processor. By doing this we have common code
reuse. This sets the stage to have a common u-boot image solution for
multiple TI EVMs such as that already done for am335x and am437x. This
sets the stage for upcoming multiple TI EVMs that share the same code
base.

NOTE: Commit eae7ae185335 ("am437x: Add am57xx_evm_defconfig using
CONFIG_DM") introduced DT support for beagle_x15 under am57xx_evm
platform name. However, this ignored the potential confusion arising for
users as a result. To prevent this, existing beagle_x15_defconfig is
renamed as am57xx_evm_nodt_defconfig to denote that this is the "non
device tree" configuration for the same platform. We still retain
am57xx-beagle-x15.dts at this point, since we just require the common
minimum dts.

As a result of this change, users should expect changes in build
procedures('make am57xx_evm_nodt_defconfig' instead of 'make
beagle_x15_defconfig'). Hopefully, this would be a one-time change.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Schuyler Patton <spatton@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agotools/env: allow config filename to be passed via command line argument
Michael Heimpold [Tue, 27 Oct 2015 21:34:49 +0000 (22:34 +0100)]
tools/env: allow config filename to be passed via command line argument

When for example generating/manipulating SD card/eMMC images which
contain U-Boot and its environment(s), it is handy to use a given
configuration file instead of the compiled-in default one.
And since the default configuration file is expected under /etc
it's hard for an usual linux user account without special permissions
to use fw_printenv/fw_setenv for this purpose.
So allow to pass an optional filename via a new '-c' command
line argument.

Example:

$ ln -s fw_printenv tools/env/fw_setenv
$ cat fw_env.config
test.img 0x20000 0x20000
test.img 0x40000 0x20000

$ tools/env/fw_printenv -c ./fw_env.config fdt_file
fdt_file=imx28-duckbill.dtb

$ tools/env/fw_setenv -c ./fw_env.config fdt_file imx28-duckbill-spi.dtb

$ tools/env/fw_printenv -c ./fw_env.config fdt_file
fdt_file=imx28-duckbill-spi.dtb

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
9 years agonios2: zap ioremap
Thomas Chou [Sat, 14 Nov 2015 03:30:30 +0000 (11:30 +0800)]
nios2: zap ioremap

Zap ioremap(), as it is replaced by map_physmem(,,MAP_NOCACHE).

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agonios2: dma-mapping.h: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:34:09 +0000 (11:34 +0800)]
nios2: dma-mapping.h: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_pio: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:26:51 +0000 (11:26 +0800)]
altera_pio: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_qspi: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:22:50 +0000 (11:22 +0800)]
altera_qspi: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_tse: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:21:16 +0000 (11:21 +0800)]
altera_tse: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_sysid: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:18:52 +0000 (11:18 +0800)]
altera_sysid: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_spi: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:17:25 +0000 (11:17 +0800)]
altera_spi: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_timer: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 03:15:31 +0000 (11:15 +0800)]
altera_timer: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_uart: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 02:38:09 +0000 (10:38 +0800)]
altera_uart: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoaltera_jtag_uart: change ioremap to map_physmem
Thomas Chou [Sat, 14 Nov 2015 02:36:49 +0000 (10:36 +0800)]
altera_jtag_uart: change ioremap to map_physmem

Change ioremap() to map_physmem(), as it is more used in u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agosf: Correct flash->flags for SST flash
Bin Meng [Mon, 16 Nov 2015 03:31:37 +0000 (19:31 -0800)]
sf: Correct flash->flags for SST flash

flash->flags for SST flash should be updated for both DM and non-DM
flash drivers.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 17 Nov 2015 22:57:32 +0000 (17:57 -0500)]
Merge git://git.denx.de/u-boot-marvell

9 years agoarm: kirkwood: ib62x0: drop duplicate defines from CONFIG_SYS_MVFS
Luka Perkov [Sat, 31 Oct 2015 20:28:44 +0000 (21:28 +0100)]
arm: kirkwood: ib62x0: drop duplicate defines from CONFIG_SYS_MVFS

These options were already defined in mv-common.h file.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: kirkwood: ib62x0: drop dev CONFIG_OF_LIBFDT
Luka Perkov [Sat, 31 Oct 2015 20:23:51 +0000 (21:23 +0100)]
arm: kirkwood: ib62x0: drop dev CONFIG_OF_LIBFDT

It is already defined in included mv-common.h file.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: kirkwood: ib62x0: make use of defconfig
Luka Perkov [Sat, 31 Oct 2015 20:23:34 +0000 (21:23 +0100)]
arm: kirkwood: ib62x0: make use of defconfig

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: kirkwood: ib62x0: drop CONFIG_CMD_ENV define
Luka Perkov [Sat, 31 Oct 2015 20:08:35 +0000 (21:08 +0100)]
arm: kirkwood: ib62x0: drop CONFIG_CMD_ENV define

The CONFIG_CMD_ENV is enabled by default so we can safely remove it.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: kirkwood: ib62x0: build u-boot.kwb
Luka Perkov [Sat, 31 Oct 2015 19:33:39 +0000 (20:33 +0100)]
arm: kirkwood: ib62x0: build u-boot.kwb

Avoid double typing in the shell and build u-boot.kwb when running "make" only.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
9 years agoarm: kirkwood: ib62x0: drop CONFIG_MACH_TYPE
Luka Perkov [Sat, 31 Oct 2015 19:32:04 +0000 (20:32 +0100)]
arm: kirkwood: ib62x0: drop CONFIG_MACH_TYPE

Mainline kernel for this device has only support for device tree. We can safely
drop this legacy code.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>