Commit Graph

24694 Commits

Author SHA1 Message Date
Albert ARIBAUD
019b57cc1d Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master' 2014-07-01 15:48:25 +02:00
Albert ARIBAUD
e99f30e105 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2014-07-01 15:11:18 +02:00
Albert ARIBAUD
d6694aff56 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2014-06-30 23:00:34 +02:00
Albert ARIBAUD
b5b8d85e9a Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master' 2014-06-30 22:19:03 +02:00
Fabio Estevam
3f4c01d9f9 mx25pdk: Remove CONFIG_SYS_GENERIC_BOARD
With CONFIG_SYS_GENERIC_BOARD the board hangs after issuing a 'save' command.

Remove CONFIG_SYS_GENERIC_BOARD until this issue can be fixed properly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-06-26 10:17:19 +02:00
Stefano Babic
5d2ad2bc33 vf610: fix build due to missing sys_proto.h
commit 67a04ab3ab
fix the build for MX25. The same error
happens for VF610 SOC.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-06-25 12:48:06 +02:00
Albert ARIBAUD
01a3647abd Merge branch 'u-boot-microblaze/zynq' into 'u-boot-arm/master' 2014-06-25 10:40:23 +02:00
Albert ARIBAUD
ed1d98d801 Merge branch 'u-boot/master' into 'u-boot-arm/master' 2014-06-25 10:39:58 +02:00
Tom Rini
ba9b42c81b Merge branch 'sandbox' of git://git.denx.de/u-boot-x86 2014-06-24 14:06:22 -04:00
Tom Rini
19198f8b01 Merge branch 'master' of git://git.denx.de/u-boot-dm 2014-06-24 14:04:33 -04:00
Albert ARIBAUD
754466ac95 Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master' 2014-06-24 19:54:20 +02:00
Masahiro Yamada
1638d98052 sandbox: change local_irq_save() to macro
local_irq_save() should be a macro, not a function
because local_irq_save() saves flag to the given argument.

GCC is silent about this issue, but Clang warns:

In file included from lib/asm-offsets.c:15:
In file included from include/common.h:20:
In file included from include/linux/bitops.h:110:
arch/sandbox/include/asm/bitops.h:59:17:
 warning: variable 'flags' is uninitialized when used here
      [-Wuninitialized]
        local_irq_save(flags);
                       ^~~~~

That change causes another warning:

In file included from include/linux/bitops.h:110:0,
                 from include/common.h:20,
                 from lib/asm-offsets.c:15:
arch/sandbox/include/asm/bitops.h: In function ‘test_and_set_bit’:
arch/sandbox/include/asm/bitops.h:56:16: warning: unused variable ‘flags’ [-Wunused-variable]

So, flags should be set to __always_unused.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-06-23 15:37:24 -06:00
Stephen Warren
9c38c07008 sandbox: terminate os_dirent_ls() result list
Each node in the linked-list that os_dirent_ls() returns has its next
pointer set only when the next node is created. For the last node in the
list, there is no next node, so this never happens, and the next pointer
is never initialized. Explicitly initialize the next pointer so that it
isn't dangling. Without this, "sb ls" might crash.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-23 15:37:24 -06:00
Stephen Warren
4d907025d6 sandbox: restore ability to access host fs through standard commands
Commit 95fac6ab45 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.

However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
  on the host.

In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.

The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2014-06-23 15:37:23 -06:00
Vasili Galka
dbb7234b2a x86: Enable 32-bit build using x86_64 multilib toolchain
Until now building the x86 arch boards required 32-bit toolchain. As
many x86_64 toolchains come with 32-bit support (multilib) that's a
good idea to enable build with such toolchains.

The change required was to specify the usage of 32-bit explicitly to
the compiler and the linker (-m32 and -m elf_i386 flags) and locate
the right libgcc path.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-23 15:37:23 -06:00
Heiko Schocher
038380597b mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board
- add CONFIG_SYS_GENERIC_BOARD
- remove CONFIG_OF_CONTROL to boot again

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-23 09:11:41 -04:00
Heiko Schocher
b047d671db lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c
move fdtdec_get_int() out of lib/fdtdec.c into lib/fdtdec_common.c
as this function is also used, if CONFIG_OF_CONTROL is not
used. Poped up on the ids8313 board using signed FIT images,
and activating CONFIG_SYS_GENERIC_BOARD. Without this patch
it shows on boot:

No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>

With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
2014-06-23 09:11:30 -04:00
Simon Glass
4af5b1445c dm: Use '*' to indicate a device is activated
Make both dm enumeration commands support showing whether a driver is active
or not, and use a consistent indicator (an asterisk).

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
2014-06-21 10:12:43 -06:00
Jeroen Hofstee
1805bfcad0 include/dm.h: fix inclusion guard
cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-21 10:06:58 -06:00
Tom Rini
39b6d07fd7 Merge branch 'master' of git://git.denx.de/u-boot-dm 2014-06-20 20:03:51 -04:00
Simon Glass
22ec136325 dm: Expand and improve the device lifecycle docs
The lifecycle of a device is an important part of driver model. Add to the
existing documentation and clarify it.

