oweals/u-boot.git
6 years agolog: add category LOGC_EFI
Heinrich Schuchardt [Mon, 22 Jan 2018 19:10:45 +0000 (20:10 +0100)]
log: add category LOGC_EFI

The EFI implementation does not fit into any of the existing categories.

Provide LOGC_EFI so that EFI related message can be filtered.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add a way to log error-return values
Simon Glass [Thu, 28 Dec 2017 20:14:23 +0000 (13:14 -0700)]
log: Add a way to log error-return values

When functions return an error it propagates up the stack to the point
where it is reported. Often the error code provides enough information
about the root cause of the error that this is obvious what went wrong.

However in some cases the error may be hard to trace. For example if a
driver uses several devices to perform an operation, it may not be
obvious which one failed.

Add a log_ret() macro to help with this. This can be used to wrap any
error-return value. The logging system will then output a log record when
the original error is generated, making it easy to trace the call stack
of the error.

This macro can significantly impact code size, so its use is controlled
by a Kconfig option, which is enabled for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add documentation for commands and formatting
Simon Glass [Thu, 28 Dec 2017 20:14:22 +0000 (13:14 -0700)]
log: Add documentation for commands and formatting

Add some notes about recent new features.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add tests for the new log features
Simon Glass [Thu, 28 Dec 2017 20:14:21 +0000 (13:14 -0700)]
log: Add tests for the new log features

Add a test of the 'log format' and 'log rec' commands. This also covers
things like log_get_cat_by_name(), since they are used by these commands.
Fix a style nit in the tests also.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add a command to output a log record
Simon Glass [Thu, 28 Dec 2017 20:14:20 +0000 (13:14 -0700)]
log: Add a command to output a log record

Add a 'log rec' command which allows a log record to be manually output.
This is useful for scripts which want full control over what is logged. It
also permits easy testing of the log system.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add a command to control the log output format
Simon Glass [Thu, 28 Dec 2017 20:14:19 +0000 (13:14 -0700)]
log: Add a command to control the log output format

Add a 'log format' command which can display or change the log output
format. This is useful for changing how much information is displayed. The
ordering of the fields is fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Update log_console to honour the log format
Simon Glass [Thu, 28 Dec 2017 20:14:18 +0000 (13:14 -0700)]
log: Update log_console to honour the log format

At present this just outputs the message. Update it to output whatever the
format requests.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add control over log formatting
Simon Glass [Thu, 28 Dec 2017 20:14:17 +0000 (13:14 -0700)]
log: Add control over log formatting

It is useful to be able to control the output format of log records on the
console. As a starting point, add definitions for controlling which
elements of the log record are displayed. Use function and message as the
default, since these are the most useful fields.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agolog: Add functions to convert IDs to/from names
Simon Glass [Thu, 28 Dec 2017 20:14:16 +0000 (13:14 -0700)]
log: Add functions to convert IDs to/from names

Category and level both use an enum for their ID values. Add functions to
convert these IDs to strings and vice versa. This will allow the log to
output the strings instead of the (inscrutable) values.

At the same time, add a new 'driver-model' category, to cover core
driver-model functions and fix an incorrect value for LOGL_MAX.

Tests will be added with the new 'log' subcommands.

Signed-off-by: Simon Glass <sjg@chromium.org>
(Updated to correct clang warnings)

6 years agodm: core: Add a function to look up a uclass by name
Simon Glass [Thu, 28 Dec 2017 20:14:15 +0000 (13:14 -0700)]
dm: core: Add a function to look up a uclass by name

Each uclass has a driver name which we can use to look up the uclass. This
is useful for logging, where the uclass ID is used as the category.

Add a function to handle this, as well as a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoKconfig: usb: rockchip: Remove not needed *_defconfig USB/gadget entries
Lukasz Majewski [Mon, 29 Jan 2018 18:33:32 +0000 (19:33 +0100)]
Kconfig: usb: rockchip: Remove not needed *_defconfig USB/gadget entries

After moving some USB gadget configs (USB_FUNCTIONS_*) to Kconfig it
turned out that following *_defconfig entries for RockChip are not
needed.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agousb: ums: Kconfig: Select USB_FUNCTION_MASS_STORAGE when enabling 'ums' command
Lukasz Majewski [Mon, 29 Jan 2018 18:28:02 +0000 (19:28 +0100)]
usb: ums: Kconfig: Select USB_FUNCTION_MASS_STORAGE when enabling 'ums' command

The CONFIG_USB_FUNCTION_MASS_STORAGE must be selected when one enables
support for ums command.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoKconfig: gadget: Move CONFIG_USB_FUNCTION_MASS_STORAGE to Kconfig
Lukasz Majewski [Mon, 29 Jan 2018 18:25:54 +0000 (19:25 +0100)]
Kconfig: gadget: Move CONFIG_USB_FUNCTION_MASS_STORAGE to Kconfig

