Commit Graph

10790 Commits

Author SHA1 Message Date
Simon Glass 026090e4c5 x86: config: Increase CONFIG_SYS_BOOTM_LEN to 16MB
The code density of x86_64 is not wonderful. Increase the maximum boot
size and adjust the load address to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-29 13:11:54 -06:00
Wolfgang Denk 69445d6c56 powerpc: TQM5200: convert to generic board
Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-10-29 16:18:09 +01:00
Wolfgang Denk 23c5d253d5 powerpc: tqm8xx*: convert to generic board
This converts all TQM8xx boards (MPC8xx based) to generic board.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-10-29 16:18:08 +01:00
Stefan Roese 678398b19e i2c: designware: Convert driver to multibus/multiadapter framework
In preparation for the SoCFPGA support of the designware I2C driver,
convert this driver to the common CONFIG_SYS_I2C framework.

This patch converts all users of this driver, this is:

- ST spearxxx boards
- AXS101 (ARC700 platform)

I couldn't test this patch on those boards. Only compile tested for all
spear boards. And tested on SoCFPGA.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Vipin Kumar <vk.vipin@gmail.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-29 08:56:23 +01:00
Marek Vasut 1fa96e80ec i2c: mxs: Add basic support for i2c framework
This patch just converts the function prototypes used throughout
this driver to match those of the i2c framework. There is so far
no functional change. This patch does not do the deeper integration
of the framework bits.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
2014-10-29 08:55:46 +01:00
Simon Glass 5bda35cffa x86: image: Add new image type for x64_64
This is a bit odd in that we are permitted to boot images for either, even
though they are separate architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-28 20:44:04 -06:00
Simon Glass 92cc94a1fe x86: Display basic CPU information on boot
Display the type of CPU (x86 or x86_64) when starting up.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-28 20:42:56 -06:00
Wolfgang Denk d58a9451e7 ppc/arm: zap EMK boards
The following bard configurations have been without active maintenance
for a long time, and the board maintainer agrees to have them removed:

MPC5200:	TOP5200, MINI5200, EVAL5200
MPC860:		TOP860
at91sam9xeXXX:	top9000eval_xe, top9000su_xe

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
[trini: Add missing Kconfig removals]
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-28 12:48:31 -04:00
Tom Rini 93575c30ac Merge git://git.denx.de/u-boot-dm 2014-10-28 12:39:26 -04:00
Marcel Ziswiler 6c499abe05 e1000: add i211 and unprogrammed i210/i211 support
This patch adds support for i211 as well as unprogrammed aka tools only
i210/i211 chip support.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2014-10-28 07:13:56 -04:00
Przemyslaw Marczak 4367c71301 exynos: common: enable generic fs operations
This config is required by Odroid, and could be also useful for the other
boards.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-27 19:20:51 -06:00
Anatolij Gustschin 4a8c3f693e Use __stringify() instead of xstr()
Some boards still use xstr(). Replace remaining occurrences
of xstr() by commonly used __stringify().

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 17:54:13 -04:00
Matthias Fuchs f39c5d1e6a ppc4xx: update PMC440 board support
- switch to GENERIC_BOARD
- fix env support from eeprom

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
2014-10-27 17:54:13 -04:00
Robert P. J. Day 3bd6f7e782 Correct single misspelling of "consitant" in source tree.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2014-10-27 17:54:11 -04:00
Guillaume GARDET ee665114c5 TI:OMAP4: enable EXT support in SPL for OMAP4 boards
Enable EXT support in SPL for OMAP4 boards.
Build tested for duovero, omap4_sdp4430 and omap4_panda.
Run time tested on omap4_panda.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
2014-10-27 17:54:09 -04:00
Guillaume GARDET 592f922261 spl: Add EXT support to SPL
Add EXT filesystem support to SPL.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
[trini: Fix a warning and checkpatch problems]
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-27 17:54:03 -04:00
Guillaume GARDET 205b4f33cf Rename some defines containing FAT in their name to be filesystem generic
Rename some defines containing FAT in their name to be filesystem generic:
MMCSD_MODE_FAT => MMCSD_MODE_FS
CONFIG_SPL_FAT_LOAD_ARGS_NAME => CONFIG_SPL_FS_LOAD_ARGS_NAME
CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME => CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION => CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
2014-10-27 11:04:01 -04:00
Simon Glass c6da9ae8a4 Tidy up data sizes and function comment in display_options
Use inttypes.h and uint64_t to correct the code so that it will not issue
warnings on 64-bit machines where 'uint64_t' is 'unsigned long'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-27 11:04:01 -04:00
Simon Glass 19ea4678ca Use uint64_t for time types
Unfortunately 'unsigned long long' and 'uint64_t' are not necessarily
compatible on 64-bit machines. Use the correct typedef instead of
writing the supposed type out in full.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-27 11:04:01 -04:00
Gabe Black 4166ecb247 Add some standard headers external code might need
inttypes.h defines format specifiers for printf which work with data types of
particular sizes. stdlib.h is currently just a passthrough to malloc.h which
has declarations of the various *alloc functions.

Add the required #define to common.h so that these printf format specifiers
will be made available.

Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Replaced with a GPL version from glibc)
2014-10-27 11:04:01 -04:00
Gabe Black 0d296cc2d3 Provide option to avoid defining a custom version of uintptr_t.
There's a definition in stdint.h (provided by gcc) which will be more correct
if available.

Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make'
commmand.

This adjusts the settings for x86 and sandbox, with both have 64-bit options.

Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@google.com>
Rewritten to be an option, since stdint.h is often available only in glibc.
Changed to preserve a clear boundary between stdint and non-stdint
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-27 11:04:01 -04:00
Simon Glass 87b6398b46 cli: hush: Adjust 'run' command to run each line of the env var
The run command treats each argument an an environment variable. It gets the
value of each variable and executes it as a command. If an environment
variable contains a newline and the hush cli is used, it is supposed to
execute each line one after the other.

Normally a newline signals to hush to exit - this is used in normal command
line entry - after a command is entered we want to return to allow the user
to enter the next one. But environment variables obviously need to execute
to completion.

Add a special case for the execution of environment variables which
continues when a newline is seen, and add a few tests to check this
behaviour.

Note: it's not impossible that this may cause regressions in other areas.
I can't think of a case but with any change of behaviour with limited test
coverage there is always a risk. From what I can tell this behaviour has
been around since at least U-Boot 2011.03, although this pre-dates sandbox
and I have not tested it on real hardware.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-27 11:03:33 -04:00
Tom Rini 0cf8761549 Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx 2014-10-27 11:03:00 -04:00
Marek Vasut f06f9a1fb1 ppc: Zap TQM8272 board
This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Marek Vasut ccc1950010 ppc: Zap TQM8260 board
This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Marek Vasut 6afb3574c9 ppc: Zap IDS8247 board
This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Marek Vasut 4109cb023f ppc: Zap HWW1U1A board
This is the only used of CONFIG_SPI_X macro, just zap this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Marek Vasut 5038d7f189 ppc: Zap Hymod board
Remove this board as this is the only one last user of eeprom_probe(),
which is pretty non-standard stuff.

This patch also removes all the PHP, SQL and CSS stuff from U-Boot,
which probably makes U-Boot a bit less IoT ;-)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:55 +01:00
Marek Vasut 1655f9f6c7 ppc: Zap MHPC board
This board uses eeprom accessors in an incorrect way. The board
is old and unsupported, just zap it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:55 +01:00
Marek Vasut 4af5f0f3b4 ppc: Zap ICU862 board
This board is the only user of CONFIG_SYS_EEPROM_X40430 , remove
it so the EEPROM command code can be cleansed of the related code
as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:55 +01:00
Wolfgang Denk 03b004074f PowerPC: drop some 74xx_7xx boards and related code
The file  board/Marvell/include/mv_gen_reg.h  is incompatible with
the GPL (see for example the "MARVELL RESERVES THE RIGHT AT ITS SOLE
DISCRETION TO REQUEST THAT THIS CODE BE IMMEDIATELY RETURNED TO
MARVELL" clause).  As this cannot be fixed, we remove the file and all
code that depends on it.  Fortunately this only affects some very old
boards that have long reached EOL:
	CPCI750
	DB64360
	DB64460
	p3m750
	p3m7448

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
2014-10-27 14:35:55 +01:00
Anatolij Gustschin 77d4357df9 powerpc: digsy_mtc: convert to generic board
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 14:35:54 +01:00
Anatolij Gustschin 5b8cdd867e powerpc: mecp5123: convert to generic board
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
2014-10-27 14:35:54 +01:00
Anatolij Gustschin 37cf49c599 powerpc: ac14xx: convert to generic board
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 14:35:54 +01:00
Anatolij Gustschin 32ff89dc87 powerpc: aria: convert to generic board
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 14:35:54 +01:00
Anatolij Gustschin 8aad332e45 powerpc: pdm360ng: convert to generic board
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 14:35:54 +01:00
Anatolij Gustschin 10e99d8f80 powerpc: mpc5121ads: convert to generic board
Also enable CONFIG_DISPLAY_BOARDINFO to get checkboard() called.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2014-10-27 14:35:54 +01:00
Tom Rini 0ce4af99c0 Merge branch 'master' of git://git.denx.de/u-boot-imx 2014-10-27 09:08:42 -04:00
Tom Rini 5aa7bece10 Merge branch 'master' of git://git.denx.de/u-boot-ti 2014-10-27 09:05:43 -04:00
Tom Rini 674ca84d11 Merge branch 'master' of git://git.denx.de/u-boot-socfpga 2014-10-27 09:05:20 -04:00
Marek Vasut 20cadbbe2e arm: socfpga: config: Add USB support example
Add example configuration stub for the DWC2 USB controller.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Pavel Machek <pavel@denx.de>
2014-10-27 02:26:24 +01:00
Marek Vasut a22a584c1f arm: socfpga: Zap CONFIG_EPHY[01]_PHY_ADDR macro
This is not used anywhere, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Pavel Machek <pavel@denx.de>
2014-10-27 02:26:24 +01:00
Marek Vasut 34584d190d arm: socfpga: Zap spl.h and ad-hoc related syms
Switch to the common spl.h file and zap the arch/spl.h . Since the arch/spl.h
contained various ad-hoc symbols, zap those symbols as well and rework the
board configuration a little so it doesn't depend on them.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-27 02:26:24 +01:00
Marek Vasut fc520894d4 arm: socfpga: Move code from misc_init_r() to arch_early_init_r()
Move this initialization code to proper place. The misc_init_r()
function is called way too late and the platform initialization
code should be executed much earlier.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-27 02:26:24 +01:00
Masahiro Yamada 9345651200 arm: debug: replace license blocks with SPDX
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-26 22:22:09 +01:00
Masahiro Yamada 1cfe9fa012 arm: debug: import debug files from Linux 3.16
U-Boot does not have arch/arm/kernel, include/uapi directories,
This commit copies files as follows:

  Location in Linux               -> Location in U-Boot

  arch/arm/kernel/debug.S         -> arch/arm/lib/debug.S
  arch/arm/include/debug/8250.S   -> arch/arm/include/debug/8250.S
  include/uapi/linux/serial_reg.h -> include/linux/serial_reg.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-26 22:21:59 +01:00
Tom Rini d0796defbe Merge http://git.denx.de/u-boot-sunxi 2014-10-26 14:13:24 -04:00
Tom Rini 1fba907f9a Merge branch 'master' of git://git.denx.de/u-boot-usb 2014-10-26 14:12:18 -04:00
Tom Rini 84a6df09c7 Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h>

Conflicts:
	arch/arm/cpu/armv7/omap3/board.c

Signed-off-by: Tom Rini <trini@ti.com>
2014-10-26 14:03:08 -04:00
Jeroen Hofstee ce04822437 spl: add prototype for jump_to_image_no_args
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:37 -04:00
Jeroen Hofstee aeb8055584 mmc: add prototype for mmc_get_env_addr
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:37 -04:00
Jeroen Hofstee 611aee2bb7 ide: add missing prototype
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:37 -04:00
Jeroen Hofstee 5b5ac64560 gpio: add protype for name_to_gpio
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:36 -04:00
Jeroen Hofstee d50b07df28 fdt_support: add prototypes for __weak functions
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:36 -04:00
Jeroen Hofstee 6f38477d3a elf: add prototype for valid_elf_image
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:36 -04:00
Jeroen Hofstee f1bd871ad1 bootm: add prototype for arch_preboot_os
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 15:27:36 -04:00
Jeroen Hofstee 5afe73f576 string.h: add missing prototypes
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 07:27:37 -04:00
Ian Campbell 06beadb001 sunxi: Increase command line buffer size (CONFIG_SYS_CBSIZE)
I was running into this limit with a not overly long PXE append line.

Since the PXE code wants to print the resulting command line increase
CONFIG_SYS_PBSIZE too.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2014-10-24 09:35:39 +02:00
Chen-Yu Tsai c757a50bd1 ARM: sunxi: Add support for using R_UART as console
The A23 only has UART0 muxed with MMC0. Some of the boards we
encountered expose R_UART as a set of pads.

Add support for R_UART so we can have a console while using mmc.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:39 +02:00
Chen-Yu Tsai 8ebe4f4292 ARM: sunxi: Add basic A23 support
The basic blocks of the A23 are similar to the A31 (sun6i). Re-use
sun6i code for initial clock, gpio, and uart setup.

There is no SPL support for A23, as we do not have any documentation
or sample code for DRAM initialization.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:39 +02:00
Chen-Yu Tsai ff2b47f6a9 ARM: sunxi: Add support for uart0 on port F (mmc0)
Allwinner SoCs provide uart0 muxed with mmc0, which can then be used
with a micro SD breakout board. On the A23, this is the only way to
use uart0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:38 +02:00
Chen-Yu Tsai 41f8e9f5c4 ARM: sunxi: Fix build break when CONFIG_MMC is not defined
BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when
CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally
include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI.

This is used when we want to use uart0 from port F, which conflicts
with mmc0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:38 +02:00
Hans de Goede e711891685 sunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i
Many people are still using old linux-sunxi-3.4 kernels on sunxi devices,
adding the proper MACH_TYPE defines for this allows people to switch to
upstream u-boot, so that we can stop maintaining the linux-sunxi u-boot fork.

These machine-ids are all properly registered at:

http://www.arm.linux.org.uk/developer/machines/

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:38 +02:00
Hans de Goede cd82113a98 sunxi: Add mmc card-detect functionality
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:38 +02:00
Maxime Ripard 8a6564dacb ARM: sunxi: Add basic A31 support
Add a new sun6i machine that supports UART and MMC.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: use SPDX labels, adapt to Kconfig system, drop ifdef
		around mmc and smp code, drop MACH_TYPE]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:38 +02:00
Chen-Yu Tsai 859b3f1432 ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined
BOOT_TARGET_DEVICES includes USB unconditionally. This breaks when
CONFIG_CMD_USB is not defined. Use a secondary macro to conditionally
include it when CONFIG_EHCI is enabled, as we do for CONFIG_AHCI.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2014-10-24 09:35:37 +02:00
Masahiro Yamada ff247b7a0d serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-23 21:43:09 -06:00
Masahiro Yamada d064cbffff dm: serial: use Driver Model for UniPhier serial driver
This commit converts UniPhier on-chip serial driver to driver model.

Since UniPhier SoCs do not have Device Tree support, some board files
should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
(Device Tree support for UniPhier platform is still under way.)

Now the base address and master clock frequency are passed from
platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
CONFIG_SYS_UNIPHIER_UART_CLK should be removed.

Tested on UniPhier PH1-LD4 ref board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-23 21:43:09 -06:00
Masahiro Yamada 3fdd0bb2b0 serial: add static directive to local functions
The functions _serial_putc, _serial_putc_raw, _serial_puts,
_serial_getc, _serial_tstc, _serial_setbrg are defined and used
locally in each of serial_ns16550.c and serial_s3c24x0.c.

Add static directive to them and remove declarations from
include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-23 21:43:08 -06:00
Masahiro Yamada 86256b796e dm: move platform data headers to include/dm/platform_data
The platform_data definitions are generally referenced from both
drivers and board files.  That is why header files defining
platform_data sturectures are placed in "include" directory,
but our top level "include" directory is already too cluttered.

Let's collect platform_data definitions under the directory
"include/dm/platform_data" like Linux gathers ones around under
"include/linux/platform_data".

This commit moves two header files:

  include/serial_mxc.h -> include/dm/platform_data/serial_mxc.h
  include/serial_pl01x.h -> include/dm/platform_data/serial_pl01x.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-23 21:43:07 -06:00
Simon Glass e98a03ca68 dm: x86: Convert coreboot serial to use driver model
This makes use of the existing device tree node to use driver model
for the serial console.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:45:45 -06:00
Simon Glass 7414112d70 dm: x86: Convert Intel ICH6 GPIO driver to use driver model
Convert over this driver, using device tree to pass in the required
information. The peripheral is still probed, just the number of GPIO banks
and their offsets is in the device tree (previously this was a table in
the driver).

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:45:28 -06:00
Simon Glass 85bfe6e4f6 dm: gpio: Remove unused get_state() uclass method
This is no longer used so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:30:51 -06:00
Simon Glass 2d91a9772c dm: dts: Move omap device tree includes to correct place
These ended up in arch/arm/dts/dt-bindings temporarily, but in fact the
correct place is now include/dt-bindings. Move them to be consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:30:51 -06:00
Simon Glass 756ac0bb15 test: dm: Support memory leak checking as a core feature
Check the state of the malloc() heap before each test is run, so that tests
can verify that all is well at the end. Provide helper functions to mark
the heap and to check that it returns to its initial state.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:29:53 -06:00
Simon Glass d44f597b12 dm: gpio: Add gpio_requestf() helper for printf() strings
Add a helper which permits a printf()-style format string for the requester
string.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:29:52 -06:00
Simon Glass 0757535a7e dm: Move the function for getting GPIO status into the uclass
This function can be more easily tested if it is in the uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:29:52 -06:00
Simon Glass 6449a506d6 dm: gpio: Add gpio_get_function() and friends
Add helpers to the uclass to allow finding out the pin function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:29:52 -06:00
Simon Glass b892d127ff dm: gpio: Implement GPIO reservation in the uclass
We have several GPIO drivers now and all are doing similar things to record
which GPIOs are reserved.

Move this logic into the uclass to make the drivers similar.

We retain the request()/free() methods since currently one driver does use
these for setting up the pin.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-23 19:29:51 -06:00
Simon Glass b3f4ca1135 dm: omap3: Move to driver model for GPIO and serial
Adjust the configuration for the am33xx boards, including beagleboard,
to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
2014-10-23 19:29:07 -06:00
Simon Glass 1a44cd89fa dm: am33xx: Move to driver model for GPIO and serial
Adjust the configuration for the am33xx boards, including beaglebone black
to use driver model.

This can be extended to other OMAP boards once platform data is provided
for them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
2014-10-23 19:29:07 -06:00
Simon Glass 167efe01bc dm: ns16550: Use an address instead of a pointer for the uart base
It is inconvenient to have to use casts when specifying platform data. Also
it is not strictly correct, since we should use map_sysmem() to convert an
address to a pointer.

Adjust the platform data to use an address.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
2014-10-23 19:29:07 -06:00
Igor Grinberg 09bab6e770 musb: fix warning in include/linux/usb/musb.h
Fix the following build warning by including linux/compat.h:
include/linux/usb/musb.h:110: warning: 'struct device' declared inside
parameter list
include/linux/usb/musb.h:110: warning: its scope is only this definition
or declaration, which is probably not what you want

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2014-10-23 21:38:59 +02:00
Tom Rini 03a3536c7b Merge branch 'master' of git://git.denx.de/u-boot-tegra 2014-10-23 14:05:34 -04:00
Masahiro Yamada 45ccec8f29 kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.

Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
2014-10-23 13:19:09 -04:00
Masahiro Yamada 8c688bc4de kconfig: move CONFIG_SYS_HZ to lib/Kconfig
CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
(but some boards still have redundant definitions).

