Commit Graph

12285 Commits

Author SHA1 Message Date
Tom Rini
563e53efaa Merge branch 'master' of git://git.denx.de/u-boot-net
Fixup include/configs/unipher.h to not set CONFIG_LIB_RAND

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-06-02 08:53:41 -04:00
Michal Simek
9ba9e85f3f net: Fix NET_RANDOM_ETHADDR dependencies
NET_RANDOM_ETHADDR depends on lib/rand.c. This patch adds dependency to
Kconfig to ensure that library is also compiled.

Remove the definitions from Blackfin boards' include/configs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-06-01 13:15:11 -05:00
Joe Hershberger
6eed3786c6 net: Move the CMD_NET config to defconfigs
This also selects CONFIG_NET for any CONFIG_CMD_NET board.

Remove the imx default for CONFIG_NET.

This moves the config that was defined by 60296a8 (commands: add more
command entries in Kconfig).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-06-01 09:40:15 -05:00
Joe Hershberger
7453cb595c Move setexpr to Kconfig
Another shell scripting command that has not been moved.

Moved using tools/moveconfig.py using these settings:

CMD_SETEXPR bool n y

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-06-01 09:39:29 -05:00
Masahiro Yamada
1e1f353685 sparc: fix build error on gr_ep2s60 board
Commit 92ac520821 (net: Remove all references to CONFIG_ETHADDR
and friends) accidentally dropped #endif.  Since then, gr_ep2s60
could not build.

scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  GEN     include/autoconf.mk
In file included from include/config.h:5:0,
                 from ./include/common.h:18:
include/configs/gr_ep2s60.h:15:0: error: unterminated #ifndef
 #ifndef __CONFIG_H__
 ^
make[1]: *** [include/autoconf.mk] Error 1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-06-01 09:33:21 -05:00
Markus Niebel
c0c5341e73 arm: mx6: tqma6: use default CONFIG_SYS_PBSIZE
this removes a config entry and uses the default value
defined in config_fallbacks.h. This implements the same
behaviour as a patch series for other i.MX6 boards from
Freescale

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-01 09:56:37 +02:00
Markus Niebel
da2103c79e arm: mx6: tqma6: fix spelling error in condition
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-01 09:54:52 +02:00
Tom Rini
43b1ff5f33 Merge branch 'master' of git://git.denx.de/u-boot-uniphier 2015-05-30 20:16:01 -04:00
Tom Rini
b1f7ecc9b5 Merge branch 'master' of http://git.denx.de/u-boot-sunxi 2015-05-30 20:15:59 -04:00
Masahiro Yamada
ece26f623c ARM: UniPhier: enable CONFIG_NET_RANDOM_ETHADDR
Since commit 92ac520821 (net: Remove all references to
CONFIG_ETHADDR and friends), the ethernet device on UniPhier boards
is not working because of the incorrect (all-zero) MAC address.

Enable CONFIG_NET_RANDOM_ETHADDR to generate the random one.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-31 02:55:55 +09:00
Masahiro Yamada
f8f35944d8 ARM: UniPhier: move CONFIG_SYS_TEXT_BASE to Kconfig
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-31 02:55:50 +09:00
Chen-Yu Tsai
014414f536 ARM: sunxi: Enable PSCI for sun8i
sun8i uses the same PSCI backend as sun6i, without power clamps.
Since there is no secure SRAM, the backend is placed at the end
of DRAM.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-29 13:46:36 +02:00
Chen-Yu Tsai
cc08ea4cff ARM: sunxi: Enable PSCI for sun6i
Now that we have a PSCI backend for sun6i, enable it.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-29 13:46:36 +02:00
Daniel Kochmański
f76eba38b3 sunxi/nand: Add support to the SPL for loading u-boot from internal NAND memory
This commit adds support to the sunxi SPL to load u-boot from the internal
NAND. Note this only adds support to access the boot partitions to load
u-boot, full NAND support to load the kernel, etc. from the nand data
partition will come later.

Signed-off-by: Roy Spliet <r.spliet@ultimaker.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-29 13:46:36 +02:00
Hans de Goede
1871a8ca62 sun9i: Basic sun9i (A80) support
Add initial sun9i (A80) support, only uart + mmc are supported for now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-29 13:46:36 +02:00
Hans de Goede
77fe98870b sunxi: Update sunxi-common.h to deal with different A1-SRAM base addr on sun9i
The A1 SRAM Base differs between sun9i and the others, update sunxi-common.h
to deal with this, so that we do not set the initial stack pointer to point
to the BROM.

This avoids the need for the weird undocumented register write I previously
took from the allwiner u-boot sources and which needed #ifdef-ery in start.S
as it needed to be done really early on.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-29 13:46:36 +02:00
Hans de Goede
e049fe2826 sunxi: Update sunxi-common.h to deal with different DRAM base addr on sun9i
The DRAM Base differs between sun9i and the others, update sunxi-common.h to
deal with this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-29 13:46:36 +02:00
Hans de Goede
93fc39a7c3 sunxi: Remove support for building "old-fashioned" fel binaries
The latest versions of the fel tool support loading normal u-boot builds
directly, and this is now the preferred way to use the fel boot method.

This commit removes support for the old deprecated standalone fel builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-29 13:46:36 +02:00
Hannes Schmelzer
4c302b9a65 cosmetic: change Author/MAINTAINER Name from Petermaier to Schmelzer
Since i've been married, i also have a new surname.
Mr. Petermaier moved to Mr. Schmelzer.

In this patch i update all files in which my (old) name is present.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2015-05-28 11:17:48 -04:00
Matt Porter
2d18ef2364 ARMv7M: add STM32F1 support
Add ARMv7M STM32F1 support including clocks, timer, gpio, and flash.

Signed-off-by: Matt Porter <mporter@konsulko.com>
2015-05-28 08:18:24 -04:00
Marek Vasut
e390bd5ed0 ARM: bcm283x: Switch to generic timer
Switch to generic timer implementation from lib/time.c .
This also fixes a signed overflow which was in __udelay()
implementation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2015-05-28 08:18:23 -04:00
Linus Walleij
1fd0f92ee1 vexpress64: use uncompressed kernel by default
The foundation model (FVP) emulator nominally boots using
a clean, uncompressed kernel and the "booti" command. Augment
the default U-Boot script to do this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-28 08:18:22 -04:00
Andrew Bradford
ea11b401b5 meminfo cmd: Enable printing >=4GiB SDRAM sizes
gd->ram_size is stored as phys_size_t type which can be bigger than an
unsigned long on some architectures.  When using unsigned long type,
SDRAM of 4GiB or larger will not print the correct size, but using
phys_size_t will.

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
2015-05-28 08:18:21 -04:00
Karl Apsite
d52e8575d9 Combine bootm_find_<thing> functions together
bootm_find_ramdisk_fdt() renamed to bootm_find_images() for readability.

The function bootm_find_ramdisk_fdt() appears to be a simple wrapper for
bootm_find_ramdisk(), bootm_find_fdt(), and now bootm_find_loadables().
I didn't see any other callers entering a bootm_find<thing>, so removing
the wrapper, and condensing these together hopefully makes the code a
little simpler.

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-28 08:18:21 -04:00
Karl Apsite
84a07dbfd8 add boot_get_loadables() to load listed images
Added a trimmed down instance of boot_get_<thing>() to satisfy the
minimum requierments of the added feature.  The function follows the
normal patterns set by other boot_get<thing>'s, which should make it a
bit easier to combine them all together into one boot_get_image()
function in a later refactor.

Documentation for the new function can be found in source:
  include/image.h

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-28 08:18:20 -04:00
Karl Apsite
ecf8cd6535 mkimage will now report information about loadable
Added FIT_LOADABLE_PROP, so the user can identify an optional entry
named "loadables" in their .its configuration. "loadables" is a comma
separated list in the .its

Documentation can be found in doc/uImage.FIT/source_file_format.txt and
                              doc/uImage.Fit/multi-with-loadables.its

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-28 08:18:20 -04:00
Masahiro Yamada
af22ac660a include: introduce include/linux/io.h as a wrapper of asm/io.h
In the latest Linux coding style, <linux/io.h> should be included
rather than <asm/io.h>.  To follow this standard also in U-Boot,
add include/linux/io.h.  Currently, it just includes <asm/io.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-28 08:18:19 -04:00
Linus Walleij
33665f7cc9 vexpress64: let Juno wait for root device
The Juno reference design typically plugs the root FS
on a USB stick. We need to wait a bit for the root to
appear so tell this on the default command line.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-28 08:18:19 -04:00
Ricardo Ribalda
d67b72d563 ppc: xilinx-ppc: Move to generic board support
Generic board support seems to work just fine. Tested on ml507 with
bitstream generated on the latest ISE software.

Tested-by: Georg Schardt <schardt@team-ctech.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
2015-05-28 08:18:09 -04:00
Fabio Estevam
fdf71898d9 warp: Add fuse command support
Select the fuse command support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-05-28 12:10:41 +02:00
Fabio Estevam
e6434d7eca warp: Enable CONFIG_SUPPORT_EMMC_BOOT
CONFIG_SUPPORT_EMMC_BOOT is important to enable the boot partition via
'mmc partconf 0 1 1 0' command, for example.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-05-28 12:10:41 +02:00
Fabio Estevam
b459803335 warp: Fix CONFIG_SYS_FSL_ESDHC_ADDR
Warp uses eMMC connected to esdhc2 port, so fix
CONFIG_SYS_FSL_ESDHC_ADDR to reflect that.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-05-28 12:10:41 +02:00
Fabio Estevam
825adb991a warp: Adjust CONFIG_SYS_DFU_DATA_BUF_SIZE
Adjust CONFIG_SYS_DFU_DATA_BUF_SIZE in order to avoid the following error
when running the dfu command:
=> dfu 0 mmc 0
dfu_get_buf: Could not memalign 0x2000000 bytes

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-05-28 12:10:41 +02:00
Linus Walleij
303557089f vexpress64: fix various memory issues
The ARM Trusted Firmware or other security solutions are
eating memory from the top of the physical SDRAM1 space,
moving backward from 0xffffffff, currently occupying e.g.
0xfe000000-0xffffffff with Trusted Firmware.

