]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agokconfig: fix a bug of "make config"
Masahiro Yamada [Wed, 3 Sep 2014 20:41:34 +0000 (05:41 +0900)]
kconfig: fix a bug of "make config"

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make config" is not working because of a missing '$' before '(Q)'.

Besides, "make config" should be invoked via scripts/multiconfig.sh
to avoid a warning message:
Kconfig:11:warning: environment variable KCONFIG_OBJDIR undefined

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to handle TPL correctly
Masahiro Yamada [Wed, 3 Sep 2014 20:41:33 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to handle TPL correctly

Since 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script),
"make savedefconfig" of TPL boards has not been working.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.o.rg
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix whitespace handling bug of savedefconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:32 +0000 (05:41 +0900)]
kconfig: fix whitespace handling bug of savedefconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced another regression.

Shell usually handles whitespaces as separators,
so "make saveconfig" outputs

  # CONFIG_FOO is not set

into:

  #
  CONFIG_FOO
  is
  not
  set

Whitespaces should not be treated as separators here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: fix savedefconfig to output empty defconfig
Masahiro Yamada [Wed, 3 Sep 2014 20:41:31 +0000 (05:41 +0900)]
kconfig: fix savedefconfig to output empty defconfig

Commit 3ff291f371fa9858426774f3732924bacb61ed1c
(kconfig: convert Kconfig helper script into a shell script)
introduced a minor regression.

make alldefconfig; make savedefconfig
should create an empty 'defconfig'.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agostandalone: use GCC_VERSION defined in compiler-gcc.h
Masahiro Yamada [Wed, 3 Sep 2014 17:40:59 +0000 (02:40 +0900)]
standalone: use GCC_VERSION defined in compiler-gcc.h

Now GCC_VERSION is defined in include/linux/compiler-gcc.h
(with a little different definition).
Use it and delete the one in examples/standlone/stub.c.

This should work on Clang too because __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__ are also defined on Clang.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agocompiler*.h: sync include/linux/compiler*.h with Linux 3.16
Masahiro Yamada [Wed, 3 Sep 2014 17:40:58 +0000 (02:40 +0900)]
compiler*.h: sync include/linux/compiler*.h with Linux 3.16

Copy them from Linux v3.16 tag.
My main motivation of this commit is to add compiler-clang.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoimplement the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:54 +0000 (10:05 -0700)]
implement the Android sparse image format

update to provide usable implementation to U-Boot

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocleanup code which handles the Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:53 +0000 (10:05 -0700)]
cleanup code which handles the Android sparse image format

- port dprintf() to debug()
- update formatting

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoupdate code which handles Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:52 +0000 (10:05 -0700)]
update code which handles Android sparse image format

- remove unnecessary functions

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agoadd code to handle Android sparse image format
Steve Rae [Wed, 3 Sep 2014 17:05:51 +0000 (10:05 -0700)]
add code to handle Android sparse image format

Add original file (pristine) from :
  https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master
[3b5092d20bd15a7a2879c13e9f64acc48d04af2d]

Signed-off-by: Steve Rae <srae@broadcom.com>
9 years agocmd_mem: add static to internally used functions
Masahiro Yamada [Wed, 3 Sep 2014 15:38:26 +0000 (00:38 +0900)]
cmd_mem: add static to internally used functions

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokgdb: Remove first_entry for kgdb
Peng Fan [Mon, 1 Sep 2014 13:48:07 +0000 (21:48 +0800)]
kgdb: Remove first_entry for kgdb

There are two ways to run into handle_exception, run command 'kgdb' and
encounter a breakpoint which triggers exception handling.

The origin source code only saves regs when first run command 'kgdb'.
Take the following for example, When run 'kgdb', regs is saved to entry_regs.
When run 'bootz', regs is not saved. However, if we set a breakpoint, then
continue. When breakpoint is reached, run `quit`, and Now return to the
instruction which follows kgdb, but not bootz.This may cause errors. So,
save regs for each handle_exception call to return to the correct place.
Example:
Target      |    Host
=>kgdb      |    (gdb)b bootz
            |    (gdb)c
=>bootz     |
            |    (gdb)Here stop because of breakpoint
            |    (gdb)q

Signed-off-by: Peng Fan <van.freenix@gmail.com>
9 years agotools/genboardscfg.py: improve performance more with Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:38 +0000 (19:57 +0900)]
tools/genboardscfg.py: improve performance more with Kconfiglib

The idea of using Kconfiglib was given by Tom Rini.
It allows us to scan lots of defconfigs very quickly.
This commit also uses multiprocessing for further acceleration.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agotools: Import Kconfiglib
Masahiro Yamada [Mon, 1 Sep 2014 10:57:37 +0000 (19:57 +0900)]
tools: Import Kconfiglib

