]> git.ipfire.org Git - people/ms/u-boot.git/log
people/ms/u-boot.git
6 years agousbtty: fix typos
Heinrich Schuchardt [Thu, 12 Oct 2017 21:37:37 +0000 (23:37 +0200)] 
usbtty: fix typos

Fix typos in USB tty driver.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agotools: env: Add embedded.c to .gitignore
Bin Meng [Thu, 12 Oct 2017 03:15:04 +0000 (20:15 -0700)] 
tools: env: Add embedded.c to .gitignore

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
6 years agocmd/pxe.c: Rework bootargs construction to clarify string checks
Tom Rini [Wed, 11 Oct 2017 19:34:33 +0000 (15:34 -0400)] 
cmd/pxe.c: Rework bootargs construction to clarify string checks

As the code currently stands, we first check that the length of the
given command line, along with ip_str/mac_str along with an additional 1
for the NULL termination will fit within the buffer we have, and if not,
we return an error.  The way this code was originally written however
left Coverity "unhappy" due to using strcat rather than strncat.
Switching this to strncat however causes clang to be unhappy that we
aren't enforcing the "1" portion within strncat.  Rather than further
re-work the code to include a "- 1" in this case as well, make the
strcat code only be done within the else side of the length test.  This
keeps both clang and Coverity happy.

Fixes: 48ee0a87bc46 ("cmd/pxe.c: Rework initrd and bootargs handling slightly")
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agokbuild: fix dependency of DT build
Masahiro Yamada [Wed, 11 Oct 2017 14:56:10 +0000 (23:56 +0900)] 
kbuild: fix dependency of DT build

I saw a DT build issue report some time before [1].  I was able to
reproduce the bug, and figure out the root cause.

