]> git.sur5r.net Git - u-boot/log
u-boot
8 years agospi: Rename SPI_OPM_RX_* to SPI_RX_*
Jagan Teki [Wed, 16 Dec 2015 09:45:41 +0000 (15:15 +0530)]
spi: Rename SPI_OPM_RX_* to SPI_RX_*

SPI_OPM_RX_AS  - SPI_RX_SLOW
SPI_OPM_RX_AF - SPI_RX_FAST
SPI_OPM_RX_DOUT - SPI_RX_DUAL
SPI_OPM_RX_QOF - SPI_RX_QUAD

Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Remove SPI_OPM_RX_DIO|QIOF
Jagan Teki [Wed, 16 Dec 2015 09:31:23 +0000 (15:01 +0530)]
spi: Remove SPI_OPM_RX_DIO|QIOF

SPI_OPM_RX_DIO and SPI_OPM_RX_QIOF are rx IO
commands/opmodes for dual and quad. Usually IO
operation's are referred to flash protocol rather
with spi controller protocol, these are still present
in flash side for the usage of spi-nor controllers.

Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Remove SPI_OPM_RX_EXTN
Jagan Teki [Wed, 16 Dec 2015 09:23:59 +0000 (14:53 +0530)]
spi: Remove SPI_OPM_RX_EXTN

SPI_OPM_RX_EXTN is a combination of all rx opmode's
and spi driver shall use any one of the rx mode at
a time not the combination and it is true in case of
flash where spi_flash_table mention combination of
supported read opmodes so-that the required one
will pick based on the rx mode from spi driver.

Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Write quad bit along with read status
Jagan Teki [Wed, 16 Dec 2015 08:18:08 +0000 (13:48 +0530)]
sf: Write quad bit along with read status

While setting quad bit on spansion, macronix code
is writing only particular quad bit this may give
wrong functionality with other register bits,
So this patch fix the issue where it with write
previous read reg status along  particular quad bit.

Cc: Vignesh R <vigneshr@ti.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Read back and check once macronix quad bit set
Jagan Teki [Tue, 15 Dec 2015 07:12:02 +0000 (12:42 +0530)]
sf: Read back and check once macronix quad bit set

One macronix quad bit set using SR, it's good to
read back and check the written bit and also if
it's already been set check for the bit and return.

Cc: Vignesh R <vigneshr@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Read back and check once spansion quad bit set
Jagan Teki [Tue, 15 Dec 2015 06:58:39 +0000 (12:28 +0530)]
sf: Read back and check once spansion quad bit set

One spansion quad bit set using CR, it's good to
read back and check the written bit and also if
it's already been set check for the bit and return.

Cc: Vignesh R <vigneshr@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Fix quad bit set for micron devices
Jagan Teki [Mon, 14 Dec 2015 12:45:39 +0000 (18:15 +0530)]
sf: Fix quad bit set for micron devices

Setting up quad bit for micron devices need to do the
same way as other flash devices like spansion, winbond
etc does using enhanced volatile config register so this
patch adds this support instead of printing "QEB is volatile"

Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Peter Pan <peterpandong@micron.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Use BIT macro
Jagan Teki [Mon, 14 Dec 2015 12:42:04 +0000 (18:12 +0530)]
sf: Use BIT macro

Used BIT macro like 1 << nr as BIT(nr) where nr is 0...n

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Minor cleanup
Jagan Teki [Mon, 14 Dec 2015 12:33:54 +0000 (18:03 +0530)]
sf: Minor cleanup

- Tab space
- Place all read commands at one place.
- Re-arrange write commands.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Remove spi_flash_remove
Jagan Teki [Mon, 14 Dec 2015 03:32:06 +0000 (09:02 +0530)]
sf: Remove spi_flash_remove

Use direct call to device_remove instead of exctra
spi_flash_remove defination.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Rename bank_end to bar_end in read_bar
Jagan Teki [Sun, 13 Dec 2015 17:40:33 +0000 (23:10 +0530)]
sf: Rename bank_end to bar_end in read_bar

