]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 years agodm: scsi: Remove the forward declarations
Simon Glass [Sun, 1 May 2016 17:35:57 +0000 (11:35 -0600)]
dm: scsi: Remove the forward declarations

Reorder the code to avoid needing forward declarations.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Add dummy SATA functions
Simon Glass [Sun, 1 May 2016 17:35:56 +0000 (11:35 -0600)]
sandbox: Add dummy SATA functions

Add some functions needed by the SATA code. This allows it to be compiled
for sandbox, thus increasing build coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Add dummy SCSI functions
Simon Glass [Sun, 1 May 2016 17:35:55 +0000 (11:35 -0600)]
sandbox: Add dummy SCSI functions

Add some functions needed by the SCSI code. This allows it to be compiled
for sandbox, thus increasing build coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Add string and 16-bit I/O functions
Simon Glass [Sun, 1 May 2016 17:35:54 +0000 (11:35 -0600)]
sandbox: Add string and 16-bit I/O functions

Add outsw() and insw() functions for sandbox, as these are needed by the IDE
code. The functions will not do anything useful if called, but allow the
code to be compiled.

Also add out16() and in16(), required by systemace.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoAllow iotrace byte access to use an address of any size
Simon Glass [Sun, 1 May 2016 17:35:53 +0000 (11:35 -0600)]
Allow iotrace byte access to use an address of any size

If an address is used with readb() and writeb() which is smaller than the
expected size (e.g. 32-bit value on a machine with 64-bit addresses), a
warning results. Fix this by adding a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: Rename disk uclass to ahci
Simon Glass [Sun, 1 May 2016 17:35:52 +0000 (11:35 -0600)]
dm: Rename disk uclass to ahci

This started as 'ahci' and was renamed to 'disk' during code review. But it
seems that this is too generic. Now that we have a 'blk' uclass, we can use
that as the generic piece, and revert to ahci for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agopci: Drop CONFIG_SYS_SCSI_SCAN_BUS_REVERSE
Simon Glass [Sun, 1 May 2016 17:35:51 +0000 (11:35 -0600)]
pci: Drop CONFIG_SYS_SCSI_SCAN_BUS_REVERSE

This option is not used by any board. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: sandbox: Add a board for sandbox without CONFIG_BLK
Simon Glass [Sun, 1 May 2016 17:35:50 +0000 (11:35 -0600)]
dm: sandbox: Add a board for sandbox without CONFIG_BLK

While the driver-model block device support is in progress, it is useful to
build sandbox both with and without CONFIG_BLK. Add a separate board for
the latter.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoRevert "dm: sandbox: Drop the pre-DM host implementation"
Simon Glass [Sun, 1 May 2016 17:35:49 +0000 (11:35 -0600)]
Revert "dm: sandbox: Drop the pre-DM host implementation"

Bring this support back so that sandbox can be compiled with CONFIG_BLK. This
allows sandbox to have greater build coverage during the block-device
transition. This can be removed again later.

This reverts commit 33cf727b1634dbd9cd68a6ebc444a88f053822d7.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agogpio: exynos(s5p): remove gpio_xlate routine
Eric Nelson [Wed, 20 Apr 2016 15:37:39 +0000 (08:37 -0700)]
gpio: exynos(s5p): remove gpio_xlate routine

With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass,
the Exynos/S5P gpio driver doesn't need a custom xlate routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agogpio: rk: remove gpio_xlate routine
Eric Nelson [Wed, 20 Apr 2016 15:37:38 +0000 (08:37 -0700)]
gpio: rk: remove gpio_xlate routine

With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass,
the Rockchip gpio driver doesn't need a custom xlate routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogpio: pic32: remove gpio_xlate routine
Eric Nelson [Wed, 20 Apr 2016 15:37:37 +0000 (08:37 -0700)]
gpio: pic32: remove gpio_xlate routine

With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass,
the pic32 gpio driver doesn't need a custom xlate routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Purna Chandra Mandal <purna.mandal@microchip.com>
8 years agogpio: omap: remove gpio_xlate routine
Eric Nelson [Wed, 20 Apr 2016 15:37:36 +0000 (08:37 -0700)]
gpio: omap: remove gpio_xlate routine

With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass,
the omap gpio driver doesn't need a custom xlate routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agogpio: intel_broadwell: remove gpio_xlate routine
Eric Nelson [Wed, 20 Apr 2016 15:37:35 +0000 (08:37 -0700)]
gpio: intel_broadwell: remove gpio_xlate routine

With the addition of GPIO_ACTIVE_LOW parsing in gpio-uclass,
the intel_broadwell driver doesn't need a custom xlate routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: gpio: add a default gpio xlate routine
Eric Nelson [Sun, 24 Apr 2016 23:32:40 +0000 (16:32 -0700)]
dm: gpio: add a default gpio xlate routine

Many drivers use a common form of offset + flags for device
tree nodes. e.g.:
<&gpio1 2 GPIO_ACTIVE_LOW>

This patch adds a common implementation of this type of parsing
and calls it when a gpio driver doesn't supply its' own xlate
routine.

This will allow removal of the driver-specific versions in a
handful of drivers and simplify the addition of new drivers.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodrivers: usb: common: add common code for usb drivers to use
Mugunthan V N [Tue, 12 Apr 2016 10:31:19 +0000 (16:01 +0530)]
drivers: usb: common: add common code for usb drivers to use

Add common usb code which usb drivers makes use of it.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: gpio: introduce 74x164 driver
Peng Fan [Tue, 3 May 2016 02:02:23 +0000 (10:02 +0800)]
dm: gpio: introduce 74x164 driver

