platform/kernel/u-boot.git
5 years agomx6sabresd: Remove U-Boot proper mmc initialization
Fabio Estevam [Tue, 21 May 2019 13:37:54 +0000 (10:37 -0300)]
mx6sabresd: Remove U-Boot proper mmc initialization

After the conversion to DM there is no need to have mmc initialization
code inside U-Boot proper.

Remove the unneeded code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx6sabresd: Select pinctrl driver
Fabio Estevam [Tue, 21 May 2019 13:37:53 +0000 (10:37 -0300)]
mx6sabresd: Select pinctrl driver

With the conversion to DM we should select the pinctrl driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agomx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size
Fabio Estevam [Tue, 21 May 2019 13:37:52 +0000 (10:37 -0300)]
mx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size

Currently the mx6qsabresd board does not boot:

U-Boot SPL 2019.07-rc2 (May 16 2019 - 14:28:55 -0300)
Trying to boot from MMC1
spl: could not find mmc device 0. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

The reason for the boot failure is that that the SPL
size got greater than the 68KB limit (4KB header + 64KB max
size) as explained in include/configs/imx6_spl.h.

Remove the CONFIG_SPL_DM option, so that the SPL binary could
fit into the allowed size and the board can boot again.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoimx8qxp_mek: Remove unneeded config options settings
Fabio Estevam [Wed, 8 May 2019 12:02:08 +0000 (09:02 -0300)]
imx8qxp_mek: Remove unneeded config options settings

Remove such unneeded custom config options because the
provided default values are good enough.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qm_mek: Remove unneeded config options settings
Fabio Estevam [Wed, 8 May 2019 12:02:07 +0000 (09:02 -0300)]
imx8qm_mek: Remove unneeded config options settings

Remove such unneeded custom config options because the
provided default values are good enough.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Parthiban Nallathambi [Wed, 10 Apr 2019 14:35:32 +0000 (16:35 +0200)]
imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM

Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063)
with eMMC on SoM.

CPU:   Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 38C
Reset cause: POR
Model: Phytec phyBOARD-i.MX6ULL-Segin SBC
Board: PHYTEC phyCORE-i.MX6ULL
DRAM:  256 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial@02020000
Out:   serial@02020000
Err:   serial@02020000
Net:   FEC0

Working:
 - Eth0
 - i2C
 - MMC/SD
 - eMMC
 - UART (1 & 5)
 - USB (host & otg)

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
5 years agoapalis-tk1: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:43 +0000 (13:00 +0300)]
apalis-tk1: use UUID for rootfs

1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.
2. Fix legacy USB command (both sdboot and usbboot can be used now).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoapalis_imx6: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:42 +0000 (13:00 +0300)]
apalis_imx6: use UUID for rootfs

1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.
2. Fix legacy USB command (both sdboot and usbboot can be used now).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:41 +0000 (13:00 +0300)]
colibri_vf: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri-imx6ull: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:40 +0000 (13:00 +0300)]
colibri-imx6ull: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_imx7: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:39 +0000 (13:00 +0300)]
colibri_imx7: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoboard: toradex: add apalis imx8qm 4gb wb it v1.0b module support
Marcel Ziswiler [Fri, 31 May 2019 16:00:20 +0000 (19:00 +0300)]
board: toradex: add apalis imx8qm 4gb wb it v1.0b module support

This commit adds initial support for the Toradex Apalis iMX8QM 4GB WB IT
V1.0B module. Unlike the V1.0A early access samples exclusively booting
from SD card, they are now strapped to boot from eFuses which are
factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

Functionality wise the following is known to be working:
- eMMC, 8-bit and 4-bit MMC/SD card slots
- Gigabit Ethernet
- GPIOs
- I2C

Unfortunately, there is no USB functionality for the i.MX 8QM as of yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoimx8: fuse: fix fuse driver
Marcel Ziswiler [Fri, 31 May 2019 16:00:19 +0000 (19:00 +0300)]
imx8: fuse: fix fuse driver

This fixes the i.MX 8 fuse driver to actually build for i.MX 8QM as
well.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoimx8qm: fix cpu frequency reporting
Marcel Ziswiler [Fri, 31 May 2019 16:00:18 +0000 (19:00 +0300)]
imx8qm: fix cpu frequency reporting

CPU frequency reporting failed with the following error message being
printed:

