oweals/u-boot.git
5 years agommc: sdhci-cadence: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:48:02 +0000 (02:48 +0000)]
mmc: sdhci-cadence: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: s5p: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:59 +0000 (02:47 +0000)]
mmc: s5p: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: pci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:56 +0000 (02:47 +0000)]
mmc: pci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: msm_sdhci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:53 +0000 (02:47 +0000)]
mmc: msm_sdhci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: bcm: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:50 +0000 (02:47 +0000)]
mmc: bcm: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Matthias Brugger <mbrugger@suse.com>
Cc: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: atmel_sdhci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:47 +0000 (02:47 +0000)]
mmc: atmel_sdhci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agotest/py: Fix MMC/SD block write test dependency
Michal Simek [Fri, 2 Aug 2019 04:48:44 +0000 (06:48 +0200)]
test/py: Fix MMC/SD block write test dependency

Test is using random command which has own Kconfig symbol CMD_RANDOM which
already depends on CMD_MEMORY. That's why replace cmd_memory by cmd_random.

Fixes: 09da18deab8b ("test/py: add MMC/SD block write test")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: zynq_sdhci: fix uninitialized pointer deref on probe
Matwey V. Kornilov [Thu, 1 Aug 2019 15:00:05 +0000 (18:00 +0300)]
mmc: zynq_sdhci: fix uninitialized pointer deref on probe

Since commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.

