oweals/u-boot.git
7 years agoarmv7: Add workaround for USB erratum A-008997
Ran Wang [Mon, 4 Sep 2017 10:46:54 +0000 (18:46 +0800)]
armv7: Add workaround for USB erratum A-008997

Low Frequency Periodic Singaling (LFPS) Peak-to-Peak Differential
Output Voltage Test Compliance fails using default transmitter settings

Change config of transmitter signal swings by setting register
PCSTXSWINGFULL to 0x47 to pass compliance tests.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv7: Add workaround for USB erratum A-009798
Ran Wang [Mon, 4 Sep 2017 10:46:53 +0000 (18:46 +0800)]
armv7: Add workaround for USB erratum A-009798

The default setting for USB High Speed Squelch Threshold results
in a threshold close to or lower than 100mV. This leads to Receive
Compliance test failure for a 100mV threshold.

Shift the threshold from ~100mV towards ~130mV by setting SQRXTUNE
to 0x0 to pass USB High Speed Receiver Sensitivity Compliance test.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv7: Add workaround for USB erratum A-009008
Ran Wang [Mon, 4 Sep 2017 10:46:52 +0000 (18:46 +0800)]
armv7: Add workaround for USB erratum A-009008

USB High Speed (HS) EYE Height Adjustment
USB HS speed eye diagram fails with the default value at
many corners, particularly at a high temperature

Optimal eye at TXREFTUNE value to 0x9 is observed, change
set the same value.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Add workaround for USB erratum A-009007
Ran Wang [Mon, 4 Sep 2017 10:46:51 +0000 (18:46 +0800)]
armv8: Add workaround for USB erratum A-009007

Rx Compliance tests may fail intermittently at high
jitter frequencies using default register values.

Program register USB_PHY_RX_OVRD_IN_HI in certain sequence
to make the Rx compliance test pass.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Suresh Gupta <suresh.bhagat@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Add workaround for USB erratum A-008997
Ran Wang [Mon, 4 Sep 2017 10:46:50 +0000 (18:46 +0800)]
armv8: Add workaround for USB erratum A-008997

Low Frequency Periodic Signaling(LFPS) Peak-to-Peak Differential
Output Voltage Test Compliance fails using default transmitter
settings

Change config of transmitter signal swings by setting register
PCSTXSWINGFULL to 0x47 to pass compliance tests.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Add workaround for USB erratum A-009798
Ran Wang [Mon, 4 Sep 2017 10:46:49 +0000 (18:46 +0800)]
armv8: Add workaround for USB erratum A-009798

The default setting for USB High Speed Squelch Threshold results
in a threshold close to or lower than 100mV. This leads to Receiver
Compliance test failure for a 100mV threshold.

Shift the threshold from ~100mV towards ~130mV by setting SQRXTUNE
to 0x0 to pass USB High Speed Receiver Sensitivity Compliance test.

Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Add workaround for USB erratum A-009008
Ran Wang [Mon, 4 Sep 2017 10:46:48 +0000 (18:46 +0800)]
armv8: Add workaround for USB erratum A-009008

USB High Speed (HS) EYE Height Adjustment
USB HS speed eye diagram fails with the default value at
many corners, particularly at a high temperature

Optimal eye at TXREFTUNE value to 0x9 is observed, change
set the same value.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
[YS: Reordered Kconfig options]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: Add scfg_clrsetbits_32(), scfg_clrbits_32()
Ran Wang [Mon, 4 Sep 2017 10:46:47 +0000 (18:46 +0800)]
armv8: Add scfg_clrsetbits_32(), scfg_clrbits_32()

Some erratum patch might need it to program registers.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1088aqds: Add support of EC1 and EC2
Prabhakar Kushwaha [Thu, 31 Aug 2017 11:07:32 +0000 (16:37 +0530)]
armv8: ls1088aqds: Add support of EC1 and EC2

EC1 and EC2 are RGMII interface on ls1088aqds platform.
This patch add support of RGMII with PHY and MDIO

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Amrita Kumari <amrita.kumari@nxp.com>
Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: Support to add RGMII for ls1088aqds
Ashish Kumar [Thu, 31 Aug 2017 11:07:31 +0000 (16:37 +0530)]
armv8: fsl-layerscape: Support to add RGMII for ls1088aqds

This patch adds support for RGMII protocol

NXP's LDPAA2 support RGMII protocol. LS1088A is the
first Soc supporting both RGMII and SGMII.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Amrita Kumari <amrita.kumari@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1088aqds: Add support of LS1088AQDS
Ashish Kumar [Thu, 31 Aug 2017 10:42:55 +0000 (16:12 +0530)]
armv8: ls1088aqds: Add support of LS1088AQDS

This patch add support of LS1088AQDS platform.

The LS1088A QorIQTM Development System (QDS) is a high-performance
computing, evaluation, and development platform that supports the
LS1088A QorIQ Architecture processor.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: ls1088ardb: Add support for LS1088ARDB platform
Ashish Kumar [Thu, 31 Aug 2017 10:42:54 +0000 (16:12 +0530)]
armv8: ls1088ardb: Add support for LS1088ARDB platform

