platform/kernel/u-boot.git
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 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>
8 years agocheckpatch: fix left brace warning
Heiko Schocher [Mon, 4 Jan 2016 08:17:19 +0000 (09:17 +0100)]
checkpatch: fix left brace warning

using checkpatch with Perl 5.22.0 generates a warning,
this is fixed in linux through commit:

commit 4e5d56bdf892e18832a6540b63ebf709966bce2a
Author: Eddie Kovsky <ewk@edkovsky.org>
Date:   Wed Sep 9 15:37:52 2015 -0700

checkpatch: fix left brace warning

Using checkpatch.pl with Perl 5.22.0 generates the following warning:

Unescaped left brace in regex is deprecated, passed through in regex;

This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.

Adapt it for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agommc: update MMC_ERASE argument to match Linux kernel.
Eric Nelson [Mon, 7 Dec 2015 14:50:01 +0000 (07:50 -0700)]
mmc: update MMC_ERASE argument to match Linux kernel.

Table 41 of the JEDEC standard for eMMC says that bit 31 of
the command argument is obsolete when issuing the ERASE
command (CMD38) on page 115 of this document:
http://www.jedec.org/sites/default/files/docs/jesd84-B45.pdf

The SD Card Association Physical Layer Simplified Specification also
makes no mention of the use of bit 31.
https://www.sdcard.org/downloads/pls/part1_410.pdf