This commit moves USB_FUNCTION_MASS_STORAGE config to Kconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoKconfig: gadget: Move CONFIG_USB_FUNCTION_THOR to Kconfig
Lukasz Majewski [Mon, 29 Jan 2018 18:30:18 +0000 (19:30 +0100)]
Kconfig: gadget: Move CONFIG_USB_FUNCTION_THOR to Kconfig

This commit moves USB_FUNCTION_THOR config to Kconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoKconfig: usb: Sort USB_FUNCTION_* entries
Lukasz Majewski [Mon, 29 Jan 2018 18:21:39 +0000 (19:21 +0100)]
Kconfig: usb: Sort USB_FUNCTION_* entries

Lets provide alphabetical order for USB_FUNCTION_* entries of
USB_GADGET_DOWNLOAD

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agoenv: sf: use env_import_redund to simplify env_sf_load
Simon Goldschmidt [Wed, 31 Jan 2018 13:47:13 +0000 (14:47 +0100)]
env: sf: use env_import_redund to simplify env_sf_load

For the redundant environment configuration, env_sf_load still
contained duplicate code instead of using env_import_redund().

Simplify the code by only executing the load twice and delegating
everything else to env_import_redund.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: make env drivers propagate env_import return value
Simon Goldschmidt [Wed, 31 Jan 2018 13:47:12 +0000 (14:47 +0100)]
env: make env drivers propagate env_import return value

For multiple env drivers to correctly implement fallback when
one environment fails to load (e.g. crc error), the return value
of env_import has to be propagated by all env driver's load
function.

Without this change, the first driver that succeeds to load an
environment with an invalid CRC return 0 (success) and no other
drivers are checked.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: move more common code to env_import_redund
Simon Goldschmidt [Wed, 31 Jan 2018 13:47:11 +0000 (14:47 +0100)]
env: move more common code to env_import_redund

There is more common code in mmc, nand and ubi env drivers that
can be shared by moving to env_import_redund.

For this, a status/error value whether the buffers were loaded
are passed as additional parameters to env_import_redund.
Ideally, these are already returned to the env driver by the
storage driver. This is the case for mmc, nand and ubi, so for
this change, code deduplicated.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: make env_import(_redund) return 0 on success, not 1
Simon Goldschmidt [Wed, 31 Jan 2018 13:47:10 +0000 (14:47 +0100)]
env: make env_import(_redund) return 0 on success, not 1

env_import (and env_import_redund) currently return 1 on success
and 0 on error. However, they are only used from functions
returning 0 on success or a negative value on error.

Let's clean this up by making env_import and env_import_redund
return 0 on success and -EIO on error (as was the case for all
users before).

Users that cared for the return value are also updated. Funny
enough, this only affects onenand.c and sf.c

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agocmd: nvedit: env_get_f must check for env_get_char error codes
Simon Goldschmidt [Wed, 31 Jan 2018 06:56:48 +0000 (07:56 +0100)]
cmd: nvedit: env_get_f must check for env_get_char error codes

env_get_f calls env_get_char to load single characters from the
environment. However, the return value of env_get_char was not
checked for errors. Now if the env driver does not support the
.get_char call, env_get_f did not notice this and looped over the
whole size of the environment, calling env_get_char over 8000
times with the default settings, just to return an error in the
end.