Reported-by: Jon Loeliger <jdl@jdl.com>

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:56:53 -06:00
Simon Glass
f2bc6fc331 dm: Tidy up four minor code nits
There is a spelling mistake and two functions are missing comments
altogether. Also the flags declaration is correct, but doesn't follow
style. Finally, the uclass_get_device() function has some errors in
its documentation.

Fix these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
2014-06-20 11:56:50 -06:00
Simon Glass
47f3d3c80b tegra: Enable driver model
Enable driver model for Tegra boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
2014-06-20 11:56:47 -06:00
Simon Glass
8946034a31 tegra: dts: Bring in GPIO bindings from linux
These files are taken from Linux 3.14.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
2014-06-20 11:56:33 -06:00
Simon Glass
184b1b7175 dm: Fix printf() strings in the 'dm' command
The values here are int, but the map_to_sysmem() call can return a long.
Add a cast to deal with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:56:28 -06:00
Simon Glass
b6a49a7ae7 dm: Allow driver model tests only for sandbox
The GPIO tests require the sandbox GPIO driver, so cannot be run on other
platforms. Similarly for the 'dm test' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:52 -06:00
Simon Glass
89876a55a6 dm: Cast away the const-ness of the global_data pointer
In a very few cases we need to adjust the driver model root device, such as
when setting it up at initialisation. Add a macro to make this easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:49 -06:00
Simon Glass
6a6d8fbef7 dm: Add missing header files in lists and root
These files don't compile in some architectures. Fix it by adding the
missing headers.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:42 -06:00
Simon Glass
939cda5bf0 dm: Use case-insensitive comparison for GPIO banks
We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
considered when naming GPIO banks.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:39 -06:00
Simon Glass
2eb31b13d9 dm: Update README to encourage conversion to driver model
Add a note to encourage people to convert drivers to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:25 -06:00
Simon Glass
ae7f451308 dm: Rename struct device_id to udevice_id
It is best to avoid having any occurence of 'struct device' in driver
model, so rename to achieve this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:55:18 -06:00
Simon Glass
5957ac2a9f Makefile: Support include files for .dts files
Linux supports this, and if we are to have compatible device tree files,
U-Boot should also.

Avoid giving the device tree files access to U-Boot's include/ directory.
Only include/dt-bindings is accessible.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-20 11:55:03 -06:00
Simon Glass
42d3b29d9e sandbox: Support iotrace feature
Support the iotrace feature for sandbox, and enable it, using some dummy
I/O access methods.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:54:42 -06:00
Simon Glass
ad827e1649 arm: Support iotrace feature
Support the iotrace feature for ARM, when enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:54:40 -06:00
Simon Glass
aa53233a15 Add an I/O tracing feature
When debugging drivers it is useful to see what I/O accesses were done
and in what order.

Even if the individual accesses are of little interest it can be useful to
verify that the access pattern is consistent each time an operation is
performed. In this case a checksum can be used to characterise the operation
of a driver. The checksum can be compared across different runs of the
operation to verify that the driver is working properly.

In particular, when performing major refactoring of the driver, where the
access pattern should not change, the checksum provides assurance that the
refactoring work has not broken the driver.

Add an I/O tracing feature and associated commands to provide this facility.
It works by sneaking into the io.h heder for an architecture and redirecting
I/O accesses through its tracing mechanism.

For now no commands are provided to examine the trace buffer. The format is
fairly simple, so 'md' is a reasonable substitute.

Note: The checksum feature is only useful for I/O regions where the contents
do not change outside of software control. Where this is not suitable you can
fall back to manually comparing the addresses. It might be useful to enhance
tracing to only checksum the accesses and not the data read/written.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-20 11:54:29 -06:00
Masahiro Yamada
45f0ad9545 cosmetic: kbuild: clean-up coding style (sync with Linux 3.16-rc1)
Import the following trivial commits from Linux v3.16-rc1:

 bb66fc6 kbuild: trivial - use tabs for code indent where possible
 7eb6e34 kbuild: trivial - remove trailing empty lines
 3fbb43d kbuild: trivial - fix comment block indent
 38385f8 kbuild: trivial - remove trailing spaces

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-20 11:56:26 -04:00
Ash Charles
12cc543767 omap3: overo: Select fdtfile for expansion board
The u-boot Overo board actually supports both Overo (OMAP35xx)
and Overo Storm (AM/DM37xx) COMs with a range of different expansion
boards.  This provides a mechanism to select the an appropriate device
tree file based on the processor version and, if available, the
expansion board ID written on the expansion board EEPROM. To match the
3.15+ kernels, fdtfile names have this format:
 "omap3-overo[-storm]-<expansion board name>.dtb"

By default, we use "omap3-overo-storm-tobi.dtb".

