]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
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

8 years agoPrepare v2016.05-rc3
Tom Rini [Mon, 25 Apr 2016 23:27:37 +0000 (19:27 -0400)]
Prepare v2016.05-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopico-imx6ul: Update the defconfig
Tom Rini [Mon, 25 Apr 2016 22:03:48 +0000 (18:03 -0400)]
pico-imx6ul: Update the defconfig

The defconfig/config.h file were merged but were already out of sync
with mainline.  This brings them further into line now.

Cc: Richard Hu <richard.hu@technexion.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 25 Apr 2016 20:23:51 +0000 (16:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agodrivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definition
Martin Pietryka [Mon, 25 Apr 2016 19:25:07 +0000 (21:25 +0200)]
drivers/video/am335x-fb: Fix bits for LCD_PALMODE_RAWDATA definition

According to the TRM you have to set bits [21:20] to 0b10 for RAW mode, so
(0x10 << 20) is obviously wrong here.

Signed-off-by: Martin Pietryka <martin.pietryka@chello.at>
8 years agopci: Device scanning range fix
Yoshinori Sato [Mon, 25 Apr 2016 06:41:01 +0000 (15:41 +0900)]
pci: Device scanning range fix

The terminal condition in the area where a PCI device is scanned is wrong,
and 1f.7 isn't scanned.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agommc: sdhci: add const qualifier to the name of struct sdhci_host
Masahiro Yamada [Fri, 22 Apr 2016 11:59:31 +0000 (20:59 +0900)]
mmc: sdhci: add const qualifier to the name of struct sdhci_host

This allows to drop annoying (char *) casts when setting the host
name of struct sdhci_host.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: DRA7: Add ABB setup for all domains
Nishanth Menon [Thu, 21 Apr 2016 19:34:25 +0000 (14:34 -0500)]
ARM: DRA7: Add ABB setup for all domains

ABB should be initialized for all required domains voltage domain
for DRA7: IVA, GPU, EVE in addition to the existing MPU domain. If
we do not do this, kernel configuring just the frequency using the
default boot loader configured voltage can fail on many corner lot
units and has been hard to debug. This specifically is a concern with
DRA7 generation of SoCs since other than VDD_MPU, all other domains
are only permitted to setup the voltages to required OPP only at boot.

Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5: Enable ABB configuration for MM voltage domain
Nishanth Menon [Thu, 21 Apr 2016 19:34:24 +0000 (14:34 -0500)]
ARM: OMAP5: Enable ABB configuration for MM voltage domain

Since we setup the voltage and frequency for the MM domain, we *must*
setup the ABB configuration needed for the domain as well. If we do not
do this, kernel configuring just the frequency using the default boot
loader configured voltage can fail on many corner lot units.

Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5/DRA7: Move ABB TXDONE mask to voltage structure
Nishanth Menon [Thu, 21 Apr 2016 19:34:23 +0000 (14:34 -0500)]
ARM: OMAP5/DRA7: Move ABB TXDONE mask to voltage structure

ABB TX_DONE mask will vary depending on ABB module. For example,
3630 never had ABB on IVA domain, while OMAP5 does use ABB on MM domain,
DRA7 has it on all domains with the exception of CORE, RTC.

Hence, move the txdone mask definition over to structure describing
voltage domain.

Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoARM: OMAP5/DRA7: Get rid of control_std_fuse_opp_vdd_mpu_2
Nishanth Menon [Thu, 21 Apr 2016 19:34:22 +0000 (14:34 -0500)]
ARM: OMAP5/DRA7: Get rid of control_std_fuse_opp_vdd_mpu_2

This information is already available under vcores->volts.efuse.reg.
There is no reason for duplicating the information since AVS Class 0
definitions are common for OMAP5 and DRA7 and defined with
STD_FUSE_OPP_* macros. This allows a central location of defining
the ABB and voltage definitions especially since they are reused.

This also makes it simpler to prevent mistakes involved when changing
the boot OPP for the device.

Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agocommon/dlmalloc.c: Delete content that was moved to malloc.h
Robert P. J. Day [Thu, 21 Apr 2016 11:35:55 +0000 (07:35 -0400)]
common/dlmalloc.c: Delete content that was moved to malloc.h

Remove several hundred lines of content surrounded by:

#if 0  /* Moved to malloc.h */
... moved stuff ...
#endif /* 0 */                 /* Moved to malloc.h */

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agospl: spl_mmc: Disambiguate error message
Fabio Estevam [Thu, 21 Apr 2016 02:12:04 +0000 (23:12 -0300)]
spl: spl_mmc: Disambiguate error message

The error message "spl: mmc block read error" may come from two
different functions, so we should better annotate the function name
where the error comes from to help debugging.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hikey: Simplify README instructions.
Peter Griffin [Wed, 20 Apr 2016 16:14:03 +0000 (17:14 +0100)]
ARM: hikey: Simplify README instructions.

This patch updates and simplifies the hikey README. The old
instructions were hard to follow, and convoluted.

This patch also updates the link to the mcuimage.bin which was outdated.

Using an outdated mcuimage.bin results in the additional a53 cores
not coming online when the kernel issues PSCI requests to
arm trusted firmware (ATF).

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Align memory node with upstream kernel
Peter Griffin [Wed, 20 Apr 2016 16:14:02 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: Align memory node with upstream kernel

The memory node gets automatically generated by U-Boot
in arch_fixup_fdt(), before passing control to the kernel
using U-Boots representation of the dram banks.

However the upstream kernel uses the memory node to carve-out
regions of RAM for various purposes. To make this work without
changing arch_fixup_fdt() which will effect many platforms
we replicate the upstream memory node layout using the dram
banks.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
Peter Griffin [Wed, 20 Apr 2016 16:14:01 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.

This is a binding which only exists in U-Boot, but is
required to get working serial in U-Boot.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Implement reset_cpu() for hikey.
Peter Griffin [Wed, 20 Apr 2016 16:14:00 +0000 (17:14 +0100)]
ARM: hisilicon: hikey: Implement reset_cpu() for hikey.

This allows the reset command to reset the board from
u-boot.

=> reset
resetting ...
INFO:    BL1: 0xf9810000 - 0xf9818000 [size = 32768]
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.1(debug):7fb9b0e
NOTICE:  BL1: Built : 17:06:41, Apr 19 2016

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
Peter Griffin [Wed, 20 Apr 2016 16:13:59 +0000 (17:13 +0100)]
ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.

Currently only the serial pl01x driver is using DT,
and the other drivers still use platform data but
as more DT lands in the upstream kernel the aim is
to migrate the other drivers over to DT as well to
have a fully DT configured hikey u-boot.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoMAINTAINERS: Add myself as maintainer for hikey
Peter Griffin [Wed, 20 Apr 2016 16:13:58 +0000 (17:13 +0100)]
MAINTAINERS: Add myself as maintainer for hikey

This patch adds myself as maintainer for the hikey
U-Boot port.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
Peter Griffin [Wed, 20 Apr 2016 16:13:57 +0000 (17:13 +0100)]
ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.

Import the upstream kernel dts into U-Boot. Currently
only serial is supported, but a lot more DT changes are
queued for v4.7.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agosf: fix timebase data type in _wait_ready()
Stephen Warren [Mon, 4 Apr 2016 17:03:52 +0000 (11:03 -0600)]
sf: fix timebase data type in _wait_ready()

get_timer() returns an unsigned 64-bit value, but is currently assigned to
a signed 32-bit variable. Due to sign extension and data truncation, this
causes the timeout loop in spi_flash_cmd_wait_ready() to immediately (and
incorrectly) fire for about 50% of all time values, based on whether bit
31 is set. In sandbox at least, this causes the test to pass or fail based
on system uptime, as opposed to time since the U-Boot binary was started.

Fixes: 4efad20a1751 ("sf: Update status reg check in spi_flash_cmd_wait_ready")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoti_armv7_common.h: Fix U-Boot location on eMMC
Semen Protsenko [Wed, 20 Apr 2016 09:05:59 +0000 (12:05 +0300)]
ti_armv7_common.h: Fix U-Boot location on eMMC

According to common eMMC partition table for Android boot (see
PARTS_DEFAULT definition in include/configs/dra7xx_evm.h), "bootloader"
partition (where u-boot.img is stored) starts at 256 KiB. Which is equal
to 512 sectors (as 1 MMC sector size is 512 bytes).

This patch fixes CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR constant so that
it points to correct address of "bootloader" partition and SPL is able to
read, parse and run u-boot.img correctly.

This change was originally done as part of patch [1] in omapzoom u-boot.
Without this patch, SPL fails to parse U-Boot header with next error:

    mkimage signature not found - ih_magic = 4814325a

While at it, also fix U-Boot partition size, which is 384 KiB (as stated in
include/configs/dra7xx_evm.h).

[1] http://omapzoom.org/?p=repo/u-boot.git;a=commit;h=742b82d0c0aa0ed8096c2225a00e9f350212efa9

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync with cmd/Kconfig
Tom Rini [Sun, 24 Apr 2016 21:29:26 +0000 (17:29 -0400)]
configs: Re-sync with cmd/Kconfig

Update the config.h and defconfig files for the commands that 8e3c036
converted over to Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd: Kconfig: Add a Kconfig options for a few CMD
Dinh Nguyen [Thu, 21 Apr 2016 14:05:23 +0000 (09:05 -0500)]
cmd: Kconfig: Add a Kconfig options for a few CMD

Add the following CMD options to Kconfig:

CMD_BOOTZ
CMD_ASKENV
CMD_GREPENV
CMD_USB_MASS_STORAGE
CMD_FAT
CMD_MII
CMD_CACHE
CMD_DFU
CMD_EXT2
CMD_EXT4
CMD_EXT4_WRITE
CMD_FS_GENERIC
CMD_MMC

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
[trini: Don't make CMD_USB_MASS_STORAGE nor CMD_DFU depend on CMD_USB]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoinclude/configs: Whitespace fixup
Tom Rini [Sun, 24 Apr 2016 14:24:59 +0000 (10:24 -0400)]
include/configs: Whitespace fixup

A number of moveconfig.py runs have left a instances of multiple empty
lines in a row.  Correct this to a single empty line.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync almost all of cmd/Kconfig
Tom Rini [Fri, 22 Apr 2016 20:41:25 +0000 (16:41 -0400)]
configs: Re-sync almost all of cmd/Kconfig

This syncs up the current cmd/Kconfig and include/configs/ files with the
only exception being CMD_NAND.  Due to how we have used this historically
we need to take further care here when converting.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync CONFIG_USB_MUSB_HOST
Tom Rini [Fri, 22 Apr 2016 18:01:08 +0000 (14:01 -0400)]
configs: Re-sync CONFIG_USB_MUSB_HOST

Now that CONFIG_USB_MUSB_HOST is part of Kconfig, migrate that over to
the defconfig files.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync HUSH options
Tom Rini [Fri, 22 Apr 2016 01:37:19 +0000 (21:37 -0400)]
configs: Re-sync HUSH options

Move all cases of CONFIG_SYS_HUSH_PARSER out of the config.h files.  Remove
all cases of CONFIG_SYS_PROMPT_HUSH_PS2 as everyone uses the default.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-uniphier
Tom Rini [Mon, 25 Apr 2016 17:45:32 +0000 (13:45 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-uniphier

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-usb
Tom Rini [Mon, 25 Apr 2016 17:43:22 +0000 (13:43 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-usb

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 25 Apr 2016 17:34:42 +0000 (13:34 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 25 Apr 2016 17:32:58 +0000 (13:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Mon, 25 Apr 2016 17:32:18 +0000 (13:32 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

8 years agodfu: ram: fix number base of RAM entity parameters
Stephen Warren [Fri, 22 Apr 2016 19:34:16 +0000 (13:34 -0600)]
dfu: ram: fix number base of RAM entity parameters

U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM
entity parsing has historically done so. Reverse the change to default
to base 10, so that values in previously working command-lines aren't
mis-parsed, causing RAM corruption, crashes, hangs, etc.

Fixes: 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env")
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
[Test HW: AM335x BBB]

8 years agodrivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env
Mugunthan V N [Fri, 22 Apr 2016 08:49:25 +0000 (14:19 +0530)]
drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env

U-Boot crashes when an invalid dfu_alt_info is set and tried
using dfu command. Fixing this as it is handled in dfu-mmc.

=> dfu 0 ram 0
data abort
pc : [<9ff893d6>]          lr : [<9ff6edb9>]
reloc pc : [<808323d6>]    lr : [<80817db9>]
sp : 9ef36cf0  ip : 00000158     fp : 9ffbc0b8
r10: 9ffbc0b8  r9 : 9ef36ed8     r8 : 00000000
r7 : 00000000  r6 : 9ffbc0c8     r5 : 9ef36cfc  r4 : 9ef392c8
r3 : 00000004  r2 : 00000000     r1 : 9ff9a985  r0 : ffffffff
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>