Since commit 6d427c6b1fa0 ("binman: Automatically include a U-Boot
.dtsi file"), invalid .*.cmd files are generated.

Since that commit, DTS files are put into sed and piped to CPP.
Because CPP reads the stream from stdin, -Wp,-MD,$(depfile).pre.tmp
option generates a depfile with the target name "-".  This is not
the format expected by fixdep.

Use one more temporary file instead of using pipe.  With this, deps_
in the .*.cmd will be fixed.  Having a temp file name in source_ is
odd, but it is unsed in the build system.  Not a big deal.

[1] https://lists.denx.de/pipermail/u-boot/2017-June/294451.html

Fiexes: 6d427c6b1fa0 ("binman: Automatically include a U-Boot .dtsi file")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agocommon: Remove genimg_get_image()
Tuomas Tynkkynen [Tue, 10 Oct 2017 18:59:43 +0000 (21:59 +0300)] 
common: Remove genimg_get_image()

Removal of the legacy DataFlash code turned genimg_get_image() into a
no-op. Drop all calls to it and the function itself.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoDrop CONFIG_HAS_DATAFLASH
Tuomas Tynkkynen [Tue, 10 Oct 2017 18:59:42 +0000 (21:59 +0300)] 
Drop CONFIG_HAS_DATAFLASH

Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agospi: Drop CONFIG_ATMEL_DATAFLASH_SPI
Tuomas Tynkkynen [Tue, 10 Oct 2017 18:59:41 +0000 (21:59 +0300)] 
spi: Drop CONFIG_ATMEL_DATAFLASH_SPI

Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
6 years agoenv: Drop CONFIG_ENV_IS_IN_DATAFLASH
Tuomas Tynkkynen [Tue, 10 Oct 2017 18:59:40 +0000 (21:59 +0300)] 
env: Drop CONFIG_ENV_IS_IN_DATAFLASH

Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agofs/jffs2/mini_inflate.c: use "static inline" instead of "inline"
Vagrant Cascadian [Tue, 10 Oct 2017 16:42:39 +0000 (09:42 -0700)] 
fs/jffs2/mini_inflate.c: use "static inline" instead of "inline"

This makes gcc no longer expect an out-of-line version of the
functions being present elsewhere.

This fixes a failure to build on several marvell targets with gcc-7 on
Debian:

  https://bugs.debian.org/877963

Signed-off-by: Adrian Bunk <bunk@debian.org>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
6 years agojffs2: ECC corrected nand data is ignored
Engling, Uwe [Tue, 10 Oct 2017 14:20:55 +0000 (14:20 +0000)] 
jffs2: ECC corrected nand data is ignored

Hello,

I ran into a problem with the JFFS2 filesystem driver implemented in U-Boot.

I've got a NAND device that has correctable ECC errors (corrected somewhere in mtd/nand/nand_base.c).
The NAND driver tells the filesystem layer (jffs2_1pass.c) above that there occurred correctable ECC errors and returns with a "value > 0".
The JFFS2 driver recognizes the corrected ECC errors as real error and skips this block because the only accepts a "return value == 0" as correct.

This problem exists for over 8 years (I checked version 2010.09) so I'm a little bit worried that I interpreted something wrong or didn't get the whole context.

Can someone confirm this bug (and the bugfix) in the u-boot jffs2 driver?

There was a mail in 2012 that mentioned the same problem, but there was no patch:
http://u-boot.10912.n7.nabble.com/JFFS2-seems-to-drop-nand-data-with-ECC-corrections-td142008.html
Sometime after this discussion the return value of nand_read() changed from -EUCLEAN as correctable ECC error to a positive value with the count of ECC corrected errors.

With kind reguards,
Uwe Engling

6 years agoARM: Add documentation for the qemu-arm board
Tuomas Tynkkynen [Mon, 9 Oct 2017 16:42:41 +0000 (19:42 +0300)] 
ARM: Add documentation for the qemu-arm board

Add brief documentation for the recently merged qemu-arm board.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agommc: stm32_sdmmc2: increase polling status register delay
Christophe Kerello [Mon, 9 Oct 2017 15:02:28 +0000 (17:02 +0200)] 
mmc: stm32_sdmmc2: increase polling status register delay

MMC commands like MMC_CMD_ALL_SEND_CID or MMC_CMD_SEND_CSD can reach
500 us. This patch increases the polling status register delay to avoid
a timeout on a command.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agodm: clk: fix PWR_CR3 register's bit 2 name
Patrice Chotard [Mon, 9 Oct 2017 09:41:24 +0000 (11:41 +0200)] 
dm: clk: fix PWR_CR3 register's bit 2 name

Fix bit 2 name of PWR_CR3 register to match with the
last STM32H7 reference manual available here :

http://www.st.com/content/st_com/en/support/resources/
resource-selector.html?querycriteria=productId=SS1951$$
resourceCategory=technical_literature$$resourceType=reference_manual

Update also comment about voltage scaling 1 values

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agodm: clk: remove CLK() macro for clk_stm32h7
Patrice Chotard [Mon, 9 Oct 2017 09:41:23 +0000 (11:41 +0200)] 
dm: clk: remove CLK() macro for clk_stm32h7

CLK() macro is a residue of a previously reworked patch,
remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoARM: tegra: Remove unused define CONFIG_ARMCORTEXA9
Tuomas Tynkkynen [Sun, 8 Oct 2017 19:44:05 +0000 (22:44 +0300)] 
ARM: tegra: Remove unused define CONFIG_ARMCORTEXA9

This macro isn't used by anything, and in fact hasn't ever been used
according to the Git logs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agofs: Set .opendir to fs_opendir_unsupported for btrfs
Marek Behún [Fri, 6 Oct 2017 14:56:07 +0000 (16:56 +0200)] 
fs: Set .opendir to fs_opendir_unsupported for btrfs

Otherwise fs_opendir will fault.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agofs: btrfs: Remove a foreign language note
Marek Behún [Fri, 6 Oct 2017 13:04:59 +0000 (15:04 +0200)] 
fs: btrfs: Remove a foreign language note

I accidentaly left a foreign language note in the code from development.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agofs: btrfs: Fix usage of uninitialized variables
Marek Behún [Fri, 6 Oct 2017 13:04:57 +0000 (15:04 +0200)] 
fs: btrfs: Fix usage of uninitialized variables

The variable res should be initialized to 0 in these functions,
because if the searched key is not found, the variable is used
uninitialized.

Reported-by: Coverity (CID: 167335)
Reported-by: Coverity (CID: 167336)
Reported-by: Coverity (CID: 167337)
Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agolinux/time.h: Remove dead code
Marek Behún [Fri, 6 Oct 2017 13:04:56 +0000 (15:04 +0200)] 
linux/time.h: Remove dead code

Since
  rem = ((long) *tim_p) % SECSPERDAY;
the second while cycle
  while (rem >= SECSPERDAY)
is dead.

Reported-by: Coverity (CID: 167334)
Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agoiso: Reduce verbosity on test and info calls
Alexander Graf [Fri, 6 Oct 2017 11:35:07 +0000 (13:35 +0200)] 
iso: Reduce verbosity on test and info calls

The test and info callbacks into the partition callback struct are
used by the "part list" command on the command line. That command
is used by the distro script.

With verb=1 set, "part list" thus throws a lot of warnings about
partitions it can't find when an upper layer searches for partitions.

So let's reduce verbosity to bring it to the same level of noise
as the other partition targets.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agofixdep: fix dependency on options surrounded by CONFIG_VAL()
Masahiro Yamada [Fri, 6 Oct 2017 01:24:43 +0000 (10:24 +0900)] 
fixdep: fix dependency on options surrounded by CONFIG_VAL()

CONFIG options surrounded by

  CONFIG_IS_ENABLED(...)
  CONFIG_IS_BUILTIN(...)
  CONFIG_IS_MODULE(...)
  CONFIG_VAL(...)

need special care for proper dependency tracking.

I do not remember why, but I missed to add CONFIG_VAL(...) handling.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agotools: bmp_logo: correctly interpret BMP files with larger headers
Jon Smith [Thu, 5 Oct 2017 12:35:02 +0000 (08:35 -0400)] 
tools: bmp_logo: correctly interpret BMP files with larger headers

All BMP files were being treated as though they had a 40 byte header.
There are several BMP header formats consisting of additional data.
This was causing some of the header to be read as color information,
skewing the color palette.

Signed-off-by: Jon Smith <jtsmith@pdiarm.com>
6 years agocommon: Add a prototype for s_init()
Diego Dorta [Thu, 5 Oct 2017 12:13:38 +0000 (09:13 -0300)] 
common: Add a prototype for s_init()

When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/soc.c:590:6: warning: no previous prototype for ‘s_init’ [-Wmissing-prototypes] void s_init(void)

Remove this warning by adding the function prototype into include/common.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agotools/mkimage: Fix DTC run command to handle file names with space
Mirza, Taimoor [Wed, 4 Oct 2017 15:28:03 +0000 (20:28 +0500)] 
tools/mkimage: Fix DTC run command to handle file names with space

fit_handle_file function does not quote input and output files while preparing
command to run DTC to convert .its to .itb. This results in a failure if input
or output files contain spaces in their names. Quote input and output files in
DTC command to avoid this failure.

Signed-off-by: Mirza, Taimoor <Taimoor_Mirza@mentor.com>
6 years agofdt: update bcm283x device tree sources to Linux 4.14 state
Alexander Graf [Wed, 4 Oct 2017 12:39:16 +0000 (14:39 +0200)] 
fdt: update bcm283x device tree sources to Linux 4.14 state

Upstream Linux has received a few device tree updates to the RPi
which we should propagate into the builtin U-Boot one as well to
gain hardware support.

This patch bumps the dts files to their 4.14 Linux counterparts
with the exception of sdhost on 32bit RPi versions. There we stay
with iproc as the sdhost driver is missing in U-Boot.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agopart_efi: In is_gpt_valid() check argument validity before allocation
Tom Rini [Tue, 3 Oct 2017 13:38:44 +0000 (09:38 -0400)] 
part_efi: In is_gpt_valid() check argument validity before allocation

While this goes somewhat against normal coding style we should ensure
that dev_desc is not NULL before we dereference it in allocation of
legacy_mbr.

Reported-by: Coverity (CID: 167292)
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoSPL: FIT: Kconfig: Change SPL_FIT_IMAGE_POST_PROCESS entry
ext-vasily.gurevich@vaisala.com [Mon, 2 Oct 2017 13:42:55 +0000 (13:42 +0000)] 
SPL: FIT: Kconfig: Change SPL_FIT_IMAGE_POST_PROCESS entry

Remove depends on TI_SECURE_DEVICE for other platforms.

Signed-off-by: Vasily Gurevich <ext-vasily.gurevich@vaisala.com>
6 years agoclk: uniphier: add NAND controller clock
Masahiro Yamada [Fri, 13 Oct 2017 17:21:19 +0000 (02:21 +0900)] 
clk: uniphier: add NAND controller clock

This allows the NAND driver to enable clock and get its clock rate.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: denali_dt: add clock support
Masahiro Yamada [Fri, 13 Oct 2017 17:21:18 +0000 (02:21 +0900)] 
mtd: nand: denali_dt: add clock support

Enable clock in the probe hook.  The clock rate will be necessary
when setup_data_interface hook is supported.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: adjust ifdefs for new UniPhier DWC3 CONFIG
Masahiro Yamada [Fri, 13 Oct 2017 17:21:17 +0000 (02:21 +0900)] 
ARM: uniphier: adjust ifdefs for new UniPhier DWC3 CONFIG

Now USB 3.0 feature is enabled/disabled by CONFIG_USB_DWC3_UNIPHIER.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: enable DWC3 xHCI driver
Masahiro Yamada [Fri, 13 Oct 2017 17:21:16 +0000 (02:21 +0900)] 
ARM: uniphier: enable DWC3 xHCI driver

Enable CONFIGs for the DWC3 core and the UniPhier specific glue layer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: change the default of SoC select to UNIPHIER_V7_MULTI
Masahiro Yamada [Fri, 13 Oct 2017 10:22:09 +0000 (19:22 +0900)] 
ARM: uniphier: change the default of SoC select to UNIPHIER_V7_MULTI

ARCH_UNIPHIER_V8_MULTI depends on !SPL, so the default may be hidden.
Use a clearer default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoreset: uniphier: fix the first argument passed to dev_err()
Masahiro Yamada [Fri, 13 Oct 2017 10:22:02 +0000 (19:22 +0900)] 
reset: uniphier: fix the first argument passed to dev_err()

priv->dev does not exist.  Pass the correct pointer to udevice.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoclk: uniphier: add PXs3 clock data
Masahiro Yamada [Fri, 13 Oct 2017 10:22:00 +0000 (19:22 +0900)] 
clk: uniphier: add PXs3 clock data

Add basic clock data for Socionext's new SoC PXs3.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoclk: uniphier: rework for better clock tree structure
Masahiro Yamada [Fri, 13 Oct 2017 10:21:59 +0000 (19:21 +0900)] 
clk: uniphier: rework for better clock tree structure

U-Boot does not support fancy clock tree structures like the Linux
common clock framework.  Implement a simple clock tree model at the
driver level.  With this, the clock data will be simplified.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoi2c: uniphier-f: replace debug() with dev_dbg()
Masahiro Yamada [Fri, 13 Oct 2017 10:21:58 +0000 (19:21 +0900)] 
i2c: uniphier-f: replace debug() with dev_dbg()

Use dev_dbg() functions.  It will be helpful to prefix log messages
with the corresponding device name when the core framework is ready.

While I am here, I renamed "dev", which was actually private data,
into "priv" because dev->dev looks confusing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoi2c: uniphier: replace debug() with dev_dbg()
Masahiro Yamada [Fri, 13 Oct 2017 10:21:57 +0000 (19:21 +0900)] 
i2c: uniphier: replace debug() with dev_dbg()

Use dev_dbg() functions.  It will be helpful to prefix log messages
with the corresponding device name when the core framework is ready.

While I am here, I renamed "dev", which was actually private data,
into "priv" because dev->dev looks confusing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agousb: dwc3-uniphier: replace <common.h> with <linux/bitops.h>
Masahiro Yamada [Fri, 13 Oct 2017 10:21:56 +0000 (19:21 +0900)] 
usb: dwc3-uniphier: replace <common.h> with <linux/bitops.h>

Including <common.h> pulls in a lot of bloat.  What this driver needs
is BIT(), so replace it with <linux/bitops.h>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Marek Vasut <marex@denx.de>
6 years agoARM: uniphier: use pr_() instead of printf() where appropriate
Masahiro Yamada [Fri, 13 Oct 2017 10:21:55 +0000 (19:21 +0900)] 
ARM: uniphier: use pr_() instead of printf() where appropriate

Replace printf() with pr_() to specify proper loglevel.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agopinctrl: uniphier: simplify input enable and delete pin arrays
Masahiro Yamada [Fri, 13 Oct 2017 10:21:54 +0000 (19:21 +0900)] 
pinctrl: uniphier: simplify input enable and delete pin arrays

The pin data are implemented for old SoCs to specify the bit shift of
the IECTRL register.  They are not wortwhile given the required memory
footprint.  Delete all the pin data and enable all bits of the IECTRL
register.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agopinctrl: uniphier: set PUPD_SIMPLE cap flag for PXs3
Masahiro Yamada [Fri, 13 Oct 2017 10:21:53 +0000 (19:21 +0900)] 
pinctrl: uniphier: set PUPD_SIMPLE cap flag for PXs3

Like other recenct UniPhier SoCs, the pupdctrl number of PXs3
matches to the pin number.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: update GPIO nodes
Masahiro Yamada [Fri, 13 Oct 2017 10:21:52 +0000 (19:21 +0900)] 
ARM: dts: uniphier: update GPIO nodes

Switch to the single node design.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agogpio: uniphier: rework single device node model
Masahiro Yamada [Fri, 13 Oct 2017 10:21:51 +0000 (19:21 +0900)] 
gpio: uniphier: rework single device node model

First, I implemented this driver as per-bank model, but it was
a design mistake.

  - There are 31 banks in the maximum case.  It is painful to add
    so many nodes to DT.

  - The IRQ control registers are shared between banks.  Per-bank
    design is a problem for Linux.  The counterpart for Linux turned
    around to the single node model.

Rework based on the driver for Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: switch to CONFIG_ENV_IS_NOWHERE
Masahiro Yamada [Fri, 13 Oct 2017 10:21:50 +0000 (19:21 +0900)] 
ARM: uniphier: switch to CONFIG_ENV_IS_NOWHERE

The non-volatile storage varies board by board.  The default should
be NOWHERE.  Please choose a proper device via Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)
Masahiro Yamada [Fri, 15 Sep 2017 12:44:59 +0000 (21:44 +0900)] 
mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)

