platform/kernel/u-boot.git
8 years agocommon: cmd_ethsw: Spelling fixes
Codrin Ciubotariu [Tue, 15 Dec 2015 13:21:05 +0000 (15:21 +0200)]
common: cmd_ethsw: Spelling fixes

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodoc: t1040-l2switch: Update README
Codrin Ciubotariu [Tue, 15 Dec 2015 13:21:04 +0000 (15:21 +0200)]
doc: t1040-l2switch: Update README

The driver for VSC9953 L2 switch IP supports many features and
the documentation needs to be updated.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: net: vsc9953: Fix FDB aging time
Codrin Ciubotariu [Tue, 15 Dec 2015 13:21:03 +0000 (15:21 +0200)]
drivers: net: vsc9953: Fix FDB aging time

By default, the aging period is set to 0, so the dynamic
FDB entries are never removed. This patch sets the aging
time to 300 seconds.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodrivers: net: vsc9953: Fix number of reserved registers
Codrin Ciubotariu [Tue, 15 Dec 2015 13:21:02 +0000 (15:21 +0200)]
drivers: net: vsc9953: Fix number of reserved registers

There are only 21 registers reserved between ana_ana and
ana_pgid register groups.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: phy: do not read configuration register on reset
Stefan Agner [Wed, 9 Dec 2015 19:21:25 +0000 (11:21 -0800)]
net: phy: do not read configuration register on reset

When doing a software reset, the reset flag should be written without
other bits set. Writing the current state will lead to restoring the
state of the PHY (e.g. Powerdown), which is not what is expected from
a software reset.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Michael Welling <mwelling@ieee.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 12 Jan 2016 23:12:42 +0000 (18:12 -0500)]
Merge git://git.denx.de/u-boot-dm

8 years agosandbox: eth-raw-os.c: Ensure that our interface name is not too long
Tom Rini [Tue, 8 Dec 2015 03:26:34 +0000 (22:26 -0500)]
sandbox: eth-raw-os.c: Ensure that our interface name is not too long

Coverity notes that we do not ensure when we copy ifname we still have
space left to ensure NULL termination.  As cannot control the size of
ifr_name we must make sure that our argument will not overflow the
buffer.

Reported-by: Coverity (CID 131094)
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: core: Add option to configure an offset for the address translation
Stefan Roese [Mon, 14 Dec 2015 15:18:15 +0000 (16:18 +0100)]
dm: core: Add option to configure an offset for the address translation

Some platforms need to ability to configure an offset to the standard
addresses extracted from the device-tree. This patch allows this by
adding a function to DM to configure this offset (if needed).

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Fixed space before tab:
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: Use the debug UART on rk3036
Simon Glass [Mon, 14 Dec 2015 04:37:00 +0000 (21:37 -0700)]
rockchip: Use the debug UART on rk3036

Rather than using a new debug UART implementation, use the standard one
provided by U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
8 years agodm: ns16550: Allow the driver to be omitted if requested
Simon Glass [Mon, 14 Dec 2015 04:36:59 +0000 (21:36 -0700)]
dm: ns16550: Allow the driver to be omitted if requested

Allow the ns16550 debug UART to be used without the full driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
8 years agodm: serial: Allow the UART driver to be dropped from the image
Simon Glass [Mon, 14 Dec 2015 04:36:58 +0000 (21:36 -0700)]
dm: serial: Allow the UART driver to be dropped from the image

In very very space-constrained devices even the full UART driver is too
large. In this case the debug UART can still be used in some cases.

Add options to enable the UART driver in SPL and U-Boot proper. Enable both
options by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
8 years agodm: net: usb: Convert mcs7830 driver to support driver model
Simon Glass [Sun, 29 Nov 2015 20:18:11 +0000 (13:18 -0700)]
dm: net: usb: Convert mcs7830 driver to support driver model

Adjust this driver to support driver model for Ethernet.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodm: net: usb: Refactor mcs7830 driver ready for DM conversion
Simon Glass [Sun, 29 Nov 2015 20:18:10 +0000 (13:18 -0700)]
dm: net: usb: Refactor mcs7830 driver ready for DM conversion

Remove stamp data and create common functions for the main Ethernet
operations. This will make it easier to convert this driver to support
driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agopci: Tidy up comments in pci_bind_bus_devices()
Simon Glass [Sun, 29 Nov 2015 20:18:09 +0000 (13:18 -0700)]
pci: Tidy up comments in pci_bind_bus_devices()