Fix this by checking if env_get_char returns < 0.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Wed, 31 Jan 2018 23:44:31 +0000 (18:44 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agodavinci: Fix omapl138_lcdk builds
Tom Rini [Wed, 31 Jan 2018 20:34:49 +0000 (15:34 -0500)]
davinci: Fix omapl138_lcdk builds

The omapl138_lcdk platform is not a DA850 SoC so we need to select
SOC_DA8XX and not SOC_DA850, as it was before.  It does however point
out a bit of a misnomer in how all of these PLL defines are named as
they are generic to DA8xx, not DA850 centric.  Remove the 'if SOC_DA850'
under the defaults as these are simply the defaults.  As SOC_DA8XX will
select SYS_DA850_DDR_INIT when needed, we do not need it under both SOC
options.

Fixes: 76e22222d3aa ("Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig")
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblaze
Tom Rini [Wed, 31 Jan 2018 12:10:55 +0000 (07:10 -0500)]
Merge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblaze

Xilinx changes for v2018.03

- Several Kconfig fixes (also moving configs to defconfigs)
- Some DTS updates
- ZynqMP psu rework based on Zynq concept
- Add low level initialization for zc770 and zcu102
- Add support for Zynq zc770 x16 nand configuration
- Add mini nand/emmc ZynqMP targets
- Some arasan nand changes

6 years agoConvert CONFIG_SYS_OMAP24_I2C_SLAVE et al to Kconfig
Adam Ford [Wed, 24 Jan 2018 21:21:21 +0000 (15:21 -0600)]
Convert CONFIG_SYS_OMAP24_I2C_SLAVE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_OMAP24_I2C_SLAVE
   CONFIG_SYS_OMAP24_I2C_SPEED

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
6 years agoConvert CONFIG_SYS_DV_CLKMODE et al to Kconfig
Adam Ford [Tue, 23 Jan 2018 10:04:28 +0000 (04:04 -0600)]
Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_DV_CLKMODE
   CONFIG_SYS_DA850_PLL0_POSTDIV
   CONFIG_SYS_DA850_PLL0_PLLDIV1
   CONFIG_SYS_DA850_PLL0_PLLDIV2
   CONFIG_SYS_DA850_PLL0_PLLDIV3
   CONFIG_SYS_DA850_PLL0_PLLDIV4
   CONFIG_SYS_DA850_PLL0_PLLDIV5
   CONFIG_SYS_DA850_PLL0_PLLDIV6
   CONFIG_SYS_DA850_PLL0_PLLDIV7
   CONFIG_SYS_DA850_PLL1_POSTDIV
   CONFIG_SYS_DA850_PLL1_PLLDIV1
   CONFIG_SYS_DA850_PLL1_PLLDIV2
   CONFIG_SYS_DA850_PLL1_PLLDIV3

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to Kconfig
Derald D. Woods [Mon, 22 Jan 2018 23:17:10 +0000 (17:17 -0600)]
Convert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to Kconfig

This converts the following to Kconfig:
CONFIG_SYS_BOOT_GET_CMDLINE
CONFIG_SYS_BOOT_GET_KBD

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoarmv8: ls2088ardb: Add 3DS RDIMM support
York Sun [Mon, 29 Jan 2018 17:44:40 +0000 (09:44 -0800)]
armv8: ls2088ardb: Add 3DS RDIMM support

Tested with MTA72ASS8G72PSZ-2S6G1. This is 3DS RDIMM module with x4
DDR chips. LS2088ARDB needs to be modified to connect all DQS signals.
Some of them are grounded by default for x8 chips. Tested with RDIMM
MTA18ASF2G72PDZ on main memory controllers. DP-DDR doesn't support
RDIMM. Dropped related timing table.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1046ardb: Add RDIMM support
York Sun [Mon, 29 Jan 2018 17:44:39 +0000 (09:44 -0800)]
armv8: ls1046ardb: Add RDIMM support

This adds 2Rx8 RDIMM on LS1046ARDB board. Tested with RDIMM
MTA18ASF2G72PDZ and MTA9ASF1G72PZ.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Cleanup unused variable
York Sun [Mon, 29 Jan 2018 17:44:38 +0000 (09:44 -0800)]
drivers/ddr/fsl: Cleanup unused variable

Variable "row_density" is no longer used. Drop it from DIMM structure.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Modify binding registers to save time on data init
York Sun [Mon, 29 Jan 2018 17:44:37 +0000 (09:44 -0800)]
drivers/ddr/fsl: Modify binding registers to save time on data init

DDR controllers always use binding register to determine the memory
space to perform data initialization. In case of controller interleaving,
the space is doubled, resulting twice long wait. It wasn't too bad until
the memory capacity increases. To reduce the wait time, reduce the
binding space to half and restore it after data initialization.
Three-way interleaving is no longer used and is removed.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Add calculation of register control words
York Sun [Mon, 29 Jan 2018 18:24:08 +0000 (10:24 -0800)]
drivers/ddr/fsl: Add calculation of register control words

DDR4 RDIMM has some information in SPD to be used to calculate the
control words for register chip. The rest can be found from JEDEC
spec DDR4RCD02.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Add 3DS RDIMM support
York Sun [Mon, 29 Jan 2018 17:44:35 +0000 (09:44 -0800)]
drivers/ddr/fsl: Add 3DS RDIMM support

On top of RDIMM support, add new register calculation to support
3DS RDIMMs. Only symmetrical 3DS is supported at this time.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Fix workaround for A009803
York Sun [Mon, 29 Jan 2018 17:44:34 +0000 (09:44 -0800)]
drivers/ddr/fsl: Fix workaround for A009803

Wrong field was masked in this workaround due to wrong endianness. The
impacted SoCs have big-endian.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agodrivers/ddr/fsl: Fix DDR4 RDIMM support
York Sun [Mon, 29 Jan 2018 17:44:33 +0000 (09:44 -0800)]
drivers/ddr/fsl: Fix DDR4 RDIMM support

For DDR4, command/address delay in mode registers and parity latency
in timing config register are only needed for UDIMMs, but not RDIMMs.
Add additional register rcw_3 for DDR4 RDIMM. Fix mirrored bit for
dual rank RDIMMs. Set sdram_cfg_3[DIS_MRS_PAR] for RDIMMs. Fix
calculation of timing config registers. Use hexadecimal format for
printing RCW (register control word) registers.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1088a: Add CONFIG_SPI_FLASH_SPANSION to sdcard defconfigs
Ashish Kumar [Mon, 29 Jan 2018 06:41:20 +0000 (12:11 +0530)]
armv8: ls1088a: Add CONFIG_SPI_FLASH_SPANSION to sdcard defconfigs

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agodriver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl
Yogesh Gaur [Tue, 16 Jan 2018 04:38:24 +0000 (10:08 +0530)]
driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dpl

For for case of lazyapply method, API fdt_fixup_board_enet() gets
invoked before DPL being deployed. This leads to an issue that
fsl-mc fdt fixup status marked as fail and dprc driver didn't get
registered in linux boot.

Fixes this issue by calling fdt_fixup_board_enet() for case when
DPL is deployed successfully in lazyapply method.

Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Tue, 30 Jan 2018 15:09:01 +0000 (10:09 -0500)]
Merge git://git.denx.de/u-boot-x86