Set Features (0xEF) command toggles the R/B# pin after 4 sub feature
parameters are written.

Currently, nand_command(_lp) calls chip->dev_ready immediately after
the address cycle because NAND_CMD_SET_FEATURES falls into default:
label.  No wait is needed at this point.

If you see nand_onfi_set_features(), R/B# is already cared by the
chip->waitfunc call.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[ Linux commit: c5d664aa5a4c4b257a54eb35045031630d105f49 ]

6 years agomtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)
Masahiro Yamada [Fri, 15 Sep 2017 12:44:58 +0000 (21:44 +0900)] 
mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)

Read ID (0x90) command does not toggle the R/B# pin.  Without this
patch, NAND_CMD_READID falls into the default: label, then R/B# is
checked by chip->dev_ready().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[ Linux commit: 3158fa0e739615769cc047d2428f30f4c3b6640e ]

6 years agomoveconfig: fix error message in do_autoconf()
Chris Packham [Sun, 27 Aug 2017 08:00:51 +0000 (20:00 +1200)] 
moveconfig: fix error message in do_autoconf()

Move the % arch outside the double quote so that the missing toolchain
message is displayed correctly.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoMerge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Tom Rini [Fri, 13 Oct 2017 13:53:58 +0000 (09:53 -0400)] 
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-10-13