Signed-off-by: Ash Charles <ashcharles@gmail.com>

Conflicts:
	include/configs/omap3_overo.h
2014-06-19 17:53:59 -04:00
Axel Lin
7a4861fad0 spi: davinci: Fix register address for SPI1_BUS
Fix a trivial copy-paste bug.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2014-06-19 17:53:59 -04:00
Stefano Babic
734af242c2 OMAP: disable gpmc timeout safely for reenabling
gpmc timeout is disabled and the reset counter
is set to 0. However, if later a driver activates
the timeout setting the reset to a valid value,
the old reset value with zero is still valid
for the first access. In fact, the timeout block
loads the reset counter after a successful access.

Found on a am335x board with a FPGA connected
to the GPMC bus together with the NAND.
When the FPGA driver in kernel activates
the timeout, the system hangs at the first access
by the NAND driver.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-06-19 17:53:59 -04:00
Jeroen Hofstee
fd3f401bc1 omap3: board: trivial: add void for no args
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-06-19 17:53:58 -04:00
Felipe Balbi
403edbb94f board: ti: am43xx: enable QSPI and Gbit Ethernet on AM437x SK
AM437x Starter Kit has a qspi flash and gbit ethernet
support. By muxing those signals, we can use those
interfaces from u-boot.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19 17:53:58 -04:00
Felipe Balbi
619ce62d2d board: ti: am43xx: add AM437x SK PHY Address
pass correct PHY Address when running on SK
so that we have working ethernet with this board
too.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19 17:53:58 -04:00
Felipe Balbi
9cb9f3331b board: ti: am43xx: add support for AM43xx Starter Kit
AM43xx Starter Kit is a new board based on
AM437x line of SoCs. Being a low-cost EVM and
small size EVM are intended to provide an entry
level development platform on a full fledged
Hardware System.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19 17:53:58 -04:00
Felipe Balbi
9f1220a9ca cpu: armv7: am33x: ddr: write emif ref_ctrl_shadow register
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19 17:53:58 -04:00
Felipe Balbi
d51e5aeff6 board: ti: am43xx: print unsupported board name
when porting u-boot to a new am43xx board, it
helps to know the name of the current unsupported
board so we don't have to hunt for design documents
to figure out what's written in the EEPROM.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19 17:53:58 -04:00
Khoronzhuk, Ivan
909ea9aa26 ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c
Move AEMIF driver to drivers/memory/ti-aemif.c along with AEMIF
definitions collected in arch/arm/include/asm/ti-common/ti-aemif.h

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-06-19 17:53:58 -04:00
Khoronzhuk, Ivan
3e01ed00da mtd: nand: davinci: add header file for driver definitions
The definitions inside emif_defs.h concern davinci nand driver and
should be in it's header. So create header file for davinci nand
driver and move definitions from emif_defs.h and nand_defs.h to it.

Acked-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
[trini: Fixup more davinci breakage]
Signed-off-by: Tom Rini <trini@ti.com>
2014-06-19 17:53:58 -04:00
Ash Charles
99907176a0 omap4: duovero: Correct name of default device tree
Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-06-19 17:53:58 -04:00
Ash Charles
2868a5dff3 omap: Don't enable GPMC CS0 with nothing attached
If CONFIG_(NAND|NOR|ONENAND) is not defined, no configuration is set
for GPMC on chip select #0---size is 0.  In this case, the GPMC
configuration should be reset but not enabled.  Enabling causes the
Gumstix DuoVero board to hang when entering Linux.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
[trini: Switch to testing base as GPMC_SIZE_256M is 0x0]
Signed-off-by: Tom Rini <trini@ti.com>
2014-06-19 17:53:41 -04:00
Stephen Warren
fe7b7cd266 ARM: tegra: set initrd_high so boot scripts work
During bootm/z, U-Boot relocates the DTB and initrd to high memory so
they are out of the way of the kernel. On ARM at least, some parts of
high memory are "highmem" and can't be accessed at early boot. To solve
this, we need to restrict this relocation process to use lower parts of
RAM that area accessible.

For the DTB, an earlier patch of mine set CONFIG_SYS_BOOTMAPSZ. However,
since some platforms have different restrictions on DTB and initrd
location, that config option doesn't affect the initrd. We need to set
the initrd_high environment variable to control the initrd relocation.

Since we have carefully chosen the load addresses for the DTB and
initrd (see comments in include/configs/tegraNNN-common.h re: values in
MEM_LAYOUT_ENV_SETTINGS), we don't actually need any DTB or initrd
relocation at all. Skipping relocation removes some redundant work.
Hence, set both fdt_high and initrd_high to ffffffff which completely
disables relocation.

If the user does something unusual, such as using custom locations for
the DTB/initrd load address or wanting to use DTB/initrd relocation for
some reason, they can simply set these variables to custom values to
override these environment defaults.

With this change, cmd_sysboot works correctly for a filesystem created
by the Fedora installer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-06-19 10:47:20 -07:00