Kconfiglib is the flexible Python Kconfig parser and library
created by Ulf Magnusson.
(https://github.com/ulfalizer/Kconfiglib)

This commit imports kconfiglib.py from
commit ce84c22e58fa59cb93679d4ead03c3cd1387965e,
with ISC SPDX-License-Identifier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agoSPDX: Add ISC SPDX-License-Identifier
Masahiro Yamada [Mon, 1 Sep 2014 10:57:36 +0000 (19:57 +0900)]
SPDX: Add ISC SPDX-License-Identifier

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
9 years agokbuild: force to define __UBOOT__ in all the C sources
Masahiro Yamada [Sun, 31 Aug 2014 06:16:53 +0000 (15:16 +0900)]
kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

  #ifdef __UBOOT__
    [ modification for U-Boot ]
  #else
    [ original code ]
  #endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agortl8169: Defer network packet processing
Thierry Reding [Thu, 28 Aug 2014 10:38:03 +0000 (12:38 +0200)]
rtl8169: Defer network packet processing

When network protocol errors occur (such as a file not being found on a
TFTP server), the processing done by the NetReceive() function will end
up calling the driver's .halt() implementation. However, after that the
device no longer has access to the memory buffers and will cause errors
such as this in the rtl_recv() function when trying to hand descriptors
back to the device:

pci_hose_bus_to_phys: invalid physical address

This can be fixed by deferring processing of network packets until the
descriptors have been handed back. That way rtl_halt() tearing down
network buffers is not going to prevent access to the buffers.

Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoopenrisc: Fix a few type cast related warnings
Vasili Galka [Tue, 26 Aug 2014 10:46:17 +0000 (13:46 +0300)]
openrisc: Fix a few type cast related warnings

Use size_t type for positive offsets instead of the loff_t type. The
later is defined as long long, which is larger than the pointer type
on OpenRISC architecture and therefore the following warning was
generated:

"warning: cast to pointer from integer of different size"

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agoFix a few printf argument verification warnings
Vasili Galka [Tue, 26 Aug 2014 10:45:48 +0000 (13:45 +0300)]
Fix a few printf argument verification warnings

The parameters of size_t type shall be formatted using "%zu" and not
using "%d".

Precision argument for the "%.*s" parameters shall be of int type.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
9 years agocosmetic: README.scrapyard: add NIOS2 boards
Masahiro Yamada [Mon, 25 Aug 2014 01:37:49 +0000 (10:37 +0900)]
cosmetic: README.scrapyard: add NIOS2 boards

Commit 70fbc461 removed obsolete PCI5441 and PK1C20 boards.
This commit adds them to README.scrapyard and also fills
some commit IDs and dates for removed boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
9 years agokconfig: remove redundant "string" type in arch and board Kconfigs
Masahiro Yamada [Sat, 13 Sep 2014 18:01:49 +0000 (03:01 +0900)]
kconfig: remove redundant "string" type in arch and board Kconfigs

Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
are specified in arch/Kconfig.

We can delete the ones in arch and board Kconfig files.

This commit can be easily reproduced by the following command:

find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
/config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
}
'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig
Masahiro Yamada [Sat, 13 Sep 2014 18:01:48 +0000 (03:01 +0900)]
kconfig: add CONFIG_SYS_{ARCH, CPU, ...} type def to arch/Kconfig