This commit moves the definition and the document in README to
Kconfig.  Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
the sanity check in lib/time.c should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2014-10-23 13:18:59 -04:00
Tom Rini 05180fc708 am335x_evm: Correct "raw" portions of DFU alt into
Signed-off-by: Tom Rini <trini@ti.com>
2014-10-23 11:53:01 -04:00
Felipe Balbi 76bfd1625a arm: am43xx: switch over to CONFIG_ENV_IS_IN_FAT
By using CONFIG_ENV_IS_IN_FAT it's far easier
to have a private, minimal environment for e.g.
booting off of network or mounting rootfs on NFS
without having to modify the configuration header.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-10-23 11:53:01 -04:00
Stefan Herbrechtsmeier f5c30c1b1c omap3: overo: Add usb host support
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2014-10-23 11:53:01 -04:00
Stefan Herbrechtsmeier f2565a551c omap3: overo: Call bootm only after successful nand read
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2014-10-23 11:53:01 -04:00
Hao Zhang 26459488b7 ARM: keystone: cmd_ddr3: add ddr3 commands to test ddr
Add ddr3 commands:

test <start_addr in hex> <end_addr in hex> - test DDR from start\n
	address to end address\n
ddr compare <start_addr in hex> <end_addr in hex> <size in hex> -\n
	compare DDR data of (size) bytes from start address to end
	address\n
ddr ecc_err <addr in hex> <bit_err in hex> - generate bit errors\n
	in DDR data at <addr>, the command will read a 32-bit data\n
	from <addr>, and write (data ^ bit_err) back to <addr>\n

Delete CONFIG_MAX_UBOOT_MEM_SIZE, as it was supposed to be used
for ddr3 commands and for now it's not needed any more.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:29 -04:00
Hao Zhang 00b821f16e board: k2e_evm: add network support
This patch adds network support code and enables keystone_net
driver usage for k2e_evm evaluation board.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:29 -04:00
Khoronzhuk, Ivan 3c61502aad net: keystone_serdes: add keystone K2E SoC support
Keystone2 Edison SoC uses the same keystone SerDes driver.
This patch adds support for K2E SoCs.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:29 -04:00
Khoronzhuk, Ivan a4d2adee11 net: keystone_net: use general get link function
The phy framework has function to get link, so use it
instead of own implementation.

There is no reason to check SGMII link while sending each
packet, phy link is enough. Check SGMII link only while
ethernet open.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:28 -04:00
Khoronzhuk, Ivan 3fe93623cc net: keystone_net: register eth PHYs on MDIO bus
As MDIO bus has been added we can register PHYs with it.
After registration, the PHY driver will be probed according to the
hardware on board.

Startup PHY at the ethernet open.

Use phy_startup() instead of keystone_get_link_status() when eth open,
as it verifies PHY link inside and SGMII link is checked before.

For K2HK evm PHY configuration at init was absent, so don't enable
phy config at init for k2hk evm.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:28 -04:00
Hao Zhang 92a16c81f5 soc: keystone_serdes: generalize to be used by other sub systems
SerDes driver is used by other sub systems like PCI, sRIO etc.
So modify it to be more general. The SerDes driver provides common
API's that can also be extended for other peripherals SerDes
configurations.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:28 -04:00
Hao Zhang 95f74dad91 soc: keystone_serdes: enhance to use cmu/comlane/lane specific configurations
Enhance the driver to use cmu/comlane/lane specific configurations
instead of 1 big array of configuration.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:28 -04:00
Khoronzhuk, Ivan a43febde44 soc: keystone_serdes: create a separate SGMII SerDes driver
This patch split the Keystone II SGMII SerDes related code from
Ethernet driver and create a separate SGMII SerDes driver.
The SerDes driver can be used by others keystone subsystems
like PCI, sRIO, so move it to driver/soc/keystone directory.

Add soc specific drivers directory like in the Linux kernel.
It is going to be used by keysotone soc specific drivers.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:28 -04:00
Khoronzhuk, Ivan 0935cac685 net: keystone_net: move header file from arch to ti-common
The header file for the driver should be in correct place.
So move it to "arch/arm/include/asm/ti-common/keystone_net.h"
and correct driver's external dependencies. At the same time
align and correct some definitions.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:05 -04:00
Khoronzhuk, Ivan e3114c9a06 net: keystone_net: add support for NETCP v1.5
Currently the network driver is used only by k2hk evm board.
The k2hk SoC contains NETCP v1.0, but Keystone2 SoCs, like k2e
contain NETCP v1.5. So driver should be able to work with such kind
of NETCP. This commit adds this opportunity. The main difference in
masks and some registers, the logic is the same, so only definitions
should be changed. To differentiate between versions add KS2_NETCP_V1_0
and KS2_NETCP_V1_5. Also remove unused and no more needed defines.

The port number is specific for each board so move this parameter to
configuration.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:05 -04:00
Khoronzhuk, Ivan 8347210a3f configs: ks2_evm: enable misc_init_r
Currently keystone has misc_init_r where all DSPS are turned off
by default. So enable this function.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:05 -04:00
Hao Zhang 345af53456 keystone2: k2l-evm: add board support
This patch adds Keystone II Lammar (K2L) EVM board support.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:05 -04:00
WingMan Kwok bc0e8d7c5d keystone: usb: add support of usb xhci
Add support of usb xhci. xHCI controls all USB speeds of the Host
mode, that is, the SS through the SS PHY, as well as the HS, FS, and
LS through the USB2 PHY. xHCI replaces and supersedes all previous
host HCIs (HS-only EHCI, FS/LS OHCI and UHCI), and is therefore not
backwards compatible with any of them. The USB3SS’s USB Controller is
fully compliant with xHC.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:04 -04:00
Khoronzhuk, Ivan 9ea9021ac4 dma: keystone_nav: generalize driver usage
The keystone_nav driver is general driver intended to be used for
working with queue manager and pktdma for different IPs like NETCP,
AIF, FFTC, etc. So the it's API shouldn't be named like it works only
with one of them, it should be general names. The names with prefix
like netcp_* rather do for drivers/net/keystone_net.c driver. So it's
good to generalize this driver to be used for different IP's and
delete confusion with real NETCP driver.

The current netcp_* functions of keystone navigator can be used for
other settings of pktdma, not only for NETCP. The API of this driver
is used by the keystone_net driver to work with NETCP, so net driver
also should be corrected. For convenience collect pkdma
configurations in drivers/dma/keystone_nav_cfg.c.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:04 -04:00
Khoronzhuk, Ivan ef4547176d dma: keystone_nav: move keystone_nav driver to driver/dma/
The keystone_nav is used by drivers/net/keystone_net.c driver to
send and receive packets, but currently it's placed at keystone
arch sources. So it should be in the drivers directory also.
It's separate driver that can be used for sending and receiving
pktdma packets by others drivers also.

This patch just move this driver to appropriate directory and
doesn't add any functional changes.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-10-23 11:27:04 -04:00
Stefan Roese a488483174 arm: armada-xp: Add basic support for the maxBCM board
The maxBCM board is equipped with the Marvell Armada-XP MV78460 SoC. It
integrates an SPI NOR flash and an Marvell 88E6185 switch.

Signed-off-by: Stefan Roese <sr@denx.de>
2014-10-23 09:59:21 -04:00
Stefan Roese dd580801aa arm: armada-xp: Add basic support for the Marvell DB-MV784MP-GP board
This patch adds basic support for the Marvell DB-MV784MP-GP evaulation
board. This is the first board that uses the recently created
Armada XP 78460 SoC support.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
2014-10-23 09:59:21 -04:00
Stefan Roese 4fb3f0c802 net: phy.h: Make PHY autonegotiation timeout configurable
The Marvell MV78460 eval board DB-78460-BP seems to need a longer
PHY autonegotiation timeout than the "standard" 4 seconds. So lets
make this timeout configurable. If not defined in the board config
header the original 4000ms is used.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
2014-10-23 09:59:21 -04:00
Stefan Roese 19fc2eae6d net: mvneta.c: Add support for the ethernet controller of the Marvell Armada XP SoC
This patch adds support for the NETA ethernet controller which is integrated
in the Marvell Armada XP SoC's. This port is based on the Linux driver which
has been stripped of the in U-Boot unused portions.