The Linux kernel distinguishes between secure (bit 31 set) and
non-secure erase, and this patch copies the macro names from
include/linux/mmc/core.h.

Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Eric Nelson <eric@nelint.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Mon, 4 Jan 2016 15:53:50 +0000 (10:53 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

8 years agoUBI: Fix compile error when CONFIG_UBI_SILENCE_MSG defined
Ladislav Michl [Sun, 3 Jan 2016 21:05:03 +0000 (22:05 +0100)]
UBI: Fix compile error when CONFIG_UBI_SILENCE_MSG defined

drivers/mtd/ubi/io.c:1354:3: error: 'dump_len' undeclared (first use in
this function)
   dump_len = max_t(int, 128, len - i);

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Sun, 3 Jan 2016 15:32:24 +0000 (10:32 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agoimx: mx6qsabreauto: support lvds display
Peng Fan [Tue, 15 Dec 2015 08:27:18 +0000 (16:27 +0800)]
imx: mx6qsabreauto: support lvds display

Move setup_display from board_early_init_f to board_init.
Add more clock settings.
Add blacklight iomux setting.
Add display_info_t info for the lvds screen.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoi2c: mxc: add a condition in case the parameter is NULL
Gong Qianyu [Fri, 18 Dec 2015 09:38:01 +0000 (17:38 +0800)]
i2c: mxc: add a condition in case the parameter is NULL

This could avoid executing the code that only applies to i.MX platforms.

The bus_i2c_init() is called before relocation and will assgin value
to a static variable. If U-Boot is then still running in a flash
device, it's theoretically not allowed to write data to flash without
an erasing operation. For i.MX platforms, the U-Boot is always running
in DDR.

Actually it causes asynchronous error when the ARM64 system error
report is enabled and the flash write protect is set.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoimx_common: check for Serial Downloader in spl_boot_device
Stefano Babic [Fri, 11 Dec 2015 16:30:42 +0000 (17:30 +0100)]
imx_common: check for Serial Downloader in spl_boot_device

Check for bmode before reading the boot device
to check if a serial downloader is started,
and returns UART if the serial downloader is set,
letting SPL to wait for an image if
CONFIG_SPL_YMODEM_SUPPORT is set.

This allows to load again a SPL based board
with imx_usb_loader together with a tool
such as kermit.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tim Harvey <tharvey@gateworks.com>
CC: Fabio Estevam <Fabio.Estevam@freescale.com>
CC: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Tested-by: Eric Nelson <eric@nelint.com>
8 years agoARM: mxs: allow boards to select DC-DC switching clock source
Michael Heimpold [Sun, 13 Dec 2015 11:08:37 +0000 (12:08 +0100)]
ARM: mxs: allow boards to select DC-DC switching clock source

For some board designs, it might be useful to switch the DC-DC
clock source to something else rather the default 24 MHz, e.g.
for EMI reasons.

For this, override the mxs_power_setup_dcdc_clocksource function
in your board support files.

Example:
void mxs_power_setup_dcdc_clocksource(void)
{
    mxs_power_switch_dcdc_clocksource(POWER_MISC_FREQSEL_20MHZ);
}

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
8 years agocgtqmx6eval: fix pad configuration for SPI bus
Michael Schanz [Thu, 10 Dec 2015 08:58:35 +0000 (09:58 +0100)]
cgtqmx6eval: fix pad configuration for SPI bus

Use the macro SETUP_IOMUX_PAD(...) rather than imx_iomux_v3_setup_multiple_pads(...) in order to setup
the pin configuration for ECSPI1.

ARRAY_SIZE(pads) provides the wrong size for imx_iomux_v3_setup_multiple_pads(pads, ARRAY_SIZE(pads)) in
case of MX6QDL. In the particular case, the content of GPR12 is overwritten and the IPG/AHB/ATB/ATP clocks
are deactivated. Therefore, the connection to the system via JTAG is not possible anymore. Furthermore,
kernel version 3.0.35 hangs during bootprocess in the function etm_init().

Signed-off-by: Michael Schanz <michael.schanz@congatec.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agonet: fec_mxc: unregister mdio bus on probe error
Måns Rullgård [Tue, 8 Dec 2015 15:38:46 +0000 (15:38 +0000)]
net: fec_mxc: unregister mdio bus on probe error

If fecmxc_initialize_multi() fails, it frees but does not unregister
the mdio bus, causing subsequent uses of the "mii" command to crash.
Fix this by adding mdio_unregister() calls where needed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
8 years agonet: fec_mxc: configure MDIO hold time
Måns Rullgård [Tue, 8 Dec 2015 15:38:45 +0000 (15:38 +0000)]
net: fec_mxc: configure MDIO hold time

If the host clock frequency is higher than 100 MHz, the MDIO hold
time needs to be increased from its current setting of one cycle in
order to meet the specified minium of 10 ns.  Writing an appropriate
value to the HOLDTIME field of the MII_SPEED register achieves this.

Comment copied from Linux kernel.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
8 years agoserial_mxc: Fix setup of UARTx_UFCR register
Maximilian Schwerin [Wed, 25 Nov 2015 13:08:00 +0000 (14:08 +0100)]
serial_mxc: Fix setup of UARTx_UFCR register

This patch writes the default values for TXTL and RXTL to UARTx_UFCR.
Without this patch some older kernel versions crash as UARTx_UFCR was
not always correctly initialized.

Signed-off-by: Maximilian Schwerin <maximilian.schwerin@tigris.de>
8 years agoARM: imx: fsl_esdhc: fix usage of low 4 bits of sysctl register
Eric Nelson [Fri, 4 Dec 2015 19:32:48 +0000 (12:32 -0700)]
ARM: imx: fsl_esdhc: fix usage of low 4 bits of sysctl register

The low four bits of the SYSCTL register are reserved on the USDHC
controller on i.MX6 and i.MX7 processors, but are used for clocking
operations on earlier models.

Guard against their usage by hiding the bit mask macros on those
processors.

These bits are used to prevent glitches when changing clocks on
i.MX35 et al. Use the RSTA bit instead for i.MX6 and i.MX7.

>From the i.MX6DQ RM:
To prevent possible glitch on the card clock, clear the
FRC_SDCLK_ON bit when changing clock divisor value(SDCLKFS
or DVS in System Control Register) or setting RSTA bit.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Hector Palacios <hector.palacios@digi.com>
8 years agoimx: ddr: drop duplicated debug info
Peng Fan [Thu, 15 Oct 2015 10:06:00 +0000 (18:06 +0800)]
imx: ddr: drop duplicated debug info

Drop duplicated debug info for tcl.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Sat, 2 Jan 2016 17:24:43 +0000 (12:24 -0500)]
Merge git://git.denx.de/u-boot-usb

8 years agousb: musb: Fix hub port setting for SPLIT transactions
Stefan Brüns [Tue, 22 Dec 2015 00:21:04 +0000 (01:21 +0100)]
usb: musb: Fix hub port setting for SPLIT transactions

The ifdef'ed Linux kernel code uses the 1 based port number, whereas U-Boot
puts a 0 based port number into the register. The reason the 0 based port
number apparently works can probably be taken from the USB 2.0 spec:

8.4.2.2 Start-Split Transaction Token
... The host must correctly set the port field for single and multiple TT
hub implementations. A single TT hub implementation *may ignore* the port
field.

Actually, as far as I understand, a multi TT hub defaults to single TT
(bAlternateSetting: 0) until switched via SetInterface, so even "port 42"
would work.

The change was verified by hardcoding the port number to a wrong value,
SPLIT transactions kept working (although using a DWC2 instead of MUSB).
Tested hubs are the RPi onboard SMC9514 and an external "05e3:0608
Genesys Logic, Inc. USB-2.0 4-Port HUB". The former is a multi TT hub,
the latter single TT only.

Addendum: Tested on sunxi/MUSB by Hans de Goede

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
8 years agousb: Move determination of TT hub address/port into separate function
Stefan Brüns [Tue, 22 Dec 2015 00:21:03 +0000 (01:21 +0100)]
usb: Move determination of TT hub address/port into separate function

Start split and complete split tokens need the hub address and the
downstream port of the first HS hub (device view).

The core of the function was duplicated in both host/ehci_hcd and
musb-new/usb-compat.h.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>