The current comments are confusing. We don't actually bind a generic device
when the device tree has no information. We try to scan available PCI
drivers. Update the comments to reflect this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: Convert PCI MMC over to use DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:18:08 +0000 (13:18 -0700)]
dm: Convert PCI MMC over to use DM PCI API

At present pci_mmc_init() does not correctly use the PCI function since the
list it passes is not terminated. The array size passed to pci_mmc_init() is
actually not used correctly. Fix this and adjust the pci_mmc_init() to scan
all available MMC devices.

Adjust this code to use the new driver model PCI API.

This should move over to the new MMC uclass at some point.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: usb: Convert echi-pci to use new DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:18:07 +0000 (13:18 -0700)]
dm: usb: Convert echi-pci to use new DM PCI API

Convert this driver to use the new driver model PCI API.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agodm: ahci: Convert to use new DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:18:06 +0000 (13:18 -0700)]
dm: ahci: Convert to use new DM PCI API

Convert this driver to use the new driver model PCI API.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Switch to DM API for PCI address mapping
Simon Glass [Sun, 29 Nov 2015 20:18:05 +0000 (13:18 -0700)]
dm: pci: Switch to DM API for PCI address mapping

We should use the new address mapping functions unless we are in
compatibility mode. Disable the old functions by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: net: Convert rtl8169 to use DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:18:04 +0000 (13:18 -0700)]
dm: net: Convert rtl8169 to use DM PCI API

Update this driver to use the proper driver-model PCI API functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodm: pci: Add driver model API functions for address mapping
Simon Glass [Sun, 29 Nov 2015 20:18:03 +0000 (13:18 -0700)]
dm: pci: Add driver model API functions for address mapping

At present the PCI address map functions use the old API. Add new functions
for this so that drivers can be converted.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: test: Convert PCI tests to use the DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:18:02 +0000 (13:18 -0700)]
dm: test: Convert PCI tests to use the DM PCI API

Update these tests to use driver model API functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: tegra: net: Convert tegra boards to driver model for Ethernet
Simon Glass [Sun, 29 Nov 2015 20:18:01 +0000 (13:18 -0700)]
dm: tegra: net: Convert tegra boards to driver model for Ethernet

Adjust all Tegra boards to use driver model for Ethernet, now that the
required drivers are converted.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agodm: pci: Drop the old version of pci_find_class()
Simon Glass [Sun, 29 Nov 2015 20:18:00 +0000 (13:18 -0700)]
dm: pci: Drop the old version of pci_find_class()

Move this function into the compatibility file so that it is not available
by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Drop the old version of pci_find_device/s()
Simon Glass [Sun, 29 Nov 2015 20:17:59 +0000 (13:17 -0700)]
dm: pci: Drop the old version of pci_find_device/s()

Move these functions into the compatibility file so that they are not
available by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:58 +0000 (13:17 -0700)]
dm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI API

This function should take a struct udevice rather than pci_dev_t. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: video: Convert video and pci_rom to use DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:57 +0000 (13:17 -0700)]
dm: pci: video: Convert video and pci_rom to use DM PCI API

Adjust these files to use the driver-model PCI API instead of the legacy
functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: Convert bios_interrupts to use DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:56 +0000 (13:17 -0700)]
dm: Convert bios_interrupts to use DM PCI API

Adjust this code to use driver model for devices where possible. Since
existing users have not been converted the old code must remain.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: x86: ivybridge: Convert graphics init to use DM PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:55 +0000 (13:17 -0700)]
dm: x86: ivybridge: Convert graphics init to use DM PCI API

Use the driver-model PCI functions here where possible. For now we have to
search for the device with pci_bus_find_bdf() but at some point we can put
this in a proper driver and avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: serial: Convert ns16550 driver to use driver model PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:54 +0000 (13:17 -0700)]
dm: serial: Convert ns16550 driver to use driver model PCI API

Use the driver model version of the function to find the BAR. This updates
the fdtdec function, of which ns16550 is the only user.

The fdtdec_get_pci_bdf() function is dropped for several reasons:
- with driver model we should use 'struct udevice *' rather than passing the
   device tree offset explicitly