bar_end gives more meaningfull compared to bank_end and
spi_flash_write_bar uses bar_end so replaced bank_end with
bar_end in spi_flash_read_bar

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Rename spi_flash_set_* functions
Jagan Teki [Sun, 13 Dec 2015 17:34:46 +0000 (23:04 +0530)]
sf: Rename spi_flash_set_* functions

Since quad_mode functions are local to spi flash core,
rename them to a meaningful and readable names.

Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Move spi_read_cmds_array locally
Jagan Teki [Sun, 13 Dec 2015 16:20:26 +0000 (21:50 +0530)]
sf: Move spi_read_cmds_array locally

Since spi_read_cmds_array is used locally in
spi_flash_scan, so move array to locally used
function instead of defining global array.

Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Rename SPI_TX_BP|QPP to SPI_TX_BYTE|QUAD
Jagan Teki [Sun, 13 Dec 2015 14:42:45 +0000 (20:12 +0530)]
spi: Rename SPI_TX_BP|QPP to SPI_TX_BYTE|QUAD

Since SPI_TX_* are spi_slave{} members so use spi protocol
notation instead spi flash programming, like

SPI_TX_BP  => SPI_TX_BYTE
SPI_TX_QPP => SPI_TX_QUAD

Cc: Simon Glass <sjg@chromium.org>
Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: Use mode instead of op_mode_tx
Jagan Teki [Sun, 13 Dec 2015 14:40:33 +0000 (20:10 +0530)]
spi: Use mode instead of op_mode_tx

Used mode member from spi_slave{} instead of op_mode_tx.

Cc: Simon Glass <sjg@chromium.org>
Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agospi: make mode visible to both dm and non-dm
Jagan Teki [Mon, 14 Dec 2015 06:45:17 +0000 (12:15 +0530)]
spi: make mode visible to both dm and non-dm

Couldn't find the exact reason to define 'mode' for dm,
probably it is not using in non-dm drivers but it need
to visible both dm and non-dm as mode data is getting
dereferred in spi flash core ie common to both.

Cc: Simon Glass <sjg@chromium.org>
Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agosf: Get spi locally from spi_flash
Jagan Teki [Sat, 12 Dec 2015 06:21:57 +0000 (11:51 +0530)]
sf: Get spi locally from spi_flash

For better code readabilty, get the spi pointer from
spi_flash{} locally and use it instead of direct
dereferring spi pinter as flash->spi->*

Tested-by: Jagan Teki <jteki@openedev.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agoarm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs
Nathan Rossi [Thu, 7 Jan 2016 17:00:48 +0000 (03:00 +1000)]
arm: socfpga: Enable SPL_DM_SEQ_ALIAS for all SOCFPGA configs

This feature is required in SPL to enable support for loading from SPI
flash.

Also clean up the #define in socfpga_common.h.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin-Liang See <clsee@altera.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: mvebu: Select SPL_DM_SEQ_ALIAS
Nathan Rossi [Thu, 7 Jan 2016 17:00:47 +0000 (03:00 +1000)]
arm: mvebu: Select SPL_DM_SEQ_ALIAS

Select SPL_DM_SEQ_ALIAS which is required for certain uclasses,
specifically SPI Flash.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configs
Nathan Rossi [Thu, 7 Jan 2016 17:00:46 +0000 (03:00 +1000)]
arm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configs

This feature is required in SPL to enable support for loading from SPI
flash when the device is booted from QSPI.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospl: dm: Add SPL_DM_SEQ_ALIAS config option
Nathan Rossi [Thu, 7 Jan 2016 17:00:45 +0000 (03:00 +1000)]
spl: dm: Add SPL_DM_SEQ_ALIAS config option

The Device Model sequence alias feature is required by some Uclasses.
Instead of disabling the feature for all SPL targets allow it to be
configured.

The config option is disabled by default to reduce code size for targets
that are not interested or do not require this feature.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agox86: qemu: add documentaion for the fw_cfg interface
Miao Yan [Thu, 7 Jan 2016 09:32:06 +0000 (01:32 -0800)]
x86: qemu: add documentaion for the fw_cfg interface

Document the usage of 'qfw' command

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: remove cpu node in device tree
Miao Yan [Thu, 7 Jan 2016 09:32:05 +0000 (01:32 -0800)]
x86: qemu: remove cpu node in device tree