This solution to reserving memory for secure world is not
optimal, so we need to think of how the secure world and
earlier boot stages should communicate to U-Boot what
memory they are eating up. For now let's just put 16MB
aside.

Also enable the memory test command and define start and
end of the test range so we can check that we actually have
all that memory available and working.

Suggested-by: Axel Haslam <ahaslam@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-27 13:35:55 -04:00
Chris Packham
e186851ae4 Makefile: Add U_BOOT_TZ and include in version
Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to
include the timezone in the version output.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2015-05-27 13:35:55 -04:00
Ryan Harkin
f19f389f34 vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH
Testing on the ARM Versatile Express Juno board showed intermittent CFI
flash detection problems.

Debug output in exception cases showed that the NOR flash was returning
incorrect values to a query command:

fwc addr 0000000008000000 cmd f0 f0f0f0f0 32bit x 8 bit
fwc addr 0000000008000000 cmd ff ffffffff 32bit x 8 bit
fwc addr 0000000008000154 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151
fwc addr 0000000008001554 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151
fwc addr 0000000008000000 cmd f0 00f000f0 32bit x 16 bit
fwc addr 0000000008000000 cmd ff 00ff00ff 32bit x 16 bit
fwc addr 0000000008000154 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051
fwc addr 0000000008001554 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051

Debugging showed that the problem could be solved by preventing u-boot
from scanning different flash widths by specifying
CONFIG_SYS_FLASH_CFI_WIDTH so that only using the 'correct' width was
used.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-27 13:35:54 -04:00
Tom Rini
9bea236b34 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-05-26 10:38:01 -04:00
Tom Rini
d43e154210 Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze 2015-05-26 10:37:29 -04:00
Peter Robinson
1022b85cb0 mx6: standardise CONFIG_CMD_CACHE
Move CONFIG_CMD_CACHE to mx6_common and standardise the way it's defined.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
2015-05-26 15:58:57 +02:00
Peter Robinson
e51c1e8ece imx6: generic MMC config options to mx6_common
Move all standard mx6 MMC configs to mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
2015-05-26 15:58:57 +02:00
Peter Robinson
a380ce6e96 imx6: standardise filesystem and boot options
Move all standard filesystem, partition and fdt options to mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-05-26 15:58:56 +02:00
Peter Robinson
2d8a07475e imx6: move generic miscellaneous and overwrite options
Move generic miscellaneous options that are standard across most, if not all,
 mx6 boards to central mx6_common define to ensure consistent features.

 Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-05-26 15:58:56 +02:00
Peter Robinson
8183058188 imx6: centralise common boot options in mx6_common.h
Define common LOADADDR and BOOTDELAY to ensure a consistent experience
across mx6 boards

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-05-26 15:58:56 +02:00
Peter Robinson
302b2e5bab imx6: move MXC_GPIO define to mx6_common.h
Define CONFIG_MXC_GPIO and CONFIG_CMD_GPIO by default in mx6_common

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-05-26 15:58:56 +02:00
Peter Robinson
ea6909173f imx6: move standard ATAG configs to mx6_common.h
Define the standard ATAG consfigs in mx6_common.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
2015-05-26 15:58:55 +02:00
Peter Robinson
3b1f681131 imx6: move generic imx6 options to mx6_common.h
All boards define CONFIG_MX6, CONFIG_DISPLAY_BOARDINFO, CONFIG_DISPLAY_CPUINFO
and CONFIG_SYS_GENERIC_BOARD so define them in mx6_common

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
2015-05-26 15:58:55 +02:00
Peter Robinson
056845c235 imx6: move all standard includes to mx6_common.h
The linux/sizes.h, asm/arch/imx-regs.h, asm/imx-common/gpio.h,
config_cmd_default.h includes are used fairly universally across imx6 boards
so include them in mx6_common.h by default.

We define CONFIG_SYS_NO_FLASH before config_cmd_default.h  so that we
don't have to undef CONFIG_CMD_FLASH / CONFIG_CMD_IMLS everywhere.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-05-26 15:58:48 +02:00
Peter Robinson
60667a53bc novena: standardise mx6_common.h include
Standardise mx6_common.h to the same as other mx6 boards

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
2015-05-26 15:31:48 +02:00
Tim Harvey
0a9c215050 imx: ventana: update MMC env configuration
We will use the same env size and redundancy used for NAND env for MMC.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-26 14:21:32 +02:00
Heiko Schocher
7254d92ebc arm, imx6: add support for aristainetos2 board
add support for imx6dl based aristainetos2 board

U-Boot 2015.04-rc5-00066-g60f6ed4 (Apr 10 2015 - 08:46:27)

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
Reset cause: WDOG
Board: aristaitenos2
       Watchdog enabled
I2C:   ready
DRAM:  1 GiB
NAND:  1024 MiB
MMC:   FSL_SDHC: 0
SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Display: lg4573 (480x800)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
=>

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-05-26 14:18:11 +02:00
Michal Simek
a2ec7fb906 zynq: Use system timer implementation instead of our
Don't use error-prone arch timer code and instead use system
timer implementation to simplify our code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-05-25 10:52:03 +02:00
Tom Rini
980267a144 Merge git://git.denx.de/u-boot-nand-flash 2015-05-24 21:01:30 -04:00
Stefan Agner
8fca2d8cb8 mtd: vf610_nfc: enable ONFI detection
This changes enable ONFI detection. The Read ID command now allows
one address byte which is needed for ONFI detection. To read the
ONFI parameter page, the NAND_CMD_PARAM need to be supported. The
CMD code enables one command and one address byte along with reading
data from flash using R/B#, as specified by ONFI.

Signed-off-by: Stefan Agner <stefan@agner.ch>
2015-05-24 14:27:46 -05:00
Stefan Agner
5519194d4f mtd: vf610_nfc: add Freescale NFC controller configs to Kconfig
This commit allows users to enable/disable the Freescale NFC
controller found in systems like Vybrid (VF610), MPC5125, MCF54418
or Kinetis K70 via Kconfig with more detailed help docs.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Stefano Babic <sbabic@denx.de>
[scottwood: updated vf610twr_nand_defconfig]
Signed-off-by: Scott Wood <scottwood@freescale.com>
2015-05-24 14:27:28 -05:00
Tom Rini
a84988c76d Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2015-05-22 17:23:15 -04:00
Tim Harvey
53940a5079 imx: ventana: config: enable Falcon mode
Falcon mode entails the SPL booting the OS directly instead of U-Boot.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-21 19:07:17 +02:00
Fabio Estevam
0d1ea05210 wandboard: Switch to SPL support
Currently we need to build one U-boot image for each of the wandboard
variants: quad, dual-lite and solo.

By switching to SPL we can support all these variants with a single binary,
which is very convenient.

Based on the work from Richard Hu.

Tested kernel booting on the three boards.

Signed-off-by: Richard Hu <hakahu@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2015-05-21 18:08:37 +02:00
Joe Hershberger
421f86f329 test: env: Add test framework for env
Add a new "env" subcommand to the ut command.

This will run unit tests on the env code. This should be targetable to
any device that supports the env features needed for the tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:18 -04:00
Joe Hershberger
fe3f6a65fe test: Return values from the asserts compatible with cmds
The asserts are sometimes called from the context of the test command
itself so make sure that a return that happens as a result of a failure
is compatible with that command return. When called within a test, the
return value is ignored.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:18 -04:00
Joe Hershberger
c812f722f8 test: dm: Move the time test over to the ut command
Unify the command for running unit tests further by moving the "ut_time"
command over to "ut time".

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-21 09:16:17 -04:00
Joe Hershberger
40441e0bd3 test: dm: Move the dm tests over to the ut command
Unify the command for running unit tests further by moving the "dm test"
command over to "ut dm".

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:17 -04:00
Joe Hershberger
c617ede08a test: Add a common unit test command
Add a command that all other unit tests should be a sub-command of.
Also include a command that will run all tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:17 -04:00
Joe Hershberger
e721b882e9 test: Generalize the unit test framework
Separate the ability to define tests and assert status of test functions
from the dm tests so they can be used more consistently throughout all
tests.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:16:16 -04:00
Joe Hershberger
6e0d26c050 net: Handle ethaddr changes as an env callback
When the ethaddr is changed in the env, update the device pdata at the
same time (only if it is probed for the DM case; only if registered for
the non-DM case). Again this gets us closer to completely non-polled
env needed to simplify the net_loop.

This requires that the NET feature select the REGEX feature.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-21 09:16:16 -04:00
Joe Hershberger
c0a93440a7 net: Add default flags for common net env vars
Check that the common network stack's env vars conform to the proper
format for IP addresses.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:20 -04:00
Joe Hershberger
fd3056337e net: Use env callbacks for net variables
Instead of checking for changes to the env each time we enter the
net_loop, use the env callbacks to update the values of the variables.
Don't update the variables when the source was programmatic, since the
variables were the source of the new value.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:20 -04:00
Joe Hershberger
73c2bbeea3 net: Apply default format rules to all ethaddr
Use a regular expression to apply the default formatting flags for all
ethaddr env vars.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:20 -04:00
Joe Hershberger
94b467b14e env: Distinguish finer between source of env change
We already could tell the difference in the callback between an import
and "other" which we called interactive. Now add further distinction
between interactive (i.e. running env set / env edit / env ask / etc.
from the U-Boot command line) and programmatic (i.e. when u-boot source
calls any variant of setenv() ).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:19 -04:00
Joe Hershberger
bdf1fe4e68 env: Add regex support to env_attrs
Allow the features that use env_attrs to specify regexs for the name

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:19 -04:00
Joe Hershberger
cca98fd6aa env: Allow env_attr_walk to pass a priv * to callback
In some cases it can be helpful to have context in the callback about
the calling situation. This is needed for following patches.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:19 -04:00
Joe Hershberger
7acdf78108 sandbox: Enable some ENV commands
Enable some additional ENV commands in sandbox to aid in build testing
and run testing.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-21 09:13:18 -04:00
Tom Rini
3238639d40 Merge git://git.denx.de/u-boot-net 2015-05-20 15:57:55 -04:00
York Sun
a88cc3bd90 arm/ls1021a: Remove ccsr_ddr from immap_ls102xa.h
ccsr_ddr structure is already defined in fsl_immap.h. Remove
this duplicated define. Move fixed timing into ls1021atwr.h.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
Acked-by: Alison Wang <alison.wang@freescale.com>
2015-05-20 10:34:09 -07:00
York Sun
d9be24c92d driver/ddr/fsl: Remove deskew_cntrl register
This register is reserved and shouldn't have been exposed.
Accessing it may have unexpected result on different SoCs.