sc_pm_get_clock_rate: resource:507 clk:2: res:3
Could not read CPU frequency: -22
CPU:   NXP i.MX8QM RevB A53 at 0 MHz

Fix this by differentiating between the A35 as found on the i.MX 8QXP
and the A53 as found on the i.MX 8QM SoCs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoclk: imx8qm: fix usdhc2 clocks
Marcel Ziswiler [Fri, 31 May 2019 16:00:17 +0000 (19:00 +0300)]
clk: imx8qm: fix usdhc2 clocks

Trying to bring up uSDHC2 the following error message was observed:

MMC:   imx8_clk_set_rate(Invalid clk ID #60)
imx8_clk_set_rate(Invalid clk ID #60)
usdhc@5b030000 - probe failed: -22

This commit fixes this by properly setting resp. clocks.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoarm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4
Marcel Ziswiler [Fri, 31 May 2019 16:00:16 +0000 (19:00 +0300)]
arm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4

Add support for i2c0, i2c1, i2c2, i2c3 and i2c4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoarm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4
Marcel Ziswiler [Fri, 31 May 2019 16:00:15 +0000 (19:00 +0300)]
arm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4

Add support for lpuart1, lpuart2, lpuart3 and lpuart4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agopico-imx6ul: MAINTAINERS: Add pico-dwarf entry
Fabio Estevam [Fri, 26 Apr 2019 16:56:34 +0000 (13:56 -0300)]
pico-imx6ul: MAINTAINERS: Add pico-dwarf entry

pico-dwarf-imx6ul_defconfig does not have an entry in MAINTAINERS file,
so add it to avoid a build warning.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agopico-imx6ul: MAINTAINERS: Unify all board entries
Fabio Estevam [Fri, 26 Apr 2019 16:56:33 +0000 (13:56 -0300)]
pico-imx6ul: MAINTAINERS: Unify all board entries

It is easier to consolidate all boards into a single entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agopico-imx7d: MAINTAINERS: Unify all board entries
Fabio Estevam [Fri, 26 Apr 2019 16:56:32 +0000 (13:56 -0300)]
pico-imx7d: MAINTAINERS: Unify all board entries

It is easier to consolidate all boards into a single entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agocolibri_imx7: fastboot support
Igor Opaniuk [Fri, 31 May 2019 10:19:35 +0000 (13:19 +0300)]
colibri_imx7: fastboot support

Enable fastboot support (including "fastboot oem" subset of commands).

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoARM: imx: novena: Convert to DM VIDEO
Marek Vasut [Fri, 17 May 2019 18:32:20 +0000 (20:32 +0200)]
ARM: imx: novena: Convert to DM VIDEO

Enable DM Video support on iMX6Q Novena and fix minor details
to restore previous behavior of the system.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agoARM: imx: novena: Enable DM USB
Marek Vasut [Fri, 17 May 2019 18:32:18 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM USB

Enable DM USB support on iMX6Q Novena.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agoARM: imx: novena: Convert block devices to DM
Marek Vasut [Fri, 17 May 2019 18:32:17 +0000 (20:32 +0200)]
ARM: imx: novena: Convert block devices to DM

Enable DM block, DM MMC and DM SATA support on iMX6Q Novena
convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agoARM: imx: novena: Enable DM GPIO
Marek Vasut [Fri, 17 May 2019 18:32:16 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM GPIO

Enable DM GPIO support on iMX6Q Novena and fix up board code
where applicable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agoARM: imx: novena: Enable DM pin control
Marek Vasut [Fri, 17 May 2019 18:32:15 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM pin control

Enable DM pin control support on iMX6Q Novena.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agoARM: dts: imx: novena: Import Novena DT from Linux
Marek Vasut [Fri, 17 May 2019 18:32:14 +0000 (20:32 +0200)]
ARM: dts: imx: novena: Import Novena DT from Linux

Import iMX6Q Novena device tree from Linux 5.1-rc7 37624b58542f .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
5 years agopico-imx7d: enable boot without PMIC
Jun Nie [Wed, 8 May 2019 06:38:36 +0000 (14:38 +0800)]
pico-imx7d: enable boot without PMIC

If PMIC is not probed successfully, it is still OK to boot
with default configuration although power is not optimized.

Default voltage of SW1A/SW1B is 1.1V/1.0V for PC32PF3000A1EP
on pico according to table 42 of spec of PF3000 ver 9.0.

Default mode of SW1A/SW1B is APS as expected(table 47).

Signed-off-by: Jun Nie <jun.nie@linaro.org>
5 years agopico-imx7d: README: Add BL33 usage case
Jun Nie [Wed, 8 May 2019 06:38:35 +0000 (14:38 +0800)]
pico-imx7d: README: Add BL33 usage case

Add Documentation of BL33 usage case. U-boot is in
non-secure world in this case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
5 years agopico-imx7d: Add bl33 config
Jun Nie [Wed, 8 May 2019 06:38:34 +0000 (14:38 +0800)]
pico-imx7d: Add bl33 config

Add default configuration to run u-boot as BL33 in the boot flow case
of ATF(ARM Trusted Firmware) -> OPTEE -> U-boot.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agopico-imx7d: Add boot option for verified boot
Jun Nie [Wed, 8 May 2019 06:38:33 +0000 (14:38 +0800)]
pico-imx7d: Add boot option for verified boot

Add boot option to boot from fitimage to support verified boot.
The boot script plain text file should be packed into fit blob as
image with name of bootscr.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
5 years agopico-imx7d: Reserve region of memory to OPTEE
Jun Nie [Wed, 8 May 2019 06:38:32 +0000 (14:38 +0800)]
pico-imx7d: Reserve region of memory to OPTEE

Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size so that
the OPTEE memory is not override during u-boot relocation.

Note the OPTEE live in the end part of DRAM and OPTEE boot process will
itself subtract the DRAM region it lives in from the memory map passed
to Linux.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agopico-imx7d: Correct uart clock root
Jun Nie [Wed, 8 May 2019 06:38:31 +0000 (14:38 +0800)]
pico-imx7d: Correct uart clock root

Correct uart clock root ID. Incorrect ID may result the
clock is gated because rate value 0 is returned in
imx_get_uartclk()

The ID can be ignored if CONFIG_SKIP_LOWLEVEL_INIT is not enabled
because init_clk_uart() will enable all uart clocks in that case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
5 years agoimx: mx7: Skip secure init in arch_cpu_init
Jun Nie [Wed, 8 May 2019 06:38:30 +0000 (14:38 +0800)]
imx: mx7: Skip secure init in arch_cpu_init

Skip secure related initialization in arch_cpu_init if low level
init is skipped.  Because these should be done in early stage
firmware, such as ARM trusted firmware.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
5 years agomx7_common: Share configs to skip low level init
Jun Nie [Wed, 8 May 2019 06:38:29 +0000 (14:38 +0800)]
mx7_common: Share configs to skip low level init

Share configs in mx7 to skip low level init if we are in the case where
OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
the low level initialization is already done and that we may/should skip
it doing them here.

Fix the definition detection with size detection to decide whether to skip
it.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agospi: imx: work with cs greater 0
Heiko Schocher [Sun, 26 May 2019 10:15:47 +0000 (12:15 +0200)]
spi: imx: work with cs greater 0

currently spi mxc driver can only handle cs 0.
Allow it to handle also cs > 0.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agospi: imx: remove doubled pointer from mxc_spi_probe
Heiko Schocher [Sun, 26 May 2019 10:15:46 +0000 (12:15 +0200)]
spi: imx: remove doubled pointer from mxc_spi_probe

in mxc_spi_probe() plat and mxcs pointer are created:

struct mxc_spi_slave *plat = bus->platdata;
struct mxc_spi_slave *mxcs = dev_get_platdata(bus);

which have the same value. Remove plat pointer.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agoarm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT case
Heiko Schocher [Tue, 28 May 2019 11:44:31 +0000 (13:44 +0200)]
arm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT case

in case CONFIG_MULTI_DTB_FIT is set and u-boot-dtb.imx
image is build, currently u-boot-dtb.bin is used for
generating the u-boot-dtb.imx binary, which is wrong, as
it contains only a dtb blob not the fit.blob

Use instead the u-boot-fit-dtb.bin for generating
u-boot-dtb.imx which contains the fit.blob.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agowandboard: Rework Makefile to prevent spl.o from being built
Ezequiel Garcia [Sat, 25 May 2019 22:19:41 +0000 (19:19 -0300)]
wandboard: Rework Makefile to prevent spl.o from being built

The spl.c source was entirely conditioned by CONFIG_SPL_BUILD.
Change this moving CONFIG_SPL_BUILD to be used in the Makefile,
which is slightly cleaner and more readable.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
5 years agoARM: imx: dh-imx6: Convert SPI support to DM
Marek Vasut [Fri, 17 May 2019 14:58:54 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SPI support to DM

Enable DM SPI and SF support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: dh-imx6: Convert USB support to DM
Marek Vasut [Fri, 17 May 2019 14:58:53 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert USB support to DM

Enable DM USB host support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: dh-imx6: Convert SATA support to DM
Marek Vasut [Fri, 17 May 2019 14:58:52 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SATA support to DM

Enable DM SATA support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: dh-imx6: Convert SD/MMC support to DM
Marek Vasut [Fri, 17 May 2019 14:58:51 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SD/MMC support to DM

Enable DM block and DM MMC support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: dh-imx6: Enable DM GPIO
Marek Vasut [Fri, 17 May 2019 14:58:50 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Enable DM GPIO

Enable DM GPIO support on DHCOM iMX6 PDK2 and fix up board code
where applicable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: imx: dh-imx6: Enable DM pin control
Marek Vasut [Fri, 17 May 2019 14:58:49 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Enable DM pin control

Enable DM pin control support on DHCOM iMX6 PDK2.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: dts: imx: dh-imx6: Fix SPI CS polarity on DHCOM iMX6 PDK2
Marek Vasut [Fri, 17 May 2019 14:58:48 +0000 (16:58 +0200)]
ARM: dts: imx: dh-imx6: Fix SPI CS polarity on DHCOM iMX6 PDK2

The SPI nCS signal is active low, make it so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: dts: imx: dh-imx6: Import DHCOM iMX6 PDK2 DTs from Linux
Marek Vasut [Fri, 17 May 2019 14:58:47 +0000 (16:58 +0200)]
ARM: dts: imx: dh-imx6: Import DHCOM iMX6 PDK2 DTs from Linux

Import DHCOM iMX6 PDK2 device tree from Linux 5.1.1 b724e9356404 .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoRevert "drivers/crypto/fsl: assign job-rings to non-TrustZone"
Breno Matheus Lima [Tue, 4 Jun 2019 02:54:44 +0000 (02:54 +0000)]
Revert "drivers/crypto/fsl: assign job-rings to non-TrustZone"

Commit 22191ac35344 ("drivers/crypto/fsl: assign job-rings to
 non-TrustZone") breaks HABv4 encrypted boot support in the
following i.MX devices:

- i.MX6UL
- i.MX7S
- i.MX7D
- i.MX7ULP

For preparing a HABv4 encrypted boot image it's necessary to
encapsulate the generated DEK in a blob. In devices listed
above the blob generation function takes into consideration
the Job Ring TrustZone ownership configuration (JROWN_NS)
and can be only decapsulated by the same configuration.

The ROM code expects DEK blobs encapsulated by the Secure World
environments which commonly have JROWN_NS = 0.

As U-Boot is running in Secure World we must have JROWN_NS = 0
so the blobs generated by dek_blob tool can be decapsulated
by the ROM code.

Job-rings assignment is now handled in OP-TEE OS, this commit can
be safely reverted.
https://github.com/OP-TEE/optee_os/pull/2986

This reverts commit 22191ac353445ad8fafc5a78aefcd94e78963041.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
5 years agoconfig: Update KP's imx53 HSC config to pass key pressed information
Lukasz Majewski [Wed, 8 May 2019 14:26:23 +0000 (16:26 +0200)]
config: Update KP's imx53 HSC config to pass key pressed information

The information about pressed key is relevant in performing correct
update and recovery scenarios via USB pendrive.

This commit modifies envs to provide it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfig: Update KP's imx53 HSC config to support SWUpdate
Lukasz Majewski [Wed, 8 May 2019 14:26:22 +0000 (16:26 +0200)]
config: Update KP's imx53 HSC config to support SWUpdate

This commit updates envs responsible for using USB pendrive as a
SWUpdate based tool for recovery and update.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: Use a convenient default value for SYS_MALLOC_F_LEN
Fabio Estevam [Fri, 3 May 2019 17:05:04 +0000 (14:05 -0300)]
imx: Use a convenient default value for SYS_MALLOC_F_LEN

Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
simple-bus driver") causes some i.MX boards that were converted
to DM, such as warp7, to fail to boot.

As explained by Lukas Auer:

"With the patch, U-Boot probes the drivers for devices under simple-bus
device tree nodes in the pre-relocation device model. The default value
of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
do this, causing it to hang."

Fix this problem by providing a convenient default value for
CONFIG_SYS_MALLOC_F_LEN.

Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoopos6uldev: don't call enable_lcdif_clock
Sébastien Szymanski [Tue, 14 May 2019 11:46:20 +0000 (13:46 +0200)]
opos6uldev: don't call enable_lcdif_clock

The mxsfb driver already calls enable_lcdif_clock.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoopos6ul: set REFSEL and REFR fields
Sébastien Szymanski [Tue, 14 May 2019 11:33:46 +0000 (13:33 +0200)]
opos6ul: set REFSEL and REFR fields

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
5 years agoimx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices
Breno Matheus Lima [Fri, 26 Apr 2019 02:56:48 +0000 (02:56 +0000)]
imx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices

In certain i.MX devices the encrypted boot image is failing to boot.

According to AN12056 "Encrypted Boot on HABv4 and CAAM Enabled Devices"
it's necessary to pad CSF to 0x2000 and append DEK blob.

In this case the total image size in boot data structure must cover the
entire binary otherwise the dek_blob won't be copied to memory and image
won't be decrypted.

Increase CSF_SIZE to 0x4000 to avoid such issue when booting encrypted
boot images.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agocolibri-imx6ull: fix usb host mode
Marcel Ziswiler [Fri, 26 Apr 2019 18:48:14 +0000 (20:48 +0200)]
colibri-imx6ull: fix usb host mode

This fixes an issue with USB host mode.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoARM: imx: apalis_imx6: Drop ad-hoc SATA binding
Marek Vasut [Sun, 12 May 2019 20:43:25 +0000 (22:43 +0200)]
ARM: imx: apalis_imx6: Drop ad-hoc SATA binding

Drop the ad-hoc AHCI binding code, this is superseded by
CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoregulator: bd71837: copy the bd71837 pmic driver from NXP imx u-boot
Matti Vaittinen [Tue, 7 May 2019 07:43:39 +0000 (10:43 +0300)]
regulator: bd71837: copy the bd71837 pmic driver from NXP imx u-boot

https://source.codeaurora.org/external/imx/uboot-imx

cherry picked, styled and merged commits:
- MLK-18387 pmic: Add pmic driver for BD71837: e9a3bec2e95a
- MLK-18590 pmic: bd71837: Change to use new fdt API: acdc5c297a96

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocolibri_imx7: migrate usb to driver model
Igor Opaniuk [Fri, 10 May 2019 09:35:29 +0000 (12:35 +0300)]
colibri_imx7: migrate usb to driver model

Migrate USB to Driver Model (CONFIG_DM_USB=y).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: imx6-engicam: Update the recoveryboot setting
Jagan Teki [Fri, 26 Apr 2019 09:01:46 +0000 (14:31 +0530)]
configs: imx6-engicam: Update the recoveryboot setting

Since recovery boot on mmc can get the mmcpart and mmcroot
dynamically, drop the static definitions and handle it
properly.

Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agotoradex apalis/colibri: extend CONFIG_SYS_MALLOC_F_LEN
Igor Opaniuk [Fri, 17 May 2019 14:48:43 +0000 (17:48 +0300)]
toradex apalis/colibri: extend CONFIG_SYS_MALLOC_F_LEN

Extend size of the malloc() pool for use before relocation, from 0x400
(default one) to 0x2000 (CONFIG_SYS_MALLOC_F_LEN=0x2000),
as adding of DM_FLAG_PRE_RELOC flag to simple-bus driver introduced a
regression on multiple boards, because of more intensive usage of malloc()
pool and therefore a broken boot as the size of pool isn't sufficient.

Fixes: 3a7c45f6a7 ("simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoapalis_imx6: add device tree to makefile
Marcel Ziswiler [Tue, 9 Apr 2019 15:21:48 +0000 (17:21 +0200)]
apalis_imx6: add device tree to makefile

Add device tree to Makefile to avoid newly introduced error:

Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

make[1]: *** [dts/Makefile:28: arch/arm/dts/imx6-apalis.dtb] Error 1
make: *** [Makefile:1009: dts/dt.dtb] Error 2

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoapalis/colibri imx6: provide proper fdtfile value
Igor Opaniuk [Thu, 23 May 2019 11:05:50 +0000 (11:05 +0000)]
apalis/colibri imx6: provide proper fdtfile value

Provide proper fdtfile env variable value before invoking distro_bootcmd
command.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoARM: dts: i.MX6ULL: U-Boot specific dts for u-boot, dm-spl
Parthiban Nallathambi [Sun, 7 Apr 2019 18:32:42 +0000 (20:32 +0200)]
ARM: dts: i.MX6ULL: U-Boot specific dts for u-boot, dm-spl

u-boot,dm-spl property is specific to U-Boot, so created one
for i.MX6ULL platforms.

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
5 years agopower: pfuze100: Fix off by one error in voltage table handling
Trent Piepho [Thu, 4 Apr 2019 21:52:04 +0000 (21:52 +0000)]
power: pfuze100: Fix off by one error in voltage table handling

The code that sets a regulator by looking up the voltage in a table had
an off by one error.  vsel_mask is a bitmask, not the number of table
entries, so a vsel_mask value of 0x7 indicates there are 8, not 7,
entries in the table.

Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
5 years agomx7ulp: Add common plugin codes for mx7ulp
Ye Li [Thu, 16 May 2019 03:18:51 +0000 (03:18 +0000)]
mx7ulp: Add common plugin codes for mx7ulp

Add common plugin codes to call ROM's hwcnfg_setup and generate IVT2
header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoboard: toradex: add colibri imx8qxp 2gb wb it v1.0b module support
Marcel Ziswiler [Fri, 31 May 2019 15:56:39 +0000 (18:56 +0300)]
board: toradex: add colibri imx8qxp 2gb wb it v1.0b module support

This commit adds initial support for the Toradex Colibri iMX8QXP 2GB WB
IT V1.0B module. Unlike the V1.0A early access samples exclusively
booting from SD card, they are now strapped to boot from eFuses which
are factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

Functionality wise the following is known to be working:
- eMMC and MMC/SD card
- Ethernet
- GPIOs
- I2C

Unfortunately, there is no USB functionality for the i.MX 8QXP as of
yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoimx: fix building for i.mx8 without spl
Marcel Ziswiler [Fri, 31 May 2019 15:56:38 +0000 (18:56 +0300)]
imx: fix building for i.mx8 without spl

Building with Travis CI complained and stopped with the following error:
+cc1: fatal error: opening output file spl/u-boot-spl.cfgout: No such
file or directory
+compilation terminated.

This fixes commit caceb739ea07 ("imx: build flash.bin for i.MX8") which
took SPL being enabled on i.MX8 for granted.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoARM: imx6logic: Stop overwriting fdt_file if manually set
Adam Ford [Wed, 13 Mar 2019 15:49:22 +0000 (10:49 -0500)]
ARM: imx6logic: Stop overwriting fdt_file if manually set

The board file uses the processor type to determine what dtb file
is set.  Unfortunately, if the user wants to manually set this,
it get gets overwritten upon boot.  This patch adds a check to
see if the value is already set and only changes it if the value
is empty.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoPrepare v2019.07-rc4 v2019.07-rc4
Tom Rini [Tue, 11 Jun 2019 01:27:46 +0000 (21:27 -0400)]
Prepare v2019.07-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoefi_loader: implement event queue
Heinrich Schuchardt [Wed, 5 Jun 2019 19:00:39 +0000 (21:00 +0200)]
efi_loader: implement event queue

Up to now we have only been using a flag queued for events. But this does
not satisfy the requirements of the UEFI spec. Events must be notified in
the sequence of decreasing TPL level and within a TPL level in the sequence
of signaling.

Implement a queue for signaled events.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: correct event group test
Heinrich Schuchardt [Wed, 5 Jun 2019 20:50:42 +0000 (22:50 +0200)]
efi_selftest: correct event group test

If any member of the event group is signaled, all members must be set to
signaled and their notification functions have to be queued.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: event signaling in ExitBootServices
Heinrich Schuchardt [Fri, 7 Jun 2019 04:47:01 +0000 (06:47 +0200)]
efi_loader: event signaling in ExitBootServices

ExitBootServices() has to stop timer related activity before calling the
events of the EFI_EVENT_GROUP_EXIT_BOOT_SERVICES event group. But our
current implementation was stopping all other events.

All events have to observe the task priority level.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: SignalEvent for event in signaled state
Heinrich Schuchardt [Wed, 5 Jun 2019 23:51:50 +0000 (01:51 +0200)]
efi_loader: SignalEvent for event in signaled state

If an event is already in the signaled state, SignalEvent should not queue
the notification function but simply return EFI_SUCCESS.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: RegisterProtocolNotify event signaling
Heinrich Schuchardt [Fri, 7 Jun 2019 05:43:24 +0000 (07:43 +0200)]
efi_loader: RegisterProtocolNotify event signaling

In a following patch efi_signal_event() will only queue an event if it is
not signaled.

Set the is_signaled status to false before signaling the event.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Mon, 10 Jun 2019 13:43:11 +0000 (09:43 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- mpc8xxx spi driver fixes (Mario)
- mpc8xxx spi dm conversion (Mario, Jagan)
- SPI DM Migration update (Jagan)

5 years agoMerge tag 'video-updates-for-2019.07-rc3' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 10 Jun 2019 13:41:19 +0000 (09:41 -0400)]
Merge tag 'video-updates-for-2019.07-rc3' of git://git.denx.de/u-boot-video

- mxsfb DM_VIDEO conversion
- splash fix for DM_VIDEO configurations
- meson HDMI fix for boards without hdmi-supply regulator

5 years agoMerge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 10 Jun 2019 13:41:00 +0000 (09:41 -0400)]
Merge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmel

First set of u-boot-atmel fixes for 2019.07 cycle

5 years agodm: MIGRATION: Update migration status for SPI
Jagan Teki [Sun, 28 Apr 2019 20:28:54 +0000 (01:58 +0530)]
dm: MIGRATION: Update migration status for SPI

Now, we have few driver are fully converted into dm and few
are partially converted.

So, update the migration status accordingly.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Convert to DM
Jagan Teki [Sun, 28 Apr 2019 20:28:53 +0000 (01:58 +0530)]
spi: mpc8xxx: Convert to DM

Support DM in the MPC8xxx SPI driver, and remove the legacy SPI
interface.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Use get_timer
Mario Six [Sun, 28 Apr 2019 20:28:52 +0000 (01:58 +0530)]
spi: mpc8xxx: Use get_timer

The comment before the transmission loop in conjunction with the
definition of SPI_TIMEOUT as 1000 implies that the loop is supposed to
have a timeout value of 1000 ms. But since there is no mdelay(1) or
similar in the loop body, the loop just runs 1000 times, without regard
for the time elapsed.

To correct this, use the standard get_timer functionality to properly
time out the loop after 1000 ms.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix if check
Mario Six [Sun, 28 Apr 2019 20:28:51 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix if check

Decreasing the bit length and increasing the write data pointer should
be done when there are more than 32 bit of data, not 16 bit.

This did not produce incorrect behavior, because the only time where the
two checks produce different outcomes is the case of 16 < bitlen < 32,
and in this case the subsequent transmission is the last one regardless,
hence the additional bit length decrease and write data pointer increase
has no effect anyway.

Still, the correct check is the check for "bitlen > 32", so correct this
behavior.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Re-order transfer setup
Mario Six [Sun, 28 Apr 2019 20:28:50 +0000 (01:58 +0530)]
spi: mpc8xxx: Re-order transfer setup

Minize the time the adapter is disabled (via SPI_MODE_EN
clearing/setting) to just the character length setting, and only set up
the temporary data writing variable right before we need it, so there is
a more clear distinction between setting up the SPI adapter, and setting
up the data to be written.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Document LEN setting better
Mario Six [Sun, 28 Apr 2019 20:28:49 +0000 (01:58 +0530)]
spi: mpc8xxx: Document LEN setting better

Instead of having a table right before the code implementing the length
setting for documentation, have inline comments for the if branches
actually implementing the length setting described table's entries
(which is readable thanks to the set_char_len function).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Rename variable
Mario Six [Sun, 28 Apr 2019 20:28:48 +0000 (01:58 +0530)]
spi: mpc8xxx: Rename variable

The variable "char_size" holds the number of bits to be transferred in
the current loop iteration. A better name would be "xfer_bitlen", which
we rename this variable to.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Make code more readable
Mario Six [Sun, 28 Apr 2019 20:28:47 +0000 (01:58 +0530)]
spi: mpc8xxx: Make code more readable

Introduce the to_prescale_mod and set_char_len inline functions to make
the code more readable.

Note that the added "if (bitlen > 16)" check does not change the
semantics of the current code, and hence only preserves the current
error (this will be fixed in a later patch in the series).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Reduce scope of loop variables
Mario Six [Sun, 28 Apr 2019 20:28:46 +0000 (01:58 +0530)]
spi: mpc8xxx: Reduce scope of loop variables

The transmission loop starts with setting some variables, which are only
used inside the loop. Reduce the scope to the loop to make the
declaration and initialization of these variables coincide.

In the case of char_size this also always initializes the variable
immediately with the final value actually used in the loop (instead of
the placeholder value 32).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Simplify logic a bit
Mario Six [Sun, 28 Apr 2019 20:28:45 +0000 (01:58 +0530)]
spi: mpc8xxx: Simplify logic a bit

We do nothing in the loop if the "not empty" event was not detected. To
simplify the logic, check if this is the case, and skip the execution of
the loop early to reduce the nesting level and flag checking.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Get rid of is_read
Mario Six [Sun, 28 Apr 2019 20:28:44 +0000 (01:58 +0530)]
spi: mpc8xxx: Get rid of is_read

Get rid of the is_read variable, and just keep the state of the "not
empty" and "not full" events in two boolean variables within the loop
body.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Simplify if
Mario Six [Sun, 28 Apr 2019 20:28:43 +0000 (01:58 +0530)]
spi: mpc8xxx: Simplify if

Instead of having a nested if block, just have two branches within the
overarching if block to eliminate one nesting level.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Use IO accessors
Mario Six [Sun, 28 Apr 2019 20:28:42 +0000 (01:58 +0530)]
spi: mpc8xxx: Use IO accessors

Accesses to the register map are currently done by directly reading and
writing the structure.

Switch to the appropriate IO accessors instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Replace defines with enums
Mario Six [Sun, 28 Apr 2019 20:28:41 +0000 (01:58 +0530)]
spi: mpc8xxx: Replace defines with enums

Replace pre-processor defines with proper enums, and use the BIT macro
where applicable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix function names in strings
Mario Six [Sun, 28 Apr 2019 20:28:40 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix function names in strings

Replace the function name with a "%s" format string and the __func__
variable in debug statements (as proposed by checkpatch).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix space after cast
Mario Six [Sun, 28 Apr 2019 20:28:39 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix space after cast

Fix all "superfluous space after case" style errors.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Rename camel-case variables
Mario Six [Sun, 28 Apr 2019 20:28:38 +0000 (01:58 +0530)]
spi: mpc8xxx: Rename camel-case variables

There are three variables that have camel-case names, which is not the
preferred naming style.

Give those variables more compliant names instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Fix comments
Mario Six [Sun, 28 Apr 2019 20:28:37 +0000 (01:58 +0530)]
spi: mpc8xxx: Fix comments

There are some comments on the same line as the code they document. Put
comments above the code lines they document, so the line length is not
unnecessarily increased.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: mpc8xxx: Use short type names
Mario Six [Sun, 28 Apr 2019 20:28:36 +0000 (01:58 +0530)]
spi: mpc8xxx: Use short type names

The function signatures in the driver are quite long as is. Use short
type names (uint etc.) to make them more readable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoids8313: Disable SPI
Mario Six [Fri, 7 Jun 2019 09:35:51 +0000 (11:35 +0200)]
ids8313: Disable SPI

With the recent SPI changes, the ids8313 board won't compile anymore.

Until further information from the manufacturer, disable SPI support, so
that the board will at least compile again.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Sat, 8 Jun 2019 13:10:31 +0000 (09:10 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

The bulk of these changes are an effort to unify Tegra186 builds with
builds of prior 64-bit Tegra generations. On top of that there are
various improvements that allow data (such as the MAC address and boot
arguments) to be passed through from early firmware to the kernel on
boot.

5 years agospl: Correct SPL_SIZE_LIMIT Kconfig option
Tom Rini [Sat, 8 Jun 2019 00:39:32 +0000 (20:39 -0400)]
spl: Correct SPL_SIZE_LIMIT Kconfig option

When introduced this limit was an int but was then changed to hex
without noting as much in the prompt nor changing existing users.  Put
this back to an int.

Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Fixes: 2577015dc5c4 ("spl: add overall SPL size check")
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch '2019-06-07-master-imports'
Tom Rini [Fri, 7 Jun 2019 22:03:18 +0000 (18:03 -0400)]
Merge branch '2019-06-07-master-imports'

- Include Heinrich's series to move the i.MX board size check function
  to be more widely available.
- Include Simon Goldschmidt's patch to make it possible to have a more
  accurate SPL size check applied.