Remove 'cpu' node in device tree for QEMU targets, and let U-Boot detect
and fix up those information at runtime.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: fix cpu device in smp boot
Miao Yan [Thu, 7 Jan 2016 09:32:04 +0000 (01:32 -0800)]
x86: qemu: fix cpu device in smp boot

Currently, when booting with more that one CPU enabled, U-Boot scans
'cpu' node in device tree and calculates CPU number. This does not scale
well as changing CPU number also requires modifying .dts and re-compiling
U-Boot.

This patch uses fw_cfg interface provided by QEMU to detect online CPU
number at runtime, and dynamically adds 'cpu' device to U-Boot's driver
model.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: use actual CPU number for allocating memory
Miao Yan [Thu, 7 Jan 2016 09:32:03 +0000 (01:32 -0800)]
x86: use actual CPU number for allocating memory

Use actual CPU number, instead of maximum cpu configured, to allocate
stack memory in 'load_sipi_vector'

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: fix a typo in function name
Miao Yan [Thu, 7 Jan 2016 09:32:02 +0000 (01:32 -0800)]
x86: fix a typo in function name

Rename 'find_cpu_by_apid_id' to 'find_cpu_by_apic_id'. This should be a
typo.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: add a cpu uclass driver for qemu target
Miao Yan [Thu, 7 Jan 2016 09:32:01 +0000 (01:32 -0800)]
x86: qemu: add a cpu uclass driver for qemu target

Add a cpu uclass driver for qemu. Previously, the qemu target gets cpu
number from board dts files, which are manually created at compile time.
This does not scale when more cpus are assigned to guest as the dts files
must be modified as well.

This patch adds a cpu uclass driver for qemu targets to directly read
online cpu number from firmware.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: add fw_cfg support
Miao Yan [Thu, 7 Jan 2016 09:32:00 +0000 (01:32 -0800)]
x86: qemu: add fw_cfg support

The QEMU fw_cfg interface allows the guest to retrieve various data
information from QEMU. For example, APCI/SMBios tables, number of online
cpus, kernel data and command line, etc.

This patch adds support for QEMU fw_cfg interface.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: adjust ramdisk load address
Miao Yan [Thu, 7 Jan 2016 09:31:59 +0000 (01:31 -0800)]
x86: adjust ramdisk load address

By default, ramdisk load address is defined to 02000000 in env string.
When loading bzImage to 01000000 (default address), there's a chance that
the ramdisk header would be overwritten by the kernel. Thus increase the
gap and make ramdisk load at 04000000 by default and also this patch
introduces a new configuration item CONFIG_RAMDISK_ADDR for this purpose

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: ivybridge: Add macros for LPC decode ranges
Bin Meng [Fri, 11 Dec 2015 10:55:52 +0000 (02:55 -0800)]
x86: ivybridge: Add macros for LPC decode ranges

Add several macros for LPC decode registers on PCH.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Always use hex numbers in the hob command output
Bin Meng [Fri, 11 Dec 2015 10:55:51 +0000 (02:55 -0800)]
x86: fsp: Always use hex numbers in the hob command output

In the 'fsp hob' command output, decimal numbers and hexadecimal
numbers are used mixedly. Now change to always use hex numbers
to keep consistency.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: ivybridge: Do not require HAVE_INTEL_ME
Bin Meng [Fri, 11 Dec 2015 10:55:49 +0000 (02:55 -0800)]
x86: ivybridge: Do not require HAVE_INTEL_ME

Do not set HAVE_INTEL_ME by default as for some cases Intel ME
firmware even does not reside on the same SPI flash as U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: ivybridge: Add microcode blobs for all the steppings
Bin Meng [Fri, 11 Dec 2015 10:55:47 +0000 (02:55 -0800)]
x86: ivybridge: Add microcode blobs for all the steppings

This adds microcode blobs created from Intel FSP package for the
Chief River platform. They are for all the Ivy Bridge steppings:
306a2 (B0), 306a4 (C0), 306a5 (K0/M0), 306a8 (E0/L0), except the
306a9 which is already in the U-Boot tree.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agotools: microcode-tool: Support parsing header file with a license block
Bin Meng [Fri, 11 Dec 2015 10:55:46 +0000 (02:55 -0800)]
tools: microcode-tool: Support parsing header file with a license block