Signed-off-by: York Sun <yorksun@freescale.com>
2015-05-20 10:34:09 -07:00
Alison Wang
1c69a51cc3 arm: ls102xa: Adjust the load address of U-Boot for NOR boot
The original load address of U-Boot is 0x67f80000. The address
space of NOR flash is 0x60000000 to 0x67ffffff. It will cause
the size of u-boot couldn't be larger than 512K. As more features
are supported in u-boot, the size of u-boot is larger than 512K.

To fix this issue, the load address of U-Boot for NOR boot is
adjusted to 0x60100000.

In RCW, the PBI command needs to change as follows:
 .pbi
-write 0xee0200, 0x67f80000
+write 0xee0200, 0x60100000
 .end

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-20 10:33:52 -07:00
Joe Hershberger
76ec988b06 net: Remove all calls to net_random_ethaddr()
Remove the calls to net_random_ethaddr() that some boards and some
drivers are calling. This is now implemented inside of net/eth.c

Enable the feature for all boards that previously enabled it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-By: Michael Walle <michael@walle.cc> (for the lsxl board part)

Series-changes: 2
-Fixed bfin build errors
2015-05-20 11:07:27 -05:00
Joe Hershberger
92ac520821 net: Remove all references to CONFIG_ETHADDR and friends
We really don't want boards defining fixed MAC addresses in their config
so we just remove the option to set it in a fixed way. If you must have
a MAC address that was not provisioned, then use the random MAC address
functionality.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-19 13:33:21 -05:00
Paul Kocialkowski
8a65f69c9c sunxi: Cache line size definition
Sunxi platforms use ARM Cortex A8, A7 and A15 (unsupported yet) CPU cores,
which all have 64 bytes cache line size.

This is required to e.g. enable USB gadget.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-19 18:46:44 +02:00
Laurent Itti
5cd83b11f9 sunxi: add support for UART2 on A23/A33
Add support for UART2 (2-pin version but note that RTS/CTS pins are available
pn that port for possible future use), can be selected in config
by using CONFIG_CONS_INDEX=3

Signed-off-by: Laurent Itti <laurentitti@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-19 18:37:30 +02:00
Hans de Goede
a8552c7c9b console: Fix pre-console flushing via cfb_console being very slow
On my A10 OlinuxIno Lime I noticed a huge (5+ seconds) delay coming from
console_init_r. This turns out to be caused by the preconsole buffer flushing
to the cfb_console. The Lime only has a 16 bit memory bus and that is already
heavy used to scan out the 1920x1080 framebuffer.

The problem is that print_pre_console_buffer() was printing the buffer once
character at a time and the cfb_console code then ends up doing a cache-flush
for touched display lines for each character.

This commit fixes this by first building a 0 terminated buffer and then
printing it in one puts() call, avoiding unnecessary cache flushes.

This changes the time for the flush from 5+ seconds to not noticable.

The downside of this approach is that the pre-console buffer needs to fit
on the stack, this is not that much to ask since we are talking about plain
text here. This commit also adjusts the sunxi CONFIG_PRE_CON_BUF_SZ to
actually fit on the stack. Sunxi currently is the only user of the pre-console
code so no other boards need to be adjusted.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-05-19 18:37:30 +02:00
Paul Kocialkowski
9f85221135 sunxi: Pass serial number through ATAG
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-19 18:28:52 +02:00
Tim Harvey
f0e8e8944d imx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from OTP
The MX6 has a temperature grade defined by OCOTP_MEM0[7:6] which is at 0x480
in the Fusemap Description Table in the reference manual. Return this value
as well as min/max temperature based on the value.

Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the
their Fusemap Description Table however Freescale has confirmed that these
eFUSE bits match the description within the IMX6DQRM and that they will
be added to the next revision of the respective reference manuals.

This has been tested with IMX6 Automative and Industrial parts.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-19 15:31:40 +02:00
Peng Fan
3fd10f3e25 pmic: pfuze100 fix typo
Change PUZE_100_SW1ABCONF to PFUZE100_SW1ABCONF

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-05-19 15:13:38 +02:00
Nikolay Dimitrov
223d91cc33 imx: riotboard, marsboard: Enable thermal support
Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
2015-05-19 15:10:27 +02:00
Tim Harvey
e06a03625d imx: ventana: add pmic_setup to SPL
We need to do any PMIC setup in the SPL if we are to bypass U-Boot for
falcon mode.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-19 15:04:44 +02:00
Tim Harvey
55ff55e9b4 imx: ventana: (cosmetic) clean up size defines for improved readability
Use the SZ_1M and SZ_1K macros from linuz/sizes.h for improved readability

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-19 15:04:31 +02:00
Tim Harvey
e889e23a1d imx: ventana: config: use MMC SPL RAW support
Switch to MMC RAW support for SPL. We will place the uboot.img at 69KB.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-19 15:04:10 +02:00
Tim Harvey
50de5088bb imx: ventana: config: enable Thermal support
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:25 +02:00
Tim Harvey
d41c8c8ece imx: ventana: enable DM_SERIAL
mxc_serial supports DM so lets use it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:25 +02:00
Tim Harvey
e1b4770ce4 imx: ventana: config: enable driver model
Enable U-Boot Driver Model (DM).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:25 +02:00
Tim Harvey
32a6eaeadf imx: ventana: config: enable gpio command
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:24 +02:00
Tim Harvey
06c3564d5f imx: ventana: display SPL boot device
Display what device the SPL will fetch uboot.img from

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:24 +02:00
Tim Harvey
560e8b3f33 imx: ventana: set dtype env var to boot media
Bootscripts for some distro's such as Android can benefit from knowing
what boot media its script was loaded from.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15 19:21:24 +02:00
Soeren Moch
9927d60f4a tbs2910: add CONFIG_SUPPORT_EMMC_BOOT
Add emmc boot partition commands to be able to select the boot partition.

Signed-off-by: Soeren Moch <smoch@web.de>
2015-05-15 19:21:24 +02:00
Soeren Moch
2a02e3f978 tbs2910: use default CONFIG_SYS_PBSIZE
Since there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h,
this setting is no longer required in board configurations.

Signed-off-by: Soeren Moch <smoch@web.de>
2015-05-15 19:21:24 +02:00
Soeren Moch
54ca183aff tbs2910: only enable vga output for stdout/stderr when hdmi detected
Only enable graphical output for stdout/stderr (and a usb keyboard for stdin)
when a hdmi device is detected.
Serial console is always enabled for stdin/stdout/stderr.

Signed-off-by: Soeren Moch <smoch@web.de>
2015-05-15 19:21:24 +02:00
Soeren Moch
d896276d27 tbs2910: support for usb otg host mode
Add support for USB OTG host mode. Only high speed devices supported so far
(e.g. usb 2.0 hub required to connect a keyboard).

Signed-off-by: Soeren Moch <smoch@web.de>
2015-05-15 19:21:24 +02:00
Fabio Estevam
62be18ef74 hummingboard: Remove mx6solo specific support
Hummingboard dual, dual-lite and solo are now supported via SPL mechanism.

Remove the previous hummingboard support, which does not use SPL and supported
only the solo variant.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-05-15 19:21:23 +02:00
Fabio Estevam
0e1f991efb mx6cuboxi: Skip usb initialization when booting without HDMI
Starting USB initialization is useful for those who use Cuboxi/Hummingboard
with HDMI and USB keyboard.

However, when booting without a HDMI connection we can skip the usb
initialization, which makes the boot faster.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
2015-05-15 19:20:47 +02:00
Stefan Roese
911b5ea56e arm: mx6: tqma6: Fix USB and add other filesystems
This patch fixes the USB EHCI support on the TQMa6 SoM. Additionally
some filesystems are added, included the generic FS commands (e.g.
ls...).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-By: Markus Niebel <Markus.Niebel@tq-group.com>
2015-05-15 19:20:47 +02:00
Fabio Estevam
c49cfdcd22 mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin
There are users of Cuboxi and Hummingboard that use these boards without
connecting them to a USB/serial adapter.

Allow such usage by allowing the HDMI port to act as stdout and USB keyboard
as stdin.

The serial console still also works as stdin/stdout.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
2015-05-15 19:20:47 +02:00
Fabio Estevam
e1d74379ef mx6cuboxi: Add USB host support
Enable USB Host1 port.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
2015-05-15 19:20:47 +02:00
Fabio Estevam
f68a9c6b3d mx6cuboxi: Add HDMI output support
Add HDMI output using PLL5 as the source for the IPU clocks,
and accurate VESA timings.

These settings are based on the patch from Soeren Moch <smoch@web.de>
submitted for the tbs2910 mx6 based board.

It allows the display to work properly at 1024x768@60.

This should make the hdmi output signal compatible with most if not all
modern displays.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
2015-05-15 19:20:46 +02:00
Przemyslaw Marczak
9038cd5313 sandbox: dts: add sandbox_pmic.dtsi and include it to sandbox.dts and test.dts
This commit adds dtsi file for Sandbox PMIC.
It fully describes the PMIC by:
- i2c emul node - with a default settings of 16 registers
- 2x buck regulator nodes
- 2x ldo regulator nodes