LS1088A is an ARMv8 implementation. The LS1088ARDB is an evaluatoin
platform that supports the LS1088A family SoCs. This patch add basic
support of the platform.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Raghav Dogra <raghav.dogra@nxp.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
[YS: Disabled NAND in board header file]
Reviewed-by: York Sun <york.sun@nxp.com>
WIP: disable NAND for LS1088ARDB

7 years agoarmv8: ls1088a: Add NXP LS1088A SoC support
Ashish Kumar [Thu, 31 Aug 2017 10:42:53 +0000 (16:12 +0530)]
armv8: ls1088a: Add NXP LS1088A SoC support

LS1088A is compliant with the Layerscape Chassis Generation 3 with
eight ARM v8 Cortex-A53 cores in 2 cluster, CCI-400, one 64-bit DDR4
SDRAM memory controller with ECC, Data path acceleration architecture
2.0 (DPAA2), Ethernet interfaces (SGMIIs, RGMIIs, QSGMIIs, XFIs),
QSPI, IFC, PCIe, SATA, USB, SDXC, DUARTs etc.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Raghav Dogra <raghav.dogra@nxp.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
[YS: Revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-layerscape: Fix final MMU table for QSPI and IFC
Suresh Gupta [Tue, 29 Aug 2017 13:42:43 +0000 (19:12 +0530)]
armv8: fsl-layerscape: Fix final MMU table for QSPI and IFC

For QSPI and IFC addresses execution shouldn't be allowed
when u-boot running from DDR. Revise the MMU final table
to enforce execute-never bits.

Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl: Use correct conditional compile for ls1012a
Ran Wang [Mon, 28 Aug 2017 02:40:33 +0000 (10:40 +0800)]
armv8: fsl: Use correct conditional compile for ls1012a

According current code base, CONFIG_LS1012A should be
CONFIG_ARCH_LS1012A, or function fsl_fdt_disable(blob) will be
wrongly called to disable all dwc3 USB nodes on LS1012A, which
cause Linux USB function stop working at all.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agodrivers:net:fsl-mc: Update MC address calculation
Priyanka Jain [Thu, 24 Aug 2017 11:12:43 +0000 (16:42 +0530)]
drivers:net:fsl-mc: Update MC address calculation

Update MC address calculation as per MC design requirement of address
as least significant 512MB address of MC private allocated memory,
i.e. address should point to end address masked with 512MB offset in
private DRAM block.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
[YS: reformatted commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: fsl-lsch3: Make CCN-504 related code conditional
Ashish Kumar [Fri, 18 Aug 2017 05:24:36 +0000 (10:54 +0530)]
armv8: fsl-lsch3: Make CCN-504 related code conditional

LS2080 family has CCN-504 cache coherent interconnet. Other SoCs
in LSCH3 family may have differnt interconnect.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agospl: fit: Add booting OS first
York Sun [Tue, 15 Aug 2017 18:14:45 +0000 (11:14 -0700)]
spl: fit: Add booting OS first

If CONFIG_SPL_OS_BOOT is enabled, boot OS if kernel image is found
in FIT structure.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: fit: Support both external and embedded data
York Sun [Tue, 15 Aug 2017 18:14:44 +0000 (11:14 -0700)]
spl: fit: Support both external and embedded data

SPL supports U-Boot image in FIT format which has data outside of
FIT structure. This adds support for embedded data for normal FIT
images.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: fit: Eanble GZIP support for image decompression
York Sun [Tue, 15 Aug 2017 18:14:43 +0000 (11:14 -0700)]
spl: fit: Eanble GZIP support for image decompression

Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for
SPL boot, eg. falcon boot compressed kernel image.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocmd: spl: Fix compiling warning
York Sun [Tue, 15 Aug 2017 18:14:42 +0000 (11:14 -0700)]
cmd: spl: Fix compiling warning

Fix warning "cast from pointer to integer of different size".

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotools: pblimage: Fix address calculation
York Sun [Tue, 15 Aug 2017 18:14:41 +0000 (11:14 -0700)]
tools: pblimage: Fix address calculation

The image size should be added to the initial pbl command, not bit
"ORed".

Signed-off-by: York Sun <york.sun@nxp.com>
7 years agoarmv8: LS2080ARDB: Add secure boot defconfig for QSPI boot.
Udit Agarwal [Wed, 16 Aug 2017 11:13:30 +0000 (07:13 -0400)]
armv8: LS2080ARDB: Add secure boot defconfig for QSPI boot.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
[YS: dropped redundant commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoLS2080ARDB: QSPI boot: Secure Boot image validation
Udit Agarwal [Wed, 16 Aug 2017 11:13:29 +0000 (07:13 -0400)]
LS2080ARDB: QSPI boot: Secure Boot image validation

Adds header address for PPA to be validated during ESBC phase for
ARCH_LS2088 and QSPI_BOOT. Moves sec_init prior to ppa_init(). It
must be initialized before the PPA.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
[YS: revised commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoSECURE_BOOT: Unify memory map for Layerscape based platforms
Sumit Garg [Wed, 16 Aug 2017 11:13:28 +0000 (07:13 -0400)]
SECURE_BOOT: Unify memory map for Layerscape based platforms

Unify memory map for Layerscape based platforms. This patch includes
changes in bootscript, bootscript header and PPA header addresses
change as per unified memory map.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Tested-by: Vinitha Pillai <vinitha.pillai@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoQE: Set QE_IRAM_READY after uploading firmware
Zhao Qiang [Mon, 14 Aug 2017 02:22:43 +0000 (10:22 +0800)]
QE: Set QE_IRAM_READY after uploading firmware

QE_IRAM_READY should be set only after successfully uploading the
firmware.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agofsl-layerscape: Consolidate registers space defination for CCI-400 bus
Ashish Kumar [Fri, 11 Aug 2017 05:39:14 +0000 (11:09 +0530)]
fsl-layerscape: Consolidate registers space defination for CCI-400 bus

CoreLink Cache Coherent Interconnect (CCI) provides full cache
coherency between two clusters of multi-core CPUs and I/O coherency
for devices and I/O masters.

This patch add new config option SYS_FSL_HAS_CCI400 and moves
existing register space definaton of CCI-400 bus to fsl_immap to be
shared. CONFIG_SYS_CCI400_ADDR is replaced with SYS_CCI400_OFFSET
in Kconfig.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
[YS: revised commit message, squashed patches for armv8 and armv7]
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agocmd: ide: Make the first device the default one
Bin Meng [Sun, 10 Sep 2017 12:12:53 +0000 (05:12 -0700)]
cmd: ide: Make the first device the default one

At present the IDE device number is initialized to -1, which means
we cannot type "ide read" command before setting the device number
via "ide device #".

For convenience, let's set the first device as the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoblock: ide: Don't bother to create BLK device if no CDROM inserted
Bin Meng [Sun, 10 Sep 2017 12:12:52 +0000 (05:12 -0700)]
block: ide: Don't bother to create BLK device if no CDROM inserted

When there is no CDROM inserted, the block size is zero hence there
is no need to create a BLK device for it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoblock: ide: Fix block read/write with driver model
Bin Meng [Sun, 10 Sep 2017 12:12:51 +0000 (05:12 -0700)]
block: ide: Fix block read/write with driver model

This converts the IDE driver to driver model so that block read and
write are fully functional.

Fixes: b7c6baef ("x86: Convert MMC to driver model")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agoblk: Use macros for block device vendor/product/rev string size
Bin Meng [Sun, 10 Sep 2017 12:12:50 +0000 (05:12 -0700)]
blk: Use macros for block device vendor/product/rev string size

So far these are using magic numbers. Replace them with macros.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoedison: Disable CONFIG_USB_HOST_ETHER
Tom Rini [Fri, 8 Sep 2017 20:43:24 +0000 (16:43 -0400)]
edison: Disable CONFIG_USB_HOST_ETHER

This board does dwc3 gadget, not host, so we cannot have host support or
we will fail to link.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoenv: Migrate CONFIG_ENV_AES to Kconfig and deprecate
Tom Rini [Fri, 8 Sep 2017 17:12:16 +0000 (13:12 -0400)]
env: Migrate CONFIG_ENV_AES to Kconfig and deprecate

The underlying implementation for ENV_AES has security complications and
is not recommended for use.  Please see CVE-2017-3225 and CVE-2017-3226
for more details.  Mark this as deprecated now and delete this in the
medium term if no one comes forward to re-work the support.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agousb: doc: update README.usb for new config options
Chris Packham [Mon, 28 Aug 2017 08:50:47 +0000 (20:50 +1200)]
usb: doc: update README.usb for new config options

A number of the config options for USB networking have been migrated to
Kconfig. Update README.usb to reflect this.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
7 years agousb: net: migrate USB Ethernet adapters to Kconfig
Chris Packham [Mon, 28 Aug 2017 08:50:46 +0000 (20:50 +1200)]
usb: net: migrate USB Ethernet adapters to Kconfig

This migrates ASIX, ASIX88179, MCS7830, RTL8152 and SMSC95XX to Kconfig.
Update defconfigs.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agousb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig
Chris Packham [Mon, 28 Aug 2017 08:50:45 +0000 (20:50 +1200)]
usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig

CONFIG_USB_HOST_ETHER is the framework that the drivers are dependent on
USB_HOST_ETHER. Use this as a menu and move the existing LAN75XX and
LAN78XX options under new menu. Finally update the defconfigs that need
CONFIG_USB_HOST_ETHER.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoKconfig: drop CONFIG_USB_ETHER_RNDIS
Chris Packham [Mon, 28 Aug 2017 08:50:44 +0000 (20:50 +1200)]
Kconfig: drop CONFIG_USB_ETHER_RNDIS

This is not a valid option. Drop it.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoKconfig: drop CONFIG_USB_ETHER_DM9601
Chris Packham [Mon, 28 Aug 2017 08:50:43 +0000 (20:50 +1200)]
Kconfig: drop CONFIG_USB_ETHER_DM9601

This is not a valid option. Drop it.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoREADME: Fix typo in description of CONFIG_OF_EMBED
Nobuhiro Iwamatsu [Fri, 25 Aug 2017 22:34:14 +0000 (07:34 +0900)]
README: Fix typo in description of CONFIG_OF_EMBED

The correct name is 'gd->fdt_blob', not 'gd->blob'.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 8 Sep 2017 14:14:49 +0000 (10:14 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agorockchip: enable SPL_SYSRESET config for all Rockchip SoCs
Kever Yang [Fri, 8 Sep 2017 03:00:54 +0000 (11:00 +0800)]
rockchip: enable SPL_SYSRESET config for all Rockchip SoCs

With Makefiles testing for $(SPL_TPL_)SYSRESET, we need SPL_SYSRESET
for do_reset() in SPL for Rockchip SoCs.

References: 87c16d4 "drivers: spl: consistently use the $(SPL_TPL_) macro"
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3328: fix syscon id table
Kever Yang [Wed, 6 Sep 2017 07:58:25 +0000 (15:58 +0800)]
rockchip: rk3328: fix syscon id table

syscon id table need a dummy member as NULL ending, or else system
will panic while try to match a compatible in this table as a list.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoARM: rmobile: Disable CONFIG_ARCH_FIXUP_FDT_MEMORY
Marek Vasut [Thu, 7 Sep 2017 07:48:24 +0000 (09:48 +0200)]
ARM: rmobile: Disable CONFIG_ARCH_FIXUP_FDT_MEMORY

Disable CONFIG_ARCH_FIXUP_FDT_MEMORY to prevent U-Boot from modifying
the memory {} nodes in the DT passed to the Linux kernel. The R8A779x
DT contains multiple memory {} nodes, while U-Boot only modifies the
first one and stuffs all the memory entries into it, which is wrong.
Disabling CONFIG_ARCH_FIXUP_FDT_MEMORY is the least intrusive way to
fix the issue this close to the release, while the real fix is to
extend the fdt_fixup_memory_banks() to handle multiple memory nodes
in DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Fix SD divider settings on Gen3
Marek Vasut [Tue, 5 Sep 2017 13:11:14 +0000 (15:11 +0200)]
ARM: rmobile: Fix SD divider settings on Gen3

On RCar M3 and on RCar H3 newer than and not including ES1.0, the SD clock
must be divided by 4 rather than 2 because a hardware workaround present
only in the H3 ES1.0 has been removed from these chips. U-Boot currently
only supports M3 and H3 ES 2.0 and newer, so configure the SD pre-divider
to 4 to prevent SD instability.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoMerge git://git.denx.de/u-boot-net
Tom Rini [Thu, 7 Sep 2017 18:48:23 +0000 (14:48 -0400)]
Merge git://git.denx.de/u-boot-net

7 years agonet: fix typos
Heinrich Schuchardt [Tue, 29 Aug 2017 16:44:37 +0000 (18:44 +0200)]
net: fix typos

%s/Desriptor/Descriptor/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoarmv8: ls1043/ls1046aqds: add support for RGMII_TXID
Madalin Bucur [Fri, 18 Aug 2017 08:37:20 +0000 (11:37 +0300)]
armv8: ls1043/ls1046aqds: add support for RGMII_TXID

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: York Sun <york.sun@nxp.com>
7 years agonet: nfs: Drop CONFIG_NFS_READ_SIZE
Tom Rini [Mon, 21 Aug 2017 02:40:01 +0000 (22:40 -0400)]
net: nfs: Drop CONFIG_NFS_READ_SIZE

In the general case, CONFIG_NFS_READ_SIZE is unchanged from the default
of 1024.  There are in fact no in-tree users that increase this size.
Adjust the comment to reflect what could be done in the future in
conjunction with CONFIG_IP_DEFRAG.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: phy: realtek: fix enabling of the TX-delay for RTL8211F
Madalin Bucur [Fri, 18 Aug 2017 08:35:24 +0000 (11:35 +0300)]
net: phy: realtek: fix enabling of the TX-delay for RTL8211F

The old logic always enabled the TX-delay when the phy-mode was set to
PHY_INTERFACE_MODE_RGMII. With this patch we enable the TX delay for
PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID and
disable it for PHY_INTERFACE_MODE_RGMII.

Based on a similar change made in the Linux Realtek PHY driver
by Martin Blumenstingl <martin.blumenstingl@googlemail.com>.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: York Sun <york.sun@nxp.com>
7 years agospl: typo fix for SPL_ATF_SUPPORT description
Kever Yang [Thu, 7 Sep 2017 07:50:18 +0000 (15:50 +0800)]
spl: typo fix for SPL_ATF_SUPPORT description

Delete one redundant 'which' for SPL_ATF_SUPPORT description.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
7 years agolinker_lists: remove incorrect comment
Heinrich Schuchardt [Thu, 7 Sep 2017 01:55:11 +0000 (03:55 +0200)]
linker_lists: remove incorrect comment

Remove a comment line refering to a non-existent file.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agovsprintf: vsprintf does not have parameter size
Heinrich Schuchardt [Wed, 6 Sep 2017 15:55:13 +0000 (17:55 +0200)]
vsprintf: vsprintf does not have parameter size

The inline documentation of vsprintf mentions a parameter size
which does not exist in the function declaration.

int vsprintf(char *buf, const char *fmt, va_list args);

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agoRevert "dm: arm: rpi: Drop CONFIG_OF_EMBED"
Paul Barker [Wed, 6 Sep 2017 07:35:19 +0000 (08:35 +0100)]
Revert "dm: arm: rpi: Drop CONFIG_OF_EMBED"

This reverts commit 25877d4e4c45451c5398aec3de50e0d5befe0e9f.

This is a workaround for Raspberry Pi boot failures seen when passing on
the device tree provided by the Raspberry Pi firmware at boot. Without
CONFIG_OF_EMBED, we just get stuck at "Starting kernel ..." when we try
to boot Linux with this device tree.

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agotools: .gitignore: Add libfdt related files
Bin Meng [Wed, 6 Sep 2017 05:37:45 +0000 (22:37 -0700)]
tools: .gitignore: Add libfdt related files

Some files are generated during libfdt build. Ignore them.

This was wrongly put in the .gitignore in the root directory before.
Now let's remove entries there and put them in the right place.

Fixes: 34e2c285 ("gitignore: add intermediates from libfdt build")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agotools: .gitignore: Sort in alphabetical order
Bin Meng [Wed, 6 Sep 2017 05:37:44 +0000 (22:37 -0700)]
tools: .gitignore: Sort in alphabetical order

These are currently out of alphabetical order.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agodoc: remove duplicate text in README.gpt
Alison Chaiken [Tue, 5 Sep 2017 01:19:04 +0000 (18:19 -0700)]
doc: remove duplicate text in README.gpt

Signed-off-by: Alison Chaiken <alison@she-devel.com>
7 years agopart: mac: Suppress the error message after reading ddb
Bin Meng [Mon, 4 Sep 2017 01:44:23 +0000 (18:44 -0700)]
part: mac: Suppress the error message after reading ddb

Change to use 'debug' to output the error message if it fails to
read the driver descriptor block.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoenv: Add 'envtools' target to 'make help'
Simon Glass [Tue, 5 Sep 2017 07:53:59 +0000 (01:53 -0600)]
env: Add 'envtools' target to 'make help'

The target is not currently mentioned anywhere. Add it to the help so
people can find it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoenv: Fix operation of 'make environ'
Simon Glass [Tue, 5 Sep 2017 07:53:58 +0000 (01:53 -0600)]
env: Fix operation of 'make environ'

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in
two C files.

Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ')
Reported-by: Måns Rullgård <mans@mansr.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agousb: gadget: g_dnl: Sync internal SN variable with env
Sam Protsenko [Fri, 1 Sep 2017 12:42:03 +0000 (15:42 +0300)]
usb: gadget: g_dnl: Sync internal SN variable with env

Since commit 842778a09104 ("usb: gadget: g_dnl: only set iSerialNumber
if we have a serial#") "fastboot devices" stopped to show correct device
serial number for TI boards, showing this line instead:

    ???????????? fastboot

This is because serial# env variable could be set after g_dnl gadget was
initialized (e.g. by using env_set() in the board file).

To fix this, let's update internal serial number variable (g_dnl_serial)
when "serial#" env var is changed.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoenv: Fix out of tree building of tools-all
Tom Rini [Tue, 5 Sep 2017 18:01:29 +0000 (14:01 -0400)]
env: Fix out of tree building of tools-all

With the move of environment code from common/ to env/ a number of
changes needed to be made to various make targets.  We missed updating
some of the files required for out of tree builds of the tools.  Correct
the 'environ' target to know that we need to work under tools/env/ still
(not tools/environ/) and then update the wrappers in env_attr.c and
env_flags.c to point to the new correct file.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge git://git.denx.de/u-boot-video
Tom Rini [Tue, 5 Sep 2017 12:54:55 +0000 (08:54 -0400)]
Merge git://git.denx.de/u-boot-video

7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Tue, 5 Sep 2017 11:11:46 +0000 (07:11 -0400)]
Merge git://git.denx.de/u-boot-rockchip

7 years agoMAINTAINERS: add lcd files to video section
Anatolij Gustschin [Mon, 28 Aug 2017 20:39:41 +0000 (22:39 +0200)]
MAINTAINERS: add lcd files to video section

LCD drivers are video related, so add them to video section.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
7 years agorockchip: i2c: fix >32 byte reads
Wadim Egorov [Thu, 3 Aug 2017 11:48:11 +0000 (13:48 +0200)]
rockchip: i2c: fix >32 byte reads

The hw can read up to 32 bytes at a time. If we need
more than one chunk, we have to enter the plain RX mode.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: firefly-rk3399: enable ATF and dwmmc
Kever Yang [Thu, 27 Jul 2017 12:38:52 +0000 (20:38 +0800)]
rockchip: firefly-rk3399: enable ATF and dwmmc

enable the ATF option and SDCard in defconfig.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: timer: fix U_BOOT_DRIVER name
Philipp Tomsich [Fri, 25 Aug 2017 11:22:00 +0000 (13:22 +0200)]
rockchip: timer: fix U_BOOT_DRIVER name

When I originally added this driver, I did some careless (and in
retrospect: mindless) copy & paste for the U_BOOT_DRIVER structure
skeletion... unfortunately, the 'arc_timer' string was committed
and slipped through all reviews.

This fixes the U_BOOT_DRIVER name to read 'rockchip_rk3368_timer'
(as originally intended).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reported-by: Artturi Alm <artturi.alm@gmail.com>
7 years agorockchip: rk3288: Add reset reason detection
Wadim Egorov [Mon, 21 Aug 2017 11:36:57 +0000 (13:36 +0200)]
rockchip: rk3288: Add reset reason detection

Sometimes it's helpful to know the reset reason caused in the SoC.
Add reset reason detection for the RK3288 SoC.
This will set an environment variable which represents the reset reason.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: phycore: Read configuration EEPROM & set ethaddr in late init
Wadim Egorov [Mon, 21 Aug 2017 08:59:00 +0000 (10:59 +0200)]
rockchip: phycore: Read configuration EEPROM & set ethaddr in late init

Read SoM information from EEPROM and set ethaddr in late init.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Tue, 5 Sep 2017 02:17:59 +0000 (22:17 -0400)]
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

7 years agoARM: rmobile: Add missing IPSR18 bits to R8A7795 PFC
Marek Vasut [Mon, 28 Aug 2017 12:13:11 +0000 (14:13 +0200)]
ARM: rmobile: Add missing IPSR18 bits to R8A7795 PFC

The IPSR18 register bits were missing from the R8A7795 ES2.0+ PFC
tables, which triggered a BUG() in sh_pfc driver. This is because
of an out-of-bounds access to the pinmux_gpios[] array in the PFC
tables, which was too short due to the missing IPSR18 bits.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Drop board_mmc_init
Marek Vasut [Mon, 28 Aug 2017 12:12:54 +0000 (14:12 +0200)]
ARM: rmobile: Drop board_mmc_init

The board_mmc_init() is no longer invoked when DM is used, so move
all the pinmux config into board_init() instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Replace CONFIG_RAVB with CONFIG_RENESAS_RAVB in boards
Marek Vasut [Mon, 28 Aug 2017 12:12:34 +0000 (14:12 +0200)]
ARM: rmobile: Replace CONFIG_RAVB with CONFIG_RENESAS_RAVB in boards

The configuration option name is the later, so replace usage of
CONFIG_RAVB in board files with CONFIG_RENESAS_RAVB , otherwise
the RAVB pinmux is not set and ethernet does not work.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agosplash_source: Verify FIT magic
Niko Mauno [Thu, 3 Aug 2017 06:53:24 +0000 (09:53 +0300)]
splash_source: Verify FIT magic

Before reading entire FIT image, add sanity check by testing image
header against FDT_MAGIC. This should help avoid problems in situations
where FIT is not yet available from storage device, for example when
performing initial programming of device.

Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Tomas Melin <tomas.melin@vaisala.com>
7 years agovideo: ipuv3_fb: skip IPU shutdown if IPU was not enabled before
Anatolij Gustschin [Mon, 4 Sep 2017 21:33:45 +0000 (23:33 +0200)]
video: ipuv3_fb: skip IPU shutdown if IPU was not enabled before

Boards can skip display interface init using board_video_skip().
If display interface was not initialized (e.g. no ipuv3 framebuffer
registered or IPU clock disabled), booting Linux stops due to the
crash in IPU shutdown function, when accessing IPU registers.
Check IPU clock and skip shutdown if clock is not enabled.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
7 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Mon, 4 Sep 2017 18:56:45 +0000 (14:56 -0400)]
Merge git://git.denx.de/u-boot-dm

7 years agoPrepare v2017.09-rc4 v2017.09-rc4
Tom Rini [Mon, 4 Sep 2017 13:02:48 +0000 (09:02 -0400)]
Prepare v2017.09-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocrypto/fsl: fix obj-yy in Makefile
Clemens Gruber [Sun, 3 Sep 2017 17:17:10 +0000 (19:17 +0200)]
crypto/fsl: fix obj-yy in Makefile

When enabling CONFIG_CMD_BLOB and/or CONFIG_CMD_DEKBLOB, the build fails
with a linker error:
  ...
  LD      u-boot
arch/arm/mach-imx/built-in.o: In function `blob_encap_dek':
/home/clemens/dev/u-boot/arch/arm/mach-imx/cmd_dek.c:46: undefined
reference to `blob_dek'

This is due to an error in the Makefile, resulting in obj-yy/obj-yn/..
and fsl_blob.o is therefore not linked.

Fix it by splitting it up into two obj-y lines.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agogit: mailrc: Update e-mail address
Lukasz Majewski [Sun, 3 Sep 2017 16:13:11 +0000 (18:13 +0200)]
git: mailrc: Update e-mail address

Signed-off-by: Lukasz Majewski <lukma@denx.de>
7 years agodm: core: Add livetree documentation
Simon Glass [Thu, 31 Aug 2017 11:59:55 +0000 (05:59 -0600)]
dm: core: Add livetree documentation

Add some documentation for the live device tree support in U-Boot. This
was missing from the initial series.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
7 years agogitignore: add intermediates from libfdt build
Philipp Tomsich [Tue, 29 Aug 2017 09:47:16 +0000 (11:47 +0200)]
gitignore: add intermediates from libfdt build

Since ee95d10 (fdt: Build the new python libfdt module), a number of
additional files are auto-generated/installed into the tools directory.
List these in .gitignore to suppress having them listed as untracked.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
References: ee95d10 (fdt: Build the new python libfdt module)
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: fix 'prop (...) not found!' error in 'fdt set' command
Hannes Schmelzer [Fri, 18 Aug 2017 12:41:14 +0000 (14:41 +0200)]
fdt: fix 'prop (...) not found!' error in 'fdt set' command

This commit brings things back to the well known working state of the
command.
-
With commit 9620d87259572ef21f0df60988d9a932ca673779
(cmd/fdt: support single value replacement within an array)

there was an error introduced modifying (inserting) a property to a
device-tree node.
fdt_getprop(...) returnes a len with -1 for a non-existing property, but
a memcpy with len -1 isn't a good idea and things went wrong (crash).
-
Some times later Tom did repair this
with commit 99bb38e2cce9d99238458e0f6d1880c6d2e80a4d
(fdt: Check for NULL return from fdt_getprop in 'fdt set')

This repairs the crash but the behaviour of the command isn't like
before, it makes it impossible to insert a property.
-

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodm: Add migration plan for CONFIG_BLK
Simon Glass [Sat, 5 Aug 2017 21:45:53 +0000 (15:45 -0600)]
dm: Add migration plan for CONFIG_BLK

The CONFIG_BLK conversion involves quite invasive changes in the U-Boot
code, with #ifdefs and different code paths. We should try to move over to
this soon so we can drop the old code.

Set a deadline of 9 months for this work, rounded up to the next release.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMakefile: Suppress output of python libfdt build command
Bin Meng [Sun, 3 Sep 2017 11:37:49 +0000 (04:37 -0700)]
Makefile: Suppress output of python libfdt build command

This should not be printed by default. Prefix it with $(Q).

Fixes ee95d10b: ("fdt: Build the new python libfdt module")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoMakefile: Quiesce libfdt build
Bin Meng [Sun, 3 Sep 2017 11:37:48 +0000 (04:37 -0700)]
Makefile: Quiesce libfdt build

Since commit 3809e302 "Makefile: honor PYTHON configuration properly",
the build commands of libfdt are printed while previously were not.

This adds the missing '--quiet' back.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoomap3: evm: Fixes for CONFIG_NAND, SPL_OS_BOOT, USB, and environment
Derald D. Woods [Sat, 2 Sep 2017 22:43:05 +0000 (17:43 -0500)]
omap3: evm: Fixes for CONFIG_NAND, SPL_OS_BOOT, USB, and environment

- Pass MTDPARTS kernel arguments to kernel
- Use Kconfig CONFIG_NAND instead of CONFIG_SYS_EXTRA_OPTIONS="NAND"
- Call 'usb_stop' on kernel start
- Update Falcon mode setup to match other OMAP3 boards
- Use "uEnv.txt" as boot script instead of "boot.scr"

7 years agoblock: Drop the ftide020 driver
Bin Meng [Sat, 2 Sep 2017 15:43:54 +0000 (08:43 -0700)]
block: Drop the ftide020 driver

This is not used in U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoblock: ide: Drop CONFIG_IDE_LED
Bin Meng [Sat, 2 Sep 2017 15:43:53 +0000 (08:43 -0700)]
block: ide: Drop CONFIG_IDE_LED

This is actually not used. Drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoblock: ide: Drop CONFIG_IDE_INIT_POSTRESET
Bin Meng [Sat, 2 Sep 2017 15:43:52 +0000 (08:43 -0700)]
block: ide: Drop CONFIG_IDE_INIT_POSTRESET

This is not referenced anywhere. Drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agonvme: Remove dead codes in nvme_setup_io_queues()
Bin Meng [Sat, 2 Sep 2017 15:15:37 +0000 (08:15 -0700)]
nvme: Remove dead codes in nvme_setup_io_queues()

Execution cannot reach this statement: "nr_io_queues = result;"

Reported-by: Coverity (CID: 166731)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agonvme: Fix potential sign extension issue in nvme_blk_rw()
Bin Meng [Sat, 2 Sep 2017 15:15:36 +0000 (08:15 -0700)]
nvme: Fix potential sign extension issue in nvme_blk_rw()

"lbas" with type "u16" (16 bits, unsigned) is promoted in
"lbas << ns->lba_shift" to type "int" (32 bits, signed), then
sign-extended to type "unsigned long long" (64 bits, unsigned).
If "lbas << ns->lba_shift" is greater than 0x7FFFFFFF, the upper
bits of the result will all be 1.

Fix it by casting "lbas" to "u32".

Reported-by: Coverity (CID: 166730)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agonvme: Fix wrong ndev->queues memset
Bin Meng [Sat, 2 Sep 2017 15:15:35 +0000 (08:15 -0700)]
nvme: Fix wrong ndev->queues memset

memset() was given a sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *)
to clear, which is wrong.

Reported-by: Coverity (CID: 166729)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodisk: part: fix typo
Heinrich Schuchardt [Tue, 29 Aug 2017 16:36:59 +0000 (18:36 +0200)]
disk: part: fix typo

%s/Desriptor/Descriptor/g

Fix lines over 80 characters with said typo.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agofix: fw_env: Prevent writing error message on special files, which don't support...
Lukasz Majewski [Sun, 27 Aug 2017 11:46:22 +0000 (13:46 +0200)]
fix: fw_env: Prevent writing error message on special files, which don't support fsync

According to fsync specification [1] some special files (e.g., a pipe, FIFO,
or socket) don't support synchronization and return either EROFS or EINVAL.

On the linux side the sys_fsync -> do_fsync() checks if the requested file
has f_op->fsync defined. If not it returns EINVAL [2].

This commit prevents writing error messages for files (devices), which
do not support fsync().

[1] - http://man7.org/linux/man-pages/man2/fsync.2.html
[2] - http://elixir.free-electrons.com/linux/v4.13-rc6/source/fs/sync.c#L183

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Michael Heimpold <mhei@heimpold.de>
7 years agobch: don't use __BSD_VISIBLE to test for fls
Jonathan Gray [Sun, 27 Aug 2017 10:45:14 +0000 (20:45 +1000)]
bch: don't use __BSD_VISIBLE to test for fls

Commit 4ecc988301bc8e981e6d7538c57cdb3aa82f7c1d assumes fls is in libc
if __BSD_VISIBLE is defined.  This appears to only be true on FreeBSD
and DragonFlyBSD.  OpenBSD defines __BSD_VISIBLE and does not have fls
in strings.h/libc.

Switch the test for __BSD_VISIBLE to one for __DragonFly__ and
__FreeBSD__ to unbreak the build on OpenBSD.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
7 years agoinclude/configs: remove numerous CONFIG_SYS_BARGSIZE definitions
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:06 +0000 (22:59 +0200)]
include/configs: remove numerous CONFIG_SYS_BARGSIZE definitions

This commit removes definitions of CONFIG_SYS_BARGSIZE defined to be
equal to CONFIG_SYS_CBSIZE in numerous configuration files.

We remove such definitions in two situations:

 - CONFIG_SYS_CBSIZE is otherwise not defined in the board
   configuration file, which means the default value of
   CONFIG_SYS_CBSIZE == 256 applies. In this case, the default value
   of CONFIG_SYS_BARGSIZE == 512 (common/image.c) is suitable, as it is
   larger.

 - CONFIG_SYS_CBSIZE is defined in the board configuration file, but
   to a value equal or less than 512. In this case, the default value
   of CONFIG_SYS_BARGSIZE == 512 (common.image.c) is suitable, as it
   is equal or larger.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoinclude/configs: remove default values of CONFIG_SYS_BARGSIZE
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:05 +0000 (22:59 +0200)]
include/configs: remove default values of CONFIG_SYS_BARGSIZE

CONFIG_SYS_BARGSIZE is already defined to 512 in common/image.c when
not defined. Therefore, there is no point in having board
configuration files define it to 512.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoinclude/configs: drop default definitions of CONFIG_SYS_MAXARGS
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:04 +0000 (22:59 +0200)]
include/configs: drop default definitions of CONFIG_SYS_MAXARGS

Now that include/config_fallbacks.h define a sane fallback for
CONFIG_SYS_MAXARGS, we can drop the definition of this constant in all
configurations that were using the default value.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoinclude/config_fallbacks.h: add default for CONFIG_SYS_MAXARGS
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:03 +0000 (22:59 +0200)]
include/config_fallbacks.h: add default for CONFIG_SYS_MAXARGS

CONFIG_SYS_MAXARGS contains the maximum number of arguments accepted
by U-Boot commands. Since the vast majority of the platforms define it
to 16, it makes sense to have a default definition to 16, which will
allow to remove this definition from a significant number of
platforms.

It will allow to remove the default definition from 216 platform .h
files, leaving only 56 platforms with non-default values (15, 24, 32,
48, 64, 96, 128 or 256).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoinclude/configs: drop default definitions of CONFIG_SYS_PBSIZE
Thomas Petazzoni [Wed, 23 Aug 2017 20:59:02 +0000 (22:59 +0200)]
include/configs: drop default definitions of CONFIG_SYS_PBSIZE

Now that the fallback value of CONFIG_SYS_PBSIZE in
include/config_fallbacks.h has been adjusted, remove its definition
from a large number of board configuration files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>