The microcode header files in the Intel Chief River FSP package have
a license comment block. Update the microcode-tool to support parsing
it and extract the license text to the .dtsi file.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agofdtdec: Add compatible string for Intel IvyBridge FSP
Bin Meng [Fri, 11 Dec 2015 10:55:44 +0000 (02:55 -0800)]
fdtdec: Add compatible string for Intel IvyBridge FSP

Use "intel,ivybridge-fsp" for Intel IvyBridge FSP compatible string.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Set up init runtime buffer in update_fsp_configs()
Bin Meng [Fri, 11 Dec 2015 06:03:04 +0000 (22:03 -0800)]
x86: fsp: Set up init runtime buffer in update_fsp_configs()

fsp_init() runtime buffer parameter might be different across
different platforms. Move this to update_fsp_configs().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Move struct fspinit_rtbuf definition to chipset header
Bin Meng [Fri, 11 Dec 2015 06:03:03 +0000 (22:03 -0800)]
x86: fsp: Move struct fspinit_rtbuf definition to chipset header

All FSP spec v1.0 complaint FSP binary uses struct fspinit_rtbuf
as defined by the 1.0 spec, however there are FSPs that does not
follow 1.0 spec (possible due to that FSP predates the 1.0 spec),
and future FSP binary that is complaint to v1.1 spec defines an
optional paltform-specific runtime data in the struct fspinit_rtbuf.
Hence move the definition to chipset header.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: queensbay: Remove invalid comments in update_fsp_configs()
Bin Meng [Fri, 11 Dec 2015 06:03:02 +0000 (22:03 -0800)]
x86: queensbay: Remove invalid comments in update_fsp_configs()

Those comments in update_fsp_configs() are not correct. Remove them.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Introduce CONFIG_FSP_USE_UPD Kconfig option
Bin Meng [Fri, 11 Dec 2015 06:03:01 +0000 (22:03 -0800)]
x86: fsp: Introduce CONFIG_FSP_USE_UPD Kconfig option

Not every FSP supports UPD, thus we introduce a Kconfig option
CONFIG_FSP_USE_UPD and use it to wrap these common UPD handling
codes in fsp_support.c.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Rename update_fsp_upd() and change its signature
Bin Meng [Fri, 11 Dec 2015 06:03:00 +0000 (22:03 -0800)]
x86: fsp: Rename update_fsp_upd() and change its signature

To support platform-specific configurations (might not always be
UPD on some platform), use a better name update_fsp_configs() and
accepct struct fsp_config_data as its parameter so that platform
codes can handle whatever configuration data for that FSP.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Rename shared_data to fsp_config_data
Bin Meng [Fri, 11 Dec 2015 06:02:59 +0000 (22:02 -0800)]
x86: fsp: Rename shared_data to fsp_config_data

FSP has several config data like UPD, HDA verb table which can be
overridden or provided by bootloader. Currently in U-Boot only UPD
is handled via struct shared_data. To accommodate any platform, we
rename shared_data to fsp_config_data and move the definition from
common place fsp_support.h to platform-specific place fsp_configs.h.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Add boot_mode as a member of struct shared_data
Bin Meng [Fri, 11 Dec 2015 06:02:58 +0000 (22:02 -0800)]
x86: fsp: Add boot_mode as a member of struct shared_data

Save boot_mode in struct shared_data for future refactoring.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Avoid cast stack_top in struct shared_data
Bin Meng [Fri, 11 Dec 2015 06:02:57 +0000 (22:02 -0800)]
x86: fsp: Avoid cast stack_top in struct shared_data

Declare stack_top as u32 in struct shared_data and struct common_buf
so that we can avoid casting in fsp_init().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agox86: fsp: Simplify fsp_continue()
Bin Meng [Fri, 11 Dec 2015 06:02:56 +0000 (22:02 -0800)]
x86: fsp: Simplify fsp_continue()

There is no need to pass shared_data to fsp_continue() so we can
remove unnecessary codes that simplifies the function a lot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
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://www.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://www.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>