Tested on the Marvell MV78460 eval board db-78460-bp.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Tested-by: Luka Perkov <luka@openwrt.org>
2014-10-23 09:59:21 -04:00
Stefan Roese 24c04977fa arm: mvebu: Add common mbus functions to use on Marvell SoCs
These mbus functions are ported from Barebox. The Barebox version is
ported from Linux. These functions will be first used by the upcoming
Armada XP support. Later other Marvell SoC's will be adopted to use
these functions as well (Kirkwood, Orion).

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
2014-10-23 09:59:20 -04:00
Tom Rini dee8abcd80 Merge git://git.denx.de/u-boot-x86 2014-10-23 06:54:03 -04:00
Tom Rini 2110957763 Merge git://git.denx.de/u-boot-fdt 2014-10-23 06:51:46 -04:00
Christian Gmeiner 2e3a1f4d1d ot1200: fix sf detection
Commit 155fa9af95 changed the way
to define a GPIO line, which can be used to force CS high
across multiple transactions. In order to fix sf detection
change board code to make use of board_spi_cs_gpio(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
2014-10-23 10:02:16 +02:00
Simon Glass c0561d14c5 x86: Enable FIT, ELF on coreboot
Enable FIT support and the bootelf command. Also change the default load
address to somewhere other than the normal load address of the kernel,
to allow for decompression without overwriting the original file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:33 -06:00
Simon Glass c67161c1f1 x86: config: link: Display the board model on the screen
To get a display in U-Boot on link you must either build a coreboot that
always sets it up, or use Esc-Refresh-Power to reset the machine.

When we do have a display, it is nice to display the model at the top, so
enable this option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:33 -06:00
Simon Glass 39c0b633c0 x86: link: Tidy up the command lines options
We may as well use hush. The auto-complete option was incorrect so this was
not enabled. Also expand the command line size a little and go back to the
default prompt since "boot>" doesn't seem any more useful.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:33 -06:00
Simon Glass 14db950945 x86: cros_ec: Enable cros_ec for link
Add defines to enable the Chrome OS EC interface and set it up on init.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:33 -06:00
Simon Glass ca42d3f7ee x86: dts: Add device tree compatible string for Intel IPC
Add this to the table so that it can be recognised.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:32 -06:00
Simon Glass 2d41046531 x86: config: Enable dhcp on link
The dhcp option is required to get bootp to work on the Chromebook Pixel,
so enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:32 -06:00
Thierry Reding 2f3760428f fdt: Add a subnodes iterator macro
The fdt_for_each_subnode() iterator macro provided by this patch can be
used to iterate over a device tree node's subnodes. At each iteration a
loop variable will be set to the next subnode.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-10-22 16:56:41 -06:00
Thierry Reding 9f85eee72a fdt: Add a function to return PCI BDF triplet
The fdtdec_pci_get_bdf() function returns the bus, device, function
triplet of a PCI device by parsing the "reg" property according to the
PCI device tree binding.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-10-22 16:56:41 -06:00
Thierry Reding 56f42242f0 fdt: Add resource parsing functions
Add the fdt_get_resource() and fdt_get_named_resource() functions which
can be used to parse resources (memory regions) from an FDT. A helper to
compute the size of a region is also provided.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 16:56:41 -06:00
Thierry Reding 5094eb408a fdt: Add functions to retrieve strings
Given a device tree node, a property name and an index, the new function
fdt_get_string_index() will return in an output argument a pointer to
the index'th string in the property's value.

The fdt_get_string() is a shortcut for the above with the index being 0.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 16:56:41 -06:00
Thierry Reding fc503c1791 fdt: Add a function to get the index of a string
Given a device tree node and a property name, the new fdt_find_string()
function will look up a given string in the string list contained in the
property's value and return its index.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 16:56:40 -06:00
Thierry Reding bc4147ab2d fdt: Add a function to count strings
Given a device tree node and a property name, the fdt_count_strings()
function counts the number of strings found in the property value.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 16:56:40 -06:00
Stephen Warren 227ec97f51 ARM: rpi_b: enable USB/DHCP/PXE in bootcmd
USB support must be enabled before config_distro_bootcmd.h is included
for bootcmd to include USB-related functionality.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22 22:02:08 +02:00
Stephen Warren 4f80a06df3 ARM: rpi_b: query internal MAC address from firmware
The built-in SMSC 95xx chip doesn't know its own MAC address. Instead,
we must query it from the VC firmware; it's probably encoded in fuses
on the BCM2835.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22 22:02:08 +02:00
Marek Vasut 72d5702c44 arm: rpi: Enable USB support on RPi
Enable DWC2 USB, storage and ethernet support. Tested on RPi B+.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
2014-10-22 22:02:08 +02:00
Oleksandr Tymoshenko 6e9e06260d usb: dwc2: Add driver for Synopsis DWC2 USB IP block
This is the USB host controller used on the Altera SoCFPGA and Raspbery Pi.

This code has three checkpatch warnings, but to make sure it stays at least
readable and clear, these are not fixed. These bugs are in the USB request
handling combinatorial logic, so any abstracting of those is out of question.

Tested on DENX MCV (Altera SoCFPGA 5CSFXC6C6U23C8N) and RPi B+ (BCM2835).

Signed-off-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Cc: Vince Bridgers <vbridger@altera.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2014-10-22 22:01:58 +02:00
Tom Rini 68e80fdda1 Merge git://git.denx.de/u-boot-dm 2014-10-22 13:51:45 -04:00
Simon Glass aed2fbef5e dm: serial: Tidy up the pl01x driver
Adjust the driver so that leaf functions take a pointer to the serial port
register base. Put all the global configuration in the init function, and
use the same settings from then on.

This makes it much easier to move to driver model without duplicating the
code, since with driver model we use platform data rather than global
settings.

The driver is compiled with either the CONFIG_PL010_SERIAL or
CONFIG_PL011_SERIAL option and this determines the uart type. With driver
model this needs to come in from platform data, so create a new
CONFIG_PL01X_SERIAL config which brings in the driver, and adjust the
driver to support both peripheral variants.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22 10:36:57 -06:00
Simon Glass 41e98e011d dm: rpi: Convert GPIO driver to driver model
Convert the BCM2835 GPIO driver to use driver model, and switch over
Raspberry Pi to use this, since it is the only board.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2014-10-22 10:36:57 -06:00
Simon Glass da802b9e27 dm: core: Add support for simple-bus
Add a driver for the simple-bus nodes, which allows devices within these
nodes to be bound.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:56 -06:00
Simon Glass 3f0e935f22 dm: imx: Move cm_fx6 to use driver model for serial and GPIO
Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an
example.

Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
2014-10-22 10:36:56 -06:00
Simon Glass a8ba569cba dm: imx: serial: Support driver model in the MXC serial driver
Add driver model support with this driver. Boards which use this driver
should define platform data in their board files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:56 -06:00
Simon Glass 10778398b3 dm: core: Allow a list of devices to be declared in one step
The U_BOOT_DEVICE macro allows the declaration of a single U-Boot device.
Add an equivalent macro to declare an array of devices, for convenience.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:54 -06:00
Simon Glass 3fcc3af4d2 dm: linker_lists: Add a way to declare multiple objects
The existing ll_entry_declare() permits a single element of the list to
be added to a linker list. Sometimes we want to add several objects at
once. To avoid lots of messy declarations, add a macro to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:53 -06:00
Simon Glass ea0ebc8662 dm: exynos: cros_ec: Move cros_ec_spi to driver model
Adjust this driver to use driver model and move smdk5420 boards over to
use it.

Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:53 -06:00
Simon Glass be995a8545 dm: sandbox: cros_ec: Move sandbox cros_ec to driver module
Adjust the sandbox cros_ec emulation driver to work with driver model, and
switch over to driver model for sandbox cros_ec.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:53 -06:00
Simon Glass 84d6cbd302 dm: cros_ec: Add support for driver model
Add support for driver model if enabled. This involves minimal changes
to the code, mostly just plumbing around the edges.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:53 -06:00
Simon Glass fda6fac39b dm: tegra: spi: Convert to driver model
This converts the Tegra SPI drivers to use driver model. This is tested
on:

- Tegra20 - trimslice
- Tegra30 - beaver
- Tegra124 - dalmore

(not tested on Tegra124)

Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:52 -06:00
Simon Glass 465bc03b0c dm: exynos: config: Use driver model for SPI flash
Use driver model for exynos5 board SPI flash.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:51 -06:00
Simon Glass b6c2956def dm: sf: sandbox: Convert SPI flash driver to driver model
Convert sandbox's spi flash emulation driver to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:51 -06:00
Simon Glass 4c2dbefde5 dm: sf: Add a uclass for SPI flash
Add a driver model uclass for SPI flash which supports the common
operations (read, write, erase). Since we must keep support for the
non-dm interface, some modification of the spi_flash header is required.

CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:50 -06:00
Simon Glass ff0960f9a0 sf: Tidy up public and private header files
Since spi_flash.h is supposed to be the public API for SPI flash, move
private things to sf_internal.h. Also tidy up a few comment nits.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:50 -06:00
Simon Glass 0043b1faa7 exynos: universal_c210: Move to driver model soft_spi
Adjust this board to use the driver model soft_spi implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:49 -06:00
Simon Glass 73186c9460 dm: exynos: Convert SPI to driver model
Move the exynos SPI driver over to driver model. This removes quite a bit
of boilerplate from the driver, although it adds some for driver model.

A few device tree additions are needed to make the SPI flash available.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:49 -06:00
Simon Glass 44ba6b0ecc dm: spi: Remove SPI_INIT feature
This feature provides for init of a single SPI port for the soft SPI
feature. It is not really compatible with driver model since it assumes a
single SPI port. Also, inserting SPI init into the driver by means of
a #define is not very nice.

This feature is not used by any active boards, so let's remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:48 -06:00
Simon Glass 49b5d6e6e2 dm: sandbox: spi: Move to driver model
Adjust the sandbox SPI driver to support driver model and move sandbox over
to driver model for SPI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:48 -06:00
Simon Glass c60e1f2547 dm: sandbox: Add a SPI emulation uclass
U-Boot includes a SPI emulation driver already but it is not explicit, and
is hidden in the SPI flash code.

Conceptually with sandbox's SPI implementation we have a layer which
creates SPI bus transitions and a layer which interprets them, currently
only for SPI flash. The latter is actually an emulation, and it should be
possible to add more than one emulation - not just SPI flash.

Add a SPI emulation uclass so that other emulations can be plugged in to
support different types of emulated devices on difference buses/chip
selects.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:46 -06:00
Simon Glass d7af6a4851 dm: spi: Add a uclass for SPI
Add a uclass which provides access to SPI buses and includes operations
required by SPI.

For a time driver model will need to co-exist with the legacy SPI interface
so some parts of the header file are changed depending on which is in use.
The exports are adjusted also since some functions are not available with
driver model.

Boards must define CONFIG_DM_SPI to use driver model for SPI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
(Discussed some follow-up comments which will address in future add-ons)
2014-10-22 10:36:46 -06:00
Simon Glass 547cea19b8 dm: core: Add a clarifying comment on struct udevice's seq member
The sequence number is unique within the uclass, so state this clearly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:46 -06:00
Simon Glass accd4b19b3 dm: core: Allow parents to pass data to children during probe
Buses sometimes want to pass data to their children when they are probed.
For example, a SPI bus may want to tell the slave device about the chip
select it is connected to.

Add a new function to permit the parent data to be supplied to the child.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:46 -06:00
Simon Glass a8981d4f80 dm: core: Add functions for iterating through device children
Buses need to iterate through their children in some situations. Add a few
functions to make this easy.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2014-10-22 10:36:45 -06:00
Simon Glass 73e256c2ac dm: exynos: Move serial to driver model
Change the Exynos serial driver to work with driver model and switch over
all relevant boards to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:45 -06:00
Simon Glass b8809e60cd dm: exynos: gpio: Convert to driver model
Convert the exynos GPIO driver to driver model. This implements the generic
GPIO interface but not the extra Exynos-specific functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:36 -06:00
Simon Glass 084067ce13 dm: exynos: Move s5p_goni to generic board
The generic board deadline is approaching, and we need this feature to
enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for s5p_goni.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:12 -06:00
Simon Glass d010facb4e dm: exynos: Move smdkc100 to generic board
The generic board deadline is approaching, and we need this feature to
enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for smdkc100.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:36:09 -06:00
Robert Baldyga 4d38395c15 arm: goni: add i2c_init_board()
Add proper initialization of GPIO pins used by software i2c.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:33:49 -06:00
Masahiro Yamada f887cb6d86 dm: add of_match_ptr() macro
The driver model supports two ways for passing device parameters;
Device Tree and platform_data (board file).
Each driver should generally support both of them because some
popular IPs are used on various platforms.

Assume the following scenario:
  - The driver Foo is used on SoC Bar and SoC Baz
  - The SoC Bar uses Device Tree control (CONFIG_OF_CONTROL=y)
  - The SoC Baz does not support Device Tree; uses a board file

In this situation, the device driver Foo should work with/without
the device tree control.  The driver should have .of_match and
.ofdata_to_platdata members for SoC Bar, while they are meaningless
for SoC Baz; therefore those device-tree control code should go
inside #ifdef CONFIG_OF_CONTROL.

The driver code will be like this:

  #ifdef CONFIG_OF_CONTROL
  static const struct udevice_id foo_of_match = {
          { .compatible = "foo_driver" },
          {},
  }

  static int foo_ofdata_to_platdata(struct udevice *dev)
  {
          ...
  }
  #endif

  U_BOOT_DRIVER(foo_driver) = {
          ...
          .of_match = of_match_ptr(foo_of_match),
          .ofdata_to_platdata = of_match_ptr(foo_ofdata_to_platdata),
          ...
  }

This idea has been borrowed from Linux.
(In Linux, this macro is defined in include/linux/of.h)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:32:17 -06:00
Masahiro Yamada b1799fcbdc dm: fix include guard
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:32:17 -06:00
Masahiro Yamada 42c23dd2aa dm: include <linker_lists.h> from platdata.h and uclass.h
The header files include/dm/platdata.h and include/dm/uclass.h
use ll_entry_declare(); therefore they depend on
include/linker_lists.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:32:17 -06:00
Masahiro Yamada dc7cb46f97 linker_lists: include <linux/compiler.h>
The header file include/linker_lists.h uses __aligned();
therefore it depends on include/linux/compiler.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:32:16 -06:00
Masahiro Yamada 81b4e751c2 dm: fix comments
The struct udevice stands for a device, not a driver.
The driver_info.name is a driver's name, which is referenced
to bind devices.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-10-22 10:32:16 -06:00
Marcel Ziswiler 9aafef4f36 tegra: apalis_t30: master revamp
Update Apalis T30 as per the following commits

c369139234
tegra: dts: Add serial port details

461be2f96e
kconfig: remove redundant "string" type in arch and board Kconfigs

f1ef2b6233
kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:55 -07:00
Marcel Ziswiler ac13b9af91 tegra: colibri_t30: clean-up spurious new line
Clean-up a spurious new line which got introduced resp. left behind by
commit

f1ef2b6233
kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:55 -07:00
Marcel Ziswiler 4dab5549a8 tegra: clean-up useless define
Wondering what exactly that one should bring (;-p). Looks like a remnant of the last commit

783e6a72b8
kconfig: move CONFIG_OF_* to Kconfig

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:55 -07:00
Marcel Ziswiler 25ca385dd6 gpio: header file comment spelling fixes
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:55 -07:00
Marcel Ziswiler 4270d5afed arm: tegra: use architecture specific memcpy
Use architecture specific memcpy to speed up things.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:54 -07:00
Marcel Ziswiler bf78b2717d arm: tegra: initial support for apalis t30
This patch adds board support for the Toradex Apalis T30 a computer on
module which can be used on different carrier boards.

For the sake of ease of use we do not distinguish between different
carrier boards for now as the base module features are deemed
sufficient enough for regular booting.

The following functionality is working so far:
- eMMC boot and environment storage
- Gigabit Ethernet (once Thierry's PCIe as well as my E1000 resp. i210
  fixes hit mainline)
- MMC/SD cards (both 8-bit as well as 4-bit slot)
- USB client/host (dual role port as client e.g. for DFU/UMS, other two
  ports as host)

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-10-22 09:30:54 -07:00
Simon Glass 90268b878b x86: Support loading kernel setup from a FIT
Add a new setup@ section to the FIT which can be used to provide a setup
binary for booting Linux on x86. This makes it possible to boot x86 from
a FIT.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 09:03:06 -06:00
Fabio Estevam 04451ba347 mx6sabre_common: Add HDMI config to common code
HDMI config options can be placed into the common mx6sabre_common.h file to
avoid duplication.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-10-21 14:04:59 +02:00
Fabio Estevam 510922ac61 mx6qsabreauto: Add HDMI support
Let HDMI splash screen support work by default.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-10-21 14:04:39 +02:00
Tom Rini a84c8107d9 Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2014-10-20 18:17:26 -04:00
Ruchika Gupta ba4740205d ls102x: Add support for secure boot and enable blob command
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:21:26 -07:00
Ruchika Gupta 789490b6c0 mpc85xx: configs - Enable blob command in freescale platforms
Enable blob commands for platforms having SEC 4.0 or greater
for secure boot scenarios

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:21:09 -07:00
Ruchika Gupta c5de15cbc8 crypto/fsl: Add command for encapsulating/decapsulating blobs
Freescale's SEC block has built-in Blob Protocol which provides
a method for protecting user-defined data across system power
cycles. SEC block protects data in a data structure called a Blob,
which provides both confidentiality and integrity protection.

Encapsulating data as a blob
Each time that the Blob Protocol is used to protect data, a
different randomly generated key is used to encrypt the data.
This random key is itself encrypted using a key which is derived
from SoC's non volatile secret key and a 16 bit Key identifier.
The resulting encrypted key along with encrypted data is called a blob.
The non volatile secure key is available for use only during secure boot.

During decapsulation, the reverse process is performed to get back
the original data.

Commands added
--------------
    blob enc - encapsulating data as a cryptgraphic blob
    blob dec - decapsulating cryptgraphic blob to get the data

Commands Syntax
---------------
	blob enc src dst len km

	Encapsulate and create blob of data $len bytes long
	at address $src and store the result at address $dst.
	$km is the 16 byte key modifier is also required for
	generation/use as key for cryptographic operation. Key
	modifier should be 16 byte long.

	blob dec src dst len km

	Decapsulate the  blob of data at address $src and
	store result of $len byte at addr $dst.
	$km is the 16 byte key modifier is also required for
	generation/use as key for cryptographic operation. Key
	modifier should be 16 byte long.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:20:40 -07:00
Ruchika Gupta 4ba4a095da ls102x: configs - Add hash command in freescale LS1 platforms
Hardware accelerated support for SHA-1 and SHA-256 has been added.
Hash command enabled along with hardware accelerated support for
SHA-1 and SHA-256 for platforms which have CAAM block.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:17:32 -07:00
Ruchika Gupta 737537ef0c mpc85xx: configs - Add hash command in freescale platforms
Enable CAAM in platforms supporting the hardware block.
Hash command enabled along with hardware accelerated support for
SHA-1 and SHA-256 for platforms which have CAAM block.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:17:21 -07:00
Ruchika Gupta b9eebfade9 fsl_sec: Add hardware accelerated SHA256 and SHA1
SHA-256 and SHA-1 accelerated using SEC hardware in Freescale SoC's
The driver for SEC (CAAM) IP is based on linux drivers/crypto/caam.
The platforms needto add the MACRO CONFIG_FSL_CAAM inorder to
enable initialization of this hardware IP.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:17:07 -07:00
Ruchika Gupta 028dbb8db1 fsl_sec : Change accessor function to take care of endianness
SEC registers can be of type Little Endian or big Endian depending upon
Freescale SoC. Here SoC defines the register type of SEC IP.

So update acessor functions with common SEC acessor functions to take care
both type of endianness.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:16:50 -07:00
Ruchika Gupta 48ef0d2a10 fsl_sec : Move SEC CCSR definition to common include
Freescale SEC controller has been used for mpc8xxx. It will be used
for ARM-based SoC as well. This patch moves the CCSR defintion of
SEC to common include

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:16:25 -07:00
Ruchika Gupta 84e0fb403d powerpc/P1010RDB:Update RESET_VECTOR_ADDRESS for 768KB u-boot size
U-boot binary size has been increased from 512KB to 768KB.

So update CONFIG_RESET_VECTOR_ADDRESS to reflect the same for
P1010 SPI Flash Secure boot target.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
[York Sun: Modified subject to P1010RDB]
Reviewed-by: York Sun <yorksun@freescale.com>
2014-10-16 14:15:20 -07:00
Simon Glass 0156444cf7 lcd: Fix build error with CONFIG_LCD_BMP_RLE8
Add a block to avoid a build error with the variable declaration.
Enable the option on sandbox to prevent an error being introduced in
future.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-16 09:58:24 +02:00
Tom Rini e89d623f09 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-10-10 20:59:28 -04:00
Albert ARIBAUD 3d420cbd35 Merge branch 'u-boot-socfpga/topic/arm/socfpga-20141010' into 'u-boot-arm/master' 2014-10-11 01:20:55 +02:00
Albert ARIBAUD 790af81543 Merge branch 'u-boot/master' into 'u-boot-arm/master' 2014-10-11 01:20:30 +02:00
Marek Vasut 5a1d0ad3ee arm: socfpga: Use EMAC1 on SoCDK
The SoCDK uses EMAC1, not EMAC0. This patch fixes the issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
2014-10-11 00:50:33 +02:00
Jeroen Hofstee ed8271d11c tools: compiler.h: Fix build on FreeBSD
Commit 832472 "tools: socfpga: Add socfpga preloader signing
to mkimage" added tools/socfpga.c which relies on htole32,
le32toh and friends. While compiler.h includes these protypes
for linux from endian.h, it doesn't do so for FreeBSD. Hence
include <sys/endian.h> for FreeBSD.

Cc: Marek Vasut <marex@denx.de>
CC: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-10 16:00:01 -04:00
Heiko Schocher d0b3723034 arm, at91: add generic board support for the taurus and corvus board
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-10-10 21:51:19 +02:00
Bo Shen b2868187f4 ARM: atmel: switch at91sam9263ek to generic board
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-10-10 21:51:18 +02:00
Tom Rini 787011834e am335x_evm: Correct BOOTCOUNT driver support
We need to set the 'BE' flag here for things to work right.

Signed-off-by: Tom Rini <trini@ti.com>
2014-10-10 09:44:45 -04:00
David Müller (ELSOFT AG) fbad4641fb VCMA9: remove EXT2 support
remove the seldomly used EXT2 support because the U-Boot binary will
not fit into the 512KiB flash otherwise.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
David Müller (ELSOFT AG) cf7d4505e3 PATI: fix broken SPI access
fix broken SPI access by adding/activating BOARD_EARLY_INIT_F
functionality and calling spi_init_f() from there.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
David Müller (ELSOFT AG) 6c4c9a7c0f PATI: convert to generic board
Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
David Müller (ELSOFT AG) 13bd4d8776 VCMA9: convert to generic board
Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
David Müller (ELSOFT AG) d3b88405e5 MIP405: convert to generic board
Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
David Müller (ELSOFT AG) 3f2b5bb674 PIP405: convert to generic board
Signed-off-by: David Müller <d.mueller@elsoft.ch>
2014-10-10 09:44:44 -04:00
Wolfgang Denk 2ea9103924 SPDX License cleanup for LiMon imported files
A number of network related files were imported from the LiMon
project; these contain a somewhat unclear license statement:

	Copyright 1994 - 2000 Neil Russell.
	(See License)

I analyzed the source code of LiMon v1.4.2 which was used for this
import.  It does not contain any "License" file, but the top level
directory contains a file "COPYING", which turns out to be GPL v2
of June 1991.  So it is legitimate to conclude that the LiMon derived
files are also to be released under GPLv2.  Mark them as such.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-10-10 09:44:43 -04:00
Masahiro Yamada af55e35d33 powerpc: mpc5xxx: remove board support for MVBC_P and MVSMR
These boards have been orphaned for more than 6 months.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-10 09:44:43 -04:00
Masahiro Yamada e7a565638a powerpc: mpc83xx: remove board support for MERGERBOX and MVBLM7
These boards have been orphaned for more than 6 months.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-10 09:44:43 -04:00
Masahiro Yamada 9ed3246e19 powerpc: ppc4xx: remove board support for bluestone
This board has been orphaned for more than 6 months.

It is the last board defining CONFIG_APM821XX.
The code inside #ifdef CONFIG_APM821XX should be removed too.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-10 09:44:43 -04:00
Masahiro Yamada 1521cdc530 powerpc: ppc4xx: remove board support for CRAYL1
This board has been orphaned for more than 6 months.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-10 09:44:43 -04:00
Masahiro Yamada dc9617e0ce powerpc: ppc4xx: remove board support for KAREF and METROBOX
These boards have been orphaned for more than 6 months.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-10 09:44:42 -04:00
Roger Quadros 3160b1b986 OMAP5+: sata/scsi: Implement scsi_init()
On OMAP platforms, SATA controller provides the SCSI subsystem
so implement scsi_init().

Get rid of the unnecessary sata_init() call from dra7xx-evm
and omap5-uevm board files.

Signed-off-by: Roger Quadros <rogerq@ti.com>
2014-10-10 09:44:42 -04:00
Stefan Herbrechtsmeier 115e71f7da omap3: overo: Fix fdtfile test
Commit 12cc543767 'omap3: overo: Select
fdtfile for expansion board' wrongly missed the operator in the fdtfile
test. Update the test to only overwrite an empty fdtfile environment
variable.

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2014-10-10 09:44:41 -04:00
Albert ARIBAUD ebf8644a11 Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' 2014-10-10 08:56:01 +02:00
Nobuhiro Iwamatsu cc45a610b6 arm: rmobile: koelsch: Add CONFIG_SCIF_USE_EXT_CLK
SCIF of koelsch use external clock mode.
This enables external clock mode on koelsch board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2014-10-09 14:45:03 +09:00
Nobuhiro Iwamatsu c252d64bdd arm: rmobile: lager: Add CONFIG_SCIF_USE_EXT_CLK
SCIF of lager use external clock mode.
This enables external clock mode on lager board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2014-10-09 14:45:03 +09:00
Nobuhiro Iwamatsu c33e4f1182 arm: rmobile: lager: Fix value of CONFIG_SH_SCIF_CLK_FREQ
The clock of SCIF (serial port) of lager is supplied from External
Clock. And value of clock is 14.7456MHz.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2014-10-09 14:45:03 +09:00
Albert ARIBAUD 4b19b7448e Merge remote-tracking branch 'u-boot-imx/master'
The single file conflict below is actually trivial.

Conflicts:
	board/boundary/nitrogen6x/nitrogen6x.c
2014-10-08 21:20:49 +02:00
Simon Glass 2ecd779742 exynos: Enable pre-relocation malloc()
Enable this feature to support driver model before relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:48 +09:00
Simon Glass 93327f6976 samsung: Enable device tree for smdkc100
Change this board to add a device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:48 +09:00
Simon Glass 311757be27 samsung: Enable device tree for s5p_goni
Change this board to add a device tree.

This also adds a pinmux header file although it is not used as yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 1d55110003 config: Move smdkv310 to use common exynos4 file
Most of the smdkv310 features are common with other exynos4 boards. To
permit easier addition of driver model support, use the common file and
add a device tree file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass f94de733df config: Move arndale to use common exynos5250 file
Most of the arndale features are common with other exynos5250 boards. To
permit easier addition of driver model support, use the common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 7d15953619 exynos: config: Move cros_ec and tps65090 out of smdk boards
These boards do not in fact have a Chrome OS EC, nor a TPS565090 PMIC, so
move the settings into a separate common file to be used by those that need
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 87033d4d97 exynos: Move common smdk5420 things to common file
A few things are common but are not in the common file. Fix this and
rename the file to fit with the other exynos*-common files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 5ea01ab10d exynos: Move common exynos settings into a common file
Since exynos4 and exyno5 share many settings, we should move these into
a common file to avoid duplication.

In effect the changes are that all exynos boards now have EXT4 and FAT
write support. This affects exynos5250 and exynos5420 which previously
did not. This also disables the ext2 commands which are equivalent to
ext4 anyway.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 4c7bb1d2e0 exynos: Rename -dt config files to -common
We want exynos5250-dt.h to be a board which can support any exynos5250
device. This matches the naming used by Linux. As a first step, rename
the existing -dt files to -common to make it clear they are common files,
and not specific boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 98149d72f3 dm: exynos: Split out the cros_ec drivers
With the driver model conversion we are going to be using driver model for
SPI and not for I2C. This works OK so long as a board doesn't need both
dm and non-dm versions of the cros_ec driver. Since pit uses SPI and snow
uses I2C we need to split the configs so that only one driver is compiled
for each platform.

We can fix this later when driver model supports I2C.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 5b9c8cb6cb cros_ec: exynos: Use the correct tps65090 driver in each case
Exynos 5250 boards (snow, spring) use the I2C driver but Exynos 5420 boards
cannot due to a hardware design decision. Select the correct driver to use
in each case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:47 +09:00
Simon Glass 83d937803a exynos5: Enable data cache
Things run faster when the data cache is enabled, so turn it on along with
the 'dcache' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-10-08 17:25:46 +09:00
Tom Rini dd0204e48d Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-10-07 07:38:39 -04:00
Albert ARIBAUD 1454ba8e56 Merge branch 'u-boot-marvell/master' into 'u-boot-arm/master' 2014-10-07 12:11:32 +02:00
Tom Rini 8a6b088aff Merge branch 'master' of git://git.denx.de/u-boot-usb 2014-10-06 15:49:50 -04:00
Kevin Mihelich 5e3a388cdd nitrogen6x: config: enable EXT4 filesystem
Support reading/writing ext4 partitions.

Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson e9feee6370 nitrogen6x: config: enable Android fastboot
Enable 'fastboot' command.

This is currently enabled but not yet functional. Including it in the
configuration will ease further testing and development as discussed
on the mailing list.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson c0e7bd6661 nitrogen6x: config: add gpio command
Enable the 'gpio' command to allow reading and toggling of GPIO
pins.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson 54950e8215 nitrogen6x: config: disable logo
Some users (QNX and Windows CE users in particular) have asked
to disable the Penguin shown on the display at boot time.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2014-10-06 17:57:23 +02:00
Troy Kisky 3f5d964ea0 nitrogen6x: config: allow more bootargs parameters
Increase the maximum number of arguments allowed by the Hush parser.
This prevents errors when users or scripts aren't quoting parameters
when setting the "bootargs" variable et al.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson 5dbdc3cf3c nitrogen6x: config: enable "i2c edid"
Enable the "i2c edid" command to query data from an attached
HDMI monitor.

Usage is typically this:

        U-Boot > i2c dev 1
        U-Boot > i2c edid 0x50
        ...

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson d3d70e6f9b nitrogen6x: config: add CONFIG_CMD_MEMTEST
Enable the 'mtest' command on Nitrogen6x and SABRE Lite boards.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson c36c000828 nitrogen6x: config: enable USB keyboard support
Enable the use of USB keyboards on SABRE Lite and Nitrogen6x boards.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson 8d97b3ad95 nitrogen6x: config: expose SATA, then MMC over USB
If no boot script was found, expose internal storage over the
USB mass storage gadget to allow easy programming.

This is especially useful when SD cards are inaccessible or when
loading SATA drives.

More details are available in this blog post:
        http://boundarydevices.com/u-boot-usb-mass-storage-gadget/

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:23 +02:00
Eric Nelson 8145ccc3be nitrogen6x: config: add initrd_high
Support RAM disks by setting initrd_high. See commit 7e9603e

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:22 +02:00
Kevin Mihelich 43a3431c26 nitrogen6x: config: use FS_GENERIC load command
Remove the individual attempts to load using ext2 and fat, replace with the
generic load command supporting available filesystem types.

Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
2014-10-06 17:57:22 +02:00
Diego Rondini 5b7103e0af nitrogen6x: config: allow boot to USB stick
This patch enables boot to USB storage devices by expanding on the list
of boot devices.

Because the USB startup currently takes a long time, it places USB at
the end of the list of supported devices.

You can over-ride the boot order using the bootdevs environment variable.
For instance, this will make USB the first (highest priority) device:

	U-Boot > setenv bootdevs usb mmc sata
	U-Boot > saveenv

Signed-off-by: Diego Rondini <diego.rondini@kynetics.it>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:22 +02:00
Eric Nelson 84e2dc0c89 nitrogen6x: config: add USB Mass Storage (ums) support
Add support for the USB mass storage to enable access to on-board
storage (especially eMMC and SATA).

Details at:
        http://boundarydevices.com/u-boot-usb-mass-storage-gadget/

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2014-10-06 17:57:22 +02:00
Marek Vasut 2f210639c4 arm: socfpga: Use CMD_FS_GENERIC
Enable and use the CONFIG_CMD_FS_GENERIC to avoid hard-coding the
filesystem type into the environment.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:51 +02:00
Pavel Machek 5095ee088d arm: socfpga: Split SoCFPGA configuration
Split the SoCFPGA configuration into SoC-specific part which is
common for all boards (socfpga_cyclone5_common.h) and a board
specific part. There is currently only one board, which is the
generic SoCFPGA board (socfpga_cyclone5.h), but there are more
to come.

This is necessary due to various features of the boards, which
unfortunatelly cannot be autodetected.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:51 +02:00
Marek Vasut 47f9b4e1f3 arm: socfpga: Clean up SoCFPGA configuration
Reorganize and cleanup the configuration file for SoCFPGA. There
is no functional change after this cleanup. This was necessary,
since the file was a wild mess and it was impossible to make sense
of it's content, let alone change something without breaking some
other thing. This patch puts the contents on par with regular U-Boot
standards.

Also remove unused preprocessor symbols CONFIG_SINGLE_BOOTOADER
and CONFIG_USE_IRQ, which is undefined by default. Finally, do
logical reordering of the defines in the file so it's much more
readable. The reordering was also necessary for the splitting
as the initial one was messy.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:51 +02:00
Chin Liang See 97ce274d97 arm: socfpga: Enable SDMMC boot for SOCFPGA U-Boot
Enable the SDMMC boot as default boot for SOCFPGA U-Boot dev kit.
Enable the bootz command as zImage is used instead uImage.

Signed-off-by: Chin Liang See <clsee@altera.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:51 +02:00
Chin Liang See ddcbed04a2 arm: socfpga: Enable DWMMC for SOCFPGA
Enable the DesignWare MMC controller driver support
for SOCFPGA Cyclone5 dev kit

Signed-off-by: Chin Liang See <clsee@altera.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:51 +02:00
Marek Vasut b5e9b29625 arm: socfpga: cache: Enable PL310 L2 cache
Enable the PL310 L2 cache controller support for the SoCFPGA.
With the cache related issues resolved, this is safe to be done.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:50 +02:00
Marek Vasut 40e7bcdee7 arm: socfpga: cache: Enable D-Cache
The code is now fixed to the point where we can safely enable
the L1 data cache. Enable the D-Cache and set it as write-alloc.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:50 +02:00
Marek Vasut 9ca2116ce4 arm: socfpga: cache: Define cacheline size
The Cortex-A9 has 32-byte long L1 cachelines. Define this value.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:50 +02:00
Pavel Machek 230fe9b202 arm: socfpga: fpga: Add SoCFPGA FPGA programming interface
Add code necessary to program the FPGA part of SoCFPGA from U-Boot
with an RBF blob. This patch also integrates the code into the
FPGA driver framework in U-Boot so it can be used via the 'fpga'
command.

Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>

V2: Move the not-CPU specific stuff into drivers/fpga/ and base
    this on the cleaned up altera FPGA support.
2014-10-06 17:46:50 +02:00
Marek Vasut 2110eeaf0f arm: socfpga: timer: Pull the timer reload value from config file
The timer reload value is a property of the timer hardware and there
is no reason for this to be configurable. Place this into the timer
driver just like on the other hardware.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:46:49 +02:00
Pavel Machek a832ddba55 arm: socfpga: clock: Add code to read clock configuration
Add the entire bulk of code to read out clock configuration from the SoCFPGA
CPU registers. This is important for MMC, QSPI and UART drivers as otherwise
they cannot determine the frequency of their upstream clock.

Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>

V2: Fixed the L4 MP clock divider and synced the clock code with latest
    rocketboards codebase (thanks Dinh for pointing this out)
2014-10-06 17:46:49 +02:00
Marek Vasut 77fa164839 Merge branches 'topic/drivers/fpga-20141006', 'topic/drivers/mmc-20141006', 'topic/drivers/net-20141006', 'topic/tools/mkimage-20141006' and 'topic/arm/cache-20141006' into HEAD 2014-10-06 17:45:55 +02:00
Charles Manning 832472a94d tools: socfpga: Add socfpga preloader signing to mkimage
Like many platforms, the Altera socfpga platform requires that the
preloader be "signed" in a certain way or the built-in boot ROM will
not boot the code.

This change automatically creates an appropriately signed preloader
from an SPL image.

The signed image includes a CRC which must, of course, be generated
with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
the boot ROM will reject the image.

Unfortunately the CRC used in this boot ROM is not the same as the
Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
CRC but is more correctly described as a checksum.

Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>

V2: - Zap unused constant
    - Explicitly print an error message in case of error
    - Rework the hdr_checksum() function to take the *header directly
      instead of a plan buffer pointer
2014-10-06 17:38:17 +02:00
Pavel Machek 464eec6d42 net: Remove unused CONFIG_DW_SEARCH_PHY from configs
Remove this symbol from configs, since it's unused.

Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Chin Liang See <clsee@altera.com>
2014-10-06 17:36:40 +02:00
Marek Vasut 1bf29b3d55 mmc: dw_mmc: Fix cache alignment issue
The DMA descriptors used by the DW MMC block must be aligned to cacheline
size, otherwise we are unable to properly flush/inval cache over them and
we get data corruption.

The reason I chose this approach of expanding the structure is because
the driver allocates the descriptors in bulk. This approach does waste
space by inserting slop inbetween the descriptors, but it makes access
to the descriptors easy as the compiler does know the real size of the
structure. It also makes cache operations easy, since the size of the
structure is cache aligned and the structure start address is as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:34:40 +02:00
Marek Vasut d44ef7ffbf fpga: altera: Clean up enums in altera.h
Get rid of the line-over-80 problems and zap the typedef that
went alongside those enums.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
2014-10-06 17:31:42 +02:00
Christian Gmeiner 39d0973300 imx6: add Bachmann OT1200 board
This patch adds support for the OT1200 series of devices.

Following components are used in u-boot:
+ ethernet
+ i2c
+ emmc
+ gpio

For more details see README.

Changes v1 > v2
  - make use of enable_cspi_clock(..)
  - fix usage of OUTPUT_40OHM define
  - added README

Changes v2 > v3
  - improve spelling in README
  - added own copy of mx6q_4x_mt41j128.cfg

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2014-10-06 17:24:28 +02:00
Marek Vasut 252499e603 arm: m53evk: Zap superfluous tab in env
Remove this tab from env, since it's useless, just use spaces.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-10-06 17:13:33 +02:00
Marek Vasut 46f8a4b7e6 arm: m28evk: Zap superfluous tab in env
Remove this tab from env, since it's useless, just use spaces.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-10-06 17:12:58 +02:00
Fabio Estevam fb6f86c411 mx6sxsabresd: Fix PCI reset and power GPIO assignments
PERST_GPIO and POWER_GPIO are currently swapped.

Fix the GPIO assignments as per the board schematics.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-10-06 17:06:23 +02:00
Michael Walle 45e60c25b5 lsxl: convert to generic board and fix typo
Besides converting the LS-XHL and LS-CHLv2 to generic board, fix a typo
which accidentally reverted the bootsource to 'hdd' although the default
bootsource should be 'legacy'.

Cc: Tom Rini <trini@ti.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-06 09:02:09 -04:00
Heiko Schocher ece91016c4 arm: am335x: siemens board use in DFU mode fullspeed only
Siemens boards are now using DFU in fullspeed only. For
this CONFIG_USB_GADGET_DUALSPEED is undefined.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Liu Bin <b-liu@ti.com>
Cc: Lukas Stockmann <lukas.stockmann@siemens.com>
2014-10-06 14:50:43 +02:00
Hans de Goede 8a8a2257ec usb: kbd: Allow "usb reset" to continue when an usb kbd is used
Use the new force parameter to make the stdio_deregister succeed, replacing
stdin with a nulldev, and assume that the usb keyboard will come back after
the reset.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06 14:50:43 +02:00
Hans de Goede 32d019265d stdio: Add force parameter to stdio_deregister
In some cases we really want to move forward with a deregister, add a force
parameter to allow this, and replace the dev with a nulldev in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-06 14:50:43 +02:00
Masahiro Yamada 5894ca007d ARM: UniPhier: add UniPhier SoC support code
These are used by Panasonic UniPhier SoC family.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-05 14:10:09 +09:00
DrEagle 8ca21cbea2 ARM: sheevaplug: add HUSH parser
This patch add HUSH command parser

Signed-off-by: Gerald Kerma <drEagle@doukki.net>

 Changes in v1:
 - add HUSH command parser
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-01 07:05:09 -04:00
DrEagle 1e3d640316 ARM: sheevaplug: redefine MTDPARTS
This patch redefine MTDPARTS

Signed-off-by: Gerald Kerma <drEagle@doukki.net>

 Changes in v1:
 - redefine MTDPARTS
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-01 07:05:02 -04:00
DrEagle 65ae9523d9 ARM: sheevaplug: add MTD defaults
This patch add MTDIDS and MTDPARTS defaults settings to sheevaplug

Signed-off-by: Gerald Kerma <drEagle@doukki.net>

 Changes in v1:
 - add MTDIDS and MTDPARTS default to sheevaplug
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-01 07:04:55 -04:00
DrEagle 0f88a5a98e ARM: sheevaplug: add MVSATA driver
This patch add MVSATA driver to sheevaplug

Signed-off-by: Gerald Kerma <drEagle@doukki.net>

 Changes in v1:
 - add MVSATA driver to sheevaplug
 - enable ext4 FS support
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-01 07:04:47 -04:00
DrEagle 4dfb0e4d3e ARM: sheevaplug: change env location
This patch move the environment offset in sheevaplug.
The size of the u-boot binary is become too big.
Fix saving environments was result of corrupting the u-boot.

Signed-off-by: Gerald Kerma <drEagle@doukki.net>

 Changes in v2:
 - patch description

 Changes in v1:
 - fix sheevaplug environment offset
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-01 07:04:32 -04:00
Fabio Estevam 9f87640c03 wandboard: Select CONFIG_CMD_FUSE
Select CONFIG_CMD_FUSE so that the fuse API commands can be used.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-10-01 09:13:29 +02:00
Ye.Li 661139faf7 imx: mx6dlarm2: Add support for i.MX6Q/DL arm2 LPDDR2 boards
Update the ddr scripts for LPDDR2 and add two build configs for LPDDR2
arm2 board. Since the LPDDR2 arm2 board has different DDR size, use
CONFIG_DDR_MB in defconfig to replace the PHYS_SDRAM_SIZE.

Signed-off-by: Ye.Li <B37916@freescale.com>
2014-09-30 12:21:14 +02:00
Ye.Li b357503f1c imx: mx6dlarm2: Add support for i.MX6DL arm2 DDR3 board
This patch adds the i.MX6DL arm2 board support. The i.MX6DL ARM2
shared the same board with i.MX6Q ARM2 board since the i.MX6DL is
pin-pin compatible with i.MX6Q.

The patch also support the DDR 32-BIT mode option. Please define
CONFIG_DDR_32BIT in the board configure file to enable DDR 32-BIT
mode.But due to the board design, it's 64bit DDR buswidth physically,
so, if you CONFIG_DDR_32BIT, the DDR memory size will be half of it.

Signed-off-by: Ye.Li <B37916@freescale.com>
2014-09-30 12:21:14 +02:00
Marek Vasut febae49a2b arm: m53evk: Enable FS_GENERIC
Enable the CONFIG_CMD_FS_GENERIC on m53evk to avoid per-fs specific commands
and tweak the environment to cater for this new option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-09-29 11:38:44 +02:00
Marek Vasut fc532a921a arm: m28evk: Enable FS_GENERIC
Enable the CONFIG_CMD_FS_GENERIC on m28evk to avoid per-fs specific commands
and tweak the environment to cater for this new option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-09-29 11:37:16 +02:00
Marek Vasut 14b256e5c0 arm: m53evk: Test if bootscript exists before loading it
Make sure the boot.scr exists on the card before loading it
from the card to avoid annoying message on the console.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-09-29 11:36:55 +02:00
Marek Vasut 4ba9b1c2e3 arm: m28evk: Test if bootscript exists before loading it
Make sure the boot.scr exists on the card before loading it
from the card to avoid annoying message on the console.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-09-29 11:35:54 +02:00
Ye.Li adca1875c8 imx: mx6qarm2: Change the mmcroot and mmcpart env value
1. Set the image load partition to the first FAT partition.
2. Set the kernel rootfs partition to the second partition.

Signed-off-by: Ye.Li <B37916@freescale.com>
2014-09-29 10:12:41 +02:00
Ye.Li e7380a1fdc imx: mx6qarm2: Add the kernel FDT Loading support
To support loading FDT file for kernel, add the fdt address,
file and loading script to arm2 board default environment.

Signed-off-by: Ye.Li <B37916@freescale.com>
2014-09-29 10:12:41 +02:00
Tom Rini be9f643ae6 Merge branch 'for-tom' of git://git.denx.de/u-boot-dm 2014-09-26 20:10:48 -04:00
Simon Glass 248a0488bf spi: Add brackets and tidy defines in spi.h
Some of the #defines in spi.h are not bracketed. To avoid future mistakes
add brackets. Also add an explanatory comment for SPI_CONN_DUAL_...

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-09-26 15:01:15 -06:00
Simon Glass 5e74934d40 sandbox: config: Enable all SPI flash chips
Sandbox may as well support everything. This increases the amount of code
that is built/tested by sandbox, and also provides access to all the
supported SPI flash devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-09-26 15:00:48 -06:00
Tom Rini 2c2277f15c Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2014-09-26 09:57:52 -04:00
Tom Rini 2c3dc792b6 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2014-09-26 09:51:18 -04:00
York Sun c7eae7fcb1 board/ls1021aqds: Add DDR4 support
LS1021AQDS has a variant with DDR4 slot. This patch adds a new defconfig
for this variant to enable DDR4 support. RAW timing parameters are not
added for DDR4. The board timing parameters are only tuned for single-
rank 1600 and 1800MT/s with Micron DIMM 9ASF51272AZ-2G1A1 due to DIMM
availability.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
2014-09-25 09:12:12 -07:00
York Sun 8aeb893a8e ARMv8/ls2085a: Move u-boot location to make room for RCW
When booting with SP, RCW resides at the beginning of IFC NOR flash.

Signed-off-by: York Sun <yorksun@freescale.com>
2014-09-25 08:36:19 -07:00
York Sun 8bfa301b0a ARMv8/ls2085a: Enable secondary cores
Spin table is at the very beginning of boot code. Each core has an individual
release address within the spin table, the ft_cpu_setup fn updates the
"cpu-release-addr" property of each cpu node with the corresponding release
address.

Also fix CPU_RELEASE_ADDR to point to secondary_boot_func.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
2014-09-25 08:36:19 -07:00
Arnab Basu f43b4356a7 fdt_support: Make of_bus_default_count_cells non static
of_bus_default_count_cells can be used to get the #address-cells
and #size-cells defined by the current node's parent node. This
is required when using of_read_number to read from FDT nodes that
can be 32 or 64 bytes depending on values defined by the parent.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
2014-09-25 08:36:19 -07:00
Arnab Basu 08df4a21c7 fdt_support: Move of_read_number to fdt_support.h
This is being done so that it can be used outside 'fdt_support.c'. Making
life more convenient when reading device node properties that can be 32
or 64 bits long.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
2014-09-25 08:36:19 -07:00
York Sun bb5783224b driver/ddr/fsl: Fix tXP and tCKE
The driver was written using old DDR3 spec which only covers low speeds.
The value would be suboptimal for higher speeds. Fix both timing according
to latest DDR3 spec, remove tCKE as an config option.

Signed-off-by: York Sun <yorksun@freescale.com>
2014-09-25 08:36:18 -07:00
York Sun d9c68b1444 ARMv8/ls2085a_emu: Enable DP-DDR as standalone memory block
DP-DDR is used for DPAA, separated from main memory pool for general
use. It has 32-bit bus width and use a standard DDR4 DIMM (64-bit).

Signed-off-by: York Sun <yorksun@freescale.com>
2014-09-25 08:36:18 -07:00
York Sun 1d71efbb03 driver/ddr: Restruct driver to allow standalone memory space
U-boot has been initializing DDR for the main memory. The presumption
is the memory stays as a big continuous block, either linear or
interleaved. This change is to support putting some DDR controllers
to separated space without counting into main memory. The standalone
memory controller could use different number of DIMM slots.

Signed-off-by: York Sun <yorksun@freescale.com>
2014-09-25 08:36:18 -07:00
Prabhakar Kushwaha e211c12e77 board/ls2085a: Add support of NOR and NAND flash for simulator
Add support of NOR and NAND flash for simulator target.
Here
  IFC - CS0: NOR flash
  IFC - CS1: NAND flash

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-09-25 08:36:17 -07:00
Masahiro Yamada f1ef2b6233 kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig
This option specifies the default Device Tree used for the run-time
configuration of U-Boot.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Michal Simek <michal.simek@xilinx.com>
2014-09-25 09:31:24 -04:00
Masahiro Yamada 783e6a72b8 kconfig: move CONFIG_OF_* to Kconfig
This commit moves:
  CONFIG_OF_CONTROL
  CONFIG_OF_SEPARATE
  CONFIG_OF_EMBED
  CONFIG_OF_HOSTFILE

Because these options are currently not supported for SPL,
the "Device Tree Control" menu does not appear in the SPL
configuration.

Note:
zynq-common.h should be adjusted so as not to change the
default value of CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2014-09-25 09:27:50 -04:00
Jeroen Hofstee 0a5051ce6e compiler_gcc: prevent redefining attributes
The libc headers on FreeBSD and likely related projects as well contain an
header file, cdefs.h which provides similiar functionality as linux/compiler.h.
It provides compiler independent defines like __weak __packed, to allow
compiling with multiple compilers which might have a different syntax for such
extension.

Since that header file is included in multiple standard headers, like stddef.h
and stdarg.h, multiple definitions of those defines will be present if both are
included. When compiling u-boot the compiler will warn about it hundreds of
times since e.g. common.h will include both files indirectly.

commit 7ea50d5284 "compiler_gcc: do not redefine
__gnu_attributes" prevented such redefinitions, but this was undone by commit
fb8ffd7cfc "compiler*.h: sync
include/linux/compiler*.h with Linux 3.16".

Add the checks back where necessary to prevent such warnings.

As the original patch this checkpatch warning is ignored:
"WARNING: Adding new packed members is to be done with care"

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-24 18:30:29 -04:00
Masahiro Yamada d660b409dc common.h: remove MIN, MAX, MIN3, MAX3 macros
Now MIN, MAX, MIN3, MAX are not used.
Going forward, use min, max, min3, max3.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-24 18:30:29 -04:00
Jeroen Hofstee 87f13aa00d compiler.h: remove duplicated uninitialized_var
Since clang has a different definition for uninitialized_var
it will complain that it is redefined in include/compiler.h.
Since these are already defined in linux/compiler.h just remove
this instance.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-09-24 18:30:29 -04:00
Masahiro Yamada 97d5e9d149 linker_lists: fix comment
The section name and the C variable name seem to be opposite.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2014-09-24 18:30:29 -04:00
Masahiro Yamada 64147e564c kconfig: remove config_cmd_defaults.h
Now config_cmd_defaults.h is empty so it can be deleted safely.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-09-24 18:30:29 -04:00
Masahiro Yamada 1d5c20154f kconfig: move CONFIG_CMD_IMPORTENV to Kconfig
Since CONFIG_CMD_IMPORTENV is defined in config_cmd_defaults.h,
it should be enabled for all the boards except bf506f-ezkit
that undefs it explicitely.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24 18:30:29 -04:00