This is the second batch of amazing improvements for efi_loader in 2017.11:

  - New self tests to verify our own code
  - A few bug fixes
  - colored text support
  - event and SNP improvements, should get us close to iPXE working

6 years agoefi_selftest: correctly check return values
Heinrich Schuchardt [Thu, 12 Oct 2017 23:00:05 +0000 (01:00 +0200)] 
efi_selftest: correctly check return values

When cancelling the timer we should check the return
value provided by the set_timer service.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Thu, 12 Oct 2017 17:36:58 +0000 (13:36 -0400)] 
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agoMerge git://www.denx.de/git/u-boot-imx
Tom Rini [Thu, 12 Oct 2017 17:36:37 +0000 (13:36 -0400)] 
Merge git://www.denx.de/git/u-boot-imx

6 years agoARM: imx6: Add DHCOM i.MX6 PDK board support
Marek Vasut [Mon, 9 Oct 2017 19:51:10 +0000 (21:51 +0200)] 
ARM: imx6: Add DHCOM i.MX6 PDK board support

Add support for the DHCOM i.MX6 PDK board. This board has:
- FEC ethernet
- EHCI USB host
- 3x SDMMC

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
6 years agoimx: mx7: spl: remove redundant SATA definitionas
Uri Mashiach [Tue, 10 Oct 2017 06:13:10 +0000 (09:13 +0300)] 
imx: mx7: spl: remove redundant SATA definitionas