[this patch is based on commit 41a9fab8dac8 ("mmc: mv_sdhci: fix
uninitialized pointer deref on probe") by Baruch Siach]

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu102/zc706)
5 years agommc: Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected
Faiz Abbas [Thu, 1 Aug 2019 11:03:36 +0000 (16:33 +0530)]
mmc: Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected

Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected as is being
done for the U-boot case.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 8 Aug 2019 13:19:08 +0000 (09:19 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Remove unused bcm2835 watchdog driver (still non-DM)
- Cosmetic fixup of mtk_wdt.c

5 years agotest/py: avb: Move AVB test to android dir
Sam Protsenko [Tue, 2 Jul 2019 18:18:02 +0000 (21:18 +0300)]
test/py: avb: Move AVB test to android dir

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agoMerge branch '2019-08-07-master-imports'
Tom Rini [Thu, 8 Aug 2019 03:13:35 +0000 (23:13 -0400)]
Merge branch '2019-08-07-master-imports'

- Misc Android / AVB bugfixes (including updating the header from
  Android).
- MediaTek updates
- Other assorted bugfixes.

5 years agoUpdate include/android_image.h from AOSP
Alex Deymo [Mon, 5 Aug 2019 20:24:45 +0000 (22:24 +0200)]
Update include/android_image.h from AOSP

This takes the latest changes from AOSP from the file
include/bootimg/bootimg.h from the repository:
https://android.googlesource.com/platform/system/tools/mkbootimg
and update the U-Boot version with the latest changes.

This file keeps the changes from AOSP to a minimum:
 * Comments were converted from C++ to C style.
 * Code inside __cplusplus #ifdef blocks were removed.
 * C++11 struct extensions replaced with a single struct.

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agocommon: image-android-dt: Fix logic in print fdt info routine
Sam Protsenko [Mon, 5 Aug 2019 17:11:03 +0000 (20:11 +0300)]
common: image-android-dt: Fix logic in print fdt info routine

Do not attempt to print fdt info if root node wasn't found.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agofit: Do not automatically decompress ramdisk images
Julius Werner [Fri, 2 Aug 2019 22:52:28 +0000 (15:52 -0700)]
fit: Do not automatically decompress ramdisk images

The Linux ramdisk should always be decompressed by the kernel itself,
not by U-Boot. Therefore, the 'compression' node in the FIT image should
always be set to "none" for ramdisk images, since the only point of
using that node is if you want U-Boot to do the decompression itself.

Yet some systems populate the node to the compression algorithm used by
the kernel instead. This used to be ignored, but now that we support
decompression of all image types it becomes a problem. Since ramdisks
should never be decompressed by U-Boot anyway, this patch adds a special
exception for them to avoid these issues. Still, setting the
'compression' node like that is wrong in the first place, so we still
want to print out a warning so that third-party distributions doing this
can notice and fix it.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoconsole: execute flush on uart when silent is removed
Patrick Delaunay [Fri, 2 Aug 2019 12:58:10 +0000 (14:58 +0200)]
console: execute flush on uart when silent is removed

Avoid to flush buffer when silent console is activated as the
console can be reactivate later, after relocation, when the env will
be updated with the saved one.

Solve issue (missing beginning of U-Boot trace) when:
- CONFIG_SILENT_CONSOLE is activated
- silent=1 is defined in default environment (CONFIG_EXTRA_ENV_SETTINGS)
- silent is removed in saved environment with:
      > env delete silent; env save

Only functional when PRE_CONSOLE_BUFFER is activated.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoconsole: update silent tag after env load
Patrick Delaunay [Fri, 2 Aug 2019 12:58:09 +0000 (14:58 +0200)]
console: update silent tag after env load

Update the "silent" property with the variable "silent" get from
saved environment, it solves the issue when:
- CONFIG_SILENT_CONSOLE and CONFIG_SYS_CONSOLE_IS_IN_ENV are activated
- silent is not defined in default environment
- silent is requested in saved environment with:
  > env set silent 1; env save

On next reboot the console is not disabled as expected after relocation
and the environment load from flash (the callback is not called when
the INSERT is requested in the created hash table)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agocmd: avb: Fix compiler warnings
Sam Protsenko [Wed, 31 Jul 2019 16:59:09 +0000 (19:59 +0300)]
cmd: avb: Fix compiler warnings

When building U-Boot with AVB enabled, compiler shows next warnings:

    cmd/avb.c: In function 'do_avb_read_pvalue':
    cmd/avb.c:371:18: warning: format '%ld' expects argument of type
                      'long int', but argument 2 has type 'size_t'
                      {aka 'unsigned int'} [-Wformat=]
       printf("Read %ld bytes, value = %s\n", bytes_read,
                    ~~^                       ~~~~~~~~~~
                    %d

    cmd/avb.c: In function 'do_avb_write_pvalue':
    cmd/avb.c:404:19: warning: format '%ld' expects argument of type
                      'long int', but argument 2 has type '__kernel_size_t'
                      {aka 'unsigned int'} [-Wformat=]
       printf("Wrote %ld bytes\n", strlen(value) + 1);
                     ~~^           ~~~~~~~~~~~~~~~~~
                     %d

Fix those by using "%zu" specified.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
5 years agoavb: Fix build when CONFIG_OPTEE_TA_AVB is disabled
Sam Protsenko [Wed, 31 Jul 2019 16:59:08 +0000 (19:59 +0300)]
avb: Fix build when CONFIG_OPTEE_TA_AVB is disabled

When having only these AVB related configs enabled:

    CONFIG_AVB_VERIFY=y
    CONFIG_CMD_AVB=y
    CONFIG_LIBAVB=y

build fails with next errors:

    common/avb_verify.c: In function 'read_persistent_value':
    common/avb_verify.c:867:6: warning: implicit declaration of function
                                        'get_open_session'
    common/avb_verify.c:870:45: error: 'struct AvbOpsData' has no member
                                        named 'tee'
    common/avb_verify.c:894:7: warning: implicit declaration of function
                                        'invoke_func'
    common/avb_verify.c: In function 'write_persistent_value':
    common/avb_verify.c:931:45: error: 'struct AvbOpsData' has no member
                                       named 'tee'

Guard read_persistent_value() and write_persistent_value() functions
by checking if CONFIG_OPTEE_TA_AVB is enabled (as those are only used in
that case) to fix the build with mentioned configuration.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
5 years agopci_ep: Fix Coverity warning
Ramon Fried [Wed, 31 Jul 2019 08:04:26 +0000 (11:04 +0300)]
pci_ep: Fix Coverity warning

Fix the following Coverity warning:
CID 244086:  Incorrect expression  (BAD_COMPARE)
Comparing pointer "ep_bar" against NULL using anything besides == or
is likely to be incorrect.

Fixes: 914026d25848 ("drivers: pci_ep: Introduce UCLASS_PCI_EP uclass")

Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
5 years agoclk: MediaTek: add hifsys entry for MT7623 SoC.
Ryder Lee [Mon, 29 Jul 2019 14:17:48 +0000 (22:17 +0800)]
clk: MediaTek: add hifsys entry for MT7623 SoC.

This adds high speed interface subsystem - hifsys (i.e. PCIe and USB)
for MT7623 SoC and enables its reset controller.

The control block is shared with ethsys and accordingly rename the
related defines.

Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
5 years agoARM: dts: add hifsys reset for MediaTek SoCs
Ryder Lee [Mon, 29 Jul 2019 14:17:47 +0000 (22:17 +0800)]
ARM: dts: add hifsys reset for MediaTek SoCs

This adds missing hifsys reset parts in header files.

Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
5 years agoMAINTAINERS: MediaTek: add MediaTek team in the entry
Ryder Lee [Mon, 29 Jul 2019 14:17:46 +0000 (22:17 +0800)]
MAINTAINERS: MediaTek: add MediaTek team in the entry

Add MediaTek team as designated reviewer.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
5 years agoautoboot: fix bug using with CAAM and AUTOBOOT_ENCRYPTION
Heiko Schocher [Mon, 29 Jul 2019 05:23:19 +0000 (07:23 +0200)]
autoboot: fix bug using with CAAM and AUTOBOOT_ENCRYPTION

if  CONFIG_AUTOBOOT_KEYED, CONFIG_AUTOBOOT_ENCRYPTION and
CONFIG_AUTOBOOT_STOP_STR_SHA256 are enabled in conjunction
with CONFIG_SHA_HW_ACCEL and CONFIG_FSL_CAAM, we get the
Error when pressing a key while waiting for bootdelay:

Error: Address arguments are not aligned
CAAM was not setup properly or it is faulty

Reason is, that used variables are not cache aligned,
so malloc this variables cache aligned.

Probably this is also a bugfix for other hw accelerators
than CAAM.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agolog: document the assign() macro
Heinrich Schuchardt [Sat, 27 Jul 2019 18:21:06 +0000 (20:21 +0200)]
log: document the assign() macro

Provide a concise description of the assert() macro. Point out that the
tested expression is always executed, irrespective of the value of _DEBUG.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoarm: dts: change MT7629 to use spi-mem rather than qspi
Weijie Gao [Mon, 22 Jul 2019 02:35:10 +0000 (10:35 +0800)]
arm: dts: change MT7629 to use spi-mem rather than qspi

The original mtk_qspi driver has been removed. We change MT7629 to use
newly added mtk-spimem driver.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agowatchdog: mtk_wdt: Cosmetic cleanup of latest changes
Stefan Roese [Wed, 3 Jul 2019 05:22:20 +0000 (07:22 +0200)]
watchdog: mtk_wdt: Cosmetic cleanup of latest changes

This patch cleans up some coding style related issues in the mtk_wtd
driver to make this driver comply again with the U-Boot coding style
standards.

The only minimal functional change is that the timeout parameter is now
passed in (u64) instead of (unsigned int) from mtk_wdt_start() to
mtk_wdt_set_timeout(), preserving the original value.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Shannon Barber <sbarber@dataspeedinc.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
5 years agowatchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references
Stefan Roese [Fri, 10 May 2019 12:26:57 +0000 (14:26 +0200)]
watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references

The BCM2835/2836 watchdog is not used in mainline U-Boot at all. This
patch removes the driver and its references (CONFIG_BCM2835_WDT)
completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Paolo Pisati <p.pisati@gmail.com>
5 years agoMerge tag 'efi-2019-10-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 4 Aug 2019 23:39:54 +0000 (19:39 -0400)]
Merge tag 'efi-2019-10-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for v2019.10-rc2

With this pull request a workaround for GRUB on 32bit ARM is re-enabled
and made customizable. Without the patch booting on ARM 32bit with GRUB
prior to version 2.04 or with a cache which is not managed via CP15
fails.

Further work will be needed to achieve a UEFI compliant cache handling.
According to the UEFI spec all caches except those that cannot be
managed via CP15 should be enabled.

An implementation of the ConvertPointer() runtime service is provided.

efi_crt0 is always rebuild to avoid having to call 'make mrproper' when
switching architectures.

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-clk
Tom Rini [Fri, 2 Aug 2019 17:29:46 +0000 (13:29 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-clk

- Port more CCF code to work with i.MX8 devices.

5 years agogitlab-ci: Add qemu-riscv64 testing
Tom Rini [Fri, 2 Aug 2019 15:32:37 +0000 (11:32 -0400)]
gitlab-ci: Add qemu-riscv64 testing

Mirror the qemu-riscv64 testing we do on Travis.  Update to a newer
Docker image that contains riscv64-softmmu for QEMU.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agogitlab-ci: Remove unused TOOLCHAIN environment variable
Tom Rini [Fri, 2 Aug 2019 15:31:42 +0000 (11:31 -0400)]
gitlab-ci: Remove unused TOOLCHAIN environment variable

As part of copying the logic from Travis to GitLab I kept the TOOLCHAIN
variable.  However we don't use that now as the Docker container already
has all toolchains so we don't need to do any downloading.  Remove this
variable.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agotravis.yml: run Python tests on qemu-riscv64_defconfig
Heinrich Schuchardt [Thu, 18 Jul 2019 04:33:58 +0000 (06:33 +0200)]
travis.yml: run Python tests on qemu-riscv64_defconfig

Run the Python tests on the RISC-V architecture too.

https://github.com/swarren/uboot-test-hooks has already been updated.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge branch '2019-08-02-autoboot-cleanup'
Tom Rini [Fri, 2 Aug 2019 15:19:23 +0000 (11:19 -0400)]
Merge branch '2019-08-02-autoboot-cleanup'

- Merge Simon Glass's series to cleanup the autoboot code

5 years agoautoboot: Adjust the implementation in autoboot_command()
Simon Glass [Sun, 21 Jul 2019 02:51:28 +0000 (20:51 -0600)]
autoboot: Adjust the implementation in autoboot_command()

Avoid use of #ifdef and keep the common condion in a variable. This makes
the code easier to read.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Move a few more options from #ifdef to if()
Simon Glass [Sun, 21 Jul 2019 02:51:27 +0000 (20:51 -0600)]
autoboot: Move a few more options from #ifdef to if()

Adjust some of the code which can be trivially moved to use IS_ENABLED()
instead of #ifdef.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Add comments for menu_show()
Simon Glass [Sun, 21 Jul 2019 02:51:26 +0000 (20:51 -0600)]
autoboot: Add comments for menu_show()

Add comments for this function. Also remove the #ifdef around it so that
it can be called from 'if (IS_ENABLED(...))'.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoConvert CONFIG_AUTOBOOT_MENU_SHOW to Kconfig
Simon Glass [Sun, 21 Jul 2019 02:51:25 +0000 (20:51 -0600)]
Convert CONFIG_AUTOBOOT_MENU_SHOW to Kconfig

This converts the following to Kconfig:
   CONFIG_AUTOBOOT_MENU_SHOW

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOT
Simon Glass [Sun, 21 Jul 2019 02:51:24 +0000 (20:51 -0600)]
autoboot: Rename CONFIG_MENU_SHOW to include AUTOBOOT

Rename this option to CONFIG_AUTOBOOT_MENU_SHOW this it relates to the
autoboot functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Tidy up use of menukey
Simon Glass [Sun, 21 Jul 2019 02:51:23 +0000 (20:51 -0600)]
autoboot: Tidy up use of menukey

Move the variable to the top of the file and adjust the code which uses it
to use if() rather than #ifdef, to make it easier to read.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosnow: Define CONFIG_AUTOBOOT_MENUKEY
Simon Glass [Sun, 21 Jul 2019 02:51:22 +0000 (20:51 -0600)]
snow: Define CONFIG_AUTOBOOT_MENUKEY

This option is not used by any boards. To avoid needing to remove it as
dead code, add it to 'snow'.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY
Simon Glass [Sun, 21 Jul 2019 02:51:21 +0000 (20:51 -0600)]
autoboot: Rename CONFIG_MENUKEY to CONFIG_AUTOBOOT_MENUKEY

Since this is part of the autoboot functionality, it makes sense to name
it with an AUTOBOOT prefix. No mainline boards use it so this should be
safe, and downstream boards will need to adjust.

Since this option is just an integer value, it really needs another option
to control whether the feature is enabled or not. Add a new
CONFIG_USE_AUTOBOOT_MENUKEY for that. This fits better with how things are
done with Kconfig, avoiding the need to use a specific value to disable
the feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Drop unused CONFIG_MENUPROMPT
Simon Glass [Sun, 21 Jul 2019 02:51:20 +0000 (20:51 -0600)]
autoboot: Drop unused CONFIG_MENUPROMPT

This is not defined by any board. We could use CONFIG_AUTOBOOT_PROMPT
instead perhaps, but this depends on CONFIG_AUTOBOOT_KEYED which is not
used for the single-key case.

So let's just remove CONFIG_MENUPROMPT.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Drop #ifdef CONFIG_AUTOBOOT_KEYED
Simon Glass [Sun, 21 Jul 2019 02:51:19 +0000 (20:51 -0600)]
autoboot: Drop #ifdef CONFIG_AUTOBOOT_KEYED

At present we have two functions named __autoboot() which do different
things. This is confusing. Fix it by using if() instead of #ifdef for
selecting the functions, and renaming them to meaningful names.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Use if() for CONFIG_SILENT_CONSOLE
Simon Glass [Sun, 21 Jul 2019 02:51:18 +0000 (20:51 -0600)]
autoboot: Use if() for CONFIG_SILENT_CONSOLE

Avoid an #ifdef in this function, to improve readability.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Improve docs for CONFIG_AUTOBOOT_ENCRYPTION
Simon Glass [Sun, 21 Jul 2019 02:51:17 +0000 (20:51 -0600)]
autoboot: Improve docs for CONFIG_AUTOBOOT_ENCRYPTION

This option is not documented properly at present. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Drop #ifdef for CONFIG_AUTOBOOT_ENCRYPTION
Simon Glass [Sun, 21 Jul 2019 02:51:16 +0000 (20:51 -0600)]
autoboot: Drop #ifdef for CONFIG_AUTOBOOT_ENCRYPTION

Use if() instead for this option, renaming the two different
passwd_abort() functions to indicate their purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoautoboot: Use CONFIG_AUTOBOOT_STOP_STR_SHA256 indirectly
Simon Glass [Sun, 21 Jul 2019 02:51:15 +0000 (20:51 -0600)]
autoboot: Use CONFIG_AUTOBOOT_STOP_STR_SHA256 indirectly

This CONFIG option is only present if CONFIG_AUTOBOOT_ENCRYPTION is
enabled so it cannot be used in code without that #ifdef. But we want to
reduce the use of #ifdef in this file and in particular to avoid having
two different functions both named passwd_abort() but which do different
things.

In preparation for this, create an intermediate value which is set to an
empty string if there is no value for CONFIG_AUTOBOOT_STOP_STR_SHA256.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoConvert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig
Simon Glass [Sun, 21 Jul 2019 02:51:14 +0000 (20:51 -0600)]
Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig

This converts the following to Kconfig:
   CONFIG_USE_PREBOOT
   CONFIG_PREBOOT

Both are together in one commit, since otherwise the former causes kconfig
to define the latter, which gives duplicate symbol errors.

Includes a manual fixup for CONFIG_PREBOOT in ids8313_defconfig since the
backslash lands in the wrong place. Similarly with socfpga_vining_fpga.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoAdd CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOT
Simon Glass [Sun, 21 Jul 2019 02:51:13 +0000 (20:51 -0600)]
Add CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOT

In order to use CONFIG_PREBOOT with Kconfig, CONFIG_USE_PREBOOT must be
defined for each board. To prepare for conversion to Kconfig, add this.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoConvert CONFIG_SHOW_BOOT_PROGRESS to Kconfig
Simon Glass [Sun, 21 Jul 2019 02:51:12 +0000 (20:51 -0600)]
Convert CONFIG_SHOW_BOOT_PROGRESS to Kconfig

This converts the following to Kconfig:
   CONFIG_SHOW_BOOT_PROGRESS

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agomain: Use conditional run_preboot_environment_command()
Simon Glass [Sun, 21 Jul 2019 02:51:11 +0000 (20:51 -0600)]
main: Use conditional run_preboot_environment_command()

The function name indicates that it does something, but its entire
operation is actually condition on a CONFIG. Move the condition outside
the function so this is clearer, and use if() instead of #ifdef, like the
reset of the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoMerge tag 'u-boot-amlogic-20190731' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 31 Jul 2019 20:06:24 +0000 (16:06 -0400)]
Merge tag 'u-boot-amlogic-20190731' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- sync Amlogic G12A DT with linux 5.3-rc1
- add support for 4GiB DRAM memory
- add support for Amlogic G12B based Odroid-N2
- small duplicate logic fix for gxbb clock driver

5 years agoMerge branch '2019-07-31-ti-imports'
Tom Rini [Wed, 31 Jul 2019 18:20:55 +0000 (14:20 -0400)]
Merge branch '2019-07-31-ti-imports'

- Various DaVinci fixes
- Migrate am335x_boneblack_vboot to use more DM drivers
- Keystone updates

5 years agoRevert "ARM: davinci: da850: Manual pinmux only when PINCTRL not available"
Adam Ford [Wed, 31 Jul 2019 14:17:31 +0000 (09:17 -0500)]
Revert "ARM: davinci: da850: Manual pinmux only when PINCTRL not available"

This reverts commit 877ab2423bc257045a06bc23d4b9440b82bda6fb.

The above patch was designed to shrink code by only pin-muxing items
needed for SPL in SPL and relying on driver model or SPL to mux other
items.  Unfortunately, da850evm_direct_nor doesn't use SPL so items
that were only muxed during SPL are not muxed causing the board
to no longer boot.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agonand: davinci: avoid out of bounds array access
Heinrich Schuchardt [Tue, 30 Jul 2019 21:29:21 +0000 (23:29 +0200)]
nand: davinci: avoid out of bounds array access

The array bounds have to be checked before accessing the array element.

Identified by cppcheck.

Fixes: 67ac6ffaeefb ("mtd: nand: davinci: add opportunity to write keystone U-boot image")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoARM: da850-evm: Remove references to CONFIG_DA850_AM18X_EVM
Adam Ford [Tue, 30 Jul 2019 13:58:58 +0000 (08:58 -0500)]
ARM: da850-evm: Remove references to CONFIG_DA850_AM18X_EVM

With the removal of da850_am18xxevm, there is at least one
whitelisted CONFIG option that can be deleted.  This patch
removes CONFIG_DA850_AM18X_EVM since it's not required any more

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: dts: da850-evm: Fix MDIO pinmux
Adam Ford [Tue, 30 Jul 2019 13:32:37 +0000 (08:32 -0500)]
ARM: dts: da850-evm: Fix MDIO pinmux

In attempts to speed up SPL and reduce size, the MDIO pin muxing
was inadvertently affected.  Since the ethernet driver will setup
the pin muxing when ethernet is loaded, this patch will also
pinmux the MDIO pins at the same time.  Once an DM compatible
MDIO driver is available, this  can be removed.

Fixes: 877ab2423bc2 ("ARM: davinci: da850: Manual pinmux only
when PINCTRL not available")

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoconfigs: am335x_boneblack_vboot_defconfig: Add DM for SPI and Flash devices
Suniel Mahesh [Tue, 30 Jul 2019 07:55:21 +0000 (13:25 +0530)]
configs: am335x_boneblack_vboot_defconfig: Add DM for SPI and Flash devices

This patch adds SPI and SPI_FLASH DM support for verified boot on
TI AM335 chipsets. The following compile warning is removed:

===================== WARNING ======================
This board does not use CONFIG_DM_SPI_FLASH. Please update
the board to use CONFIG_SPI_FLASH before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

Built and tested on AM335x device (BeagleboneBlack).

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
5 years agoconfigs: am335x_boneblack_vboot_defconfig: Fix regression by enabling BLK and DM...
Suniel Mahesh [Tue, 30 Jul 2019 07:55:20 +0000 (13:25 +0530)]
configs: am335x_boneblack_vboot_defconfig: Fix regression by enabling BLK and DM support, disable in SPL

This patch adds BLK and DM support for verified boot on TI AM335x
chipsets. The following compile warnings are removed:

===================== WARNING ======================
This board does not use CONFIG_DM_MMC. Please update
the board to use CONFIG_DM_MMC before the v2019.04 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ======================
This board does not use CONFIG_DM_USB. Please update
the board to use CONFIG_DM_USB before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

BLK and DM_MMC are enabled by default in SPL as well, which is
making the build to break with an overflow(spl image doesn't
fit into SRAM because of size constraints).

  LD      spl/drivers/built-in.o
  LD      spl/u-boot-spl
arm-linux-ld.bfd: u-boot-spl section .u_boot_list will not fit in region .sram
arm-linux-ld.bfd: region .sram overflowed by 116 bytes
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

For the above reason BLK and DM_MMC is disabled in SPL.
Built and tested on AM335x device (BeagleboneBlack).

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
5 years agoconfigs: j721e_evm_a72: Disable K3_SYSTEM_CONTROLLER
Suman Anna [Mon, 29 Jul 2019 16:48:03 +0000 (11:48 -0500)]
configs: j721e_evm_a72: Disable K3_SYSTEM_CONTROLLER

The K3 System Controller driver is used for loading and starting
the System Firmware, and is used only on R5 SPL. It need not be
enabled and built for the A72 U-Boot and SPL, so disable it from
the j721e_evm_a72 defconfig.

While at this, also remove the unneeded CONFIG_SPL_REMOTEPROC and
CONFIG_CMD_REMOTEPROC as no remoteprocs are now loaded from A72 SPL.

Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoconfigs: am65x_evm_a53: Disable K3_SYSTEM_CONTROLLER
Suman Anna [Mon, 29 Jul 2019 16:48:02 +0000 (11:48 -0500)]
configs: am65x_evm_a53: Disable K3_SYSTEM_CONTROLLER

The K3 System Controller driver is used for loading and starting
the System Firmware, and is used only on R5 SPL. It need not be
enabled and built for the A53 U-Boot and SPL, so disable it from
both the GP and HS AM65x A53 defconfigs.

While at this, also remove the unneeded CONFIG_SPL_REMOTEPROC and
CONFIG_CMD_REMOTEPROC as no remoteprocs are now loaded from A53 SPL.

Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm: dts: k3-am654-base-board: Fix cpsw_nuss power-domains property
Suman Anna [Mon, 29 Jul 2019 16:13:41 +0000 (11:13 -0500)]
arm: dts: k3-am654-base-board: Fix cpsw_nuss power-domains property

The commit 355be915ed08 ("arm: dts: k3-am654: Update power-domains
property for each node") has updated the power-domain cells value
and updated power-domains property in various existing dts nodes but
missed updating the cpsw_nuss node. This results in the following
build warning, fix this.

arch/arm/dts/k3-am654-base-board.dtb: Warning (power_domains_property): /interconnect@100000/interconnect@28380000/cpsw_nuss@046000000:power-domains: property size (8) too small for cell size 2
arch/arm/dts/k3-am654-r5-base-board.dtb: Warning (power_domains_property): /interconnect@100000/interconnect@28380000/cpsw_nuss@046000000:power-domains: property size (8) too small for cell size 2

Fixes: 355be915ed08 ("arm: dts: k3-am654: Update power-domains property for each node")
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoARM: da850-evm: Replace CMD_SF with CMD_MTD
Adam Ford [Fri, 26 Jul 2019 23:31:13 +0000 (18:31 -0500)]
ARM: da850-evm: Replace CMD_SF with CMD_MTD

This patch enables MTD and CMD_MTD and it works with SPI NOR,
so the older CMD_SF can be removed.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: da850evm: Split MTDPARTS into SPL and u-boot
Adam Ford [Fri, 26 Jul 2019 22:53:45 +0000 (17:53 -0500)]
ARM: da850evm: Split MTDPARTS into SPL and u-boot

The MTDPARTS currently lists just u-boot.ais as 512k in size.
This works when loading the ais file via serial port, but if one
wanted to update just the u-boot portion, it's not really possible.
This patch splits the MTDPARTS into a 32k SPL partiion and a 480k
u-boot partition which allows u-boot.img to be burned to the u-boot
partition.  The remaining partitions are left with the same sizes
and offsets to not break backwards compatibility.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoconfigs: am57xx_evm_defconfig: Enable 'dtimg' command
Sam Protsenko [Thu, 25 Jul 2019 17:20:19 +0000 (20:20 +0300)]
configs: am57xx_evm_defconfig: Enable 'dtimg' command

We are going to implement DTBO partition for BeagleBoard X15 further. To
support this, 'dtimg' command must be enabled.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agoconfigs: am57xx_evm_defconfig: Enable 'bcb' command
Sam Protsenko [Thu, 25 Jul 2019 17:20:18 +0000 (20:20 +0300)]
configs: am57xx_evm_defconfig: Enable 'bcb' command

It is essential to have an access to BCB area of 'misc' partition on
Android devices [1]. For BeagleBoard X15 the 'bcb' command will be
further used for reboot reason implementation and booting to recovery.
It can be also used for debugging reasons, like checking RescueParty
messages in BCB area.

[1] doc/android/bcb.txt

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agoomap: Correct the fastboot product var
Sam Protsenko [Thu, 25 Jul 2019 17:11:53 +0000 (20:11 +0300)]
omap: Correct the fastboot product var

"fastboot flashall" expects "fastboot getvar product" value to be one of
values provided in android-info.txt file (in AOSP), from "require
board=" list. Before this patch, "am57xx" is returned for all AM57xx
based boards, as it's set in $board env var from SYS_BOARD in
board/ti/am57xx/Kconfig file, which is used for default implementation
of "fastboot getvar product".

In order to fix that inconsistency, let's do next:
  1. In U-Boot: override fastboot.product, reusing the value from
     $board_name
  2. In AOSP: provide values for all AM57xx boards we can use to
     device/ti/beagle_x15/board-info.txt file

This way requirements check in "fastboot flashall" will work as
expected, verifying that user tries to flash images to the board which
those images were built for.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Andrew F. Davis <afd@ti.com>
5 years agoenv: ti: boot: Handle reboot reason from BCB
Sam Protsenko [Thu, 25 Jul 2019 13:20:41 +0000 (16:20 +0300)]
env: ti: boot: Handle reboot reason from BCB

In case of Android boot, reboot reason can be written into BCB (usually
it's an area in 'misc' partition). U-Boot then can obtain that reboot
reason from BCB and handle it accordingly to achieve correct Android
boot flow, like it was suggested in [1]:
  - if it's empty: perform normal Android boot from eMMC
  - if it contains "bootonce-bootloader": get into fastboot mode
  - if it contains "boot-recovery": perform recovery boot

The latter is not implemented yet, as it depends on some features that
are not implemented on TI platforms yet (in AOSP and in U-Boot).

[1] https://marc.info/?l=u-boot&m=152508418909737&w=2

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agoMerge tag 'mmc-7-31' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Wed, 31 Jul 2019 12:34:35 +0000 (08:34 -0400)]
Merge tag 'mmc-7-31' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

A new mmc/sd block test case
Bug fixes for sdhci and mv_sdhci

5 years agoclk: meson: remove duplicate logic
Heinrich Schuchardt [Tue, 30 Jul 2019 21:03:43 +0000 (23:03 +0200)]
clk: meson: remove duplicate logic

First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
There is not need to check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoboard: amlogic: add support for Odroid-N2
Neil Armstrong [Mon, 22 Jul 2019 09:36:14 +0000 (11:36 +0200)]
board: amlogic: add support for Odroid-N2

ODROID-N2 is a single board computer manufactured by Hardkernel Co. Ltd
with the following specifications:

 - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC
 - 4GB DDR4 SDRAM
 - Gigabit Ethernet
 - HDMI 2.1 4K/60Hz display
 - 40-pin GPIO header
 - 4 x USB 3.0 Host, 1 x USB OTG
 - eMMC, microSD
 - Infrared receiver

The board directory is W400, the name of the Amlogic Reference Design
of Amlogic G12B with Gigabit boards, which will be used for similar
boards.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
5 years agoARM: meson-g12a: Handle 4GiB DRAM size
Neil Armstrong [Mon, 22 Jul 2019 09:32:50 +0000 (11:32 +0200)]
ARM: meson-g12a: Handle 4GiB DRAM size

When configured with 4GiB DRAM size, only 3.8GiB is available, the
I/O beeing mapped in the last 256MiB of the first 4GiB physical memory/

First fixup the mm_region to handle the first 3.8GiB as memory and the
last 256MiB as I/O.

Then limit the real memory reported by the firmware to the available
physical space, 3.8GiB aligned with the mm_region memory zone size.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
5 years agoARM: dts: add support for Odroid-N2
Neil Armstrong [Mon, 22 Jul 2019 09:27:59 +0000 (11:27 +0200)]
ARM: dts: add support for Odroid-N2

Import HardKernel Odroid-N2 DT from Linux 5.3-rc1, commit 5f9e832c1370
("Linus 5.3-rc1") based on an Amlogic G12B S922X SoC.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
5 years agoARM: dts: Sync Amlogic G12A with Linux 5.3-rc1
Neil Armstrong [Mon, 22 Jul 2019 08:06:11 +0000 (10:06 +0200)]
ARM: dts: Sync Amlogic G12A with Linux 5.3-rc1

Sync the Amlogic Meson G12A DT and Bindings file with the Linux 5.3-rc1
from the commit 5f9e832c1370 ("Linus 5.3-rc1").

Also remove the meson-g12a-u-boot.dtsi and meson-g12a-u200-u-boot.dtsi,
now conflicting with the main DT content.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
5 years agommc: relocate code comment
Baruch Siach [Mon, 22 Jul 2019 12:52:12 +0000 (15:52 +0300)]
mmc: relocate code comment

The comment about init op being NULL used to be next to the NULL check
code. Commit 8ca51e51c182 ("dm: mmc: Add a way to use driver model for
MMC operations") separated the comment from the code. Put them back
together.

Fixes: 8ca51e51c182 ("dm: mmc: Add a way to use driver model for MMC operations")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout
Weijie Gao [Fri, 19 Jul 2019 03:04:47 +0000 (11:04 +0800)]
mmc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout

When reading large data in once (reading 512MiB is tested on MT7623), a
watchdog timeout is triggered due to watchdog not being fed.

This patch adds WATCHDOG_RESET() to msdc_start_data() so the watchdog will
be fed every 1024 blocks are read/written.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agommc: sdhci: fix chip detect gpio property name
Baruch Siach [Mon, 22 Jul 2019 16:14:06 +0000 (19:14 +0300)]
mmc: sdhci: fix chip detect gpio property name

The standard property name for chip-detect gpio is "cd-gpios". All
in-tree DT files use only this name.

Fixes: 451931ea700 ("mmc: sdhci: Read cd-gpio from devicetree")
Cc: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agommc: mv_sdhci: fix uninitialized pointer deref on probe
Baruch Siach [Mon, 22 Jul 2019 15:55:35 +0000 (18:55 +0300)]
mmc: mv_sdhci: fix uninitialized pointer deref on probe

Since commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
5 years agotest/py: add MMC/SD block write test
Jean-Jacques Hiblot [Mon, 17 Jun 2019 15:49:21 +0000 (17:49 +0200)]
test/py: add MMC/SD block write test

Add a standalone MMC block write test. This allows direct testing of MMC
access rather than relying on doing so as a side-effect of e.g. DFU or
UMS testing, which may not be enabled on all platforms.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
5 years agotest: dm: clk_ccf: test composite clk
Peng Fan [Wed, 31 Jul 2019 07:02:05 +0000 (07:02 +0000)]
test: dm: clk_ccf: test composite clk

Test composite clk with dm ccf

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: sandbox: add composite clk
Peng Fan [Wed, 31 Jul 2019 07:02:02 +0000 (07:02 +0000)]
clk: sandbox: add composite clk

Add composite clk to sandbox driver

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoconfigs: sandbox: Enable composite clk
Peng Fan [Wed, 31 Jul 2019 07:02:00 +0000 (07:02 +0000)]
configs: sandbox: Enable composite clk

Enable composite clk for sandbox test

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: gate: support sandbox
Peng Fan [Wed, 31 Jul 2019 07:01:57 +0000 (07:01 +0000)]
clk: gate: support sandbox

Introduce io_gate_val for sandbox clk gate test usage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: add composite clk support
Peng Fan [Wed, 31 Jul 2019 07:01:54 +0000 (07:01 +0000)]
clk: add composite clk support

Import clk composite clk support from Linux Kernel 5.1-rc5

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk-provider: include clk-uclass.h
Peng Fan [Wed, 31 Jul 2019 07:01:52 +0000 (07:01 +0000)]
clk-provider: include clk-uclass.h

Because clk-provider use clk_ops, so let's include clk-uclass.h

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agodm: clk: ignore default settings when node not valid
Peng Fan [Wed, 31 Jul 2019 07:01:49 +0000 (07:01 +0000)]
dm: clk: ignore default settings when node not valid

When the device not binded with a node, we need ignore
the parents and rate settings.

Cc: Simon Glass <sjg@chromium.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: imx: gate2 add set rate
Peng Fan [Wed, 31 Jul 2019 07:01:45 +0000 (07:01 +0000)]
clk: imx: gate2 add set rate

Add set rate for imx clk-gate2

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: imx: import clk heplers
Peng Fan [Wed, 31 Jul 2019 07:01:42 +0000 (07:01 +0000)]
clk: imx: import clk heplers

Import some clk helpers from Linux Kernel for i.MX8MM usage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: fixed_rate: export clk_fixed_rate
Peng Fan [Wed, 31 Jul 2019 07:01:39 +0000 (07:01 +0000)]
clk: fixed_rate: export clk_fixed_rate

Export the structure for others to use.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: divider set rate supporrt
Peng Fan [Wed, 31 Jul 2019 07:01:37 +0000 (07:01 +0000)]
clk: divider set rate supporrt

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: add clk-gate support
Peng Fan [Wed, 31 Jul 2019 07:01:34 +0000 (07:01 +0000)]
clk: add clk-gate support

Import clk-gate support from Linux Kernel 5.1-rc5

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: export mux/divider ops
Peng Fan [Wed, 31 Jul 2019 07:01:31 +0000 (07:01 +0000)]
clk: export mux/divider ops

Export mux/divider ops and divider_recalc_rate for composite usage

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: mux: add set parent support
Peng Fan [Wed, 31 Jul 2019 07:01:28 +0000 (07:01 +0000)]
clk: mux: add set parent support

Add set parent support for clk mux

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: use clk_dev_binded
Peng Fan [Wed, 31 Jul 2019 07:01:26 +0000 (07:01 +0000)]
clk: use clk_dev_binded

Preparing to support composite clk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: introduce clk_dev_binded
Peng Fan [Wed, 31 Jul 2019 07:01:23 +0000 (07:01 +0000)]
clk: introduce clk_dev_binded

When support Clock Common Framework, U-Boot use dev for
clk tree information, there is no clk->parent. When
support composite clk, it contains mux/gate/divider,
but the mux/gate/divider is not binded with device.
So we could not use dev_get_uclass_priv to get the correct
clk_mux/gate/divider. So add clk_dev_binded to let
choose the correct method.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoMerge tag 'video-for-2019.10-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 30 Jul 2019 23:19:54 +0000 (19:19 -0400)]
Merge tag 'video-for-2019.10-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix EDID mode filtering
- extend mxc_ipuv3_fb to enable backlight/display
- include fb_base in global_data for DM_VIDEO
- show frame buffer address via board info
  as used to be with legacy VIDEO support

5 years agoMerge tag 'xilinx-for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 30 Jul 2019 23:19:34 +0000 (19:19 -0400)]
Merge tag 'xilinx-for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx/FPGA changes for v2019.10

fpga:
- Xilinx virtex2 cleanup
- Altera cyclon2 cleanup

zynq:
- Minor Kconfig cleanup
- Add psu_init configuration for Z-turn board

zynqmp:
- Add support for pmufw config passing to PMU
- script for psu_init conversion
- zcu1275 renaming

xilinx:
- Add support for UltraZed-EV SoM

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Tue, 30 Jul 2019 23:19:04 +0000 (19:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

5 years agoefi_selftest: sharpen ConvertPointer() test
Heinrich Schuchardt [Sat, 27 Jul 2019 17:32:23 +0000 (19:32 +0200)]
efi_selftest: sharpen ConvertPointer() test

Now that ConvertPointer() is implemented throw an error if the result is
incorrect.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>