- there are no other users in the tree
- the function parses for information which is already available in the PCI
device structure (specifically struct pci_child_platdata which is available
at dev_get_parent_platdata(dev)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a function to read a PCI BAR
Simon Glass [Sun, 29 Nov 2015 20:17:53 +0000 (13:17 -0700)]
dm: pci: Add a function to read a PCI BAR

Add a driver-model function for reading the PCI BAR from a device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a driver-model version of pci_find_class()
Simon Glass [Sun, 29 Nov 2015 20:17:52 +0000 (13:17 -0700)]
dm: pci: Add a driver-model version of pci_find_class()

Add a function which scans the driver model device information rather
than scanning the PCI bus again.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: scsi: Use driver-model PCI API
Simon Glass [Sun, 29 Nov 2015 20:17:51 +0000 (13:17 -0700)]
dm: pci: scsi: Use driver-model PCI API

Adjust the SCSI command to use driver model for its PCI interface.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a driver-model version of pci_find_device()
Simon Glass [Sun, 29 Nov 2015 20:17:50 +0000 (13:17 -0700)]
dm: pci: Add a driver-model version of pci_find_device()

Add a function which scans the driver model device information rather
than scanning the PCI bus again.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Use driver model PCI API in auto-config
Simon Glass [Sun, 29 Nov 2015 20:17:49 +0000 (13:17 -0700)]
dm: pci: Use driver model PCI API in auto-config

At present we are using legacy functions even in the auto-configuration code
used by driver model. Add a new pci_auto.c version which uses the correct
API.

Create a new pci_internal.h header to hold functions that are used within
the PCI subsystem, but are not exported to other drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a dm_ prefix to pci_bus_find_bdf()
Simon Glass [Sun, 29 Nov 2015 20:17:48 +0000 (13:17 -0700)]
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()

Most driver model PCI functions have a dm_ prefix. At some point, when the
old code is converted to driver model and the old functions are removed, we
will drop that prefix.

For consistency, we should use the dm_ prefix for all driver model
functions. Update pci_bus_find_bdf() accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a dm_ prefix to pci_get_bdf()
Simon Glass [Sun, 29 Nov 2015 20:17:47 +0000 (13:17 -0700)]
dm: pci: Add a dm_ prefix to pci_get_bdf()

Most driver model PCI functions have a dm_ prefix. At some point, when the
old code is converted to driver model and the old functions are removed, we
will drop that prefix.

For consistency, we should use the dm_ prefix for all driver model
functions. Update pci_get_bdf() accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Mark legacy files as such
Simon Glass [Sun, 29 Nov 2015 20:17:46 +0000 (13:17 -0700)]
dm: pci: Mark legacy files as such

We don't want people changing the legacy PCI files while migration is in
progress. Update the file headers to indicate that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoARM: uniphier: fix recommended board setting in document
Masahiro Yamada [Fri, 8 Jan 2016 16:51:16 +0000 (01:51 +0900)]
ARM: uniphier: fix recommended board setting in document

The mem_is_flash() in arch/arm/mach-uniphier/micro-support_card.c
writes/reads the tail of each NOR flash bank to check if the device
really resides there.

If CS1_SPLIT were enabled, the support card would always require two
NOR flash devices to be inserted for the correct NOR detection.
This is not probably what we want.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add dump command for DDR Multi PHY registers
Masahiro Yamada [Fri, 8 Jan 2016 16:51:15 +0000 (01:51 +0900)]
ARM: uniphier: add dump command for DDR Multi PHY registers

The ProXstream2/PH1-LD6b is integrated with a new IP for DDR PHY
which is not register-compatible with the former SoCs.
Add a new command to support the register dump of this IP.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add DRAM init code for ProXstream2/PH1-LD6b
Masahiro Yamada [Fri, 8 Jan 2016 16:51:14 +0000 (01:51 +0900)]
ARM: uniphier: add DRAM init code for ProXstream2/PH1-LD6b

As mentioned in the log of commit 019df879a93e2 (ARM: uniphier: add
ProXstream2 and PH1-LD6b support), the DRAM init code was missing
for a long time.  Finally, here it is.  SPL works now.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move headers out of include/mach directory
Masahiro Yamada [Fri, 8 Jan 2016 16:51:13 +0000 (01:51 +0900)]
ARM: uniphier: move headers out of include/mach directory

These headers are only included locally in arch/arm/mach-uniphier/.
There is no reason to export them by putting in the mach/ directory.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move cmd_pinmon.c to boot-mode subdirectory
Masahiro Yamada [Fri, 8 Jan 2016 16:51:12 +0000 (01:51 +0900)]
ARM: uniphier: move cmd_pinmon.c to boot-mode subdirectory

This command shows the boot mode pins, so it would be more at home
in the boot-mode subdirectory.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move cmd_ddrphy.c to dram subdirectory
Masahiro Yamada [Fri, 8 Jan 2016 16:51:11 +0000 (01:51 +0900)]
ARM: uniphier: move cmd_ddrphy.c to dram subdirectory

This command shows the register dump of the DDR PHY, so it would be
more at home in the dram subdirectory.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: kill bogus header includes
Masahiro Yamada [Fri, 8 Jan 2016 16:51:10 +0000 (01:51 +0900)]
ARM: uniphier: kill bogus header includes

These includes are not necessary.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoPrepare v2016.01 v2016.01
Tom Rini [Tue, 12 Jan 2016 14:06:54 +0000 (09:06 -0500)]
Prepare v2016.01

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodm: test: usb: Update the USB tests so that they all pass
Simon Glass [Thu, 7 Jan 2016 17:23:42 +0000 (10:23 -0700)]
dm: test: usb: Update the USB tests so that they all pass

Due to a limitation removed in an earlier patch, USB tests were not seeing
all the devices. Update the tests to pass now that all devices are visible.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoMAINTAINERS/mailmap: Update my email address
Fabio Estevam [Mon, 11 Jan 2016 12:22:40 +0000 (10:22 -0200)]
MAINTAINERS/mailmap: Update my email address

Update my email address to the NXP account.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Sun, 10 Jan 2016 14:17:52 +0000 (09:17 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agocgtqmx6eval: README: Fix parameter of 'sf write' command
Otavio Salvador [Thu, 7 Jan 2016 19:01:23 +0000 (17:01 -0200)]
cgtqmx6eval: README: Fix parameter of 'sf write' command

'sf command' should receive the length in sector boundaries, so fix it
accordingly.

Also, show the steps to set the server and board IP addresses for
making the steps clearer.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx6cuboxi: Remove obsolete comment
Fabio Estevam [Wed, 6 Jan 2016 16:19:22 +0000 (14:19 -0200)]
mx6cuboxi: Remove obsolete comment

We currently support various versions of Solidrun mx6 boards, so
remove the obsolete comment.

Reported-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agomx6cuboxi: Fix the reset delay for the AR8035 PHY
Fabio Estevam [Mon, 4 Jan 2016 23:38:08 +0000 (21:38 -0200)]
mx6cuboxi: Fix the reset delay for the AR8035 PHY

Since commit 59370f3fcd1350 ("net: phy: delay only if reset handler is
registered") Ethernet is no longer functional:

Booting from net ...
FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4

This commit does not have an issue in itself, but it revelead a problem
with the Ethernet initialization.

As per the AR8035 datasheet:

"For a reliable power on reset, suggest to keep asserting the reset
low long enough (10ms) to ensure the clock is stable and clock-to-reset
1ms requirement is satisfied."

So do as suggested and keep the reset low for 10ms.

Also add a 100us delay after deasserting the reset line
to guarantee that the PHY ID can be read correctly and the Atheros
PHY can be loaded as per Troy Kisky's suggestion.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Tom Rini <trini@konsulko.com>
8 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 8 Jan 2016 19:19:24 +0000 (14:19 -0500)]
Merge git://git.denx.de/u-boot-rockchip

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Fri, 8 Jan 2016 15:18:18 +0000 (10:18 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agopci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails
Bin Meng [Fri, 8 Jan 2016 09:03:21 +0000 (01:03 -0800)]
pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails

When trying to access non-existent/unsupported PCI devices in
ls_pcie_read_config(), when ls_pcie_addr_valid() fails it returns
error code and fills in the result with 0xffffffff manually. But it
really should return zero to upper layer codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agopci: imx: Adjust the return value when imx_pcie_addr_valid() fails
Bin Meng [Fri, 8 Jan 2016 09:03:20 +0000 (01:03 -0800)]
pci: imx: Adjust the return value when imx_pcie_addr_valid() fails

When trying to access non-existent/unsupported PCI devices in
imx_pcie_read_config(), when imx_pcie_addr_valid() fails it returns
error code and fills in the result with 0xffffffff manually. But it
really should return zero to upper layer codes.

Reported-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agofs: handle the fileaddr variable in the same way as in the network case
David Müller (ELSOFT AG) [Fri, 8 Jan 2016 08:39:20 +0000 (09:39 +0100)]
fs: handle the fileaddr variable in the same way as in the network case

Signed-off-by: David Müller <d.mueller@elsoft.ch>
8 years agoget_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use
Heiko Schocher [Thu, 7 Jan 2016 12:45:38 +0000 (13:45 +0100)]
get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use

from linux commit ce8155f7a3d5:

Perl 5.22 emits a deprecated message when "\C" is used in a regex.  Perl
5.24 will disallow it altogether.

Fix it by using [A-Z] instead of \C.

>From linux adapted to U-Boot by:
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
8 years agofix always succesful memory test
Rasmus Villemoes [Thu, 7 Jan 2016 10:36:04 +0000 (11:36 +0100)]
fix always succesful memory test

Since 51209b1f42cb ("Use common mtest iteration counting"),
do_mem_mtest has always reported 0 errors and hence returned 0, even
if errors were detected. Fix the helpers mem_test_alt() and
mem_test_quick() to return the number of errors found.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
8 years agocyrus: Enable STDIO deregister
Andy Fleming [Wed, 6 Jan 2016 21:34:50 +0000 (15:34 -0600)]
cyrus: Enable STDIO deregister

If CONFIG_SYS_STDIO_DEREGISTER is not enabled, usb reset
will fail every time. Enabling it allows usb reset to
work.

Signed-off-by: Andy Fleming <afleming@gmail.com>
8 years agoMAINTAINERS, .mailmap: Update my email address
York Sun [Tue, 5 Jan 2016 17:48:45 +0000 (09:48 -0800)]
MAINTAINERS, .mailmap: Update my email address

Change from yorksun@freescale.com to york.sun@nxp.com.

Signed-off-by: York Sun <york.sun@nxp.com>
8 years agoam33xx/am43xx: Add platform data for GPIOs
Tom Rini [Tue, 5 Jan 2016 17:17:15 +0000 (12:17 -0500)]
am33xx/am43xx: Add platform data for GPIOs

On these platforms we have many cases of boards that enable device model
and GPIO support but do not enable OF_CONTROL and pass in a device tree
with the binary.  We need to bring in the platform data here as well.

Tested on Beaglebone Black.

Reported-by: Robert Nelson <robertcnelson@gmail.com>
Reported-by: Francisco Aguerre <franciscoaguerre@gmail.com>
Reported-by: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoserial: zynq: Use static inline for _debug_uart_init()
Michal Simek [Tue, 5 Jan 2016 11:49:21 +0000 (12:49 +0100)]
serial: zynq: Use static inline for _debug_uart_init()

Mark _debug_uart_init() as static to avoid sparse warning and
inline it to debug_uart_init().

Reported-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agonet: remove scary warning about EEPROM provided MAC address
Andre Przywara [Mon, 4 Jan 2016 15:48:22 +0000 (15:48 +0000)]
net: remove scary warning about EEPROM provided MAC address

In many parts of the computing world having a unique MAC address
sitting in some on-NIC storage is considered the normal case.
Remove the warning to not scare the user unnecessarily.
This applies to Highbank/Midway and ARM's Juno, for instance.
Besides that this fixes the formatting on Midway, for instance,
which currently looks like:
...
Net:   xgmac0
Warning: xgmac0 using MAC address from net device
, xgmac1
Warning: xgmac1 using MAC address from net device
...

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
8 years agoarm64: Juno/FVP: adjust kernel load address
Andre Przywara [Mon, 4 Jan 2016 15:43:36 +0000 (15:43 +0000)]
arm64: Juno/FVP: adjust kernel load address

The default kernel load offset for an arm64 kernel is 0x80000, so
U-Boot takes cares of moving the loaded kernel to a matching memory
location just before booting it.
Since we run with caches off, this takes a while for any decently
sized kernel - with no output explaining the reason for the delay
(unless one uses a DEBUG build).
By adjusting the default load offset for Juno and VFP to be 512K
aligned in the first place we can skip this copying and boot much
faster.
Tested on Juno.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoarm, Makefile: correct compilation flag for u-boot-dtb
Aneesh Bansal [Wed, 23 Dec 2015 08:46:23 +0000 (14:16 +0530)]
arm, Makefile: correct compilation flag for u-boot-dtb

The compilation of u-boot-dtb.img should be controlled by
CONFIG_OF_CONTROL and not CONFIG_DM.
CONFIG_DM may be defined even without Device Tree requirement.

This was added in commit 947cee1127c5fa97529c8cda4f0b48d141f92560.

Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
CC: Alison Wang <alison.wang@freescale.com>
8 years agobootcount: Correct #endif comment to match, other aesthetics
Robert P. J. Day [Tue, 22 Dec 2015 12:15:14 +0000 (07:15 -0500)]
bootcount: Correct #endif comment to match, other aesthetics

Correct mismatched comment on #endif to agree with its #if defined().

Also add some missing #endif comments for consistency, take out
extraneous blank lines for readability.

rday

8 years agodoc: Tidy up first part of top-level README file
Robert P. J. Day [Sat, 19 Dec 2015 12:16:10 +0000 (07:16 -0500)]
doc: Tidy up first part of top-level README file

First (small) pass at tidying up the README file, including:

 * remove references to obsolete CREDITS file
 * remove (some) references to obsolete boards.cfg file
 * remove at least one reference to a "scrapped" board
 * cut down unnecessarily detailed directory hierarchy
 * bunch of grammar and spelling tweaks

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agopowerpc: Various typo fixes under arch/powerpc/cpu/mpc83xx
Robert P. J. Day [Wed, 16 Dec 2015 17:25:42 +0000 (12:25 -0500)]
powerpc: Various typo fixes under arch/powerpc/cpu/mpc83xx

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoinclude: Correct "requset" typoes in misc.h
Robert P. J. Day [Mon, 14 Dec 2015 11:28:51 +0000 (06:28 -0500)]
include: Correct "requset" typoes in misc.h

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 8 Jan 2016 15:02:25 +0000 (10:02 -0500)]
Merge git://git.denx.de/u-boot-dm

8 years agorockchip: Fix the configuration for chromebook_jerry
Simon Glass [Tue, 29 Dec 2015 12:22:45 +0000 (05:22 -0700)]
rockchip: Fix the configuration for chromebook_jerry

Various updates did not make it through to this board. Also the instructions
for building a SPI image are no-longer correct. Fix these so that Jerry can
boot to a prompt again.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: Drop a debug message when outputing SPI images
Simon Glass [Tue, 29 Dec 2015 12:22:44 +0000 (05:22 -0700)]
rockchip: Drop a debug message when outputing SPI images

There is an unnecessary sector count displayed. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: Enable generation of SPI images
Simon Glass [Tue, 29 Dec 2015 12:22:43 +0000 (05:22 -0700)]
rockchip: Enable generation of SPI images

This feature was dropped at some point. Restore it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agonet: Fix delay in net_retry test
Joe Hershberger [Mon, 21 Dec 2015 22:31:35 +0000 (16:31 -0600)]
net: Fix delay in net_retry test

Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout)

Check the arp timeout and adjust the timeout start time before the call
to eth_recv() so that the sandbox driver has the opportunity to adjust
the sandbox timer after the new start time has been recorded.

Also, change the adjustment amount by 11 seconds instead of exactly the
10 seconds that the ping timout is expecting since the timeout check is
looking for the time elapsed to be greater than but not equal to the
specified delay.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agofdt: fix address cell count checking in fdt_translate_address()
Przemyslaw Marczak [Wed, 28 Oct 2015 14:37:57 +0000 (15:37 +0100)]
fdt: fix address cell count checking in fdt_translate_address()

Commit: dm: core: Enable optional use of fdt_translate_address()

Enables use of this function as default, but after this it's not
possible to get dev address for the case in which: '#size-cells == 0'

This causes errors when getting address for some GPIOs, for which
the '#size-cells' is set to 0.

Example error:
'__of_translate_address: Bad cell count for gpx0'

Allowing for that case by modifying the macro 'OF_CHECK_COUNTS',
(called from )__of_translate_address(), fixes the issue.

Now, this macro doesn't check, that '#size-cells' is greater than 0.

This is possible from the specification point of view, but I'm not sure
that it doesn't introduce a regression for other configs.

Please test and share the results.

Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agodm: usb: Add a remove() method for USB keyboards
Simon Glass [Sun, 3 Jan 2016 20:50:31 +0000 (13:50 -0700)]
dm: usb: Add a remove() method for USB keyboards

At present USB keyboards are not properly removed with driver model. Add the
code to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Thu, 7 Jan 2016 17:41:57 +0000 (12:41 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

8 years agousb: Allow up to 7 storage devices
Simon Glass [Sun, 3 Jan 2016 20:50:30 +0000 (13:50 -0700)]
usb: Allow up to 7 storage devices

The current limit of 5 is not enough for the driver model USB tests. Really
we should not have a limit but the driver model code still uses the
usb_dev_desc[] array, which has a limit.

Increasing the limit by 2 should not bother anyone. Adjust it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
8 years agodm: Disable all SPI and SPI flash tests
Simon Glass [Sun, 3 Jan 2016 20:50:29 +0000 (13:50 -0700)]
dm: Disable all SPI and SPI flash tests

This subsystem has been broken since commit:

  4efad20a  sf: Update status reg check in spi_flash_cmd_wait_ready

There has so far been no response from the maintainer, and a release is
imminent. For now, let's just disable the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodm: eth: Stick to 'ethact' when 'ethrotate' is 'no' in eth_init()
Bin Meng [Tue, 22 Dec 2015 06:43:39 +0000 (22:43 -0800)]
dm: eth: Stick to 'ethact' when 'ethrotate' is 'no' in eth_init()

When 'ethrotate' variable is set to 'no' and 'ethact' variable
is already set to an ethernet device, we should stick to 'ethact'.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agodm: eth: Test 'ethrotate' before changing current ethernet device
Bin Meng [Tue, 22 Dec 2015 06:43:38 +0000 (22:43 -0800)]
dm: eth: Test 'ethrotate' before changing current ethernet device

In eth_current_changed(), the call to eth_get_dev() below has a side
effect of rotating ethernet device if uc_priv->current == NULL. This
is not what we want when 'ethrotate' variable is 'no'.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agotest: add sandbox timer to test.dts
Thomas Chou [Fri, 11 Dec 2015 08:27:34 +0000 (16:27 +0800)]
test: add sandbox timer to test.dts

Add missing sandbox timer to test.dts, so that test-dm works.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoimx_watchdog: always set minimal timeout in reset_cpu
Andrey Skvortsov [Sun, 20 Dec 2015 18:09:58 +0000 (21:09 +0300)]
imx_watchdog: always set minimal timeout in reset_cpu

The problem is that timeout bits in WCR register were leaved unchanged.
So previously set timeout value was applied and therefore 'reset'
command takes any value up to two minutes, depending on previous
watchdog settings, instead of minimal 0.5 seconds.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
8 years agogpio: mxs: add name_to_gpio() function
Måns Rullgård [Tue, 15 Dec 2015 22:27:57 +0000 (22:27 +0000)]
gpio: mxs: add name_to_gpio() function

Override the default name_to_gpio() function with one that
accepts strings of the form bank:pin.  If a colon is present
in the provided name, it behaves like the default version.

This lets the "gpio" command work with sane names rather than
requiring the user to enter the bank/pin composite in decimal.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx7: fix the temperature checking for Rev1.1
Peng Fan [Mon, 4 Jan 2016 13:12:22 +0000 (21:12 +0800)]
imx: mx7: fix the temperature checking for Rev1.1

To TO1.0, we can not rely on finish bit to read temperature. But to
TO1.1, the issue was fixed by IC, we can rely on finish bit for
temperature reading for TO1.1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Adrian Alonso <aalonso@freescale.com>
8 years agoimx: mx6ul: disable VIDEO for SPL
Peng Fan [Mon, 4 Jan 2016 04:19:14 +0000 (12:19 +0800)]
imx: mx6ul: disable VIDEO for SPL

With DEBUG macro enabled, SPL build failure:
"
arch/arm/cpu/armv7/built-in.o: In function `reset_misc':
~/uboot/arch/arm/cpu/armv7/mx6/soc.c:406: undefined reference to `lcdif_power_down'
scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed
"
Wrap VIDEO settings with ifndef CONFIG_SPL_BUILD

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agopfuze: Fix unsigned variable for less-than-zero comparison
Ye.Li [Mon, 4 Jan 2016 07:26:30 +0000 (15:26 +0800)]
pfuze: Fix unsigned variable for less-than-zero comparison

According to the Coverity result, a unsigned int variable is used fo less-
than-zero comparison, the result is never true. Need to fix the variable
type to signed int.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agowandboard: Simplify the Ethernet PHY configuration
Fabio Estevam [Tue, 5 Jan 2016 19:02:54 +0000 (17:02 -0200)]
wandboard: Simplify the Ethernet PHY configuration

As per the AR8031 datasheet:

"For a reliable power on reset, suggest to keep asserting the reset
low long enough (10ms) to ensure the clock is stable and clock-to-reset
1ms requirement is satisfied."

So do as suggested and also add a 100us delay after deasserting the
reset line to guarantee that the PHY ID can be read correctly and the
Atheros 8031 PHY driver can be loaded automatically.

This results in a simpler code.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agomx6sabresd: Simplify the Ethernet PHY configuration
Fabio Estevam [Tue, 5 Jan 2016 19:02:53 +0000 (17:02 -0200)]
mx6sabresd: Simplify the Ethernet PHY configuration

As per the AR8031 datasheet:

"For a reliable power on reset, suggest to keep asserting the reset
low long enough (10ms) to ensure the clock is stable and clock-to-reset
1ms requirement is satisfied."

So do as suggested and also add a 100us delay after deasserting the
reset line to guarantee that the PHY ID can be read correctly and the
Atheros 8031 PHY driver can be loaded automatically.

This results in a simpler code.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agophy: atheros: Use ar8035_config for AR8031
Fabio Estevam [Tue, 5 Jan 2016 19:02:52 +0000 (17:02 -0200)]
phy: atheros: Use ar8035_config for AR8031

Commit 08ad9b068afb88 (" ar8031: modify the config func of ar8031 to
ar8021_config") selected 'ar8021_config' as the configuration function
for AR8031.

The correct would be to use 'ar8035_config' instead as AR8031/AR8035
have the same programming model and even share the same phy driver
in the linux kernel: drivers/net/phy/at803x.c.

Tested on a mx6qsabresd and wandboard, which now can work without
any PHY setup code in the board files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Thu, 7 Jan 2016 16:24:27 +0000 (11:24 -0500)]
Merge git://git.denx.de/u-boot-mpc85xx

8 years agospi: fsl_qspi: fix an error of using GENMASK
Gong Qianyu [Mon, 14 Dec 2015 10:26:25 +0000 (18:26 +0800)]
spi: fsl_qspi: fix an error of using GENMASK

This commit fixes the change of below commit
"spi: fsl_qspi: Use GENMASK"
(sha1 :bad490a24212c068c5b718b9189f47ea4075d078)

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agospi: spi_flash: Fix the arguments of stm_is_locked_sr()
Fabio Estevam [Wed, 6 Jan 2016 00:24:39 +0000 (22:24 -0200)]
spi: spi_flash: Fix the arguments of stm_is_locked_sr()

stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.

Based on a patch from Brian Norris for the linux kernel:
http://git.infradead.org/linux-mtd.git/commit/a32d5b726ff8cf32bf491522b0ac8ae2545a063e

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agopowerpc, mpc5xxx: fix missing bootflag init
Heiko Schocher [Wed, 25 Nov 2015 08:46:19 +0000 (09:46 +0100)]
powerpc, mpc5xxx: fix missing bootflag init

since:
commit: f05ad9ba "Add a way to skip relocation"

tqm5200s board fails to boot. Reason is that
board_init_f has a function parameter bootflag,
which is not setup in
in arch/powerpc/cpu/mpc5xxx/start.S _start

So board_init_f gets a undefined bootflag,
currently the gd pointer address. Unfortunately
this address sets the GD_FLG_SKIP_RELOC bit,
so u-boot code gets not relocated and u-boot
does not boot ...

Init bootflag with 0, and tqm5200 boots fine again.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
8 years agoPrepare v2016.01-rc4 v2016.01-rc4
Tom Rini [Mon, 4 Jan 2016 21:37:15 +0000 (16:37 -0500)]
Prepare v2016.01-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocommon: nvedit: use snprintf instead of sprintf
Peng Fan [Wed, 23 Dec 2015 04:08:09 +0000 (12:08 +0800)]
common: nvedit: use snprintf instead of sprintf

Use snprintf to replace sprintf.

Coverity log:
"
Unbounded source buffer (STRING_SIZE)
string_size: Passing string init_val of unknown size to sprintf.
"

Reported-by: Coverity
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agocommon: env: initialize scalar variable
Peng Fan [Wed, 23 Dec 2015 04:07:24 +0000 (12:07 +0800)]
common: env: initialize scalar variable

Before calling hsearch_r, initialize callback entry to NULL.

Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"

Reported-by: Coverity
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
8 years agocommon: cli: avoid memory leak
Peng Fan [Tue, 22 Dec 2015 09:14:13 +0000 (17:14 +0800)]
common: cli: avoid memory leak

Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always
check to free 'buff' to avoid memory leak.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
8 years agonet: e1000: use correct helper to do endianness conversion
Miao Yan [Mon, 21 Dec 2015 10:07:02 +0000 (02:07 -0800)]
net: e1000: use correct helper to do endianness conversion

In struct e1000_rx_desc, field 'length' is declared as
uint16_t, so use le16_to_cpu() to do endianness conversion.

Also drop conversion on 'status' which is declared as
uint8_t.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoqemu-ppce500: pass 'range_id' around in pci_map_region
Miao Yan [Mon, 21 Dec 2015 09:19:59 +0000 (01:19 -0800)]
qemu-ppce500: pass 'range_id' around in pci_map_region

In pci_map_region(), pass 'range_id' to fdt_read_range(),
otherwise the same address will be mapped again in other
calls to pci_map_region()

Signed-off-by: Miao Yan <yammiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>