6 years agox86: kconfig: Remove meaningless 'select n'
Ulf Magnusson [Tue, 30 Jan 2018 12:59:03 +0000 (13:59 +0100)]
x86: kconfig: Remove meaningless 'select n'

'select n' selects a constant symbol, which is meaningless and has no
effect. Maybe this was meant to be a 'default n', though bool and
tristate symbols already implicitly default to n.

Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
which does more strict checking here:

kconfiglib.KconfigSyntaxError: board/google/Kconfig:34: Couldn't parse ' select n': expected nonconstant symbol

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: quark: Fix unused warnings
Tom Rini [Sat, 27 Jan 2018 20:13:47 +0000 (15:13 -0500)]
x86: quark: Fix unused warnings

The variable t_rfc is never used, so drop it.  The variables ddr_wctl
and ddr_wcmd are only used in certain manual instances, so guard their
declaration by the same check as their use.

Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
6 years agocmd/bdinfo: print relocation info on X86
Heinrich Schuchardt [Wed, 24 Jan 2018 18:52:29 +0000 (19:52 +0100)]
cmd/bdinfo: print relocation info on X86

For debugging U-Boot in qemu-x86 the relocation address is needed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: qemu: qfw: Implement acpi_get_rsdp_addr()
Bin Meng [Tue, 30 Jan 2018 13:01:17 +0000 (05:01 -0800)]
x86: qemu: qfw: Implement acpi_get_rsdp_addr()

U-Boot on QEMU does not build ACPI table by ourself, instead it uses
the prebuilt ACPI table via the qfw interface. This implements the
qfw version of acpi_get_rsdp_addr() for setup_zimage().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
6 years agox86: acpi: Use an API to get the ACPI RSDP table address
Bin Meng [Tue, 30 Jan 2018 13:01:16 +0000 (05:01 -0800)]
x86: acpi: Use an API to get the ACPI RSDP table address

At present the acpi_rsdp_addr variable is directly referenced in
setup_zimage(). This changes to use an API for better encapsulation
and extension.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
6 years agoarm64: zynqmp: Fix misspelled choice default
Ulf Magnusson [Tue, 30 Jan 2018 13:02:01 +0000 (14:02 +0100)]
arm64: zynqmp: Fix misspelled choice default

There is no JTAG symbol in the "Boot mode" choice. JTAG_MODE was
probably intended.

No functional changes. Kconfig choices fall back on using the first
(visible) symbol in the choice as the default if the default symbol is
not visible.

Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
which prints the following warning:

warning: the default selection JTAG (undefined) of <choice> (defined at arch/arm/cpu/armv8/zynqmp/Kconfig:107) is not contained in the choice

I've added a corresponding warning to the C tools too, which is
currently in linux-next: https://patchwork.kernel.org/patch/9983667/

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Moved ethernet PHY configs of ZynqMP boards to defconfig
Vipul Kumar [Wed, 24 Jan 2018 05:21:31 +0000 (10:51 +0530)]
arm64: zynqmp: Moved ethernet PHY configs of ZynqMP boards to defconfig

This patch moved ethernet PHY configs of ZynqMP boards
to respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomicroblaze: Moved ethernet PHY configs of Microblaze board to defconfig
Vipul Kumar [Wed, 24 Jan 2018 05:21:32 +0000 (10:51 +0530)]
microblaze: Moved ethernet PHY configs of Microblaze board to defconfig

This patch moved ethernet PHY configs of Microblaze board to
respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Moved ethernet PHY configs of Zynq boards to defconfig
Vipul Kumar [Wed, 24 Jan 2018 05:21:30 +0000 (10:51 +0530)]
arm: zynq: Moved ethernet PHY configs of Zynq boards to defconfig

This patch moved ethernet PHY configs of Zynq boards
to respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Remove ethernet alias for topic-miami
Michal Simek [Wed, 24 Jan 2018 08:37:30 +0000 (09:37 +0100)]
arm: zynq: Remove ethernet alias for topic-miami

Ethernet is not enabled that's why this alias should be completely
unused.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Mark cc108 uart to be initialized before relocation
Michal Simek [Wed, 17 Jan 2018 09:17:19 +0000 (10:17 +0100)]
arm: zynq: Mark cc108 uart to be initialized before relocation

The same change is done for others zynq boards to get uart as early as
possible.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Update years in copyright to reflect latest changes
Michal Simek [Wed, 17 Jan 2018 06:37:47 +0000 (07:37 +0100)]
arm: zynq: Update years in copyright to reflect latest changes