The default register settings are set with preprocessor macros:
- VAL2REG(min[uV/uA], step[uV/uA], val[uV/uA])
- VAL2OMREG(mode id)
Both defined in file:
- include/dt-bindings/pmic/sandbox_pmic.h

The Voltage ranges of each regulator can be found in:
- include/power/sandbox_pmic.h

The new file is included into:
- sandbox.dts
- test.dts

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:59:21 -06:00
Przemyslaw Marczak
e8f339e0e8 test: dm: add sandbox PMIC framework tests
This change adds new file to sandbox driver model test environment.
The file is: test/dm/power.c, and it includes tests for PMIC framework,
which includes PMIC uclass and REGULATOR uclass.

All tests are based od Sandbox PMIC emulated device. Some test constants for
this device are defined in the header: include/power/sandbox_pmic.h

PMIC tests includes:
- pmic get - tests, that pmic_get() returns the requested device
- pmic I/O - tests I/O by writing and reading some values to PMIC's registers
             and then compares, that the write/read values are equal.

The regulator tests includes:
- Regulator get by devname/platname
- Voltage set/get
- Current set/get
- Enable set/get
- Mode set/get
- Autoset
- List autoset

For the regulator 'get' test, the returned device pointers are compared,
and their names are also compared to the requested one.
Every other test, first sets the given attribute and next try to get it.
The test pass, when the set/get values are equal.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:58:34 -06:00
Przemyslaw Marczak
5d387d0df9 sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
This commit adds emulation of sandbox PMIC device, which includes:
- PMIC I2C emulation driver
- PMIC I/O driver (UCLASS_PMIC)
- PMIC regulator driver (UCLASS_REGULATOR)

The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes,
which allows using 'i2c md' command with the default count (16).

The sandbox PMIC provides regulators:
- 2x BUCK
- 2x LDO

Each, with adjustable output:
- Enable state
- Voltage
- Current limit (LDO1/BUCK1 only)
- Operation mode (different for BUCK and LDO)

Each attribute has it's own register, beside the enable state, which depends
on operation mode.

The header file: sandbox_pmic.h includes PMIC's default register values,
which are set on i2c pmic emul driver's probe() method.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:58:34 -06:00
Przemyslaw Marczak
3b880757ab dm: regulator: uclass driver code cleanup
This cleanup includes:
- remove of the preprocessor macros which pointed to long name functions
- update of the names of some regulator uclass driver functions
- cleanup of the function regulator_autoset()
- reword of some comments of regulator uclass header file
- regulator_get_by_platname: check error for uclass_find_* function calls
- add function: regulator_name_is_unique
- regulator post_bind(): check regulator name uniqueness
- fix mistakes in: regulator/Kconfig
- regulator.h: update comments
- odroid u3: cleanup the regulator calls

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:58:34 -06:00
Przemyslaw Marczak
f415a3ec9d dm: pmic: code cleanup of PMIC uclass driver
The cleanup includes:
- pmic.h - fix mistakes in a few comments
- pmic operations: value 'reg_count' - redefine as function call
- fix function name: pmic_bind_childs() -> pmic_bind_children()
- pmic_bind_children: change the 'while' loop with the 'for'
- add implementation of pmic_reg_count() method
- pmic_bind_children() - update function call name
- Kconfig: add new line at the end of file
- Update MAX77686 driver code

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:58:34 -06:00
Przemyslaw Marczak
ca2b933a38 odroid: enable driver model pmic/regulator API and MAX77686 drivers
This change enables the configs required to init and setup max77686
regulator driver, using the new driver model pmic and regulator API.
And also changes the old pmic framework calls to the new ones.

This commits enables:
- CONFIG_ERRNO_STR
- CONFIG_DM_PMIC
- CONFIG_DM_PMIC_CMD
- CONFIG_DM_PMIC_MAX77686
- CONFIG_DM_REGULATOR
- CONFIG_DM_REGULATOR_CMD
- CONFIG_DM_REGULATOR_MAX77686

And removes the unused:
- CONFIG_DM_I2C_COMPAT
- CONFIG_POWER
- CONFIG_POWER_I2C
- CONFIG_POWER_MAX77686

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 19:58:34 -06:00
Przemyslaw Marczak
1757df4693 dm: regulator: add max77686 regulator driver
This commit adds support to MAX77686 regulator driver,
based on a driver model regulator's API. It implements
almost all regulator operations, beside those for setting
and geting the Current value.
For proper bind and operation it requires the MAX77686 PMIC driver.

New file: drivers/power/regulator/max77686.c
New config: CONFIG_DM_REGULATOR_MAX77686

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:38 -06:00
Przemyslaw Marczak
52a3de5e12 dm: pmic: add max77686 pmic driver
This is the implementation of driver model PMIC driver.
The max77686 PMIC driver implements read/write operations and driver
bind method - to bind its childs.

This driver will try to bind the regulator devices by using it's child
info array with regulator prefixes and driver names. This should succeed
when compatible regulator driver is compiled. If no regulator driver found,
then the pmic can still provide read/write operations, and can be used with
PMIC function calls.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:38 -06:00
Przemyslaw Marczak
af41e8db26 dm: regulator: add implementation of driver model regulator uclass
This commit introduces the implementation of dm regulator API.
Device tree support allows for auto binding. And by the basic
uclass operations, it allows to driving the devices in a common
way. For detailed informations, please look into the header file.

Core files:
- drivers/power/regulator-uclass.c - provides regulator common functions api
- include/power/regulator.h - define all structures required by the regulator

Changes:
- new uclass-id: UCLASS_REGULATOR
- new config: CONFIG_DM_REGULATOR

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:37 -06:00
Przemyslaw Marczak
4d9057e82b dm: pmic: add implementation of driver model pmic uclass
This commit introduces the PMIC uclass implementation.
It allows providing the basic I/O interface for PMIC devices.
For the multi-function PMIC devices, this can be used as I/O
parent device, for each IC's interface. Then, each PMIC particular
function can be provided by the child device's operations, and the
child devices will use its parent for read/write by the common API.

Core files:
- 'include/power/pmic.h'
- 'drivers/power/pmic/pmic-uclass.c'

The old pmic framework is still kept and is independent.

For more detailed informations, please look into the header file.

Changes:
- new uclass-id: UCLASS_PMIC
- new config: CONFIG_DM_PMIC

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:37 -06:00
Przemyslaw Marczak
bf2e5d5be2 exynos4-common: remove the unsued CONFIG_CMD_PMIC
This config name was never used, because the present pmic command
was precompiled for the CONFIG_POWER.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:36 -06:00
Przemyslaw Marczak
19bd3aaa59 exynos5: fix build break by adding CONFIG_POWER
Move the configs listed below from exynos5-dt-common.h to exynos5-common.h:
- CONFIG_POWER
- CONFIG_POWER_I2C
fixes build break for Arndale and Smdk5250 boards.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:36 -06:00
Hans de Goede
eab9433aa5 sunxi: Change usb-kbd interrupt polling to use an usb interrupt queue
Now that the ohci code supports usb interrupt queues we can switch (back)
to using an usb interrupt queue for usb-kbd interrupt polling. This
greatly reduces u-boot's latency when dealing with usb keyboards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-14 18:49:36 -06:00
Simon Glass
b527924954 sandbox: cros_ec: Support EC_CMD_ENTERING_MODE emulation
Emualate this function which is used with Chrome OS verified boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:34 -06:00
Simon Glass
f9523961b0 dm: gpio: Fix comment typo in GPIOD_IS_IN
This should say 'in', not 'out'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:34 -06:00
Simon Glass
01501804fd dm: i2c: Add a function to find out the chip offset length
We can currently set this but there is no API function to get it. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Heiko Schocher<hs@denx.de>
2015-05-14 18:49:33 -06:00
Simon Glass
28b5404ca1 bootstage: Add IDs for SPI flash reading and decompression
We maintain an accumulator for time spent reading from SPI flash, since
this can be significant on some platforms. Also add one for decompression
time.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-05-14 18:49:33 -06:00
Vincent Palatin
08f3bb0bcd usb: add device connection/disconnection detection
Provide a function to detect USB device insertion/removal in order to
avoid having to do USB enumeration in a tight loop when trying to detect
peripheral hotplugging.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:33 -06:00
Hans de Goede
6a72e804a2 sunxi: ohci: Add ohci usb host controller support
This commit adds support for the OHCI companion controller, which makes
usb-1 devices directly plugged into to usb root port work.

Note for now this switches usb-keyboard support for sunxi back from int-queue
support to the old interrupt polling method. Adding int-queue support to the
ohci code and switching back to int-queue support is in the works.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-14 18:49:32 -06:00
Hans de Goede
b6de4d1093 dm: usb: Add support for companion controllers
USB companion controllers must be scanned after the main controller has
been scanned, so that any devices which the main controller which to hand
over to the companion have actually been handed over before we scan the
companion.

As there are no guarantees that this will magically happen in the right
order, split the scanning of the buses in 2 phases, first main controllers,
and then companion controllers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:31 -06:00
Hans de Goede
8a5f0665da dm: usb: Add support for interrupt queues to the dm usb code
Interrupt endpoints typically are polled for a long time by the usb
controller before they return anything, so calls to submit_int_msg() can
take a long time to complete this.

To avoid this the u-boot code has the an interrupt queue mechanism / API,
add support for this to the driver-model usb code and implement it for the
dm ehci code.