Introduce driver to support "fairchild,74hc595" devices.
1. Take linux drivers/drivers/gpio/gpio-74x164.c as reference.
2. Following the naming used in Linux driver with gen_7x164 as the prefix.
3. Enable CONFIG_DM_74X164 to use this driver.
4. Follow Documentation/devicetree/bindings/gpio/gpio-74x164.txt to add device
   nodes
5. Tested on i.MX6 UltraLite with 74LV595 using gpio command and oscillograph.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Chin Liang See <clsee@altera.com>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: spi: introduce dm api
Peng Fan [Tue, 3 May 2016 02:02:22 +0000 (10:02 +0800)]
dm: spi: introduce dm api

Introduce dm_spi_claim_bus, dm_spi_release_bus and dm_spi_xfer
Convert spi_claim_bus, spi_release_bus and spi_xfer to use
the new API.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jteki@openedev.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: spi: soft_spi: switch to use linux compatible string
Peng Fan [Tue, 3 May 2016 02:02:21 +0000 (10:02 +0800)]
dm: spi: soft_spi: switch to use linux compatible string

1. Support compatible string "spi-gpio" which is used by Linux
   Linux use different bindings, so use UBOOT_COMPAT and
   LINUX_COMPAT to differentiate them.
2. Introduce SPI_MASTER_NO_RX and SPI_MASTER_NO_TX to handle
   no rx or no tx case.
3. Tested on i.MX6 UltraLite board with 74LV595 spi-gpio chip.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: spi: soft_spi bug fix
Peng Fan [Tue, 3 May 2016 02:02:20 +0000 (10:02 +0800)]
dm: spi: soft_spi bug fix

When doing xfer, should use device->parent, but not device
When doing bit xfer, should use "!!(tmpdout & 0x80)", but not
"(tmpdout & 0x80)"

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jteki@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agofdt: fix dev_get_addr_name node offset
Stephen Warren [Thu, 28 Apr 2016 22:04:15 +0000 (16:04 -0600)]
fdt: fix dev_get_addr_name node offset

Use the device's own DT offset, not the device's parent's.

Fixes: 43c4d44e3330 ("fdt: implement dev_get_addr_name()")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agovideo: tegra: refuse to bind to disabled dcs
Stephen Warren [Tue, 19 Apr 2016 22:19:30 +0000 (16:19 -0600)]
video: tegra: refuse to bind to disabled dcs

This prevents the following boot-time message on any board where only the
first DC is in use, yet the DC's DT node is enabled:

stdio_add_devices: Video device failed (ret=-22)

(This happens on at least Harmony, Ventana, and likely any other Tegra20
board with display enabled other than Seaboard).

The Tegra DC's DT node represents a display controller. It may itself
drive an integrated RGB display output, or be used by some other display
controller such as HDMI. For this reason the DC node itself is not
enabled/disabled in DT; the DC itself is considered a shared resource, not
the final (board-specific) display output. The node should instantiate a
display output driver only if the rgb subnode is enabled. Other output
drivers are free to use the DC if they are enabled and their DT node
references the DC's DT node. Adapt the Tegra display drivers' bind()
routine to only bind to the DC's DT node if the RGB subnode is enabled.

Now that the display driver does the right thing, remove the workaround
for this issue from Seaboard's DT file.

Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: allow drivers to refuse to bind
Stephen Warren [Tue, 19 Apr 2016 22:19:29 +0000 (16:19 -0600)]
dm: core: allow drivers to refuse to bind

In some cases, drivers may not want to bind to a device. Allow bind() to
return -ENODEV in this case, and don't treat this as an error. This can
be useful in situations where some information source other than the DT
node's main status property indicates whether the device should be
enabled, for example other DT properties might indicate this, or the
driver might query non-DT sources such as system fuses or a version number
register.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agobuildman: allow more incremental building
Stephen Warren [Mon, 11 Apr 2016 16:48:44 +0000 (10:48 -0600)]
buildman: allow more incremental building

One use-case for buildman is to continually run it interactively after
each small step in a large refactoring operation. This gives more
immediate feedback than making a number of commits and then going back and
testing them. For this to work well, buildman needs to be extremely fast.
At present, a couple issues prevent it being as fast as it could be:

1) Each time buildman runs "make %_defconfig", it runs "make mrproper"
first. This throws away all previous build results, requiring a
from-scratch build. Optionally avoiding this would speed up the build, at
the cost of potentially causing or missing some build issues.

2) A build tree is created per thread rather than per board. When a thread
switches between building different boards, this often causes many files
to be rebuilt due to changing config options. Using a separate build tree
for each board would avoid this. This does put more strain on the system's
disk cache, but it is worth it on my system at least.

This commit adds two command-line options to implement the changes
described above; -I ("--incremental") turns of "make mrproper" and -P
("--per-board-out-dir") creats a build directory per board rather than per
thread.

Tested:

    ./tools/buildman/buildman.py tegra
    ./tools/buildman/buildman.py -I -P tegra
    ./tools/buildman/buildman.py -b tegra_dev tegra
    ./tools/buildman/buildman.py -b tegra_dev -I -P tegra

... each once after deleting the buildman result/work directory, and once
"incrementally" after a previous identical invocation.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org> # v1
Tested-by: Simon Glass <sjg@chromium.org> # v1
Acked-by: Simon Glass <sjg@chromium.org>
8 years agom68k: add DM model serial driver
angelo@sysam.it [Wed, 27 Apr 2016 19:51:13 +0000 (21:51 +0200)]
m68k: add DM model serial driver

Boards can now use DM serial driver, or still legacy mcf uart
driver version.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agom68k: add malloc memory for early malloc
angelo@sysam.it [Wed, 27 Apr 2016 19:50:44 +0000 (21:50 +0200)]
m68k: add malloc memory for early malloc