The i.MX7 SOC doesn't include the SATA interface.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6: sys_proto: Add prototypes for imx6_pcie_toggle() functions
Diego Dorta [Thu, 5 Oct 2017 12:15:58 +0000 (09:15 -0300)] 
mx6: sys_proto: Add prototypes for imx6_pcie_toggle() functions

When compiling with W=1 errors are observed:

drivers/pci/pcie_imx.c:517:12: warning: no previous prototype for ‘imx6_pcie_toggle_power’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_power(void)

drivers/pci/pcie_imx.c:528:12: warning: no previous prototype for ‘imx6_pcie_toggle_reset’ [-Wmissing-prototypes] __weak int imx6_pcie_toggle_reset(void)

Remove these warnings by adding the functions prototypes on arch-mx6/sys_proto.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6: clock: Add a prototype for do_mx6_showclocks()
Diego Dorta [Thu, 5 Oct 2017 12:15:57 +0000 (09:15 -0300)] 
mx6: clock: Add a prototype for do_mx6_showclocks()

When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/clock.c:1268:5: warning: no previous prototype for ‘do_mx6_showclocks’ [-Wmissing-prototypes] int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])

Remove this warning by adding the function prototype into arch-mx6/clock.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agoi.mx6ul: xpress: update UART init for current board revision
Anatolij Gustschin [Mon, 2 Oct 2017 19:32:55 +0000 (21:32 +0200)] 
i.mx6ul: xpress: update UART init for current board revision

UART pinmux has been changed on the last board revision. Change
board pinmux accordingly. Console is on UART7 now, add pinmux,
base address and update console string in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agomx6slevk: Use PARTUUID to specify the rootfs location
Fabio Estevam [Mon, 2 Oct 2017 13:11:37 +0000 (10:11 -0300)] 
mx6slevk: Use PARTUUID to specify the rootfs location

mx6slevk can run different kernel versions, such as NXP 4.1 or mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the SD
card changes depending on the kernel version.

In order to avoid such issue, use the UUID method to specify the
rootfs location.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodrivers: pci: imx: fix imx_pcie_remove function
Sven-Ola Tuecke [Thu, 5 Oct 2017 11:46:42 +0000 (08:46 -0300)] 
drivers: pci: imx: fix imx_pcie_remove function