See the added doc comments for more details.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-14 18:49:31 -06:00
Tom Rini
9597494ebf Merge branch 'master' of git://git.denx.de/u-boot-tegra 2015-05-14 07:01:11 -04:00
Ian Campbell
21f0fd245e jetson-tk1: Add PSCI configuration options and reserve secure code
The secure world code is relocated to the MB just below the top of 4G, we
reserve it in the FDT (by setting CONFIG_ARMV7_SECURE_RESERVE_SIZE) but it is
not protected in h/w.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:16 -07:00
Stephen Warren
86bd20b007 ARM: tegra: enable STDIO deregistration
At the very least when USB keyboard support is enabled, we need to enable
CONFIG_SYS_STDIO_DEREGISTER, so the "usb reset" is able to re-scan USB
ports and find new devices. Enable it everywhere per request from Simon
Glass.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:12 -07:00
Stephen Warren
48cfca240d ARM: tegra: CONFIG_{SYS_, }LOAD{_, }ADDR rationalization
As best I can tell, CONFIG_SYS_LOAD_ADDR and CONFIG_LOADADDR/$loadaddr
serve essentially the same purpose. Roughly, if a command takes a load
address, then CONFIG_SYS_LOAD_ADDR or $loadaddr (or both) are the default
if the command-line does not specify the address. Different U-Boot
commands are inconsistent re: which of the two default values they use.
As such, set the two to the same value, and move the logic that does this
 into tegra-common-post.h so it's not duplicated. A number of other non-
Tegra boards do this too.

The values chosen for these macros are no longer consistent with anything
in MEM_LAYOUT_ENV_SETTINGS. Regain consistency by setting $kernel_addr_r
to CONFIG_LOADADDR. Older scripts tend to use $loadaddr for the default
kernel load address, whereas newer scripts and features tend to use
$kernel_addr_r, along with other variables for other purposes such as
DTBs and initrds. Hence, it's logical they should share the same value.

I had originally thought to make the $kernel_addr_r and CONFIG_LOADADDR
have different values. This would guarantee no interference if a script
used the two variables for different purposes. However, that scenario is
unlikely given the semantic meaning associated with the two variables.
The lowest available value is 0x90200000; see comments for
MEM_LAYOUT_ENV_SETTINGS in tegra30-common-post.h for details. However,
that value would be problematic for a script that loaded a raw zImage to
$loadaddr, since it's more than 128MB beyond the start of SDRAM, which
would interfere with the kernel's CONFIG_AUTO_ZRELADDR. So, let's not do
that.

The only potential fallout I could foresee from this patch is if someone
has a script that loads the kernel to $loadaddr, but some other file
(DTB, initrd) to a hard-coded address that the new value of $loadaddr
interferes with. This seems unlikely. A user should not do that; they
should either hard-code all load addresses, or use U-Boot-supplied
variables for all load addresses. Equally, any fallout due to this change
is trivial to fix; simply modify the load addresses in that script.

Cc: Paul Walmsley <pwalmsley@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Paul Walmsley <pwalmsley@nvidia.com>
Reviewed-by: Simon Glass
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:12 -07:00
Simon Glass
dedc44b466 tegra124: video: Add full link training for eDP
Add full link training as a fallback in case the fast link training
fails.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:12 -07:00
Simon Glass
531eaedc7a tegra: config: nyan-big: Enable LCD
Add the PMIC, LCD settings, PWM and also show the board info at the top of
the LCD when starting up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:12 -07:00
Simon Glass
00f3732752 tegra: video: Support serial output resource (SOR) on tegra124
The SOR is required for talking to eDP LCD panels. Add a driver for this
which will be used by the DisplayPort driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:11 -07:00
Simon Glass
51f2c99e14 dm: video: Add a uclass for display port
eDP (Embedded DisplayPort) is a standard widely used in laptops to drive
LCD panels. Add a uclass for this which supports a few simple operations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:10 -07:00
Simon Glass
00cf1167bb edid: Add a function to read detailed monitor timings
For digital displays (such as EDP LCDs) we would like to read the EDID
information and use that to set display timings. Provide a function to do
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:10 -07:00
Simon Glass
490f5fd238 video: Add drm_dp_helper.h
This file (from Linux 3.17) provides defines for display port. Use it so
that our naming is consistent with Linux.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:10 -07:00
Simon Glass
ec022efb86 tegra: config: Use CONFIG_LCD to detect LCD presence
Instead of CONFIG_VIDEO_TEGRA, use CONFIG_LCD to determine whether an LCD
is present. Tegra124 uses a different driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:09 -07:00
Simon Glass
d55b7d4c53 power: Export register access functions from as3722
With the full PMIC framework we may be able to avoid this. But for now
we need access to the PMIC.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:07 -07:00
Simon Glass
12e671142d fdt: Add binding decode function for display-timings
This is useful for display parameters. Add a simple decode function to read
from this device tree node.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:06 -07:00
Simon Glass
962f5caf60 dm: gpio: Add error handling and a function to claim vector GPIOs
gpio_get_values_as_int() should return an error if something goes wrong.
Also provide gpio_claim_vector(), a function to request the GPIOs and set
them to input mode. Otherwise callers have to do this themselves.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:06 -07:00
Simon Glass
3d7cf4192f dm: core: Sort the uclasses
Sort uclasses into alphabetical order and tidy up the comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-05-13 09:24:00 -07:00
Wu, Josh
9aee8d8357 ARM: at91: trival: fix typo for the nand partition name
We should use 'env' to present environment instead of 'evn'

Signed-off-by: Josh Wu <josh.wu@atmel.com>
2015-05-13 13:01:28 +02:00
Masahiro Yamada
f6b42c1403 ARM: at91: remove non-generic boards
Remove board support for afeb9260, tny_a9260, and sbc35_a9g20.

They have not been converted into Generic Board yet.
See doc/README.generic-board for details.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
2015-05-13 13:01:25 +02:00
Joe Hershberger
1a60650c73 kconfig: Move REGEX to Kconfig
Having this as a Kconfig allows it to be a dependent feature.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-10 09:59:38 -04:00
Stefan Roese
27e7215645 ppc4xx: Remove sc3 board
As this board seems to be unmaintained for quite some time, and its
not moved to the generic board ingrastructure, lets remove it.

This will also enable us to remove the CONFIG_AUTOBOOT_DELAY_STR2
and CONFIG_AUTOBOOT_STOP_STR2 macros, as this sc3 board is the
only one using one of this macros. A removal patch will follow
soon.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Juergen Beisert <jbeisert@eurodsn.de>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-10 09:59:38 -04:00
Vikas Manocha
0a836ceb01 stv0991: fdt: add stv0991 device tree
This patch adds device tree for the ST Micro stv0991 board & enables
device tree control. Progressively device tree support for the drivers
being used will also be added.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-10 09:59:36 -04:00
Ash Charles
88d89668b9 omap3: overo: Allow boot with kernel in UBI rootfs
If regular NAND booting fails to find a valid uImage in the
kernel partition in NAND, try to boot using a zImage and dtb found
in a UBI volume in the rootfs partition.  This is the NAND analog
of mmc zImage booting for device-tree based kernels.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
2015-05-10 07:29:39 -04:00
Ash Charles
ce170a1c3d omap3: overo: Use software BCH8 ECC for NAND
Overo COMs have NAND flash that requires 4-bit ECC or better except for
the first sector which can use 1-bit ECC.  The boot ROM expects to load
a payload from NAND written using 1-bit hardware-based ECC.  In short,
write SPL to NAND something like this (4 times for redundancy):
 #> nandecc hw
 #> nand write ${loadaddr} 0x0 ${filesize}
 #> nand write ${loadaddr} 0x20000 ${filesize}
 #> nand write ${loadaddr} 0x40000 ${filesize}
 #> nand write ${loadaddr} 0x60000 ${filesize}

Then, switch back to software-based BCH8 for everything else:
 #> nandecc sw bch8

After [1], enlarge the max size of the SPL so the BCH code can fit.

[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg163912.html

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2015-05-10 07:29:39 -04:00
kunhuahuang
60570df19c stm32f4: add serial print port
Add the stm32F4 board's serial ports support.
User can use it easily.
The user only need to edit the number of the usart.
The patch also fix the serial print out.

Last, this version of patch fix the first patch checkpatch.pl error.
Thanks to Kamil Lulko.

Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
2015-05-10 07:29:38 -04:00
Hannes Petermaier
5094befd84 board/BuR/common: rename "usbupdate" environment to "usbscript"
usbupdate in real does allways load some script from usb-storage and execute
it, on all B&R targets.

So we do following 2 things:
- rename it to what it really does
- move it from boards to common environment

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
4e2a341566 board/BuR/common: remove BMP_DISPLAY from tseries board
Since we display in future the splash screen out of linux-os, we don't need
this support anymore within the common section.

But kwb-target is still using BMP_DISPLAY feature, so we move the related
from the common section into the target-specific.

Also the default environment of tseries will be adapted to this.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
99f7247211 board/BuR/tseries: Add simplefb support
Since the used AM3352 SoC doesn't have GPU it isn't allways necessary to build
in complete drm-stuff into linux kernel. In very small applications only we use
the simple-framebuffer.

So we have 2 use-cases:
- device operating on drm-driver (let simplefb node disabled)
- device operating on simplefb-driver (activate simplefb node and reserve mem)

The decision is made by means of "simplefb" environment variable.

simplefb = 0
we don't enable the (maybe) existing simplefb node and all the rest around
display is up to the linux-kernel. We just disable the backlight, beceause we
do not want see the flicker during take over of drm-driver.

simplefb = 1
we enable the (maybe) existing simplefb node and reserve framebuffers size
in memory.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
10c63f2ebe board/BuR/tseries: remove unnary CONFIG_LCD_NOSTDOUT
the CONFIG_LCD_NOSTDOUT feature never had become mainline in uboot due to the
fact that the problem of "not writing out whole console to lcd" can be solved
with another way.

So we remove this unnary define.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
d804452bf4 board/BuR/tseries: take usage of CONFIG_LCD_ROTATION
We take use of the new LCD_ROTATION feature.
The information about how the display is rotated is taken from B&R specific
(/factory-settings/rotation) information in the devicetree.

The information there is stored as string (cw, ud, ccw, none) since starting
support of this devices and cannot be changed, so we have to convert it into

none = 0
cw   = 1
ud   = 2
ccw  = 3

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Jörg Krause
26e355d131 Fix musl build
This patch fixes cross-compiling U-Boot tools with the musl C library:
  * including <sys/types.h> is needed for ulong
  * defining _GNU_SOURCE is needed for loff_t

Tested for target at91sam9261ek_dataflash_cs3.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Tom Rini <trini@konsulko.com>
2015-05-08 17:24:17 -04:00
Cooper Jr., Franklin
2320866b97 ti: am335x/am437x/omap5 devices: Unify network environment variables
Across several devices network environment variables are duplicated.
Move these variables to a common include file which insures the environment
variables are reused and insures devices across product lines share the same
values.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-05-08 17:24:16 -04:00
Tom Rini
02ffb580e6 Merge git://git.denx.de/u-boot-dm 2015-05-08 10:46:59 -04:00
Masahiro Yamada
55ce920d5f ARM: socfpga: abolish CONFIG_SOCFPGA
Replace CONFIG_SOCFPGA with CONFIG_ARCH_SOCFPGA.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07 05:21:17 +02:00
Masahiro Yamada
05a217212b ARM: socfpga: move SoC sources to mach-socfpga
Our recent trend is to collect SoC files into arch/arm/mach-(SOC).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-07 05:21:12 +02:00
Simon Glass
f56da290b8 dm: usb: exynos: Drop legacy USB code
Drop the code that doesn't use driver model for USB.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-06 14:00:35 -06:00
Sjoerd Simons
ebaa832e99 sandbox: Don't try distro_bootcmd by default
For the distro_bootcmds to succeed on the sandbox a bit of setup is
required (e.g. network configured or host image bound), so running them
by default isn't that useful.

Add a -b/--boot command to the sandbox binary, which triggers the
distro_bootcmds to run after the other command-line commands.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-06 12:48:36 -06:00
Hans de Goede
7f1a07538f dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device
Currently we copy over a number of usb_device values stored in the on stack
struct usb_device probed in usb_scan_device() to the final driver-model managed
struct usb_device in usb_child_pre_probe() through usb_device_platdata, and
then call usb_select_config() to fill in the rest.

There are 3 problems with this approach:

1) It does not fill in enough fields before calling usb_select_config(),
specifically it does not fill in ep0's maxpacketsize causing a div by zero
exception in the ehci driver.

2) It unnecessarily redoes a number of usb requests making usb probing slower

3) Calling usb_select_config() a second time fails on some usb-1 devices
plugged into usb-2 hubs, causing u-boot to not recognize these devices.

This commit fixes these issues by removing (*) the usb_select_config() call
from usb_child_pre_probe(), and instead of copying over things field by field
through usb_device_platdata, store a pointer to the in stack usb_device
(which is still valid when usb_child_pre_probe() gets called) and copy
over the entire struct.

*) Except for devices which are explictly instantiated through device-tree
rather then discovered through usb_scan_device() such as emulated usb devices
in the sandbox.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:41 -06:00
Hans de Goede
f78a5c0774 dm: usb: Make usb_get_bus easier to use for callers
Make usb_get_bus easier to use for callers, by directly returning the bus
rather then returning it via a pass-by-ref argument.

This also removes the error checking from the current callers, as
we already have an assert() for bus not being NULL in usb_get_bus().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:41 -06:00
Simon Glass
8e7083fc95 dm: rtc: sandbox: Enable real-time clock support
Enable real-time-clock support in sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:40 -06:00
Simon Glass
dbeda5b225 dm: rtc: Add a uclass for real-time clocks
Add a uclass for real-time clocks which support getting the current time,
setting it and resetting the chip to a known-working state. Some RTCs have
additional registers which can be used to store settings, so also provide
an interface to these.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:39 -06:00
Simon Glass
94eefdee2f dm: sandbox: Add os_localtime() to obtain the system time
Add a function to read the system time into U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:20 -06:00
Simon Glass
aac5119822 dm: rtc: Split structure definition into its own file
Move the definition of struct rtc_time into a separate file so that sandbox
can include it without requiring common.h and the like.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:20 -06:00
Simon Glass
be47aa6522 dm: Remove unnecessary types in bcd.h
We don't need to use u8, and if we avoid it, it isn't so much of a problem
that rtc.h includes this header. With this change we can include rtc.h from
sandbox files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:20 -06:00
Simon Glass
714209832d dm: rtc: Rename mktime() and reduce the number of parameters
Most callers unpack the structure and pass each member. It seems better to
pass the whole structure instead, as with the C library. Also add an rtc_
prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05 20:58:20 -06:00
Simon Glass
9f9276c34c dm: rtc: Rename to_tm() to rtc_to_tm() and add error code
Rename this function so that it is clear that it is provided by the RTC.
Also return an error when it cannot function as expected. This is unlikely
to occur since it works for dates since 1752 and many RTCs do not support
such old dates. Still it is better to be accurate.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05 20:58:20 -06:00
Simon Glass
199e87c340 dm: rtc: Rename gregorian day function
Change this function name to something more descriptive. Also return a
failure code if it cannot calculate a correct value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05 20:58:20 -06:00
Simon Glass
182bf92d19 dm: i2c: Add an explicit test mode to the sandbox I2C driver
At present this driver has a few test features. They are needed for running
the driver model unit tests but are confusing and unnecessary if using
sandbox at the command line. Add a flag to enable the test mode, and don't
enable it by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:19 -06:00
Simon Glass
ba3864f803 dm: i2c: Add functions to read and write a register
Add driver model versions of the legacy functions to read and write a
single byte register. These are a useful shortcut in many cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-05 20:58:19 -06:00
Simon Glass
bc5701e1b4 dm: spi: Correct the comment on spi_get_ops()
This comment should refer to SPI, not serial.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2015-05-05 20:58:19 -06:00
Simon Glass
60e2809a84 dm: spi: Avoid setting the speed with every transfer
Only set the speed if it has changed from last time. Since the speed will
be 0 when the device is probed it will always be changed on the first
transfer after the device is probed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-05 20:58:18 -06:00
Tom Rini
d81572c272 Merge git://git.denx.de/u-boot-mpc85xx 2015-05-05 14:57:23 -04:00
Tom Rini
1131d4e22c Merge git://git.denx.de/u-boot-marvell 2015-05-05 10:32:08 -04:00
Stefan Roese
2bae75a488 arm: mvebu: Add Armada A38x DB-88F6820-GP board support
This patch adds support for the Marvell DB-88F6820-GP Armada A38x
evaluation board.

Supported peripherals are:
- UART
- Ethernet (mvneta)
- I2C
- SPI (including SPI NOR flash)

Please note that this board support right now only supports the
main U-Boot. Without the bin_hdr integration (DDR training etc). This
will be added in a few days / weeks to complete this board port. But
till then this U-Boot version can be run on the target via the
original Marvell U-Boot via this command:

tftpboot 4000000 db-88f6820-gp/u-boot.bin;go 4000000

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2015-05-05 14:32:05 +02:00
Stefan Roese
b81d0ea728 arm: mvebu: mv-common.h: Add CONFIG_PREBOOT
This enables the usage of the "preboot" environment variable on Marvell
boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2015-05-05 14:32:04 +02:00
Stefan Roese
cae9008f69 arm: mvebu: Change network init code to allow a more flexible setup
With the introduction of the Armada 38x support, its necessary to change
the mvneta ethernet driver init call from always 4 times to a
configurable value. Lets make this init call more flexible by moving
the actually used devices to the config header.

Additionally this patch takes care of the slightly different base
addresses for the ethernet controllers on A38x.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-05 14:31:49 +02:00
Stefan Roese
880b15a37b arm: mvebu: Move CONFIG_SPL_LDSCRIPT to common header
This way, new MVEBU boards don't need to specifiy the common location
for the SPL linker script.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2015-05-05 14:28:29 +02:00
Stefan Roese
d078765640 arm: mvebu: Move mvebu-common into mach-mvebu
Now that the mach-mvebu directory exists and is used by Armada XP we can
move the mvebu-common files into this directory as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
2015-05-05 14:28:29 +02:00
Tom Rini
ff7e9cfc33 Merge branch 'master' of git://git.denx.de/u-boot-mmc 2015-05-05 07:00:38 -04:00
Tom Rini
3f2f1a0039 Merge branch 'master' of git://git.denx.de/u-boot-arm 2015-05-05 07:00:11 -04:00
Rob Herring
5a20397b00 mmc: remove the MMC_MODE_HC flag
High capacity support is not a host capability, but a device capability
that is queried via the OCR. The flag in the operating conditions
request argument can just be set unconditionally. This matches the Linux
implementation.

[panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2015-05-05 12:29:36 +03:00
Andrew Gabbasov
bd47c13583 mmc: Fix splitting device initialization
Starting part of device initialization sets the init_in_progress flag
only if the MMC card did not yet come to ready state and needs to continue
polling. If the card is SD or if the MMC card became ready quickly,
the flag is not set and (if using pre-initialization) the starting
phase will be re-executed from mmc_init function.

Set the init_in_progress flag in all non-error cases. Also, move flags
setting statements around so that the flags are not set in error paths.
Also, IN_PROGRESS return status becomes unnecessary, so get rid of it.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
2015-05-05 11:55:46 +03:00
Andrew Gabbasov
a626c8d418 mmc: Avoid extra duplicate entry in mmc device structure
The 'op_cond_response' field in mmc structure contains the response
from the last SEND_OP_COND MMC command while making iterational
polling of the card. Later it is copied to 'ocr' field, designed
to contain the OCR register value, which is actually the same
response from the same command. So, these fields have actually
the same data, just in different time periods. It's easier to use
the same 'ocr' field in both cases at once, without temporary using
of the 'op_cond_response' field.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
2015-05-05 11:53:52 +03:00
Andrew Gabbasov
3f2da751be mmc: Fix typo in MMC type checking macro
The version flag constant name used in IS_MMC macro is incorrect/undefined.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
2015-05-05 11:50:37 +03:00
Albert ARIBAUD
b939689c7b Merge branch 'u-boot/master' into 'u-boot-arm/master' 2015-05-05 10:09:06 +02:00
Tom Rini
622da1c36a Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2015-05-04 17:50:20 -04:00
Oleksandr G Zhadan
8b0044ff59 powerpc/mpc85xx: Add board support for ucp1020
New QorIQ p1020 based board support from Arcturus Networks Inc.
http://www.arcturusnetworks.com/products/ucp1020/

Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
Signed-off-by: Oleksandr G Zhadan <oleks@arcturusnetworks.com>
[York Sun: remove patman tags from commit message]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:26:26 -07:00
Yangbo Lu
3285e6cbcc powerpc/t2080qds: enable eSDHC peripheral clock support
Enable eSDHC peripheral clock support. u-boot and linux will
use SD clock generated by peripheral clock instead of platform
clock.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:25:48 -07:00
Yangbo Lu
2d9ca2c72c mmc: fsl_esdhc: Add peripheral clock support
The SD clock could be generated by platform clock or peripheral
clock for some platforms. This patch adds peripheral clock
support for T1024/T1040/T2080. To enable it, define
CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:25:39 -07:00
Yangbo Lu
b46cf1b178 powerpc/t2080qds: enable eSDHC adapter card type identification
Enable eSDHC adapter card type identification and this will do
some corresponding operations and set 'adapter-type' property
for device tree according SDHC Card ID.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:25:31 -07:00
Yangbo Lu
5a8dbdc6b4 mmc: fsl_esdhc: Add adapter card type identification support
Add adapter card type identification support by reading
FPGA STAT_PRES1 register SDHC Card ID[0:2] bits. To use this function,
define CONFIG_FSL_ESDHC_ADAPTER_IDENT.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
[York Sun: resolve conflicts in README.fsl-esdhc]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:25:19 -07:00
Shengzhou Liu
e8a7f1c32b powerpc/t1023rdb: Add T1023 RDB board support
T1023RDB is a Freescale Reference Design Board that hosts the T1023 SoC.

T1023RDB board Overview
-----------------------
- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- Memory: 2GB Micron MT40A512M8HX unbuffered 32-bit fixed DDR4 without ECC
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - one 1G RGMII port on-board(RTL8211F PHY)
  - one 1G SGMII port on-board(RTL8211F PHY)
  - one 2.5G SGMII port on-board(AQR105 PHY)
- PCIe: Two Mini-PCIe connectors on-board.
- SerDes: 4 lanes up to 10.3125GHz
- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
- USB: one Type-A USB 2.0 port with internal PHY
- eSDHC: support SD/MMC card and eMMC on-board
- 256Kbit M24256 I2C EEPROM
- RTC: Real-time clock DS1339 on I2C bus
- UART: one serial port on-board with RJ45 connector
- Debugging: JTAG/COP for T1023 debugging

As well updated T1024RDB to add T1023RDB.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
[York Sun: fix defconfig files]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:24:31 -07:00
Zhao Qiang
5066e62847 T2080QDS/PCIe: Soft Reset PCIe on T2080QDS for down-training issue
T2080QDS PEX1/Slot#1 will down-train from x4 to x2,
with SRDS_PRTCL_S1 = 0x66 and SRDS_PRTCL_S2 = 0x15.
Soft reset PCIe can fix this issue.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:24:16 -07:00
Chunhe Lan
373762c34c powerpc/t4rdb: Add SD boot support for T4240RDB board
This patch adds SD boot support for T4240RDB board. SPL
framework is used. PBL initializes the internal RAM and
copies SPL to it. Then SPL initializes DDR using SPD and
copies u-boot from SD card to DDR, finally SPL transfers
control to u-boot.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
[York Sun: Fix T4240RDB_SDCARD_defcofig]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:24:04 -07:00
Nikhil Badola
0dc78ff857 drivers: usb: fsl: Workaround for Erratum A004477
Add a delay of 1 microsecond before issuing soft reset to the
controller to let ongoing ULPI transaction complete.
This prevents corruption of ULPI Function Control Register which
eventually prevents phy clock from entering to low power mode

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2015-05-04 09:23:50 -07:00
York Sun
7fc63cca61 mpc85xx/T4240EMU: Remove T4240EMU board
T4240 SoC has been available for a long time. Emulator support
is no longer needed.

Signed-off-by: York Sun <yorksun@freescale.com>
2015-05-04 09:23:46 -07:00
Hans de Goede
e13afeef6f sunxi: usb: Do not call phy_probe from hcd code
The 2/3 usb-phys on the sunxi SoCs are really a single separate functional
block, and are modelled as such in devicetree. So once we've moved all the
sunxi usb code to the driver-model then phy_probe will be called once
for the entire block from the driver-model enumeration code.

Move to this now as this also avoids problems with phy_probe being called
multiple times once we introduce ohci support. This also allows us to get rid
of the sunxi_usb_phy_enabled_count variable as phy_probe now is guaranteed
to be called only once.

Since we're effectively rewriting the probe / remove functions, move them
to the end of the file while we are at it, as that is the most logical place
for them.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:55 +02:00
Hans de Goede
d17e1577a2 sunxi: emac: Remove non driver-model code
All sunxi boards now use the driver-model, so remove the non driver-model
code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Hans de Goede
b6006baf9c sunxi: Move all boards to the driver-model
Now that we've everything prepared for it remove the DM settings from the
defconfig(s) and simply always set them for sunxi.

This makes all sunxi boards allways use the driver model for gpios and
ethernet, and allows us to move over more bits to the driver-model without
the need to introduce #ifdef-ery for boards which are not yet using DM.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Hans de Goede
25acd33f85 sunxi: dts: Add a CONFIG_DEFAULT_DEVICE_TREE setting to all sunxi boards
This is a preparation patch for switching all sunxi boards over to using
the driver model.

Note that rather then defining both CONFIG_DEFAULT_DEVICE_TREE (for u-boot)
and CONFIG_FDTFILE (for the kernel), this commit simply replaces all
CONFIG_FDTFILE defconfig settings with CONFIG_DEFAULT_DEVICE_TREE and
uses CONFIG_DEFAULT_DEVICE_TREE for setting the default fdtfile env value
in sunxi-common.h .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Hans de Goede
53ab4af34e sunxi: dts: Sync all dts files with upstream kernel
Bring all the sunxi dts files (and update existing ones) from
mripard/sunxi/dt-for-4.1 (which will be merged into upstream master any
day now). This is necessary so that we can move all sunxi boards over to
the driver model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Hans de Goede
8145dea468 sunxi: emac: port to phylib
This is a preparation-patch for adding device-model support to the emac
driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Stefan Roese <sr@denx.de>
2015-05-04 16:51:53 +02:00
Hans de Goede
aab096401c sunxi: gmac: Move sunxi_gmac_initialize proto out of netdev.h
netdev.h should not be included in driver-model enabled builds (doing so
causes compiler warnings about struct eth_driver not being declared), but
we do use sunxi_gmac_initialize in the driver-model case, so move it out of
netdev.h .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:53 +02:00
Hans de Goede
2fcf033d36 sunxi: axp: Move axp gpio code to a separate axpi-gpio driver
Move the axp-gpio code out of the drivers/power/axp*.c code, and into
a new separate axpi-gpio driver.

This change drops supports for the gpio3 pin on the axp209, as that requires
special handling, and no boards are using it.

Besides cleaning things up by moving the code to a separate driver, as
a bonus this change also adds support for the (non vusb) gpio pins on the
axp221 and the gpio pins on the axp152.

The new axp-gpio driver gets its own Kconfig option, and is only enabled
on boards which need it. Besides that it only gets enabled in the regular
u-boot build and not for the SPL as we never need it in the SPL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:53 +02:00
Hans de Goede
1d624a4f08 sunxi: axp: Move axp pmic register helpers to a separate file
Move the register helpers used to access the registers via p2wi resp.
rsb bus on the otherwise identical axp221 and axp223 pmics to a separate
file, so that they can be used by the upcoming standalone axp gpio driver
too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:53 +02:00
Hans de Goede
12ce15538a sunxi: axp: Change axp_gpio_foo prototypes to match gpio uclass ops
Change the axp_gpio_foo function prototypes to match the gpio uclass op
prototypes, this is a preparation patch for moving the axp gpio code to
a separate driver-model gpio driver.

Note that the ugly calls with a NULL udev pointer in drivers/gpio/sunxi_gpio.c
this adds are removed in a later patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:53 +02:00
Hans de Goede
8b2db32a9f sunxi: Do not build i2c support when we've no i2c controllers
This fixes the following errors being printed during boot:

Error, wrong i2c adapter 0 max 0 possible
Error, wrong i2c adapter 0 max 0 possible

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:52 +02:00
Simon Glass
11f4dc1583 dm: Implement a CPU uclass
It is useful to be able to keep track of the available CPUs in a multi-CPU
system. This uclass is mostly intended for use with SMP systems.

The uclass provides methods for getting basic information about each CPU.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-04-29 21:02:33 -06:00
Simon Glass
33eac2dc25 Add print_freq() to display frequencies nicely
Add a function similar to print_size() that works for frequencies. It can
handle from Hz to GHz.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-04-29 21:02:33 -06:00
Simon Glass
2ea09c836f Move display_options functions to their own header
Before adding one more function, create a separate header to help reduce
the size of common.h. Add the missing function comments and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-04-29 21:02:33 -06:00
Simon Glass
5b9000dd25 dm: core: Add a function to bind a driver for a device tree node
Some device tree nodes do not have compatible strings but do require
drivers. This is pretty rare, and somewhat unfortunate. Add a function
to permit creation of a driver for any device tree node.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-29 21:02:32 -06:00
Gabriel Huau
8ddb8cfb1a x86: minnowmax: use the correct NOR in the configuration
The SPI NOR on the minnowboard max is a MICRON N25Q064A

Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-29 18:51:50 -06:00
Bin Meng
afbf1404c1 x86: queensbay: Implement PIRQ routing
Implement Intel Queensbay platform-specific PIRQ routing support.
The chipset PIRQ routing setup is called in the arch_misc_init().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-29 18:51:49 -06:00
Bin Meng
5e2400e8f8 x86: Write configuration tables in last_stage_init()
We can write the configuration table in last_stage_init() for all x86
boards, but not with coreboot since coreboot already has them.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-29 18:51:49 -06:00
Bin Meng
19268834fb x86: Set serial port IRQ for SMSC LPC47M
For starting a Linux console on the superio serial port under
interrupt mode, the IRQ number must be configured.

Signed-off-by: Jian Luo <jian.luo4@boschrexroth.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-29 18:51:48 -06:00
Bin Meng
d21d05f19a x86: Move CONFIG_ENV_IS_IN_SPI_FLASH to x86-common.h
Since all x86 boards use spi flash as its bootloader storage media,
it makes sense to make CONFIG_ENV_IS_IN_SPI_FLASH a common option.
So far only minnowmax board does not support it so undefine it in
its board configuration file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-29 18:51:48 -06:00
Tom Rini
ace97d2617 Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze 2015-04-29 06:46:33 -04:00
Masahiro Yamada
0107f24036 ARM: zynq: move SoC sources to mach-zynq
Move arch/arm/cpu/armv7/zynq/* -> arch/arm/mach-zynq/*

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:05 +02:00
Michal Simek
31137acb27 zynqmp: Enable SDHCI0 options
Enable SDHCI0 for zynqmp.
Add empty gpio.h because of sdhci requirement.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:04 +02:00
Siva Durga Prasad Paladugu
5af37bd070 zynqmp: Enable FS_GENERIC option
Provide an option to write filesystem independend commands.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:04 +02:00
Siva Durga Prasad Paladugu
48d7260d19 zynqmp: Add SPI driver support for ZynqMP
Added the SPI driver support for ZynqMP
The controller is same as zynq SPI controller

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2015-04-29 11:19:04 +02:00
Siva Durga Prasad Paladugu
2594e03c64 zynqmp: i2c: Enable i2c driver for zynqMP
Enable the i2c driver for ZynqMP
Also enable the eeprom for read and writes
to eeprom on ZynqMP
ZynqMP uses the same i2c controller as in Zynq

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:04 +02:00
Michal Simek
5cb2420037 zynqmp: Add support for R5 sw loading
Add support for loading sw for R5 with enabling for zynqmp.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
2015-04-29 11:19:03 +02:00
Siva Durga Prasad Paladugu
222b212937 zynqmp: caches: Enable dcache for zynqmp
Define the mmu table till 2MB granularity
enable dcaches for zynqmp.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:02 +02:00
Nathan Rossi
7a1aec8de8 zynq: Add Zynq PicoZed board support
The PicoZed is a System-on-Module board which is marketed as part of
the ZedBoard/MicroZed/etc. collection. It includes a Zynq-7000
processor.

This patch adds support that covers all the variants of the PicoZed
including the SKUs with Z7010/Z7020 and Z7015/Z7030 Zynq chips. This
patch set however only covers support for the System-on-Module and does
not cover any extra components that are available on carrier boards
(except those that are fanned out of the module itself).

More information on this board, its variants and available carrier
boards is available at: http://zedboard.org/product/picozed

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 11:19:02 +02:00
Michal Simek
caacb33fd1 zynq: Enable GPIO driver and GPIO commands
Enable GPIO driver and GPIO commands.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-04-29 10:41:26 +02:00
Tom Rini
536266231a Merge branch 'master' of git://www.denx.de/git/u-boot-socfpga 2015-04-28 20:48:43 -04:00
Tom Rini
e536ab8849 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-04-28 12:15:13 -04:00
Tom Rini
cc555bd4f4 Merge branch 'master' of git://git.denx.de/u-boot-spi 2015-04-28 07:28:43 -04:00
Bin Meng
be7be78e10 dm: sf: Save flash flags to struct spi_flash
Add a new member 'flags' in struct spi_flash to store the flash flags
during spi_flash_validate_params().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2015-04-28 13:29:54 +05:30
Fabio Estevam
205d58699b mx6cuboxi: Load the correct 'fdtfile' variable
Instead of hardcoding the 'fdtfile' variable, let's detect the SoC and
board variant on the fly and change the dtb name.

Based on the scheme done on am335x board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-04-27 13:13:58 +02:00
Fabio Estevam
6a305f22c5 mx6cuboxi: Use more standard namings for fdt variables
README file suggests to use 'fdtfile' for the dtb file name and
'fdt_addr_r' for the dtb address in RAM, so do as suggested.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-04-27 13:13:58 +02:00
Tom Rini
3f6dcdb9cd Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2015-04-24 13:43:24 -04:00
Yangbo Lu
8b06460e55 ls2085a: esdhc: Add esdhc support for ls2085a
This patch adds esdhc support for ls2085a.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:51 -07:00
Scott Wood
32eda7cc94 armv8/ls2085ardb: Enable NAND SPL support
Enable NAND boot support using SPL framework. To boot from
NAND, either use DIP switches on board, or "qixis_reset nand"
command. Details of forming NAND image can be found in README.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[York Sun: Remove +S from defconfig after commit 252ed872]
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:51 -07:00
Scott Wood
b2d5ac5985 armv8/ls2085aqds: NAND boot support
This adds NAND boot support for LS2085AQDS, using SPL framework.
Details of forming NAND image can be found in README.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[York Sun: Remove +S from defconfig after commit 252ed872]
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:50 -07:00
Jaiprakash Singh
39b0bbbb23 driver/ifc: Add 64KB page support
IFC has two register pages.Till IFC version 1.4 each
register page is 4KB each.But IFC ver 2.0 register page
size is 64KB each.IFC regiters structure is break into
two viz FCM and RUNTIME.FCM(Flash control machine) registers
are defined in PAGE0 and controls IFC generic functionality.
RUNTIME registers are defined in PAGE1 and controls NAND and
GPCM funcinality.

FCM and RUNTIME structures defination is common for IFC
version 1.4 and 2.0.

Signed-off-by: Jaiprakash Singh <b44839@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:50 -07:00
Prabhakar Kushwaha
e60476a01e board/ls2085qds: Add support ethernet
Add support of ethernet:
 - eth.c: mapping lane to slot for (0x2A, 0x07)
 - ls2085a.c: To enable/disable dpmac and get link type

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:50 -07:00
Tom Rini
5f757cdcc6 Merge branch 'master' of git://git.denx.de/u-boot-dm 2015-04-23 14:56:10 -04:00
Sanchayan Maity
bba97cd2c9 colibri_vf: Enable USB support for Colibri Vybrid
Enable USB support on Toradex Colibri Vybrid Modules.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
2015-04-23 14:56:09 -04:00
Sanchayan Maity
e7b860fa4d ARM: vf610: Initial integration for Colibri VF50/VF61
This adds initial support for Colibri VF50/VF61 based on Freescale
Vybrid SoC.

- CPU clocked at 396/500 MHz
- DDR3 at 396MHz
  - for VF50, use PLL2 as memory clock (synchronous mode)
  - for VF61, use PLL1 as memory clock (asynchronous mode)
- Console on UART0 (Colibri UART_A)
- Ethernet on FEC1
- PLL5 based RMII clocking (E.g. No external crystal)
- UART_A and UART_C I/O muxing
- Boot from NAND by default

Tested on Colibri VF50/VF61 booting using serial loader over UART.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Stefan Agner <stefan@agner.ch>
2015-04-23 14:56:09 -04:00
angelo@sysam.it
5296cb1d99 m68k: add architecture-specific u-boot.lds
Add architecture-specific u-boot.lds and remove all board-specific
u-boot.lds.

All the .text customization that was board-specific have been
moved inside the related include/configs, inside a
LDS_BOARD_TEXT define.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2015-04-23 14:56:07 -04:00
Dileep Katta
ecd8557937 fastboot: ARM: OMAP5: Enable reboot-bootloader
Implemented fb_set_reboot_flag() for OMAP5 to set
an environment variable 'dofastboot' when reboot-bootloader called.

This environment variable will be checked in boot command and fastboot
will be called if the variable is set.
If the bootcmd env variable of OMAP5 common is overwritten with board-specific
command, then these changes will not apply.

This was originally intended for DRA7 platform, but now applies to all OMAP5.

Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Make it check for !CONFIG_ENV_IS_NOWHERE as we can't saveenv()
in that case]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-04-23 14:55:44 -04:00
Dileep Katta
be17d396ff ARM: DRA7XX: Enable Fastboot
- Fastboot is enable by default for DRA7XX
        - This is based on following patch modified accordingly
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-04-23 13:59:19 -04:00
Xiang Wang
ee4303cffa gpio: mvmfp: support newer MFP bit definitions
1. The bits 11..10 for mfp driver strength is only valid for
aspen and old xscale family, for newer Marvell chip, this range
has been moved to 12..11.
2. add sleep bit support

Signed-off-by: Xiang Wang <wangx@marvell.com>
[robh: rebase to current mainline]
Signed-off-by: Rob Herring <robh@kernel.org>
2015-04-23 13:59:18 -04:00
Peter Howard
a868e44333 davinci: add support for omapl138-lcdk board
Signed-off-by: Peter Howard <phoward@gme.net.au>
[trini: Add config file, update for ..._ether_addr() -> ..._ethaddr() rename]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-04-23 13:58:43 -04:00
York Sun
e2b65ea975 armv8/ls2085ardb: Add support of LS2085ARDB platform
The LS2085ARDB is a evaluation platform that supports LS2085A
family SoCs. This patch add sbasic support for the platform.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2015-04-23 08:55:58 -07:00
York Sun
7288c2c2b0 armv8/ls2085aqds: Add support of LS2085AQDS platform
The LS2085AQDS is an evaluatoin platform that supports the LS2085A
family SoCs. This patch add basic support of the platform.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
2015-04-23 08:55:58 -07:00