To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used.
So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and
call to board_init_f_mem() is added for all cpu's.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodm: gpio: pca953x: introduce driver model support for pca953x
Peng Fan [Thu, 14 Apr 2016 13:45:06 +0000 (21:45 +0800)]
dm: gpio: pca953x: introduce driver model support for pca953x

Introduce a new driver that supports driver model for pca953x.
The pca953x chips are used as I2C I/O expanders.
This driver is designed to support the following chips:
"
4 bits: pca9536, pca9537
8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554,
        pca9556, pca9557, pca9574, tca6408, xra1202
16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575,
         tca6416
24 bits: tca6424
40 bits: pca9505, pca9698
"
But for now this driver only supports max 24 bits and pca953x compatible
chips. pca957x compatible chips are not supported now.
These can be addressed when we need to add such support for the different
chips.
This driver has been tested on i.MX6 SoloX Sabreauto board with max7310
i2c expander using gpio command as following:

=>gpio status -a
Bank gpio@30_:
gpio@30_0: input: 1 [ ]

=> dm tree:
 i2c         [   ]    |   |   `-- i2c@021a8000
 gpio        [   ]    |   |       |-- gpio@30
 gpio        [   ]    |   |       `-- gpio@32

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Purna Chandra Mandal <purna.mandal@microchip.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: Andrea Scian <andrea.scian@dave.eu>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <michal.simek@xilinx.com> #on ZynqMP zcu102
8 years agoPrepare v2016.05
Tom Rini [Mon, 16 May 2016 14:40:32 +0000 (10:40 -0400)]
Prepare v2016.05

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agosunxi: Enable USB host in CHIP defconfig
Hans de Goede [Thu, 12 May 2016 17:23:47 +0000 (19:23 +0200)]
sunxi: Enable USB host in CHIP defconfig

Reported-and-tested-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agotest, tools: update tbot documentation
Heiko Schocher [Thu, 28 Apr 2016 06:17:28 +0000 (08:17 +0200)]
test, tools: update tbot documentation

update tbot documentation in U-Boot, as I just
merged the event system into tbots master
branch.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agotests: py: fix NameError exception if bdi cmd is not supported
Heiko Schocher [Mon, 9 May 2016 08:08:24 +0000 (10:08 +0200)]
tests: py: fix NameError exception if bdi cmd is not supported

test/py raises an error, if a board has not enabled bdi command

>           pytest.skip('bdinfo command not supported')
E           NameError: global name 'pytest' is not defined

import pytest in test/py/u_boot_utils.py fixes this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
8 years agoarm/arm64: Move barrier instructions into separate header
Andre Przywara [Thu, 12 May 2016 11:14:41 +0000 (12:14 +0100)]
arm/arm64: Move barrier instructions into separate header