We have at least a minor count of boards, that failed to re-initialize
PCI express in the Linux kernel. Typical failure rate is 20% on affected
boards. This is mitigated by commit 6ecbe1375671 ("drivers: pci: imx:
add imx_pcie_remove function").

However, at least on some i.MX6 custom boards, when calling
assert_core_reset() as part of the first-time PCIe init, read access
to PCIE_PL_PFLR simply hangs. Surround this readl() with
imx_pcie_fix_dabt_handler() does not help. For this reason, the forced
LTSSM detection is only used on the second assert_core_reset() that is
called shorly before starting the Linux kernel.

Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: David Müller <d.mueller@elsoft.ch>
6 years agowandboard: Add support for the latest revd1 revision
Fabio Estevam [Mon, 2 Oct 2017 18:47:29 +0000 (15:47 -0300)] 
wandboard: Add support for the latest revd1 revision

Latest wandboard hardware revision is revd1, which brings the following
new features:

- PFUZE100 PMIC
- AR8035 Ethernet PHY
- Upgrade Wifi/BT chip to BCM4339/BCM43430.

The detection mechanism is to probe the PMIC and when it is
found, then the revision of the board is revd1.

As the detection is done via PMIC, we need to print the board version
at a later stage via CONFIG_DISPLAY_BOARDINFO_LATE and also need
to disable CONFIG_DISPLAY_BOARDINFO, which is done much earlier.

Make the necessary adjustments for the AR8035 PHY to work on revd1.

Based on Richard Hu's work from Technexion's U-Boot tree.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodoc: update imx_usb_loader URL
Stefan Agner [Tue, 3 Oct 2017 14:43:26 +0000 (16:43 +0200)] 
doc: update imx_usb_loader URL

The changes required to use U-Boot's Serial Download Protocol
implementation are now available in upstream imx_usb_loader
repository. Update the URL accordingly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: imx7d: add support for Compulab cl-som-imx7
Ilya Ledvich [Sun, 24 Sep 2017 06:00:25 +0000 (09:00 +0300)] 
arm: imx7d: add support for Compulab cl-som-imx7

Add initial support for Compulab cl-som-imx7 SoM.
The initial support includes:
 - MMC
 - eMMC
 - SPI flash
 - I2C
 - FEC
 - USB
 - Serial console

Signed-off-by: Ilya Ledvich <ilya@compulab.co.il>
6 years agoimx: mx7: SPL support for i.MX7
Uri Mashiach [Sun, 24 Sep 2017 06:00:24 +0000 (09:00 +0300)] 
imx: mx7: SPL support for i.MX7

Add configuration file and spl_boot_device function for the i.MX7 SPL.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
6 years agoimx: mx7: DDR controller configuration for the i.MX7 architecture
Uri Mashiach [Sun, 24 Sep 2017 06:00:23 +0000 (09:00 +0300)] 
imx: mx7: DDR controller configuration for the i.MX7 architecture

The configuration files imximage.cfg are used for the DDR controller
configuration.
Add DDR configuration function to replace the DDR controller
configuration in the imximage.cfg file. The function can be used for
DDR size detection.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
6 years agoimx: mx7: fix the CCM_ macros
Uri Mashiach [Sun, 24 Sep 2017 06:00:22 +0000 (09:00 +0300)] 
imx: mx7: fix the CCM_ macros

The CCM_ macros use the CCM_BASE_ADDRESS macro, which doesn't exist.
Replace the CCM_BASE_ADDRESS macros with CCM_BASE_ADDR.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
6 years agoicorem6_rqs: env: Return mmc devno
Jagan Teki [Thu, 28 Sep 2017 17:59:14 +0000 (23:29 +0530)] 
icorem6_rqs: env: Return mmc devno

Instead of changing mmc devno from dts nodes better
to return the detected devno so-that env trigger the same.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoicore: configs: Fix merge conflict issue
Jagan Teki [Thu, 28 Sep 2017 17:59:13 +0000 (23:29 +0530)] 
icore: configs: Fix merge conflict issue

Fix for finding mmc devices on i.MX6Q icore boards
added in below comment
"icorem6: Fix to find MMC devices"
(sha1: a2b137b38d925df91afef52f5122927de024f81a)

which is reverted in during u-boot-imx merge
" Merge git://git.denx.de/u-boot-imx"
(sha1: 6aee2ab68c362ace5a59f89a63abed82e0bf19e5)

This patch, is recreated to fix merge conflict.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agotopic_miami: Remove CONFIG_CMD_BOOTZ undef
Fabio Estevam [Thu, 28 Sep 2017 19:46:00 +0000 (16:46 -0300)] 
topic_miami: Remove CONFIG_CMD_BOOTZ undef

CONFIG_CMD_BOOTZ option has been converted to defconfig, so there
is no need to undefine it in board config file anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6sabresd: Include <usb/ehci-ci.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:40 +0000 (13:12 -0300)] 
mx6sabresd: Include <usb/ehci-ci.h> header file

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:586:5: warning: no previous prototype for ‘board_ehci_hcd_init’ [-Wmissing-prototypes] int board_ehci_hcd_init(int port)

Remove this warning by including <usb/ehci-ci.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agousb: ehci-ci: Add a prototype for board_ehci_power()
Diego Dorta [Wed, 27 Sep 2017 16:12:39 +0000 (13:12 -0300)] 
usb: ehci-ci: Add a prototype for board_ehci_power()

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:601:5: warning: no previous prototype for ‘board_ehci_power’ [-Wmissing-prototypes] int board_ehci_power(int port, int on)

Remove this warning by adding the function prototype into usb/ehci-ci.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6sabresd: Include <asm/mach-imx/spi.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:38 +0000 (13:12 -0300)] 
mx6sabresd: Include <asm/mach-imx/spi.h> header file

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:680:5: warning: no previous prototype for ‘board_spi_cs_gpio’ [-Wmissing-prototypes] int board_spi_cs_gpio(unsigned bus, unsigned cs)

Remove this warning by including <asm/mach-imx/spi.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx6: soc: Include <asm/bootm.h> header file
Diego Dorta [Wed, 27 Sep 2017 16:12:37 +0000 (13:12 -0300)] 
mx6: soc: Include <asm/bootm.h> header file

When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/soc.c:213:12: warning: no previous prototype for ‘get_board_rev’ [-Wmissing-prototypes] u32 __weak get_board_rev(void)

Fix the build warning by including <asm/bootm.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
6 years agomx7ulp_evk: Move CONFIG_CMD_BOOTZ to Kconfig
Fabio Estevam [Wed, 27 Sep 2017 18:00:41 +0000 (15:00 -0300)] 
mx7ulp_evk: Move CONFIG_CMD_BOOTZ to Kconfig

CONFIG_CMD_BOOTZ symbol does not work in board config file
anymore, so fix this by moving it to Kconfig.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 years agoimx: sys_proto: Add a prototype for board_mmc_get_env_dev()
Diego Dorta [Thu, 21 Sep 2017 18:10:03 +0000 (15:10 -0300)] 
imx: sys_proto: Add a prototype for board_mmc_get_env_dev()

When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:266:5: warning:
no previous prototype for ‘board_mmc_get_env_dev’
[-Wmissing-prototypes] int board_mmc_get_env_dev(int devno)

Remove this warning by adding the function prototype into sys_proto.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoimx: Include <input.h> header file
Diego Dorta [Fri, 22 Sep 2017 15:12:18 +0000 (12:12 -0300)] 
imx: Include <input.h> header file

When building with W=1 errors like the one below is seen:

board/freescale/mx6sabresd/mx6sabresd.c:546:5: warning:
no previous prototype for ‘overwrite_console’
[-Wmissing-prototypes] int overwrite_console(void)

Fix the build warnings by including <input.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6: toradex: Remove custom CONFIG_SPL_PAD_TO definition
Fabio Estevam [Mon, 25 Sep 2017 18:20:56 +0000 (15:20 -0300)] 
mx6: toradex: Remove custom CONFIG_SPL_PAD_TO definition

CONFIG_SPL_PAD_TO is already defined inside "imx6_spl.h", so there
is no need to redefine it in the board config files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
6 years agomx25pdk: Remove duplicated define
Otavio Salvador [Sat, 30 Sep 2017 01:55:00 +0000 (22:55 -0300)] 
mx25pdk: Remove duplicated define

The CONFIG_SYS_MMC_ENV_DEV is duplicated, drop it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6 years agomx25pdk: Use generic filesystem commands
Otavio Salvador [Sat, 30 Sep 2017 01:54:59 +0000 (22:54 -0300)] 
mx25pdk: Use generic filesystem commands

This rework the board to use the generic filesystem commands instead
of forcing the use of FAT for the boot files.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
6 years agoREADME.imx6: Prefer loading SPL via the new SDP mechanism
Fabio Estevam [Wed, 20 Sep 2017 14:21:49 +0000 (11:21 -0300)] 
README.imx6: Prefer loading SPL via the new SDP mechanism

Now that it is possible to load SPL and u-boot.img via imx_usb_loader
tool, mention this method instead of the old one that relied on ymodem.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx53loco: Let CONFIG_DISPLAY_CPUINFO be selected
Fabio Estevam [Tue, 19 Sep 2017 17:46:29 +0000 (14:46 -0300)] 
mx53loco: Let CONFIG_DISPLAY_CPUINFO be selected

With CONFIG_DISPLAY_CPUINFO=y we get a "Reset cause" line, which
brings important information of the reboot cause.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx6: disable clock command and print_cpuinfo code in SPL
Anatolij Gustschin [Mon, 28 Aug 2017 19:46:26 +0000 (21:46 +0200)] 
imx6: disable clock command and print_cpuinfo code in SPL

We do not use print_cpuinfo and clock command code in SPL,
disable it when building SPL image.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
6 years agocolibri_imx6: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:33 +0000 (23:45 -0300)] 
colibri_imx6: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoapalis_imx6: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:32 +0000 (23:45 -0300)] 
apalis_imx6: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6cuboxi: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:31 +0000 (23:45 -0300)] 
mx6cuboxi: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agowandboard: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:30 +0000 (23:45 -0300)] 
wandboard: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agocgtqmx6eval: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:29 +0000 (23:45 -0300)] 
cgtqmx6eval: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agomx6sabresd: Avoid calling setup_display() from SPL code
Fabio Estevam [Sat, 23 Sep 2017 02:45:28 +0000 (23:45 -0300)] 
mx6sabresd: Avoid calling setup_display() from SPL code

There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agoefi_loader: console support for color attributes
Rob Clark [Tue, 10 Oct 2017 12:23:01 +0000 (08:23 -0400)] 
efi_loader: console support for color attributes

Shell.efi uses this, and supporting color attributes makes things look
nicer.  Map the EFI fg/bg color attributes to ANSI escape sequences.
Not all colors have a perfect match, but spec just says "Devices
supporting a different number of text colors are required to emulate the
above colors to the best of the device’s capabilities".

Signed-off-by: Rob Clark <robdclark@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: Add mem-mapped for fallback
Rob Clark [Tue, 10 Oct 2017 12:23:06 +0000 (08:23 -0400)] 
efi_loader: Add mem-mapped for fallback

When we don't have a real device/image path, such as 'bootefi hello',
construct a mem-mapped device-path.

This fixes 'bootefi hello' after devicepath refactoring.

Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling")
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMerge git://git.denx.de/u-boot-i2c
Tom Rini [Wed, 11 Oct 2017 12:38:20 +0000 (08:38 -0400)] 
Merge git://git.denx.de/u-boot-i2c

6 years agoi2c: muxes: pca954x: look up width from chip_desc
Chris Packham [Thu, 28 Sep 2017 21:53:36 +0000 (10:53 +1300)] 
i2c: muxes: pca954x: look up width from chip_desc

Commit 8e6eda7cda6c ("drivers/i2c/muxes/pca954x: Add pca9547 I2C mux
support") introduced a chip_desc for the pca954x devices but failed to
update pca954x_ofdata_to_platdata() to be aware of it. Make
pca954x_ofdata_to_platdata() lookup the chip_desc to validate the device
width.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Marek Behun <marek.behun@nic.cz>
6 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 11 Oct 2017 00:14:38 +0000 (20:14 -0400)] 
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

6 years agoconfigs: Re-sync CONFIG_CMD_IMLS with moveconfig
Tuomas Tynkkynen [Sun, 8 Oct 2017 18:48:02 +0000 (21:48 +0300)] 
configs: Re-sync CONFIG_CMD_IMLS with moveconfig

The option is specified in Kconfig, but still a few config header files
are overriding the choice by #undef'ing it. Re-sync the option with
moveconfig to rid of the #undefs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agocmd: Toggle the default value of CONFIG_CMD_IMLS
Tuomas Tynkkynen [Sun, 8 Oct 2017 18:48:01 +0000 (21:48 +0300)] 
cmd: Toggle the default value of CONFIG_CMD_IMLS

Having this as a 'default y' is rather annoying because it doesn't
actually compile unless other options are defined in the board header:

../cmd/bootm.c: In function 'do_imls_nor':
../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {

Make it 'default n' so people who develop new boards that start from a
blank defconfig have one less compilation failure to debug.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoefi_loader: don't increment part twice per loop
Jonathan Gray [Tue, 10 Oct 2017 10:32:29 +0000 (21:32 +1100)] 
efi_loader: don't increment part twice per loop

Correct a mistake in the part number handling of commit
16a73b249d138fedeb188710533902ed7aac1ddc and only increment part once
per loop.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: MAX_UTF8_PER_UTF16 = 3
Heinrich Schuchardt [Mon, 9 Oct 2017 19:09:05 +0000 (21:09 +0200)] 
efi_loader: MAX_UTF8_PER_UTF16 = 3

The constant MAX_UTF8_PER_UTF16 is used to calculate
required memory when converting from UTF-16 to UTF-8.
If this constant is too big we waste memory.

A code point encoded by one UTF-16 symbol is converted to a
maximum of three UTF-8 symbols, e.g.

0xffff could be encoded as 0xef 0xbf 0xbf.
The first byte carries four bits, the second and third byte
carry six bits each.

A code point encoded by two UTF-16 symbols is converted to four
UTF-8 symbols.

So in this case we need a maximum of two UTF-8 symbols per
UTF-16 symbol.

As the overall maximum is three UTF-8 symobls per UTF-16 symbol
we need MAX_UTF8_PER_UTF16 = 3.

Fixes: 78178bb0c9d lib: add some utf16 handling helpers
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: search all possible disk partitions
Jonathan Gray [Tue, 10 Oct 2017 02:55:26 +0000 (13:55 +1100)] 
efi_loader: search all possible disk partitions

When searching for partitions don't stop if a partition is not present
for a given partition number as there may be valid partitions after.

Search for up to MAX_SEARCH_PARTITIONS matching the other callers of
part_get_info().

This allows OpenBSD to boot via the efi_loader on rpi_3 again after
changes made after U-Boot 2017.09.  With MBR partitioning OpenBSD will
by default use the fourth partition for the 0xA6 (OpenBSD) partition.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 10 Oct 2017 00:19:39 +0000 (20:19 -0400)] 
Merge git://git.denx.de/u-boot-dm

6 years agoARM: rmobile: dts: Add SDR104/HS200 to Salvator-X
Marek Vasut [Fri, 6 Oct 2017 12:08:00 +0000 (14:08 +0200)] 
ARM: rmobile: dts: Add SDR104/HS200 to Salvator-X

Add DT nodes to enable SDR104/HS200 modes on Salvator-X boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Fixup ULCB CPLD support after PFC rework
Marek Vasut [Wed, 4 Oct 2017 01:03:50 +0000 (03:03 +0200)] 
ARM: rmobile: Fixup ULCB CPLD support after PFC rework

The ULCB CPLD support was not updated during the PFC table rework,
fix up the GPIO numbers until the CPLD support is rewritten to a
proper DM capable and DT probing driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-video
Tom Rini [Mon, 9 Oct 2017 17:31:33 +0000 (13:31 -0400)] 
Merge git://git.denx.de/u-boot-video