Updating year in zynq files. Also add missing Copyright to board.c.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add psu_init for zcu102-rev1.0
Michal Simek [Wed, 10 Jan 2018 13:48:53 +0000 (14:48 +0100)]
arm64: zynqmp: Add psu_init for zcu102-rev1.0

Add low level initialization for zcu102-rev1.0.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Prepare psu_init rework
Michal Simek [Wed, 10 Jan 2018 08:36:09 +0000 (09:36 +0100)]
arm64: zynqmp: Prepare psu_init rework

Move generic functions to common location psu_spl_init.c. Function
declarations are added to private header.
These changes are done in connection to the fact that still files from
HDF can be copied over and compilation should pass.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Call psu_init() only when ZYNQMP_PSU_INIT_ENABLED
Michal Simek [Mon, 15 Jan 2018 11:52:59 +0000 (12:52 +0100)]
arm64: zynqmp: Call psu_init() only when ZYNQMP_PSU_INIT_ENABLED

Remove SPL_BUILD dependency from zynqmp.c and move it to header file.
Use only one symbol for including psu_init.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove unused empty functions
Michal Simek [Tue, 9 Jan 2018 13:25:38 +0000 (14:25 +0100)]
arm64: zynqmp: Remove unused empty functions

Remove functions which are no longer renerated by PCW.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: arasan: Select CONFIG_SYS_NAND_SELF_INIT
Ezequiel Garcia [Mon, 15 Jan 2018 15:48:12 +0000 (12:48 -0300)]
nand: arasan: Select CONFIG_SYS_NAND_SELF_INIT

The Arasan NFC driver requires the self-init mode,
so it should select it.

Instead of having the config header define the macro,
it's cleaner to select the option at the Kconfig level.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: arasan_nfc: Use the calculated ecc address for updating ecc register
Siva Durga Prasad Paladugu [Thu, 4 Jan 2018 10:34:22 +0000 (16:04 +0530)]
nand: arasan_nfc: Use the calculated ecc address for updating ecc register

This patch corrects the ecc address calculation before updating
to ecc register. The ecc address has to be calculated based on
page, oob and ecc sizes of the device.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: arasan_nfc: Add support for ondie ecc
Siva Durga Prasad Paladugu [Thu, 4 Jan 2018 10:34:21 +0000 (16:04 +0530)]
nand: arasan_nfc: Add support for ondie ecc

This patch adds support for ondie ecc. As of now
this adds support for micron parts which supports
ondie ecc.
Didn't found any better way to detect ondie ecc
support by a device except sorting out with
manufacture and device id's.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonand: arasan_nfc: Move common ecc struct initialization init routine
Siva Durga Prasad Paladugu [Thu, 4 Jan 2018 10:34:20 +0000 (16:04 +0530)]
nand: arasan_nfc: Move common ecc struct initialization init routine

Move common part of ecc structure initialization to
arasan_nand_init() routine.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoxilinx: zynqmp: Add new target with only emmc enabled
Siva Durga Prasad Paladugu [Fri, 5 Jan 2018 10:46:16 +0000 (16:16 +0530)]
xilinx: zynqmp: Add new target with only emmc enabled

This patch adds new target which is called as mini configuration
with only emmc functionality and other required basic features enabled.
This will be used to run in system with small footprint and needs
emmc support.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoxilinx: zynqmp: Add new target with only nand enabled
Siva Durga Prasad Paladugu [Fri, 5 Jan 2018 10:46:15 +0000 (16:16 +0530)]
xilinx: zynqmp: Add new target with only nand enabled

This patch adds new target which is called as mini configuration
with only nand functionality and other required basic features enabled.
This will be used to run in system with small footprint and needs
nand support.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Provide a config to not map DDR region in MMU table
Siva Durga Prasad Paladugu [Fri, 12 Jan 2018 10:05:46 +0000 (15:35 +0530)]
arm64: zynqmp: Provide a config to not map DDR region in MMU table

DDR less systems are possible for configuration like mini qspi
and making DDR region as normal memory may cause speculative
access which results u-boot hang if DDR is absent. So, this
patch fixes the issue by not making DDR memory region
entry into MMU table.

Future solution is to prepare MMU table per memory node in dts instead
of hard code DDR addresses.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Propagate error value from psu_init()
Michal Simek [Wed, 10 Jan 2018 10:48:48 +0000 (11:48 +0100)]
arm64: zynqmp: Propagate error value from psu_init()

psu_init() returns int which wasn't declared and checked.
The patch is fixing function declarations and code to handle return
values properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove whitespaces in psu_init() comment
Michal Simek [Tue, 9 Jan 2018 13:21:48 +0000 (14:21 +0100)]
arm64: zynqmp: Remove whitespaces in psu_init() comment

Remove additional spaces before comment.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Fix pmu register description coding style
Michal Simek [Wed, 16 Nov 2016 08:29:57 +0000 (09:29 +0100)]
arm: zynq: Fix pmu register description coding style

Drop the space before/after '<' and '>'; and
separate the entries to be a bit more readable.

Reported-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable distro defaults setting
Michal Simek [Tue, 9 Jan 2018 18:31:16 +0000 (19:31 +0100)]
arm: zynq: Enable distro defaults setting

BOOTCOMMAND is composed with distro_bootcmd but this variable is not
present. Enabling distro defaults setting is fixing it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Move bootcommand to defconfig
Michal Simek [Tue, 9 Jan 2018 16:41:37 +0000 (17:41 +0100)]
arm: zynq: Move bootcommand to defconfig

It will cleanup generic config and enable option to change it for every
board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable DM_GPIO when needed
Michal Simek [Tue, 9 Jan 2018 14:27:31 +0000 (15:27 +0100)]
arm: zynq: Enable DM_GPIO when needed

There are two reasons for doing this change.
There is still !DM driver for xilinx soft gpio IP and especially it is
saving some space for memory constrained boards like cse (almost ~400B).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable DM_ETH and DM_MMC only if subsystem is enabled
Michal Simek [Tue, 9 Jan 2018 13:49:28 +0000 (14:49 +0100)]
arm: zynq: Enable DM_ETH and DM_MMC only if subsystem is enabled

Do not enable DM_ETH/MMC if subsystems are not enabled.
This saves memory for memory constrained boards like cse.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable BLK when needed
Michal Simek [Tue, 9 Jan 2018 13:52:29 +0000 (14:52 +0100)]
arm: zynq: Enable BLK when needed

There is no reason to enable BLK by default for all boards which is just
increasing memory footprint for memory contrained boards like cse.
zc770s are also saving some space.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Disable networking for zc770 xm011
Michal Simek [Mon, 8 Jan 2018 15:43:59 +0000 (16:43 +0100)]
arm: zynq: Disable networking for zc770 xm011

Ethernet cable is not connected for xm011 that's why disable all
ethernet related configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable debug console for zc770 xm011
Michal Simek [Fri, 15 Dec 2017 06:46:12 +0000 (07:46 +0100)]
arm: zynq: Enable debug console for zc770 xm011

Wire debug console which is useful for early debugging.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add identification string to Xilinx boards
Michal Simek [Wed, 13 Dec 2017 09:35:06 +0000 (10:35 +0100)]
arm: zynq: Add identification string to Xilinx boards

It is good to see this string to make sure that u-boot which runs on the
board is the same which should run there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarmv8: zynqmp: Map PCIe High as device memory
Anders Hedlund [Tue, 19 Dec 2017 16:24:41 +0000 (17:24 +0100)]
armv8: zynqmp: Map PCIe High as device memory

Set the 8GB PCIe High area as device memory.
Also extend the DDR High area to cover the full 32GB range.

Signed-off-by: Anders Hedlund <anders.j.hedlund@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoxilinx: zynqmp: Use strlen only if env_get doesn't return null
Siva Durga Prasad Paladugu [Wed, 20 Dec 2017 11:05:06 +0000 (16:35 +0530)]
xilinx: zynqmp: Use strlen only if env_get doesn't return null

Add check if boot_targets exists in environment and then
generate new_targets env accordingly. Performing strlen on
null address causes it to fail with exception if isolation
is enabled with DDR address zero as secure. It works with out
isolation enabled as zero is valid address but it may lead to
junk values in boot_targets.
This patch fixes the issue by checking return value of env_get
so that it generate boot_targets properly.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: remove unused CONFIG_ZC770_XM01* options
Masahiro Yamada [Tue, 28 Nov 2017 06:58:46 +0000 (15:58 +0900)]
ARM: zynq: remove unused CONFIG_ZC770_XM01* options

These are defined, but not referenced at all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Fix types in ps7_spl_init
Michal Simek [Fri, 12 Jan 2018 13:24:50 +0000 (14:24 +0100)]
arm: zynq: Fix types in ps7_spl_init

The patch is fixing the following Warning:
arch/arm/mach-zynq/ps7_spl_init.c:133:24: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
    while (ioread(addr) < delay)
                        ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add support for zc770-xm011-x16 configuration
Michal Simek [Mon, 8 Jan 2018 15:52:49 +0000 (16:52 +0100)]
arm: zynq: Add support for zc770-xm011-x16 configuration

zc770-xm011 is x8 width configuration. This FMC card has also x16
variant which requires different ps7_init configuration. This patch adds
it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add zc770-xm013 spl configuration
Michal Simek [Fri, 12 Jan 2018 13:46:19 +0000 (14:46 +0100)]
arm: zynq: Add zc770-xm013 spl configuration

Simplify ps7_init* initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add zc770-xm012 spl configuration
Michal Simek [Fri, 12 Jan 2018 13:46:00 +0000 (14:46 +0100)]
arm: zynq: Add zc770-xm012 spl configuration

Simplify ps7_init* initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add zc770-xm011 spl configuration
Michal Simek [Fri, 12 Jan 2018 13:34:43 +0000 (14:34 +0100)]
arm: zynq: Add zc770-xm011 spl configuration

Simplify ps7_init* initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add zc770-xm010 spl configuration
Michal Simek [Fri, 12 Jan 2018 13:45:28 +0000 (14:45 +0100)]
arm: zynq: Add zc770-xm010 spl configuration

Simplify ps7_init* initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodoc: zynq: Describe status of zc770-xm011
Michal Simek [Mon, 15 Jan 2018 06:38:21 +0000 (07:38 +0100)]
doc: zynq: Describe status of zc770-xm011

zc770-xm011 is also added and supported. Reflect this in README.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agox86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters
Andy Shevchenko [Wed, 10 Jan 2018 17:40:15 +0000 (19:40 +0200)]
x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

New field acpi_rsdp_addr, which has been introduced in boot protocol
v2.14 [1], in boot parameters tells kernel the exact address of RDSP
ACPI table. Knowing it increases robustness of the kernel by avoiding
in some cases traversal through a part of physical memory.
It will slightly reduce boot time by the same reason.

[1] See Linux kernel commit

  2f74cbf ("x86/boot: Add the ACPI RSDP address to struct setup_header::acpi_rdsp_addr")
  @ https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=2f74cbf

for the details.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: updated the kernel commit git URL and fixed one style issue]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: zImage: Move subarch assignment out of cmd_line check
Andy Shevchenko [Wed, 10 Jan 2018 17:40:14 +0000 (19:40 +0200)]
x86: zImage: Move subarch assignment out of cmd_line check

The commit

  20bfac0599bd ("x86: zImage: add Intel MID platforms support")

introduced an assignment of subarch field in boot parameters, though
missed the right place of doing that. It doesn't matter if we have or
not a kernel command line supplied, we just set that field. Although
guard it by protocol version which supports it.

Fixes: 20bfac0599bd ("x86: zImage: add Intel MID platforms support")
Cc: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: Fix reference to QEMU variant of write_acpi_tables()
Andy Shevchenko [Wed, 10 Jan 2018 17:33:10 +0000 (19:33 +0200)]
x86: Fix reference to QEMU variant of write_acpi_tables()

The commit

  eece493a7ac1 ("cmd: qfw: bring ACPI generation code into qfw core")

moves ACPI related code to another file and missed an update of
references in acpi_table.c.

Do it now.

Fixes: eece493a7ac1 ("cmd: qfw: bring ACPI generation code into qfw core")
Cc: Miao Yan <yanmiaobest@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agox86: tangier: Make _CRS for BTH0 Serialized to avoid warning
Andy Shevchenko [Wed, 10 Jan 2018 16:07:26 +0000 (18:07 +0200)]
x86: tangier: Make _CRS for BTH0 Serialized to avoid warning

ASL compiler warns:

  ASL     board/intel/edison/dsdt.asl
  board/intel/edison/dsdt.asl.tmp    238:             Method (_CRS, 0, NotSerialized)
  Remark   2120 -      Control Method should be made Serialized ^  (due to creation of named objects within)

Do as suggested by ASL compiler.

Fixes: 5d8c4ebd95e2 ("x86: tangier: Add Bluetooth to ACPI table")
Reported-by: Ferry Toth <fntoth@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agoconfigs: x86: allow to override CONFIG_BOOTCOMMAND
Heinrich Schuchardt [Wed, 3 Jan 2018 15:23:46 +0000 (16:23 +0100)]
configs: x86: allow to override CONFIG_BOOTCOMMAND

Allow to override CONFIG_BOOTCOMMAND in .config.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agoPrepare v2018.03-rc1 v2018.03-rc1
Tom Rini [Tue, 30 Jan 2018 01:12:33 +0000 (20:12 -0500)]
Prepare v2018.03-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agospl: include timezone in banner
Klaus Goger [Thu, 4 Jan 2018 06:22:11 +0000 (07:22 +0100)]
spl: include timezone in banner

Include the timezone in the SPL banner so the timestamp matches with
that from u-boot proper.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoaes: Allow non-zero initialization vector
Андрей Мозжухин [Wed, 3 Jan 2018 12:43:56 +0000 (15:43 +0300)]
aes: Allow non-zero initialization vector

AES encryption in CBC mode, in most cases, must be used with random
initialization vector. Using the same key and initialization vector several
times is weak and must be avoided.

Added iv parameter to the aes_cbc_encrypt_blocks and aes_cbc_decrypt_blocks
functions for passing initialization vector.

Command 'aes' now also require the initialization vector parameter.

Signed-off-by: Andrey Mozzhuhin <amozzhuhin@yandex.ru>
6 years agokconfig: revert change that was not needed for -Wformat-security
Masahiro Yamada [Sun, 28 Jan 2018 09:41:23 +0000 (18:41 +0900)]
kconfig: revert change that was not needed for -Wformat-security

Recent GCC versions warn if the format string is not a literal
because the compiler cannot check the argument validity at compile
time.

Commit 192bc6948b02 ("Fix GCC format-security errors and convert
sprintfs.") blindly replaced sprintf() with strcpy(), including
many cases where the format parameter is a string literal.

For the kconfig change:

    sprintf(header, "   ");

..., here the format parameter is a string literal "   ", so it is
definitely equivalent to:

    strcpy(header, "   ");

Of course, if the 'header' did not have enough length for containing
"   ", it would be a security problem, but another problem.  (in this
case, the 'header' is 4 byte length buffer, so it is not a problem at
all.)

The kconfig code is kept as synced with Linux as possible, but this
change made the code out-of-sync for nothing.  Just reverting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agofs: btrfs: Fix printf format character warning
Tom Rini [Sat, 27 Jan 2018 22:23:21 +0000 (17:23 -0500)]
fs: btrfs: Fix printf format character warning

When printing a size_t value we need to use %zu for portability between
32bit and 64bit targets.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Behun <marek.behun@nic.cz>
6 years agomvpp2: Fix warning over 32bit vs 64bit targets
Tom Rini [Sat, 27 Jan 2018 19:48:08 +0000 (14:48 -0500)]
mvpp2: Fix warning over 32bit vs 64bit targets

When we have a driver that is used on both 32bit and 64bit targets and
we are talking about address space we cannot use u64 nor u32 and instead
need to use phys_addr_t.

Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue")
Cc: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoclk: clk_stm32: Add .set_rate callback
Patrice Chotard [Mon, 29 Jan 2018 17:14:14 +0000 (18:14 +0100)]
clk: clk_stm32: Add .set_rate callback

Since 'commit f4fcba5c5baa ("clk: implement clk_set_defaults()")'
STM32F4 family board can't boot.

Above patch calls clk_set_rate() for all nodes with assigned-clock-rates
property. Clock driver for STM32F family doesn't implement .set_rate
callback which make clk_set_defaults() exit on error and prevent board
to boot.

Fixes: f4fcba5c5baa ("clk: implement clk_set_defaults()")
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32: Fix stm32f746-disco boot
Patrice Chotard [Mon, 29 Jan 2018 12:44:20 +0000 (13:44 +0100)]
board: stm32: Fix stm32f746-disco boot

Since 'commit af2f44267 ("fdc spl: use different BOARD_INIT MACRO for spl and tpl")'
board stm32f746-disco can't boot.

The macro CONFIG_IS_ENABLED() can't evaluate the value of
CONFIG_SPL_BOARD_INIT as it was defined in include/configs/stm32f746-disco.h
without attributed value.

Moving CONFIG_SPL_BOARD_INIT from stm32f746-disco.h to mach-stm32/Kconfig
fixes this issue.

Fixes: af2f44267 ("fdc spl: use different BOARD_INIT MACRO for spl and tpl")
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: Make full device search optional
Alexander Graf [Mon, 29 Jan 2018 12:57:20 +0000 (13:57 +0100)]
serial: Make full device search optional

Commit 608b0c4ad4e5ec0c ("serial: Use next serial device if probing fails")
added code to search for more serial devices if the default one was not
probed correctly.

Unfortunately, that breaks omap3_evm. So while investigating why that is
the case, let's disable the full search for everyone but bcm283x where it
is needed.

Fixes: 608b0c4ad4e5ec0c ("serial: Use next serial device if probing fails")
Reported-by: Derald D. Woods <woods.technical@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Mon, 29 Jan 2018 13:17:28 +0000 (08:17 -0500)]
Merge git://git.denx.de/u-boot-marvell

6 years agoMerge git://git.denx.de/u-boot-cfi-flash
Tom Rini [Mon, 29 Jan 2018 13:17:13 +0000 (08:17 -0500)]
Merge git://git.denx.de/u-boot-cfi-flash

6 years agotools/mrvl_uart.sh: Tidy script output
Andreas Färber [Sat, 20 Jan 2018 12:18:39 +0000 (13:18 +0100)]
tools/mrvl_uart.sh: Tidy script output

Fix a typo in help output (awailable -> available).
Tidy the grammar - not the board connects to a port, we do.

While at it, be consistent in upper-casing the comments.

Fixes: eee4835d22 ("tools: Add Marvell recovery image download script")
Cc: Konstantin Porotchkin <kostap@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Igal Liberman <igall@marvell.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agotools/mrvl_uart.sh: Fix minicom baudrate
Andreas Färber [Sat, 20 Jan 2018 12:07:09 +0000 (13:07 +0100)]
tools/mrvl_uart.sh: Fix minicom baudrate

minicom doesn't inherit the baudrate from stty but uses its own
defaults, such as for example 57600, whereas we expect 115200 here.
Explicitly tell minicom which baudrate to use.

Fixes: eee4835d22 ("tools: Add Marvell recovery image download script")
Cc: Konstantin Porotchkin <kostap@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Igal Liberman <igall@marvell.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agocfi_flash: Always define cfi_flash_num_flash_banks
Mario Six [Fri, 26 Jan 2018 13:43:56 +0000 (14:43 +0100)]
cfi_flash: Always define cfi_flash_num_flash_banks

The variable cfi_flash_num_flash_banks is defined iff
CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used
unconditionally in the function cfi_flash_init_dm. This leads to a
undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT
is not defined, but DM is enabled.

Fix this by always defining the cfi_flash_num_flash_banks variable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>