Commit bfb33f0bc45b ("sunxi: mctl_mem_matches: Add missing memory
barrier") broke compilation for the Pine64, as dram_helper.c now
includes <asm/armv7.h>, which does not compile on arm64.

Fix this by moving all barrier instructions into a separate header
file, which can easily be shared between arm and arm64.
Also extend the inline assembly to take the "sy" argument, which is
optional for ARMv7, but mandatory for v8.

This fixes compilation for 64-bit sunxi boards (Pine64).

Acked-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
8 years agoarm: socfpga: Update iomux and pll for c5 socdk RevE
Dinh Nguyen [Tue, 10 May 2016 20:13:59 +0000 (15:13 -0500)]
arm: socfpga: Update iomux and pll for c5 socdk RevE

Update the pinmux and pll configuration for the Cyclone5 RevE or later devkit.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agowarp7: Fix boot by selecting CONFIG_OF_LIBFDT
Fabio Estevam [Tue, 10 May 2016 16:31:40 +0000 (13:31 -0300)]
warp7: Fix boot by selecting CONFIG_OF_LIBFDT

CONFIG_OF_LIBFDT needs to be selected to avoid the following
boot problem:

reading zImage
6346216 bytes read in 118 ms (51.3 MiB/s)
Booting from mmc ...
reading imx7d-warp.dtb
32593 bytes read in 11 ms (2.8 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x60d5e8 ]
FDT and ATAGS support not compiled in - hanging
### ERROR ### Please RESET the board ###

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 7 May 2016 02:12:29 +0000 (22:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 7 May 2016 02:12:15 +0000 (22:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

8 years agousb: gadget: dfu: discard dead code
Peng Fan [Tue, 3 May 2016 02:25:22 +0000 (10:25 +0800)]
usb: gadget: dfu: discard dead code

Reported by Coverity:
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement:
(f_dfu->strings + --i).s = ....

If calloc failed, i is still 0 and no need to call free,
so discard the dead code.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: "Łukasz Majewski" <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
8 years agodfu: avoid memory leak
Peng Fan [Tue, 3 May 2016 02:24:52 +0000 (10:24 +0800)]
dfu: avoid memory leak

When dfu_fill_entity fail, need to free dfu to avoid memory leak.

Reported by Coverity:
"
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable dfu going out of scope leaks the storage
it points to.
"

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: "Łukasz Majewski" <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
8 years agousb: dwc2: Add delay to fix the USB detection problem on SoCFPGA
Stefan Roese [Fri, 6 May 2016 11:53:37 +0000 (13:53 +0200)]
usb: dwc2: Add delay to fix the USB detection problem on SoCFPGA

With patch c998da0d (usb: Change power-on / scanning timeout handling),
the USB scanning is started earlier and with a smaller timeout. This
resulted on SoCFPGA (using the DWC2 driver) in some USB sticks not
getting detected any more. This patch now adds a 1 second delay (in
the host mode only) to the DWC2 driver before the scanning is started.
With this delay, now all problematic USB keys are detected successfully
again. And there is no need any more to change the delay / timeout
in the common USB code (usb_hub.c).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Marek Vasut <marex@denx.de>
8 years agousb: hub: Don't continue on get_port_status failure
Marek Vasut [Tue, 3 May 2016 20:22:59 +0000 (22:22 +0200)]
usb: hub: Don't continue on get_port_status failure

The code shouldn't continue probing the port if get_port_status() failed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agousb: Assure Get Descriptor request is in separate microframe
Marek Vasut [Wed, 27 Apr 2016 01:32:56 +0000 (03:32 +0200)]
usb: Assure Get Descriptor request is in separate microframe

The Kingston DT Ultimate USB 3.0 stick is sensitive to this first
Get Descriptor request and if the request is not in a separate
microframe, the stick refuses to operate. Add slight delay, which
is enough for one microframe to pass on any USB spec revision.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agousb: Wait after sending Set Configuration request
Marek Vasut [Wed, 27 Apr 2016 01:08:12 +0000 (03:08 +0200)]
usb: Wait after sending Set Configuration request

Some devices, like the SanDisk Cruzer Pop need some time to process
the Set Configuration request, so wait a little until they are ready.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agosocfpga: fix broken build if CONFIG_ETH_DESIGNWARE disabled
Anatolij Gustschin [Fri, 6 May 2016 15:16:31 +0000 (17:16 +0200)]
socfpga: fix broken build if CONFIG_ETH_DESIGNWARE disabled

Building without ethernet driver doesn't work. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marex@denx.de>
8 years agomtd: cqspi: Simplify indirect read code
Marek Vasut [Wed, 27 Apr 2016 21:38:05 +0000 (23:38 +0200)]
mtd: cqspi: Simplify indirect read code

The indirect read code is a pile of nastiness. This patch replaces
the whole unmaintainable indirect read implementation with the one
from upcoming Linux CQSPI driver, which went through multiple rounds
of thorough review and testing. All the patch does is it plucks out
duplicate ad-hoc code distributed across the driver and replaces it
with more compact code doing exactly the same thing. There is no
speed change of the read operation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Jagan Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vignesh R <vigneshr@ti.com>
8 years agomtd: cqspi: Simplify indirect write code
Marek Vasut [Wed, 27 Apr 2016 21:18:55 +0000 (23:18 +0200)]
mtd: cqspi: Simplify indirect write code

The indirect write code is buggy pile of nastiness which fails horribly
when the system runs fast enough to saturate the controller. The failure
results in some pages (256B) not being written to the flash. This can be
observed on systems which run with Dcache enabled and L2 cache enabled,
like the Altera SoCFPGA.

This patch replaces the whole unmaintainable indirect write implementation
with the one from upcoming Linux CQSPI driver, which went through multiple
rounds of thorough review and testing. While this makes the patch look
terrifying and violates all best-practices of software development, all
the patch does is it plucks out duplicate ad-hoc code distributed across
the driver and replaces it with more compact code doing exactly the same
thing.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Jagan Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vignesh R <vigneshr@ti.com>
8 years agoarm: socfpga: socrates: Add 'time' command
Stefan Roese [Thu, 28 Apr 2016 05:17:16 +0000 (07:17 +0200)]
arm: socfpga: socrates: Add 'time' command

The time command is very helpful for performance and regressions tests.
So lets enable it on SoCrates.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
8 years agoARM: socfpga: Disable USB OC protection on SoCrates
Marek Vasut [Wed, 27 Apr 2016 13:07:03 +0000 (15:07 +0200)]
ARM: socfpga: Disable USB OC protection on SoCrates

This is mandatory, otherwise the USB does not work.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
8 years agousb: Don't init pointer to zero, but NULL
Marek Vasut [Tue, 26 Apr 2016 23:55:10 +0000 (01:55 +0200)]
usb: Don't init pointer to zero, but NULL

The pointer should always be inited to NULL, not zero (0). These are
two different things and not necessarily equal.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
8 years agousb: ehci-mx6: allow board_ehci_hcd_init to fail
Stefan Agner [Thu, 5 May 2016 23:59:12 +0000 (16:59 -0700)]
usb: ehci-mx6: allow board_ehci_hcd_init to fail

There could be runtime determined board specific reason why a EHCI
initialization fails (e.g. ENODEV if a Port is not available). In
this case, properly return the error code.
While at it, that function (board_ehci_hcd_init) has actually two
documentation blocks... Use the correct function name for the
documentation block of board_usb_phy_mode.

Signed-off-by: Stefan Agner <stefan@agner.ch>
8 years agoimx6: cache: disable L2 before touching Auxiliary Control Register
Peng Fan [Wed, 4 May 2016 07:27:50 +0000 (15:27 +0800)]
imx6: cache: disable L2 before touching Auxiliary Control Register

According PL310 TRM, Auxiliary Control Register
"
The register must be written to using a secure access, and it can be
read using either a secure or a NS access. If you write to this register
with a NS access, it results in a write response with a DECERR response,
and the register is not updated. Writing to this register with the L2
cache enabled, that is, bit[0] of L2 Control Register set to 1,
results in a SLVERR.
"

So If L2 cache is already enabled by ROM, chaning value of ACR
will cause SLVERR and uboot hang.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
8 years agotest/py: dfu: wait for USB device to go away at boot
Stephen Warren [Thu, 5 May 2016 23:02:06 +0000 (17:02 -0600)]
test/py: dfu: wait for USB device to go away at boot

It can take a while for a host machine to notice that a USB device has
disconnected, and process the change. At the end of the DFU test, we wait
up to 10 seconds for this to happen. This change makes the test wait the
same (up to) 10 seconds at the start of the test for any previously active
USB device-mode session to be cleaned up. Such as session might have been
used to download U-Boot into memory for example; this is certainly true
on my Tegra test systems. This changes should solve the DFU test
intermittency issues I've been seeing on some Tegra devices.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoARM: am33xx: Fix DDR initialization delays
Russ Dill [Thu, 5 May 2016 13:52:10 +0000 (08:52 -0500)]
ARM: am33xx: Fix DDR initialization delays

The current delays in the DDR initialization routines for am33xx
architectures are sometimes not running long enough leading to DDR
init errors. On am437x, this shows up as an L3 NOC error after the
kernel boots. This is due to the timer not being initialized
properly, but instead still containing the timer init values from
the boot ROM which cause timers to expire in 1/4th the time
required.

timer_init is typically not called until board_init_r, however on
am33xx/am43xx udelay is required in sdram_init which is called
from board_init_f, so a call to timer_init is required earlier.

Note that this issue introduced in v2015.01 by:

b352dde "am33xx: Drop timer_init call from s_init".

Although this could instead fixed by reverting said commit, it
would cause timer_init to be called twice in both SPL and non-SPL
cases. This gives a little more fine grained control and also
matches what is being done on omap-command and fsl-layerscape.

Signed-off-by: Russ Dill <russ.dill@ti.com>
8 years agoARM: fix ifdefs in ARMv8 lowlevel_init()
Stephen Warren [Thu, 28 Apr 2016 18:45:44 +0000 (12:45 -0600)]
ARM: fix ifdefs in ARMv8 lowlevel_init()

Commit 724219a65f55 "ARM: always perform per-CPU GIC init" removed some
ifdefs to unify the MULTIENTRY-vs-non-MULTIENTRY paths. However, the
wrong endif was removed. This patch adds back that missing endif, and
adds a new ifdef to match the endif the now-correctly-terminated block
used to match against. Use "git show -U25 724219a65f55" to see enough
context to make the original issue clear.

In practical terms, this makes no difference to runtime behaviour. The
code that was incorrectly compiled into the binary when ifndef MULTIENTRY
is a no-op for other cases, since branch_if_master evaluates to a hard-
coded jump. The only issues were:

- A few extra instructions were added to the binary.
- The comment on the endif at the very end of the function, indicating
which ifdef it matched, were wrong.

An alternative might be to simply fix the comment on that trailing ifdef,
but that only addresses the second point above, not the first.

Fixes: 724219a65f55 ("ARM: always perform per-CPU GIC init")
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoFix various typos, scattered over the code.
Robert P. J. Day [Wed, 4 May 2016 08:47:31 +0000 (04:47 -0400)]
Fix various typos, scattered over the code.

Spelling corrections for (among other things):

* environment
* override
* variable
* ftd (should be "fdt", for flattened device tree)
* embedded
* FTDI
* emulation
* controller

8 years agommc: Fix error in RPMB code
Marek Vasut [Wed, 4 May 2016 14:35:25 +0000 (16:35 +0200)]
mmc: Fix error in RPMB code

Since we do not build any board with CONFIG_SUPPORT_EMMC_RPMB , this
piece of code evaded conversion. Fix the following compiler error:

cmd/mmc.c: In function 'do_mmcrpmb':
cmd/mmc.c:316:32: error: 'struct blk_desc' has no member named 'part_num'
  original_part = mmc->block_dev.part_num;
                                ^

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
8 years agoomap4: duovero: Disable EFI booting
Ash Charles [Thu, 5 May 2016 18:58:07 +0000 (11:58 -0700)]
omap4: duovero: Disable EFI booting

The DuoVero board fails to compile with EFI enabled as the generated
binaries are too large.  As this platform doesn't currently need EFI,
disable this feature.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agoomap4: load files for legacy boot
Ash Charles [Thu, 5 May 2016 18:58:06 +0000 (11:58 -0700)]
omap4: load files for legacy boot

Be sure to load the zImage and fdtfile prior to actually booting in
case we are doing a legacy boot.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
8 years agoARM: tegra: import latest Jetson TK1 spreadsheet
Stephen Warren [Thu, 21 Apr 2016 22:03:37 +0000 (16:03 -0600)]
ARM: tegra: import latest Jetson TK1 spreadsheet

This imports v11 of "Jetson TK1 Development Platform Pin Mux" from
https://developer.nvidia.com/embedded/downloads.

The new version defines the mux option for the MIPI pad ctrl selection.
The OWR pin no longer has an entry in the configuration table because
the only mux option it support is OWR, that feature isn't supported, and
hence can't conflict with any other pin. This pin can only usefully be
used as a GPIO.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agopci: tegra: fix DM conversion issues on Tegra20
Stephen Warren [Wed, 20 Apr 2016 21:46:50 +0000 (15:46 -0600)]
pci: tegra: fix DM conversion issues on Tegra20

Tegra20's PCIe controller has a couple of quirks. There are workarounds in
the driver for these, but they don't work after the DM conversion:

1) The PCI_CLASS value is wrong in HW.

This is worked around in pci_tegra_read_config() by patching up the value
read from that register. Pre-DM, the PCIe core always read this via a
16-bit access to the 16-bit offset 0xa. With DM, 32-bit accesses are used,
so we need to check for offset 0x8 instead. Mask the offset value back to
32-bit alignment to make this work in all cases.

2) Accessing devices other than dev 1 causes a data abort.

Pre-DM, this was worked around in pci_skip_dev(), which the PCIe core code
called during enumeration while iterating over a bus. The DM PCIe core
doesn't use this function. Instead, enhance tegra_pcie_conf_address() to
validate the bdf being accessed, and refuse to access invalid devices.
Since pci_skip_dev() isn't used, delete it.

I've also validated that both these WARs are only needed for Tegra20, by
testing on Tegra30/Cardhu and Tegra124/Jetson TKx. So, compile them in
conditionally.

Fixes: e81ca88451cf ("dm: tegra: pci: Convert tegra boards to driver model for PCI")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: enable GPU node by compatible value
Stephen Warren [Tue, 12 Apr 2016 17:17:39 +0000 (11:17 -0600)]
ARM: tegra: enable GPU node by compatible value

In current Linux kernel Tegra DT files, 64-bit addresses are represented
in unit addresses as a pair of comma-separated 32-bit values. Apparently
this is no longer the correct representation for simple busses, and the
unit address should be represented as a single 64-bit value. If this is
changed in the DTs, arm/arm/mach-tegra/board2.c:ft_system_setup() will no
longer be able to find and enable the GPU node, since it looks up the node
by name.

Fix that function to enable nodes based on their compatible value rather
than their node name. This will work no matter what the node name is, i.e
for DTs both before and after any rename operation.

Cc: Thierry Reding <treding@nvidia.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoinclude/configs: Numerous typo fixes: "controler" -> "controller".
Robert P. J. Day [Tue, 3 May 2016 23:52:49 +0000 (19:52 -0400)]
include/configs: Numerous typo fixes: "controler" -> "controller".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agonet: increase maximum frame size to accomediate VLAN packets
Stefan Agner [Wed, 13 Apr 2016 23:38:02 +0000 (16:38 -0700)]
net: increase maximum frame size to accomediate VLAN packets

Ethernet packages with IEEE 802.1Q VLAN support may be up to 1522
bytes long. Increase the default size used to allocate packet
storage by 4 bytes. While at it, let git care about history and
rewrite the comment to represent the situation today only.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: fix vlan validation
Stefan Agner [Wed, 13 Apr 2016 23:38:01 +0000 (16:38 -0700)]
net: fix vlan validation

VLAN identifiers are 12-bit decimal numbers, not IP addresses.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: net: ldpaa: Memset pools_params as "0" before use
Prabhakar Kushwaha [Mon, 28 Mar 2016 08:41:05 +0000 (14:11 +0530)]
drivers: net: ldpaa: Memset pools_params as "0" before use

Memset pools_params as "0" to avoid garbage value in dpni_set_pools.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agofdt: fix setting MAC addresses for multiple interfaces
Lev Iserovich [Thu, 7 Jan 2016 23:04:16 +0000 (18:04 -0500)]
fdt: fix setting MAC addresses for multiple interfaces

For multiple ethernet interfaces the FDT offset of '/aliases' will change as we
are adding MAC addresses to the FDT.
Therefore only the first interface ('ethernet0') will get properly updated in
the FDT, with the rest getting FDT errors when we try to set their MAC address.

Signed-off-by: Lev Iserovich <iserovil@deshawresearch.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agousb: dwc2: Init desc_before_addr
Marek Vasut [Tue, 26 Apr 2016 01:02:35 +0000 (03:02 +0200)]
usb: dwc2: Init desc_before_addr

Initialize desc_before_addr, otherwise the USB core won't send the
first 64B Get Device Descriptor request in common/usb.c function
usb_setup_descriptor() . There are some USB devices which expect
this sequence and otherwise can misbehave.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Tom Rini <trini@konsulko.com>
8 years agousb: dwc2: Make OC protection configurable
Marek Vasut [Wed, 27 Apr 2016 12:58:49 +0000 (14:58 +0200)]
usb: dwc2: Make OC protection configurable

Introduce a new flag in the controller private data, which allows selectively
disabling the OC protection. Use the standard 'disable-over-current' OF prop
to set this flag. This OC protection must be disabled on EBV SoCrates rev 1.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
8 years agousb: dwc2: Pull Ext VBUS macro from dwc_otg_core_init()
Marek Vasut [Wed, 27 Apr 2016 12:55:57 +0000 (14:55 +0200)]
usb: dwc2: Pull Ext VBUS macro from dwc_otg_core_init()

Introduce a boolean flag in the dwc2 controller private data and set
it according to the macro (for now) instead of having this macro
directly in the dwc_otg_core_init(). This will let us configure the
flag from DT or such later on, if needed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
8 years agousb: dwc2: Pass private data into dwc_otg_core_init()
Marek Vasut [Wed, 27 Apr 2016 12:53:33 +0000 (14:53 +0200)]
usb: dwc2: Pass private data into dwc_otg_core_init()

Pass the whole bulk of private data instead of just the regs,
since the private data will soon contain important configuration
flags.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
8 years agoigep00x0: Use the SRAM available for SPL.
Enric Balletbo i Serra [Tue, 3 May 2016 06:59:24 +0000 (08:59 +0200)]
igep00x0: Use the SRAM available for SPL.

Move CONFIG_SPL_TEXT_BASE down to 0x40200000 and set CONFIG_SPL_MAX_SIZE
to (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE), so that it's clear
what the limit is.

This will also help some compilers to fit all the code into the allocated
space.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
8 years agomkimage: fix generation of FIT image
Andreas Bießmann [Tue, 3 May 2016 13:17:03 +0000 (15:17 +0200)]
mkimage: fix generation of FIT image

Commit 7a439cadcf3192eb012a2432ca34670b676c74d2 broke generation of SPL
loadable FIT images (CONFIG_SPL_LOAD_FIT).
Fix it by removing the unnecessary storage of expected image type. This was a
left over of the previous implementation. It is not longer necessary since the
mkimage -b switch always has one parameter.

Tested-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Andreas Bießmann <andreas@biessmann.org>
8 years agoi2c/eeprom: Always define I2C_RXTX_LEN
Mario Six [Wed, 20 Apr 2016 08:44:52 +0000 (10:44 +0200)]
i2c/eeprom: Always define I2C_RXTX_LEN

I2C_RXTX_LEN from include/i2c.h is not defined if CONFIG_DM_I2C is
enabled. This leads to a compilation error on boards that enable both
CONFIG_CMD_EEPROM and CONFIG_DM_I2C.

To avoid this, we define I2C_RXTX_LEN in cmd/eeprom.c if it is not
already defined.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
8 years agomx6ul_evk: Remove CONFIG_SUPPORT_EMMC_BOOT
Fabio Estevam [Thu, 21 Apr 2016 01:48:13 +0000 (22:48 -0300)]
mx6ul_evk: Remove CONFIG_SUPPORT_EMMC_BOOT

mx6ul_evk does not come with a eMMC populated, so we should not
define CONFIG_SUPPORT_EMMC_BOOT as it causes SPL to not be able
to boot some brands of SD cards, such as SanDisk microSD HC - 8GB:

U-Boot SPL 2016.05-rc1-28384-g108f841 (Apr 19 2016 - 11:19:11)
Trying to boot from MMC1
spl: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

When CONFIG_SUPPORT_EMMC_BOOT is defined spl_boot_mode() returns
MMCSD_MODE_EMMCBOOT, so remove this option to have a reliable boot
via SD card.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agokbuild: Do not append dtb for OF_EMBED case
Michal Simek [Thu, 28 Apr 2016 07:08:18 +0000 (09:08 +0200)]
kbuild: Do not append dtb for OF_EMBED case

dtb is already included in binary that's why there is no need to replace
u-boot-spl.bin with u-boot-spl-dtb.bin. This is only needed for
OF_SEPARATE is enabled. Only copy -nodtb.bin version which is straight
output from objcopy -O binary.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agofit_image: Fix a double close() on the error path
Simon Glass [Sun, 1 May 2016 23:12:24 +0000 (17:12 -0600)]
fit_image: Fix a double close() on the error path

There is an extra close() call which is not needed.

Reported-by: Coverity (CID: 143065)
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agotools: env: fix config file loading in env library
Anatolij Gustschin [Fri, 29 Apr 2016 20:00:11 +0000 (22:00 +0200)]
tools: env: fix config file loading in env library

env library is broken as the config file pointer is only initialized
in main(). When running in the env library parse_config() fails:

  Cannot parse config file '(null)': Bad address

Ensure that config file pointer is always initialized.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoconfig: am335x_evm: detect BoneGreen using BBG1
matwey.kornilov@gmail.com [Sun, 1 May 2016 16:58:31 +0000 (19:58 +0300)]
config: am335x_evm: detect BoneGreen using BBG1

Since 770e68c0a37fded897d4bdda661614fc81cb33d2
BoneGreen is detected in board_late_init as board_name 'BBG1'

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
8 years agoFix spelling of "occurred".
Vagrant Cascadian [Sun, 1 May 2016 02:18:00 +0000 (19:18 -0700)]
Fix spelling of "occurred".

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoChange my mailaddress
Andreas Bießmann [Sun, 1 May 2016 01:46:16 +0000 (03:46 +0200)]
Change my mailaddress

I'll switch my mails to my own server, so drop all gmail references.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
8 years agomkimage: fix argument parsing on BSD systems
Andreas Bießmann [Sun, 1 May 2016 01:01:27 +0000 (03:01 +0200)]
mkimage: fix argument parsing on BSD systems

The getopt(3) optstring '-' is a GNU extension which is not available on BSD
systems like OS X.

Remove this dependency by implementing argument parsing in another way. This
will also change the lately introduced '-b' switch behaviour.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarch/arm/imx-common/Makefile: Update u-boot.uim MKIMAGEFLAGS
Tom Rini [Mon, 2 May 2016 22:36:07 +0000 (18:36 -0400)]
arch/arm/imx-common/Makefile: Update u-boot.uim MKIMAGEFLAGS

We need to be passing -T firmware here and aren't.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agofs: ext4: fix symlink read function
Ronald Zachariah [Thu, 28 Apr 2016 05:08:34 +0000 (07:08 +0200)]
fs: ext4: fix symlink read function

The function ext4fs_read_symlink was unable to handle a symlink
which had target name of exactly 60 characters.

Signed-off-by: Ronald Zachariah <rozachar@cisco.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
8 years agoRevert "rockchip: rk3288: correct sdram setting"
Vagrant Cascadian [Fri, 15 Apr 2016 20:43:25 +0000 (13:43 -0700)]
Revert "rockchip: rk3288: correct sdram setting"

This reverts commit b5788dc0dd9570e98552833767f4373db965985d.

Ram size is incorrectly reported as 512MB on a firefly-rk3288 board
with 2GB of ram. Reverting this patch displays the full amount of ram.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Mon, 2 May 2016 16:18:43 +0000 (12:18 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoRevert "omap3: Use raw SPL by default for mmc1"
Tom Rini [Mon, 2 May 2016 14:52:51 +0000 (10:52 -0400)]
Revert "omap3: Use raw SPL by default for mmc1"

Unfortunately with this change we now are unable to do FS mode boots
from MMC1 as with the way the code works today we will always load and
assume that the hard-coded raw location contains U-Boot.  Further, we
cannot fix this by just changing other logic to try FS-then-RAW as it
would also make us have to ignore what order the ROM is telling us to
try.

This reverts commit 22d90d560a2b01c47f180e196e6c6485eb8e65db.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoRevert "ti_armv7_common.h: Fix U-Boot location on eMMC"
Tom Rini [Mon, 2 May 2016 12:49:53 +0000 (08:49 -0400)]
Revert "ti_armv7_common.h: Fix U-Boot location on eMMC"

We cannot change the long standing hard-coded offset for raw boot mode
for everyone to accommodate how Android expects things to be done here.

This reverts commit ef5ebe951bec72631cdbc7cef9079e6c684e5d0b.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: uniphier: move pin-mux code into pin_init function
Masahiro Yamada [Thu, 28 Apr 2016 06:37:16 +0000 (15:37 +0900)]
ARM: uniphier: move pin-mux code into pin_init function

The code in uniphier_sld3_sbc_init() is pin-muxing, so it would
be a better fit in uniphier_sld3_early_pin_init().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: allow to use System Bus for ROM boot mode of PH1-LD20
Masahiro Yamada [Thu, 28 Apr 2016 06:37:15 +0000 (15:37 +0900)]
ARM: uniphier: allow to use System Bus for ROM boot mode of PH1-LD20

The System Bus is not available by default on the ROM boot mode of
PH1-LD20.  To use devices connected to the System Bus, such as the
Micro Support Card, it is necessary to set up pin-muxing and some
System Bus Controller register.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: enable Peripherl clock to use UART in SPL
Masahiro Yamada [Thu, 28 Apr 2016 06:37:14 +0000 (15:37 +0900)]
ARM: uniphier: enable Peripherl clock to use UART in SPL

This is needed to use UART on SPL.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix boot mode table of PH1-LD20
Masahiro Yamada [Thu, 28 Apr 2016 06:37:13 +0000 (15:37 +0900)]
ARM: uniphier: fix boot mode table of PH1-LD20

PH1-LD20 does not have the dedicated boot swap select latch.
Instead, it is controlled from the boot mode select.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Thu, 28 Apr 2016 17:15:52 +0000 (13:15 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 28 Apr 2016 17:15:41 +0000 (13:15 -0400)]
Merge branch 'master' of http://git.denx.de/u-boot-sunxi

8 years agodrivers/video/am335x-fb: Properly point framebuffer behind palette
Martin Pietryka [Wed, 27 Apr 2016 19:39:16 +0000 (21:39 +0200)]
drivers/video/am335x-fb: Properly point framebuffer behind palette

The DMA was outputting the palette on the screen because the base
for the DMA was not after the palette. In addition to that, the ceiling was
also too high, this led that the output on the screen was shifted.

NOTE: According to the TRM, even in 16/24bit mode a palette is required
in the first 32 bytes of the framebuffer.

See also:
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/234967/834483#834483

"In this mode, the LCDC will assume all information is data and thus you
need to ensure that the DMA points to the first pixel of data and not the
first entry in the frame buffer which is the beginning of the 512 byte
palette."

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
8 years agodrivers/video/am335x-fb: Add support for 16bpp format
Martin Pietryka [Wed, 27 Apr 2016 19:39:15 +0000 (21:39 +0200)]
drivers/video/am335x-fb: Add support for 16bpp format

To support 16bpp we just need to change the raster_ctrl register
accordingly. Also 32bpp mode should work as well, but was not tested.
According to the TRM the uppermost byte will be ignored when
LCD_TFT_24BPP_UNPACK is set.

The switch logic is based on the Linux kernel tilcdc driver:
drivers/gpu/drm/tilcdc/tilcdc_crtc.c: lines 407 through 419
(kernel was checked out at commit: bcc981e9ed8)

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
8 years agoomap3: Reduce logic/overo SPL max image size
Tom Rini [Wed, 27 Apr 2016 22:44:32 +0000 (18:44 -0400)]
omap3: Reduce logic/overo SPL max image size

While the OMAP3 has 64KiB of SRAM, per the TRM the download area is only
from 0x40200000 to 0x4020F000 and exceeding that will cause failure to
boot.  Further, we need to make sure that we don't run into
SRAM_SCRATCH_SPACE_ADDR as once SPL is running we will write values
there and would corrupt our running image.

Cc: Adam Ford <aford173@gmail.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agosunxi: Enable LDO3 at 3.3V on A13-OLinuXino board
Hans de Goede [Thu, 14 Apr 2016 14:49:47 +0000 (16:49 +0200)]
sunxi: Enable LDO3 at 3.3V on A13-OLinuXino board

LDO3 is used for the VGA output, this fixes a regression where the VGA
output on these boards would no longer work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: mctl_mem_matches: Add missing memory barrier
Hans de Goede [Thu, 14 Apr 2016 16:53:32 +0000 (18:53 +0200)]
sunxi: mctl_mem_matches: Add missing memory barrier

We are running with the caches disabled when mctl_mem_matches gets called,
but the cpu's write buffer is still there and can still get in the way,
add a memory barrier to fix this.

This avoids mctl_mem_matches always returning false in some cases, which
was resulting in:

U-Boot SPL 2015.07 (Apr 14 2016 - 18:47:26)
DRAM: 1024 MiB

U-Boot 2015.07 (Apr 14 2016 - 18:47:26 +0200) Allwinner Technology

CPU:   Allwinner A23 (SUN8I)
DRAM:  512 MiB

Where 512 MiB is the right amount, but the DRAM controller would be
initialized for 1024 MiB.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agoARM64: zynqmp: Cleanup config file after CMD move
Michal Simek [Tue, 26 Apr 2016 14:12:06 +0000 (16:12 +0200)]
ARM64: zynqmp: Cleanup config file after CMD move

The patch:
"configs: Re-sync almost all of cmd/Kconfig"
(sha1: 78d1e1d0a157c8b48ea19be6170b992745d30f38)
doesn't remove empty if-endif. This patch is fixing it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: uniphier: revive some commands lost by Kconfig re-sync
Masahiro Yamada [Tue, 26 Apr 2016 02:23:39 +0000 (11:23 +0900)]
ARM: uniphier: revive some commands lost by Kconfig re-sync

The recently added uniphier_ld20_defconfig missed the tree-wide
re-sync by commit 89cb2b5f8be4 ("configs: Re-sync with cmd/Kconfig").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Tue, 26 Apr 2016 11:20:45 +0000 (07:20 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung