Commit Graph

36479 Commits

Author SHA1 Message Date
Bin Meng
0764f24ae6 net: Move CONFIG_RTL8169 to Kconfig
Introduce CONFIG_RTL8169 in Kconfig and move over boards' defconfig
to use that.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Stephen Warren <swaren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-03-22 12:19:53 -04:00
Bin Meng
86e9dc86b1 net: Move CONFIG_RTL8139 to Kconfig
Introduce CONFIG_RTL8139 in Kconfig and move over boards' defconfig
to use that.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
[trini: Fixup MPC8641HPCN* and r2dplus configs]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:19:27 -04:00
Bin Meng
6b33687995 defconfig: Reorder boards' defconfig files
Some boards' defconfig files are out of order. Clean this up.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-03-22 12:16:31 -04:00
Simon Glass
b94fc8518e usb: Correct return value in usb_stor_info()
This should return 0 on success, not 1. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:28 -04:00
Simon Glass
5b15a2596f mkimage: Don't close the file if it wasn't opened
The error path for fit_import_data() is incorrect if the second open() call
fails.

Reported-by: Coverity (CID: 138489)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:28 -04:00
Simon Glass
3bd3a54ac5 mkimage: Ensure file is closed in fdt_property_file()
The file that is opened is not closed in all cases. Fix it.

Reported-by: Coverity (CID: 138490)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:27 -04:00
Simon Glass
7b0bbd886d mkimage: Fix missing free() and close() in fit_build()
Make sure that both the error path and normal return free the buffer and
close the file.

Reported-by: Coverity (CID: 138491)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:27 -04:00
Simon Glass
21c2975a94 mkimage: Fix missing free() in fit_extract_data()
The 'buf' variable is not freed. Fix it.

Reported-by: Coverity (CID: 138492)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:21 -04:00
Simon Glass
b97d71e26a mkimage: Fix error path in fit_extract_data()
The 'fdt' variable is not unmapped in all error cases. Fix this.

Reported-by: Coverity (CID: 138493)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:20 -04:00
Simon Glass
6e0ffce6cb mkimage: Add a missing free() to fit_import_data()
The space allocated to fdt is not freed on error. Fix it.

Reported-by: Coverity (CID: 138494)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:20 -04:00
Simon Glass
b12a81c4cc mkimage: Close the file when unable to get its size
There is a missing close() on the error path. Add it.

Reported-by: Coverity (CID: 138496)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:19 -04:00
Simon Glass
4708a07c7c part_efi: Drop NULL check in part_get_info_efi()
This cannot be NULL since part_get_info() calls this function and requires
it to be non-NULL.

Reported-by: Coverity (CID: 138497)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:19 -04:00
Simon Glass
5f095f0c7a part_efi: Drop the NULL check on dev_desc in part_print_efi()
This cannot be NULL since part_print() calls this function and requires it
to be non-NULL.

Reported-by: Coverity (CID: 138498)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:19 -04:00
Simon Glass
0919228cf4 part_iso: Drop the customer unaligned access functions
One of these is causing a coverity warning. Drop these functions and use the
standard U-Boot ones instead.

Reported-by: Coverity (CID: 138499)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:18 -04:00
Simon Glass
f980ca3411 mkimage: Correct file being closed twice in fit_extract_data()
The code flows through to the end of the function, so we don't need another
close() before this. Remove it.

Reported-by: Coverity (CID: 138503)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:18 -04:00
Simon Glass
508b028a4c mkimage: Correct file being closed twice in fit_import_data()
The code flows through to the end of the function, so we don't need another
close() before this. Remove it.

Reported-by: Coverity (CID: 138504)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:17 -04:00
Simon Glass
9cff2d1e39 mkimage: Fix munmap() call when importing data
The munmap() call unmaps the wrong memory buffer. Fix it.

Reported-by: Coverity (CID: 138505)
Reported-by: Coverity (CID: 138495)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:17 -04:00
Vagrant Cascadian
a6f70a3d14 Fix spelling of "transferred".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:16 -04:00
Vagrant Cascadian
0af49b9575 Fix spelling of "supported/unsupported".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
2016-03-22 12:16:14 -04:00
Vagrant Cascadian
0e28065949 Fix spelling of "comment".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:13 -04:00
Tom Rini
8a7367acca cmd: Fix license command
The license command isn't usually built and has a few problems:
- The rules to generate license.h haven't worked in a long time,
  re-write these based on the bmp_logo.h rules.
- 'tok' is unused and the license text size has increased
- bin2header.c wasn't grabbing unistd.h to know the prototype for
  read().

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:13 -04:00
Eric Anholt
cd0fa5bff8 serial: pl01x: Add support for devices with the rate pre-configured.
For Raspberry Pi, we had the input clock rate to the pl011 fixed in
the rpi.c file, but it may be changed by firmware due to user changes
to config.txt.  Since the firmware always sets up the uart (default
115200 output unless the user changes it), we can just skip our own
uart init to simplify the boot process and more reliably get serial
output.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
2016-03-22 12:16:12 -04:00
Simon Glass
9a6598daaf Drop various features when the command line is not available
Some features are only useful or meaningful when the command line is
present. Ensure that these features are not compiled in when CONFIG_CMDLINE
is not enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:11 -04:00
Simon Glass
1872c67359 Allow command-line files to be dropped
These files do not need to be compiled when CONFIG_CMDLINE is disabled.
Update the Makefile to reflect this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:11 -04:00
Simon Glass
fb24112c19 Allow command code to compile to nothing
When CONFIG_CMDLINE is disabled we need to remove all the command-line
code. Most can be removed by dropping the appropriate linker lists from the
images, but sub-commands must be dealt with specially.

A simple mechanism is used to avoid 'unused static function' errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:10 -04:00
Simon Glass
045e6f0d4f Panic when no command line processing can be performed
Normally board_run_command() will handle command processed. But if for some
reason it returns then we should panic to avoid further processing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:10 -04:00
Simon Glass
2b6793de25 sandbox: Avoid calling commands when not available
Don't try to run commands when not supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:10 -04:00
Simon Glass
c1352119fd arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled
Update the link script to drop this code when not needed. This is only done
for two architectures at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:09 -04:00
Simon Glass
302a648750 Add an option to enable the command line
Add a new Kconfig option for the command line. This is enabled by default,
but when disabled it will remove the command line.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:08 -04:00
Simon Glass
633fb736ce cbfs: Update a function to be static
All command functions should be static. Update the CBFS functions to follow
this rule.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:08 -04:00
Vitaly Andrianov
b8dafa2209 ti: k2g: increase phy autoneg timeout
After power cycle of a K2G EVM dhcp fails due to a auto-negotiation
timeout. This commit increases the timeout to fix the issue.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-22 12:16:07 -04:00
Tom Rini
55926ddd18 Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2016-03-22 12:14:27 -04:00
Prabhakar Kushwaha
6dedcedd64 driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0
Return value of get_mc_boot_status() in case of failure is not necessary
to be -1.

So update the error condition check.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reported-by: Yao Yuan <yao.yuan@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:15 -07:00
Wenbin Song
ceded371c8 armv8/ls1043aqds: Enable ID_EEPROM support for ls1043aqds
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:15 -07:00
Wenbin Song
ec44289db5 armv8/ls1043aqds: Return i2c mux to default chennel
Return i2c mux to the default channel after accessing retimer.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:15 -07:00
Wenbin Song
1be8d10be4 freescale: vid: Return i2c mux to default channel
IR chip is on one of the channels on multiplexed I2C-bus.
Reset to default channel after accessing.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:15 -07:00
Alison Wang
f8008f144b arm: ls102xa: Enable CONFIG_SYS_CONSOLE_IS_IN_ENV support
CONFIG_SYS_CONSOLE_IS_IN_ENV needs to be enabled, so we could set stdout
environment variable to specify the vga for the console output when
LCD/HDMI is connected to the boards.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:14 -07:00
Yangbo Lu
e477f4bdd4 armv8/fsl-lsch2: fix sdhc clock frequency value
The eSDHC could select to use platform clock or peripheral clock to
generate SD clock. The default selection is platform clock. So, fix
the clock frequency value that's calculated for eSDHC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:14 -07:00
Prabhakar Kushwaha
0f4b82a555 armv8: ls2085a: Remove phy configuration from QDS and RDB
As phy_connect and phy_config are being called from DPAA2 driver.
Remove calling of mentioned function from board file.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:14 -07:00
Prabhakar Kushwaha
6c2b520a37 driver: net: ldpaa_eth: Add support of PHY framework
This patch integrate DPAA2 ethernet driver existing PHY framework.

Call phy_connect and phy_config as per available DPMAC id defined
in SerDes Protcol.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:14 -07:00
Pratiyush Srivastava
b2b877306c armv8: fsl-layerscape: Updating entries in Serdes Table
The serdes protocol entries in  Serdes table 1 for protocol
0x03, 0x33, 0x35 and in Serdes table 2 for protocols 0x45
and 0x47 are updated to reflect the entries in
current Reference Manual.

Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@nxp.com>
Reported-by: Jose Rivera <german.rivera@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:13 -07:00
Shengzhou Liu
dd8e740c78 driver/ddr/fsl: Add workaround for erratum A-009803
During initial DDR training, false parity errors may be detected.
This patch adds workaround to fix the erratum.
Tested on LS2085QDS and LS2080RDB.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:13 -07:00
Shengzhou Liu
eb118807a4 driver/ddr/fsl: Add address parity support for DDR4 UDIMM/discrete
Add support of address parity for DDR4 UDIMM or discrete memory.
It requires to configurate corresponding MR5[2:0] and
TIMING_CFG_7[PAR_LAT]. Parity can be turned on by hwconfig,
e.g. hwconfig=fsl_ddr:parity=on.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:13 -07:00
Stuart Yoder
5e8e27b743 pci/layerscape: set LUT and msi-map for discovered PCI devices
msi-map properties are used to tell an OS how PCI requester IDs are
mapped to ARM SMMU stream IDs.

for all PCI devices discovered in a system:
  -allocate a LUT (look-up-table) entry in that PCI controller
  -allocate a stream ID for the device
  -program and enable a LUT entry (maps PCI requester id to stream ID)
  -set the msi-map property on the controller reflecting the
   LUT mapping

basic bus scanning loop/logic was taken from drivers/pci/pci.c
pci_hose_scan_bus().

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:13 -07:00
Stuart Yoder
7e7e126470 pci/layerscape: add defines for LUT
The per-PCI controller LUT (Look-Up-Table) is a 32-entry table
that maps PCI requester IDs (bus/dev/fun) to a stream ID.

Add defines for the register offsets.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:13 -07:00
Stuart Yoder
eeb5b1ad82 pci: make pci_get_hose_head() available to external users
Put pci_get_hose_head() prototype in header so it is available to
external users, allowing them to find and iterate over all pci
controllers.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:12 -07:00
Stuart Yoder
029a407dae armv8: ls2080a: update stream ID partitioning info
Update comments around how stream IDs are partitioned.
Stream IDs allocated to PCI are no longer divided up by
controller, but are instead a contiguous range

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:12 -07:00
Stuart Yoder
2d97fbb4c4 armv8: ls2080a: remove obsolete stream ID partitioning support
Remove stream ID partitioning support that has been made
obsolete by upstream device tree bindings that specify how
representing how PCI requester IDs are mapped to MSI specifiers
and SMMU stream IDs.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:12 -07:00
York Sun
ed77b7045e boards: ls2080: Fix default bootargs
A white space is missing in multiple-line string for bootargs.

Signed-off-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:12 -07:00
Alison Wang
b2f3addbb2 arm: ls102xa: fdt: Update FSL_QSPI_COMPAT and FSL_DSPI_COMPAT
As the compatible property values for QSPI and DSPI dts nodes
are changed in kernel, FSL_QSPI_COMPAT and FSL_DSPI_COMPAT
need to be updated too.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-03-21 12:42:11 -07:00