This commit adds the type definitions (+ help messages) of
CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} to arch/Kconfig,
which would save lots of type defs for taget boards.
(See also the next commit.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-dm
Tom Rini [Sat, 13 Sep 2014 20:32:52 +0000 (16:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-dm

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 12 Sep 2014 15:27:46 +0000 (11:27 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoarm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:34 +0000 (23:32 +0200)]
arm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG

The boards using CONFIG_SYS_DV_NOR_BOOT_CFG (i.e. calimain,
da850evm_direct_nor and enbw_cmc) had the _start symbol defined after
the CONFIG_SYS_DV_NOR_BOOT_CFG word rather than before it in
arch/arm/lib/vectors.S. Because of that, if by lack of luck
'gd->mon_len = (ulong)&__bss_end - (ulong)_start' (see setup_mon_len())
was a multiple of 4 kiB (see reserve_uboot()), then the last BSS word
overlapped the first word of the following reserved RAM area (or went
beyond the top of RAM without such an area) after relocation because
__image_copy_start did not match _start (see relocate_code()).

This was broken by commit 41623c9 'arm: move exception handling out of
start.S files', which defined _start twice (before and after the
CONFIG_SYS_DV_NOR_BOOT_CFG word), then by commit 0a26e1d 'arm: fix a
double-definition error of _start symbol', which kept the definition of
the _start symbol after the CONFIG_SYS_DV_NOR_BOOT_CFG word. This new
commit fixes this issue by restoring the original behavior, i.e. by
defining the _start symbol before the CONFIG_SYS_DV_NOR_BOOT_CFG word.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Heiko Schocher <hs@denx.de>
9 years agoarm: Make reset position-independent
Benoît Thébaudeau [Wed, 3 Sep 2014 21:32:33 +0000 (23:32 +0200)]
arm: Make reset position-independent

Some boards, like mx31pdk and tx25, require the beginning of the SPL
code to be position-independent. For these two boards, this is because
they use the i.MX external NAND boot, which starts by executing the
first NAND Flash page from the NFC page buffer. The SPL then needs to
copy itself to its actual link address in order to free the NFC page
buffer and use it to load the non-SPL image from Flash before running
it. This means that the SPL runtime address differs from its link
address between the reset and the initial copy performed by
board_init_f(), so this part of the SPL binary must be
position-independent.

This requirement was broken by commit 41623c9 'arm: move exception
handling out of start.S files', which used an absolute address to branch
to the reset routine. This new commit restores the original behavior,
which just performed a relative branch. This fixes the boot of mx31pdk
and tx25.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Reported-by: Helmut Raiger <helmut.raiger@hale.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: John Rigby <jcrigby@gmail.com>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
9 years agoimx: mx6slevk: Change to use generic board
Ye.Li [Tue, 9 Sep 2014 06:51:58 +0000 (14:51 +0800)]
imx: mx6slevk: Change to use generic board

Enable CONFIG_SYS_GENERIC_BOARD for imx6slevk to use generic board.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoimx: mx6q/dlarm2: Change to use generic board
Ye.Li [Tue, 9 Sep 2014 06:51:57 +0000 (14:51 +0800)]
imx: mx6q/dlarm2: Change to use generic board

Enable the CONFIG_SYS_GENERIC_BOARD for imx6q/dl arm2 board to
use generic board.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoREADME.imximage: Fix the maximum DCD size
Fabio Estevam [Tue, 9 Sep 2014 15:28:18 +0000 (12:28 -0300)]
README.imximage: Fix the maximum DCD size

In commit 021e79c85371 ("tools: imximage: Fix the maximum DCD size for
mx53/mx6") we have fixed the maximum DCD size for mx53/mx53.

Do the same on the README document for consistency.

Reported-by: Jonas Karlsson <jonas.d.karlsson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx: Fix build of mx6sxsabresd
Stefano Babic [Wed, 10 Sep 2014 11:02:40 +0000 (13:02 +0200)]
imx: Fix build of mx6sxsabresd

Commit 224beb833e544b802f08765271cec07667d39669 add clock
enabling function for FEC, but the masks are not available
for SX processor and the mx6sxsabresd cannot be built clean.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoREADME.clang: build command with clang
Jeroen Hofstee [Wed, 10 Sep 2014 18:08:52 +0000 (20:08 +0200)]
README.clang: build command with clang

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agoMakefile: default to cc for host compiler
Jeroen Hofstee [Wed, 10 Sep 2014 18:08:51 +0000 (20:08 +0200)]
Makefile: default to cc for host compiler

Since the host compiler might not be gcc but e.g. clang
default to cc/c++ to invoke it.

cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agodm: tegra: Enable driver model for serial
Simon Glass [Thu, 4 Sep 2014 22:27:36 +0000 (16:27 -0600)]
dm: tegra: Enable driver model for serial

Use driver model for serial ports.

Since Tegra now uses driver model for serial, adjust the definition of
V_NS16550_CLK so that it is clear that this is only used for SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotegra: dts: Add serial port details
Simon Glass [Thu, 4 Sep 2014 22:27:35 +0000 (16:27 -0600)]
tegra: dts: Add serial port details

Some Tegra device tree files do not include information about the serial
ports. Add this and also add information about the input clock speed.

The console alias needs to be set up to indicate which port is used for
the console.

Also add a binding file since this is missing.

Series-changes; 5
- Add full serial port nodes from Linux tree (commit fc9d4dbe)
- Use /chosen/stdout-path instead of /aliases/console to specify the console

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Add driver model support for ns16550
Simon Glass [Thu, 4 Sep 2014 22:27:34 +0000 (16:27 -0600)]
dm: serial: Add driver model support for ns16550

Add driver model support so that ns16550 can support operation both with
and without driver model.

The driver needs a clock frequency so cannot stand alone unfortunately. The
clock frequency must be provided by a separate driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Collect common baud rate code in ns16550
Simon Glass [Thu, 4 Sep 2014 22:27:33 +0000 (16:27 -0600)]
dm: serial: Collect common baud rate code in ns16550

The same sequence is used in several places, so move it into a function.
Note that UART_LCR_BKSE is an alias for UART_LCR_DLAB.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Move baud rate calculation to ns16550.c
Simon Glass [Thu, 4 Sep 2014 22:27:32 +0000 (16:27 -0600)]
dm: serial: Move baud rate calculation to ns16550.c

Move the function that calculates the baud rate divisor into ns16550.c so
it can be used by that file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: dts: Add a serial console node
Simon Glass [Thu, 4 Sep 2014 22:27:29 +0000 (16:27 -0600)]
sandbox: dts: Add a serial console node

If the sandbox device tree is provided to U-Boot (with the -d flag) then it
will use the device tree version in preference to the built-in device. The
only difference is the colour.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: serial: Support a coloured console
Simon Glass [Thu, 4 Sep 2014 22:27:28 +0000 (16:27 -0600)]
sandbox: serial: Support a coloured console

The current sandbox serial driver is a pretty trivial example and does not
have the featues that might be needed for other board serial drivers. To
help provide a better example, add a text colour property to the device
tree for sandbox. This uses platform data, a device tree node, driver
private data and a remove() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: Convert serial driver to use driver model
Simon Glass [Thu, 4 Sep 2014 22:27:27 +0000 (16:27 -0600)]
sandbox: Convert serial driver to use driver model

Adjust the sandbox serial driver to use the new driver model uclass. The
driver works much as before, but within the new framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Add a uclass for serial devices
Simon Glass [Thu, 4 Sep 2014 22:27:26 +0000 (16:27 -0600)]
dm: Add a uclass for serial devices

Serial devices support simple byte input/output and a few operations to find
out whether data is available. Add a basic uclass for serial devices to be
used by drivers that are converted to driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Adjust lists_bind_fdt() to return the bound device
Simon Glass [Thu, 4 Sep 2014 22:27:25 +0000 (16:27 -0600)]
dm: Adjust lists_bind_fdt() to return the bound device

Allow the caller to find out the device that was bound in response to this
call.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: fdt: Add a function to look up a chosen node
Simon Glass [Thu, 4 Sep 2014 22:27:24 +0000 (16:27 -0600)]
dm: fdt: Add a function to look up a chosen node

Within /chosen we may have a node which points to another node, similar
to how /aliases works. Add a helper function to do this lookup.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: Set up the 'priv' pointer when creating a serial device
Simon Glass [Thu, 4 Sep 2014 22:27:23 +0000 (16:27 -0600)]
serial: Set up the 'priv' pointer when creating a serial device

The stdio_dev structure has a private pointer for its creator, but it is
not set up by the serial system. Set it to point to the serial device so
that it can be found by code called by stdio.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotegra: Convert tegra GPIO driver to use driver model
Simon Glass [Wed, 3 Sep 2014 23:37:03 +0000 (17:37 -0600)]
tegra: Convert tegra GPIO driver to use driver model

This is an implementation of GPIOs for Tegra that uses driver model. It has
been tested on trimslice and also using the new iotrace feature.

The implementation uses a top-level GPIO device (which has no actual GPIOS).
Under this all the banks are created as separate GPIO devices.

The GPIOs are named as per the Tegra datasheet/header files: A0..A7, B0..B7,
..., Z0..Z7, AA0..AA7, etc.

Since driver model is not yet available before relocation, or in SPL, a
special function is provided for seaboard's SPL code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: tegra: Set up a pre-reloc malloc()
Simon Glass [Wed, 3 Sep 2014 23:37:02 +0000 (17:37 -0600)]
dm: tegra: Set up a pre-reloc malloc()

Allocate 1KB so that driver model can operate before relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Make driver model available before board_init()
Simon Glass [Wed, 3 Sep 2014 23:37:01 +0000 (17:37 -0600)]
dm: Make driver model available before board_init()

For some boards board_init() will change GPIOs, so we need to have driver
model available before then. Adjust the board init to arrange this, but
enable it for driver model only, just to be safe.

This does create additional #ifdef logic, but it is safer than trying to
make a pervasive change which may cause some boards to break.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoSet up stdio earlier when using driver model
Simon Glass [Wed, 3 Sep 2014 23:37:00 +0000 (17:37 -0600)]
Set up stdio earlier when using driver model

Since driver model registers itself with the stdio subsystem, and we
want to avoid delayed registration and other complexity associated with
the current serial console, move the stdio subsystem init earlier when
driver model is used for serial.

This simplifies the implementation. Should there be any problems with
this approach they can be dealt with as boards are converted over to
use driver model for serial.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Move pre-reloc init earlier to cope with board_early_init_f()
Simon Glass [Wed, 3 Sep 2014 23:36:59 +0000 (17:36 -0600)]
dm: Move pre-reloc init earlier to cope with board_early_init_f()

In order to support GPIO access in board_early_init_f() we must set up
driver model before this function is called. In any case, earlier is
better since driver model is (or will become) a key function for most
init.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Wed, 10 Sep 2014 10:59:49 +0000 (06:59 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze

9 years agomicroblaze: remove #ident directive to fix build error
Masahiro Yamada [Mon, 8 Sep 2014 09:05:26 +0000 (18:05 +0900)]
microblaze: remove #ident directive to fix build error

The microblaze-generic board fails to build at least
with the kernel.org crosstool:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_microblaze-linux.tar.xz

$ make CROSS_COMPILE=microblaze-linux- microblaze-generic_defconfig all
  [ snip ]
  CC      disk/part.o
  CC      disk/part_dos.o
  LD      disk/built-in.o
  CC      drivers/block/systemace.o
{standard input}: Assembler messages:
{standard input}:2495: Error: operation combines symbols in different segments
{standard input}:2496: Error: operation combines symbols in different segments
{standard input}:2499: Error: operation combines symbols in different segments
{standard input}:2500: Error: operation combines symbols in different segments
{standard input}:2505: Error: operation combines symbols in different segments
{standard input}:2506: Error: operation combines symbols in different segments
{standard input}:2515: Error: operation combines symbols in different segments
{standard input}:2516: Error: operation combines symbols in different segments
{standard input}:2519: Error: operation combines symbols in different segments
{standard input}:2520: Error: operation combines symbols in different segments
{standard input}:2529: Error: operation combines symbols in different segments
{standard input}:2530: Error: operation combines symbols in different segments
{standard input}:2533: Error: operation combines symbols in different segments
{standard input}:2534: Error: operation combines symbols in different segments
{standard input}:2539: Error: operation combines symbols in different segments
{standard input}:2540: Error: operation combines symbols in different segments
{standard input}:2549: Error: operation combines symbols in different segments
{standard input}:2550: Error: operation combines symbols in different segments
make[3]: *** [drivers/block/systemace.o] Error 1
make[2]: *** [drivers/block] Error 2
make[1]: *** [drivers] Error 2
make: *** [__build_one_by_one] Error 2

It looks like the cause of this error message is the "#ident" directive.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge branch 'buildman' of git://git.denx.de/u-boot-x86
Tom Rini [Wed, 10 Sep 2014 00:02:43 +0000 (20:02 -0400)]
Merge branch 'buildman' of git://git.denx.de/u-boot-x86

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Wed, 10 Sep 2014 00:01:59 +0000 (20:01 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agobuildman: fix typos of --dry-run help message
Masahiro Yamada [Thu, 4 Sep 2014 17:23:27 +0000 (02:23 +0900)]
buildman: fix typos of --dry-run help message

try run    => dry run
no nothing => do nothing
"..."      => '...'

The last one is for consistency with the other option helps.

Change-Id: I1d69047d1fae6ef095a18f69f44ee13c448db9b7
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Create parent directories as necessary
Thierry Reding [Tue, 19 Aug 2014 08:22:39 +0000 (10:22 +0200)]
buildman: Create parent directories as necessary

When creating build directories also create parents as necessary. This
fixes a failure when building a hierarchical branch (i.e. foo/bar).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@ti.com>
9 years agopatman: make run results better visible
Vadim Bendebury [Thu, 4 Sep 2014 17:45:13 +0000 (10:45 -0700)]
patman: make run results better visible

For an occasional user of patman some failures are not obvious: for
instance when checkpatch reports warnings, the dry run still reports
that the email would be sent. If it is not dry run, the warnings are
shown on the screen, but it is not clear that the email was not sent.

Add some code to report failure to send email explicitly.

Tested by running the script on a patch with style violations,
observed error messages in the script output.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Ignore conflicting tags
Simon Glass [Sat, 6 Sep 2014 01:00:23 +0000 (19:00 -0600)]
buildman: Ignore conflicting tags

Tags like Series-version are normally expected to appear once, and with a
unique value. But buildman doesn't actually look at these tags. So ignore
conflicts.

This allows bulidman to build a branch containing multiple patman series.

Reported-by: Steve Rae <srae@broadcom.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Permit branch names with an embedded '/'
Simon Glass [Sat, 6 Sep 2014 01:00:22 +0000 (19:00 -0600)]
buildman: Permit branch names with an embedded '/'

At present buildman naively uses the branch name as part of its directory
path, which causes problems if the name has an embedded '/'.

Replace these with '_' to fix the problem.

Reported-by: Steve Rae <srae@broadcom.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Expand output test to cover directory prefixes
Simon Glass [Sat, 6 Sep 2014 01:00:21 +0000 (19:00 -0600)]
buildman: Expand output test to cover directory prefixes

Now that buildman supports removing the build directory prefix from output,
add a test for it. Also ensure that output directories are removed when the
test completes.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Add additional functional tests
Simon Glass [Sat, 6 Sep 2014 01:00:20 +0000 (19:00 -0600)]
buildman: Add additional functional tests

This adds coverage of core features of the builder, including the
command-line options which affect building.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopatman: Start with a clean series when needed
Simon Glass [Sat, 6 Sep 2014 01:00:19 +0000 (19:00 -0600)]
patman: Start with a clean series when needed

For reasons that are not well-understood, GetMetaDataForList() can end up
adding to an existing series even when it appears that it should be
starting a new one.

Change from using a default constructor parameter to an explicit one, to
work around this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Provide an internal option to clean the outpur dir
Simon Glass [Sat, 6 Sep 2014 01:00:18 +0000 (19:00 -0600)]
buildman: Provide an internal option to clean the outpur dir

For testing it is useful to clean the output directory before running a
test. This avoids a test interfering with the results of a subsequent
test by leaving data around.

Add this feature as an optional parameter to the control logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Correct counting of build failures on retry
Simon Glass [Sat, 6 Sep 2014 01:00:17 +0000 (19:00 -0600)]
buildman: Correct counting of build failures on retry

When a build is to be performed, buildman checks to see if it has already
been done. In most cases it will not bother trying again. However, it was
not reading the return code from the 'done' file, so if the result was a
failure, it would not be counted. This depresses the 'failure' count stats
that buildman prints in this case.

Fix this bug by always reading the return code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Allow tests to have their own boards
Simon Glass [Sat, 6 Sep 2014 01:00:16 +0000 (19:00 -0600)]
buildman: Allow tests to have their own boards

Rather than reading boards.cfg, which may take time to generate and is not
necessarily suitable for running tests, create our own list of boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Avoid looking at config file or toolchains in tests
Simon Glass [Sat, 6 Sep 2014 01:00:15 +0000 (19:00 -0600)]
buildman: Avoid looking at config file or toolchains in tests

These files may not exist in the environment, or may not be suitable for
testing. Provide our own config file and our own toolchains when running
tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Set up bsettings outside the control module
Simon Glass [Sat, 6 Sep 2014 01:00:14 +0000 (19:00 -0600)]
buildman: Set up bsettings outside the control module

Move the bsettings code back to the main buildman.py file, so we can do
something different when testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Add a functional test
Simon Glass [Sat, 6 Sep 2014 01:00:13 +0000 (19:00 -0600)]
buildman: Add a functional test

Buildman currently lacks testing in many areas, including its use of git,
make and many command-line flags.

Add a functional test which covers some of these areas. So far it does
a fake 'build' of all boards for the current source tree.

This version reads the real ~/.buildman and boards.cfg files. Future work
will improve this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopatman: Provide a way to intercept commands for testing
Simon Glass [Sat, 6 Sep 2014 01:00:12 +0000 (19:00 -0600)]
patman: Provide a way to intercept commands for testing

Add a test point for the command module. This allows tests to emulate
the execution of commands. This provides more control (since we can make
the fake 'commands' do whatever we like), makes it faster to write tests
since we don't need to set up as much environment, and speeds up test
execution.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Move full help code into the control module
Simon Glass [Sat, 6 Sep 2014 01:00:11 +0000 (19:00 -0600)]
buildman: Move full help code into the control module

There is no good reason to keep this code separate. Move it into control.py
so it is easier to test.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Move the command line code into its own file
Simon Glass [Sat, 6 Sep 2014 01:00:10 +0000 (19:00 -0600)]
buildman: Move the command line code into its own file

We want to be able to issue parser commands from within buildman for test
purposes. Move the parser code into its own file so we don't end up needing
the buildman and test modules to reference each other.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopatman: RunPipe() should not pipe stdout/stderr unless asked
Simon Glass [Sat, 6 Sep 2014 01:00:09 +0000 (19:00 -0600)]
patman: RunPipe() should not pipe stdout/stderr unless asked

RunPipe() currently pipes the output of stdout and stderr to a pty, but
this is not the intended behaviour. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Enhance basic test to check summary output
Simon Glass [Sat, 6 Sep 2014 01:00:08 +0000 (19:00 -0600)]
buildman: Enhance basic test to check summary output

Adjust the basic test so that it checks all console output. This will help
to ensure that the builder is behaving correctly with printing summary
information.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Send builder output through a function for testing
Simon Glass [Sat, 6 Sep 2014 01:00:07 +0000 (19:00 -0600)]
buildman: Send builder output through a function for testing

To allow us to verify the builder's console output, send it through a
function which can collect it when running in test mode.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agopatman: Add a way of recording terminal output for testing
Simon Glass [Sat, 6 Sep 2014 01:00:06 +0000 (19:00 -0600)]
patman: Add a way of recording terminal output for testing

When running unit tests we don't want output to go to the terminal.
Provide a way of collecting it so that it can be examined by test code
later.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomx6sxsabresd: Add PCI support
Fabio Estevam [Mon, 25 Aug 2014 17:26:46 +0000 (14:26 -0300)]
mx6sxsabresd: Add PCI support

Tested with an Intel Wireless PCI 7260HMW card:

U-Boot 2014.10-rc1-16576-g4a8a8a8-dirty (Aug 23 2014 - 16:05:11)

CPU:   Freescale i.MX6SX rev1.0 at 792 MHz
Reset cause: WDOG
Board: MX6SX SABRE SDB
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
  00:01.0     - 16c3:abcd - Bridge device
   01:00.0    - 8086:08b1 - Network controller

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agopcie_imx: Add mx6solox support
Fabio Estevam [Mon, 25 Aug 2014 17:26:45 +0000 (14:26 -0300)]
pcie_imx: Add mx6solox support

Let PCI on mx6solox also be supported.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agomx6: imx-regs: Provide a structure for GPC registers
Fabio Estevam [Mon, 25 Aug 2014 17:26:44 +0000 (14:26 -0300)]
mx6: imx-regs: Provide a structure for GPC registers

Introduce a structure for accessing the General Power Controller block (GPC)
registers.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agomx6qsabreauto: Remove imx6q-sabreauto.dts
Fabio Estevam [Fri, 5 Sep 2014 18:36:27 +0000 (15:36 -0300)]
mx6qsabreauto: Remove imx6q-sabreauto.dts

Commit fa9c021632473 ("mx6: add example DTB for mx6qsabreauto") introduced
'imx6q-sabreauto.dts' but it adds no real value as the dts file only contains
the 'model' and 'compatible' strings.

After this commit the final binary is also changed from 'u-boot.imx' to
'u-boot-dtb.imx', which may confuse users.

So revert it until a more complete and useful device tree could be provided.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agoimx: nitrogen6x: Replace 'fatload' by 'load' command in env settings to be filesystem...
Guillaume GARDET [Tue, 26 Aug 2014 10:05:31 +0000 (12:05 +0200)]
imx: nitrogen6x: Replace 'fatload' by 'load' command in env settings to be filesystem independent

nitrogen6x.h file defines CONFIG_CMD_FS_GENERIC, so we are able to use generic
'load' command instead of 'fatload'. It allows to use ext filesystem and keep
compatibilty with fat filesystem.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Stefano Babic <sbabic@denx.de>
Acked-By: Eric Nelson <eric.nelson@boundarydevices.com>
9 years agomx6dlsabresd: Use its own DCD table
Fabio Estevam [Thu, 21 Aug 2014 13:02:25 +0000 (10:02 -0300)]
mx6dlsabresd: Use its own DCD table

Currently mx6dlsabresd shares the same DCD settings with the nitrogen board.

Provide a DCD configuration file specific to mx6dlsabresd with the settings
recommended by the Freescale hardware team.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoarm: vf610: lpuart: disable FIFO on initializaton
Stefan Agner [Tue, 19 Aug 2014 15:54:28 +0000 (17:54 +0200)]
arm: vf610: lpuart: disable FIFO on initializaton

UART does not use the UART FIFO, but we should also not rely that
the UART FIFO is diabled by default. For instance, when loading
U-Boot using the boot ROMs serial downloader protocol over UART,
FIFO is enabled at U-Boot start time.

This patch disables the RX and TX FIFO, sets back their thresholds
and flushes them.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agoarm: vf610: lpuart: fix status register handling
Stefan Agner [Tue, 19 Aug 2014 15:54:27 +0000 (17:54 +0200)]
arm: vf610: lpuart: fix status register handling

The status register 1 (S1) is not writeable, hence we should not
write it. In order to clear the RDRF flag we only need to read
the data register.

Also, when stressing U-Boot a lot with serial input, an overflow can
occur which asserts the S1_OR flag (while not asserting the S1_RDRF
flag). To clear this flag we again just need to read the data
register, hence add this flag to the abort conditions for the while
loop.

Insert a compiler barrier to make sure reading the data register
gets executed after reading the status register.

Signed-off-by: Stefan Agner <stefan@agner.ch>
9 years agomx6: Fix ECSPI typo in soc_boot_modes
Nikolay Dimitrov [Sun, 10 Aug 2014 17:03:07 +0000 (20:03 +0300)]
mx6: Fix ECSPI typo in soc_boot_modes

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agoimximage: Fix imximage IVT bug for EIM-NOR boot
Ye.Li [Wed, 20 Aug 2014 08:55:32 +0000 (16:55 +0800)]
imximage: Fix imximage IVT bug for EIM-NOR boot

The load region size of EIM-NOR are defined to 0. For this case,
the parameter "imximage_init_loadsize" must be calculated.
The imximage tool implements the calculation in the "imximage_generate"
function, but the following function "imximage_set_header" resets the value
and not calculate. This bug cause some fields of IVT head are not
correct, for example the boot_data and DCD overlay the application area.

Signed-off-by: Ye.Li <B37916@freescale.com>
9 years agoiMX6: Disable the L2 before chaning the PL310 latency
Ye.Li [Wed, 20 Aug 2014 09:18:24 +0000 (17:18 +0800)]
iMX6: Disable the L2 before chaning the PL310 latency

The Latency parameters of PL310 Tag RAM latency control register and
Data RAM Latency control register are set in L2 cache enable. And
setting these registers must have PL310 NOT enabled.

But when using Plugin mode boot, the PL310 is enabled by bootrom.
The patch disables the PL310 before applying this setting.

Signed-off-by: Ye.Li <Ye.Li@freescale.com>
9 years agoimx: ventana: Avoid undefined behaviour
Thierry Reding [Fri, 22 Aug 2014 07:46:35 +0000 (09:46 +0200)]
imx: ventana: Avoid undefined behaviour

The leds array within struct ventana has space for 3 elements, but the
setup_board_gpio() function tries to set up 4 GPIOs for LEDs. Recent
versions of GCC complain about that:

board/gateworks/gw_ventana/gw_ventana.c: In function 'setup_board_gpio':
board/gateworks/gw_ventana/gw_ventana.c:987:27: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations]
   if (gpio_cfg[board].leds[i])
   ^
board/gateworks/gw_ventana/gw_ventana.c:986:2: note: containing loop
  for (i = 0; i < 4; i++) {
  ^

Fix this by making the upper bound of the loop match the array size.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
9 years agotools: imximage: Fix the maximum DCD size for mx53/mx6
Fabio Estevam [Mon, 1 Sep 2014 12:56:23 +0000 (09:56 -0300)]
tools: imximage: Fix the maximum DCD size for mx53/mx6

According to mx53 and mx6 reference manuals:

"The maximum size of the DCD limited to 1768 bytes."

As each DCD entry consists of 8 bytes, we have a total of 1768 / 8 = 221, and
excluding the first entry, which is the header leads to 220 as the maximum
number for DCD size.

Reported-by: Jonas Karlsson <jonas.d.karlsson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nitin Garg <nitin.garg@freescale.com>
Acked-by: Nitin Garg <nitin.garg@freescale.com>
9 years agoimx: ventana: add pci fixup for PLX PEX860x switch GPIO
Tim Harvey [Fri, 8 Aug 2014 05:49:57 +0000 (22:49 -0700)]
imx: ventana: add pci fixup for PLX PEX860x switch GPIO

Most Gateworks Ventana boards use a PLX PEX860x PCIe switch for PCIe expansion.
These boards use GPIO on the PLX device as PERST# for the downstream ports
thus we assert this when the PLX is enumerated.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agopci: add support for board_pci_fixup_dev function
Tim Harvey [Fri, 8 Aug 2014 05:49:56 +0000 (22:49 -0700)]
pci: add support for board_pci_fixup_dev function

Some board-level drivers may wish to have per-device fixup functions
for PCI devices.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm: mx6: cm_fx6: add sata support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:06 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add sata support

Add support for SATA.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: cm_fx6: use eeprom
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:05 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: use eeprom

Use Compulab eeprom module to obtain revision number, serial number, and
mac address from the EEPROM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: cm_fx6: add i2c support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:04 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add i2c support

Add support for all 3 I2C busses on Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: cm_fx6: add usb support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:03 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add usb support

Add USB and USB OTG host support for Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: cm_fx6: add ethernet support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:02 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add ethernet support

Add ethernet support for Compulab CM-FX6 CoM

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: cm_fx6: add nand support
Nikita Kiryanov [Wed, 20 Aug 2014 12:09:01 +0000 (15:09 +0300)]
arm: mx6: cm_fx6: add nand support

Add NAND support for Compulab CM-FX6 CoM.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: add support for Compulab cm-fx6 CoM
Nikita Kiryanov [Sun, 7 Sep 2014 15:59:29 +0000 (18:59 +0300)]
arm: mx6: add support for Compulab cm-fx6 CoM

Add initial support for Compulab CM-FX6 CoM.
Support includes MMC, SPI flash, and SPL with dynamic DRAM detection.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: add get_cpu_type()
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:59 +0000 (15:08 +0300)]
arm: mx6: add get_cpu_type()

Define get_cpu_type(). Reuse it in is_cpu_type().

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: ddr: fix cs0_end calculation
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:58 +0000 (15:08 +0300)]
arm: mx6: ddr: fix cs0_end calculation

Current way of calculation CS0_END field for MMDCx_MDASP register
is problematic because in most cases the user is forced to define
cs_density in an unnatural way: as value - 2, instead of value.

This breaks the abstraction provided by struct mx6_ddr_sysinfo
because the user is forced to be aware of the way the calculation
is performed.

Refactor the calculation.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agoarm: mx6: ddr: configure MMDC for slow_pd
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:57 +0000 (15:08 +0300)]
arm: mx6: ddr: configure MMDC for slow_pd

According to MX6 TRM, both MMDC and DRAM should be configured to
the same powerdown precharge. Currently, mx6_dram_cfg()
configures MMDC for fast pd (MDPDC[7] = 0), and the DRAM for
'slow exit (DLL off)' (MR0[12] = 0).

Configure MMDC for slow pd.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm: mx6: ddr: do not write into reserved bit
Nikita Kiryanov [Wed, 20 Aug 2014 12:08:56 +0000 (15:08 +0300)]
arm: mx6: ddr: do not write into reserved bit

Bit 16 in mapsr register is in a reserved field. Don't write to it.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>