]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 years agoMerge branch 'u-boot-stm32_20190827' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 27 Aug 2019 17:19:47 +0000 (13:19 -0400)]
Merge branch 'u-boot-stm32_20190827' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- Fixes and update related to STM32MP1 platforms

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
Tom Rini [Tue, 27 Aug 2019 11:11:37 +0000 (07:11 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx

Support of device tree model for T2080RDB, T4240RDB, T1024RDB,
T1042D4RDB, P1020RDB, P2020RDB, P2041RDB, P3041DS, P4080DS, P5040DS and
MPC8548CDS. Also support of  i2c dm model.

5 years agoMerge tag 'for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Tue, 27 Aug 2019 11:09:10 +0000 (07:09 -0400)]
Merge tag 'for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c

i2c bugfixes for 2019.10
- misc: i2c_eeprom: verify that the chip is functional at probe()
- i2c: mxc_i2c: Remove i2c_idle_bus from probe
- i2c-mux-gpio: Fix GPIO request flag issue

5 years agostm32mp1: update README for remoteproc support
Patrick Delaunay [Fri, 2 Aug 2019 13:07:22 +0000 (15:07 +0200)]
stm32mp1: update README for remoteproc support

Add information for remoteproc usage to load firmware in M4 coprocessor
on stm32mp157.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: add example files for FIT generation
Patrick Delaunay [Fri, 2 Aug 2019 13:07:21 +0000 (15:07 +0200)]
stm32mp1: add example files for FIT generation

Add example of its files to generate FIT to start kernel
on ev1 or dk2 board with
- only kernel and dtb = fit_copro_kernel_dtb.its
- kernel, M4 copro firmware and dtb = it_copro_kernel_dtb.its

Add extlinux example to manage config in generated FIT.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: Add copro image support for M4 firmware
Patrick Delaunay [Fri, 2 Aug 2019 13:07:20 +0000 (15:07 +0200)]
stm32mp1: Add copro image support for M4 firmware

Implements copro image loading with FIT.
Once image is loaded with remoteproc,
the M4 coprocessor is automatically started.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoimage: add new "copro" image type
Patrick Delaunay [Fri, 2 Aug 2019 13:07:19 +0000 (15:07 +0200)]
image: add new "copro" image type

Define new image type for coprocessor images.
It is used in FIT to identify the files loaded
with remoteproc command (elf or bin).

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agostm32mp1: Add remoteproc support for m4 coprocessor
Patrick Delaunay [Fri, 2 Aug 2019 13:07:18 +0000 (15:07 +0200)]
stm32mp1: Add remoteproc support for m4 coprocessor

Alignment with kernel patch proposal for binding:

[PATCH v4 0/8] stm32 m4 remoteproc on STM32MP157c
https://lkml.org/lkml/2019/5/14/159

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agomisc: change RCC form MISC to NOP uclass
Patrick Delaunay [Fri, 2 Aug 2019 11:08:08 +0000 (13:08 +0200)]
misc: change RCC form MISC to NOP uclass

The RCC driver have no operation so the new NOP uclass
is more appropriate. It only used as parent for clock and reset driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board update command stboard on misc_read result
Patrick Delaunay [Fri, 2 Aug 2019 11:08:07 +0000 (13:08 +0200)]
stm32mp1: board update command stboard on misc_read result

Update management of misc_read, which now return length of data
after the commit 8729b1ae2cbd ("misc: Update read() and write()
methods to return bytes xfered")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: update sysconf_init on misc_read result
Patrick Delaunay [Fri, 2 Aug 2019 11:08:06 +0000 (13:08 +0200)]
stm32mp1: update sysconf_init on misc_read result

Update management of misc_read in sysconf_init, which now return
length of data after the commit 8729b1ae2cbd ("misc: Update read()
and write() methods to return bytes xfered")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: update test on misc_read result
Patrick Delaunay [Fri, 2 Aug 2019 11:08:05 +0000 (13:08 +0200)]
stm32mp1: update test on misc_read result

Update the stm32mp1 baord after the commit 8729b1ae2cbd
("misc: Update read() and write() methods to return bytes xfered")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostpmic1: simplify stpmic1_sysreset_request
Patrick Delaunay [Fri, 2 Aug 2019 11:08:04 +0000 (13:08 +0200)]
stpmic1: simplify stpmic1_sysreset_request

Retrieve parent device from dev->parent instead of
calling uclass_get_device_by_driver()

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopmu: stpmic1: change specific NVM api to MISC
Patrick Delaunay [Fri, 2 Aug 2019 11:08:03 +0000 (13:08 +0200)]
pmu: stpmic1: change specific NVM api to MISC

Use MISC u-class to export the NVM register (starting at 0xF8 offset)
and avoid specific API.
- SHADOW have offset < 0.
- NVM have register > 0

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agobsec: update after MISC u-class update
Patrick Delaunay [Fri, 2 Aug 2019 11:08:02 +0000 (13:08 +0200)]
bsec: update after MISC u-class update

Since the commit 8729b1ae2cbd ("misc: Update read() and
write() methods to return bytes xfered"); The misc bsec driver
need to be adapted to reflect the number of transferred bytes.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMAINTAINERS: update ARM STM STM32MP and STM32MP1 BOARD
Patrick Delaunay [Tue, 30 Jul 2019 17:16:56 +0000 (19:16 +0200)]
MAINTAINERS: update ARM STM STM32MP and STM32MP1 BOARD

Add the missing driver and files for mach-stm32mp / stm32mp1 product.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: clk: use gd to store frequency information
Patrick Delaunay [Tue, 30 Jul 2019 17:16:55 +0000 (19:16 +0200)]
stm32mp1: clk: use gd to store frequency information

Use existing gd structure to store frequency information
which can be used in drivers or arch without new request.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: clk: remove debug traces
Patrick Delaunay [Tue, 30 Jul 2019 17:16:54 +0000 (19:16 +0200)]
stm32mp1: clk: remove debug traces

Remove many debug trace.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: Makefile cleanup
Patrick Delaunay [Tue, 30 Jul 2019 17:16:53 +0000 (19:16 +0200)]
stm32mp1: Makefile cleanup

Don't compile psci for SPL build.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: ram: add pattern parameter in infinite write test
Patrick Delaunay [Tue, 30 Jul 2019 17:16:52 +0000 (19:16 +0200)]
stm32mp1: ram: add pattern parameter in infinite write test

Add pattern for infinite test_read and test_write, that
allow to change the pattern to test without recompilation;
default pattern is 0xA5A5AA55.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: ram: reload watchdog during ddr test
Patrick Delaunay [Tue, 30 Jul 2019 17:16:51 +0000 (19:16 +0200)]
stm32mp1: ram: reload watchdog during ddr test

Avoid watchdog during infinite DDR test.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: ram: update loop management in infinite test
Patrick Delaunay [Tue, 30 Jul 2019 17:16:50 +0000 (19:16 +0200)]
stm32mp1: ram: update loop management in infinite test

Reduce verbosity of the infinite tests to avoid CubeMX issue.
test and display loop by 1024*1024 accesses: read or write.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: ram: fix address issue in 2 tests
Patrick Delaunay [Tue, 30 Jul 2019 17:16:49 +0000 (19:16 +0200)]
stm32mp1: ram: fix address issue in 2 tests

If user choose to test memory size is 1GByte (0x40000000),
memory address would overflow in test "Random" and
test "FrequencySelectivePattern".
Thus the system would hangs up when running DDR test.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Bossen WU <bossen.wu@st.com>
5 years agostm32mp1: ram: cosmetic: remove unused prototype
Patrick Delaunay [Tue, 30 Jul 2019 17:16:48 +0000 (19:16 +0200)]
stm32mp1: ram: cosmetic: remove unused prototype

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoserial: stm32: remove unused include
Patrick Delaunay [Tue, 30 Jul 2019 17:16:47 +0000 (19:16 +0200)]
serial: stm32: remove unused include

The "serial_stm32.h" is only used by drivers/serial/serial_stm32.c
and it is the file ./drivers/serial/serial_stm32.h

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoserial: stm32: add Framing error support
Patrick Delaunay [Tue, 30 Jul 2019 17:16:46 +0000 (19:16 +0200)]
serial: stm32: add Framing error support

Add management of Bit 1 of USART_ISR = FE: Framing error
This bit is set by hardware when a de-synchronization, excessive noise
or a break character is detected. It is cleared by software, writing 1
to the FECF bit in the USART_ICR register (for stm32 after f4).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agommc: stm32_sdmmc2: reload watchdog
Christophe Kerello [Tue, 30 Jul 2019 17:16:45 +0000 (19:16 +0200)]
mmc: stm32_sdmmc2: reload watchdog

This patch solves a watchdog reset issue during mmc erase command.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: cosmetic: cleanup file
Patrick Delaunay [Tue, 30 Jul 2019 17:16:44 +0000 (19:16 +0200)]
stm32mp1: board: cosmetic: cleanup file

- reorder include files
- remove one comment

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: remove board_check_usb_power when ADC is not activated
Patrick Delaunay [Tue, 30 Jul 2019 17:16:43 +0000 (19:16 +0200)]
stm32mp1: board: remove board_check_usb_power when ADC is not activated

Avoid compilation issue when CONFIG_ADC is not activated

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: Update the way vdd-supply is retrieved from DT
Patrick Delaunay [Tue, 30 Jul 2019 17:16:42 +0000 (19:16 +0200)]
stm32mp1: board: Update the way vdd-supply is retrieved from DT

Due to kernel DT alignment, pwr-supply is renamed to vdd-supply
and is a subnode of pwr-regulators.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: check the boot-source to disable bootdelay
Patrick Delaunay [Tue, 30 Jul 2019 17:16:41 +0000 (19:16 +0200)]
stm32mp1: board: check the boot-source to disable bootdelay

Allows to avoid to wait 2 second in U-Boot before to
start STM32CubeProgrammer command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: protect the led function calls
Patrick Delaunay [Tue, 30 Jul 2019 17:16:40 +0000 (19:16 +0200)]
stm32mp1: board: protect the led function calls

Avoid compilation issue when CONFIG_LED is not activated

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: support of error led on ed1/ev1 board
Patrick Delaunay [Tue, 30 Jul 2019 17:16:39 +0000 (19:16 +0200)]
stm32mp1: board: support of error led on ed1/ev1 board

Create a function led_error_blink and add node in device
tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: enable v1v2_hdmi and v3v3_hdmi regulator on dk2 boot
Patrick Delaunay [Tue, 30 Jul 2019 17:16:38 +0000 (19:16 +0200)]
stm32mp1: board: enable v1v2_hdmi and v3v3_hdmi regulator on dk2 boot

As for Audio codec IC, HDMI IC is not "IO safe".
HDMI regulators (v3v3 and v1v2) must be enabled to allow
I2C1 bus usage. HDMI IC must be under reset during power up
and keep HDMI and AUDIO devices in reset while they are not
used in U-Boot to keep them in low power mode
(each device can be kept in reset independently keeping their
power supplies ON until kernel).

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: board: add environment variable for board id and board rev
Patrick Delaunay [Tue, 30 Jul 2019 17:16:37 +0000 (19:16 +0200)]
stm32mp1: board: add environment variable for board id and board rev

Add variable to identify board with HW id (read from OTP)
and revision.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add spi load support in spl
Patrick Delaunay [Tue, 30 Jul 2019 17:16:36 +0000 (19:16 +0200)]
stm32mp1: configs: add spi load support in spl

Add the boot for NOR, SPL load U-Boot.img at offset
CONFIG_SYS_SPI_U_BOOT_OFFS = 0x80000.
It is the start address of mtd partition ssbl in nor.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: Set bootdelay to 1
Patrice Chotard [Tue, 30 Jul 2019 17:16:35 +0000 (19:16 +0200)]
stm32mp1: configs: Set bootdelay to 1

This allows to display splashcreen without waiting
an extra delay of 2 seconds due to default value of bootdelay.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add altbootcmd
Patrick Delaunay [Tue, 30 Jul 2019 17:16:34 +0000 (19:16 +0200)]
stm32mp1: configs: add altbootcmd

Add altbootcmad as it is used for
- bootcountlimit
- in mach-stm32mp/cpu.c for BOOT_RECOVERY mode

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add condition to activate WATCHDOG in SPL
Patrick Delaunay [Tue, 30 Jul 2019 17:16:33 +0000 (19:16 +0200)]
stm32mp1: configs: add condition to activate WATCHDOG in SPL

Only activate WATCHDOG in SPL when CONFIG_WATCHDOG is activated in U-Boot.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add CONFIG_CMD_BMP
Patrick Delaunay [Tue, 30 Jul 2019 17:16:32 +0000 (19:16 +0200)]
stm32mp1: configs: add CONFIG_CMD_BMP

Activate command BMP for splash screen support

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add BACKLIGHT_GPIO support
Patrick Delaunay [Tue, 30 Jul 2019 17:16:31 +0000 (19:16 +0200)]
stm32mp1: configs: add BACKLIGHT_GPIO support

Backlight of panel raydium RM68200 is controlled by a simple gpio,
thus we activate the support for the needed driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: add CONFIG_DM_VIDEO
Patrick Delaunay [Tue, 30 Jul 2019 17:16:30 +0000 (19:16 +0200)]
stm32mp1: configs: add CONFIG_DM_VIDEO

Activate command DM_VIDEO for LCD support

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: Deactivate SPI_FLASH_BAR
Patrick Delaunay [Tue, 30 Jul 2019 17:16:29 +0000 (19:16 +0200)]
stm32mp1: configs: Deactivate SPI_FLASH_BAR

Remove CONFIG_SPI_FLASH_BAR as the SPI NOR layer uses stateless
4 byte opcodes by default.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: imply CONFIG_OF_LIBFDT_OVERLAY
Patrick Delaunay [Tue, 30 Jul 2019 17:16:28 +0000 (19:16 +0200)]
stm32mp1: configs: imply CONFIG_OF_LIBFDT_OVERLAY

Add imply for FDT overlay that can be usefuill for kernel device tree
management but it is not mandatory (can be removed to gain space)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: support MTDPARTS only if needed
Patrick Delaunay [Tue, 30 Jul 2019 17:16:27 +0000 (19:16 +0200)]
stm32mp1: configs: support MTDPARTS only if needed

MTD is only use if NAND or NOR driver is activated.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: Activate DISABLE_CONSOLE
Patrick Delaunay [Tue, 30 Jul 2019 17:16:26 +0000 (19:16 +0200)]
stm32mp1: configs: Activate DISABLE_CONSOLE

Activate DISABLE_CONSOLE needed for stm32prog support on uart.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: select CONFIG_STM32_SERIAL
Patrick Delaunay [Tue, 30 Jul 2019 17:16:25 +0000 (19:16 +0200)]
stm32mp1: configs: select CONFIG_STM32_SERIAL

Select the serial driver mandatory for the console.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: deactivate ARMV7_VIRT for basic boot
Patrick Delaunay [Tue, 30 Jul 2019 17:16:24 +0000 (19:16 +0200)]
stm32mp1: configs: deactivate ARMV7_VIRT for basic boot

for the moment basic and trusted configuration must
start CPU in Supervisor mode and not in Hypervisor

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: activate PRE_CONSOLE_BUFFER
Patrick Delaunay [Tue, 30 Jul 2019 17:16:23 +0000 (19:16 +0200)]
stm32mp1: configs: activate PRE_CONSOLE_BUFFER

Correctly handle silent=1 in the default environment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: activate CONFIG_SILENT_CONSOLE
Patrick Delaunay [Tue, 30 Jul 2019 17:16:22 +0000 (19:16 +0200)]
stm32mp1: configs: activate CONFIG_SILENT_CONSOLE

Allow to disable console with environment variable 'silent':
> env set silent 1; env save

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: configs: remove CONFIG_SYS_HZ
Patrick Delaunay [Tue, 30 Jul 2019 17:16:21 +0000 (19:16 +0200)]
stm32mp1: configs: remove CONFIG_SYS_HZ

Use the default value from lib/Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostpmic1: program pmic to keep only the debug unit on
Patrick Delaunay [Tue, 30 Jul 2019 17:16:20 +0000 (19:16 +0200)]
stpmic1: program pmic to keep only the debug unit on

Depending on backup register value, we maintain the debug unit
powered-on for debugging purpose.
Only BUCK1 is required for powering the debug unit, so revert
the setting for all the other power lanes, except BUCK3 that
has to be always on.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agodt-bindings: clock: stm32mp1: support disabled fixed clock
Patrick Delaunay [Tue, 30 Jul 2019 17:16:19 +0000 (19:16 +0200)]
dt-bindings: clock: stm32mp1: support disabled fixed clock

Add precision for disabled fixed clock in stm32mp1 binding.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: add pull-up on serial rx of console connected to STLINK
Patrick Delaunay [Tue, 30 Jul 2019 17:16:18 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: add pull-up on serial rx of console connected to STLINK

Avoid U-Boot auto-boot interruption for line break detection
on console when the RX line connected to STLINK is floating
(-IO error in getc cause by framing error and testc return 1)
Same workaround is applied on all the STMicroelectonics board.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: add key support on DK1/DK2
Patrick Delaunay [Tue, 30 Jul 2019 17:16:17 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: add key support on DK1/DK2

Allow to use PA13 and PA14 to force fastboot mode or STM32CubeProgrammer
mode.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: add ldtc pre-reloc proper in SOC file
Patrick Delaunay [Tue, 30 Jul 2019 17:16:16 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: add ldtc pre-reloc proper in SOC file

The pre-relocation probe is needed to reserve video frame buffer
in video_reserve() for all the board;
LDTC must be tagged prereloc in SOC U-Boot dtsi file.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: Add PSCI node access before relocation
Patrick Delaunay [Tue, 30 Jul 2019 17:16:15 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: Add PSCI node access before relocation

Add node in DT and avoid error to search UCLASS_SYSRESET in
board_f.c::print_resetinfo() and lost 1.6s in U-Boot
for the trusted boot chain.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: Add iwdg2 support for SPL
Patrick Delaunay [Tue, 30 Jul 2019 17:16:14 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: Add iwdg2 support for SPL

This patch adds independent watchdog support for stm32mp157c
in SPL.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: DDR config v1.45
Patrick Delaunay [Tue, 30 Jul 2019 17:16:13 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: DDR config v1.45

Update DDR configuration with the latest update:
- Change DQSGE to 1 for DDR3, to cure missing DQS preamble.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: sync device tree with v5.3-rc2
Patrick Delaunay [Tue, 30 Jul 2019 17:16:12 +0000 (19:16 +0200)]
ARM: dts: stm32mp1: sync device tree with v5.3-rc2

Synchronize device tree with v5.3-rc2 label and
update the associated u-boot dtsi.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopinctrl: stmfx: update pinconf settings
Patrick Delaunay [Tue, 30 Jul 2019 17:16:11 +0000 (19:16 +0200)]
pinctrl: stmfx: update pinconf settings

Alignment with kernel driver.

According to the following tab (coming from STMFX datasheet), updates
have to done in stmfx_pinctrl_conf_set function:

-"type" has to be set when "bias" is configured as "pull-up or pull-down"
-PIN_CONFIG_DRIVE_PUSH_PULL should only be used when gpio is configured as
 output. There is so no need to check direction.

  DIR | TYPE | PUPD | MFX GPIO configuration
  ----|------|------|---------------------------------------------------
  1   | 1    | 1    | OUTPUT open drain with internal pull-up resistor
  ----|------|------|---------------------------------------------------
  1   | 1    | 0    | OUTPUT open drain with internal pull-down resistor
  ----|------|------|---------------------------------------------------
  1   | 0    | 0/1  | OUTPUT push pull no pull
  ----|------|------|---------------------------------------------------
  0   | 1    | 1    | INPUT with internal pull-up resistor
  ----|------|------|---------------------------------------------------
  0   | 1    | 0    | INPUT with internal pull-down resistor
  ----|------|------|---------------------------------------------------
  0   | 0    | 1    | INPUT floating
  ----|------|------|---------------------------------------------------
  0   | 0    | 0    | analog (GPIO not used, default setting)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopinctrl: pinctrl_stm32: cosmetic: Reorder include files
Patrice Chotard [Tue, 30 Jul 2019 17:16:10 +0000 (19:16 +0200)]
pinctrl: pinctrl_stm32: cosmetic: Reorder include files

Reorder include files

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: cosmetic: remove comment
Patrick Delaunay [Tue, 30 Jul 2019 17:16:09 +0000 (19:16 +0200)]
stm32mp1: cosmetic: remove comment

Remove unnecessary comment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agortc: stm32: manage 2 digit limitation on year
Patrick Delaunay [Mon, 22 Jul 2019 12:50:21 +0000 (14:50 +0200)]
rtc: stm32: manage 2 digit limitation on year

STM32 RTC manages only 2 digits for YEAR
(Year tens and units in BCD format in RTC_DR register).

With this patch, RTC driver assumes that tm->tm_years is between
2000 and 2099; tm->tm_year - 2000 have only 2 digit
(0 > and <= 99).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stih410-b2260: Sync DT with kernel v5.2
Patrice Chotard [Tue, 23 Jul 2019 13:33:30 +0000 (15:33 +0200)]
ARM: dts: stih410-b2260: Sync DT with kernel v5.2

Synchronize U-boot DT with kernel v5.2 for stih410-b2260.
Update stih410-b2260-u-boot.dtsi accordingly.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agommc: sti_sdhci: Fix sdhci_setup_cfg() call.
Patrice Chotard [Wed, 24 Jul 2019 07:51:02 +0000 (09:51 +0200)]
mmc: sti_sdhci: Fix sdhci_setup_cfg() call.

host->mmc, host->mmc->dev and host->mmc->priv must be set
before calling sdhci_setup_cfg() to avoid hang during mmc
initialization.

Thanks to commit 3d296365e4e8
("mmc: sdhci: Add support for sdhci-caps-mask") which put
this issue into evidence.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agommc: stm32_sdmmc2: Increase SDMMC_BUSYD0END_TIMEOUT_US
Patrice Chotard [Mon, 22 Jul 2019 09:41:10 +0000 (11:41 +0200)]
mmc: stm32_sdmmc2: Increase SDMMC_BUSYD0END_TIMEOUT_US

Increase SDMMC_BUSYD0END_TIMEOUT_US from 1s to 2s to
avoid timeout error during blocks erase on some sdcard

Issue seen on Kingston 16GB :
  Device: STM32 SDMMC2
  Manufacturer ID: 27
  OEM: 5048
  Name: SD16G
  Bus Speed: 50000000
  Mode: SD High Speed (50MHz)
  card capabilities: widths [4, 1] modes [SD Legacy, SD High Speed (50MHz)]
  host capabilities: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed (26MHz), SD High Speed (50MHz), MMC High Speed (52MHz)]
  Rd Block Len: 512
  SD version 3.0
  High Capacity: Yes
  Capacity: 14.5 GiB
  Bus Width: 4-bit
  Erase Group Size: 512 Bytes

Issue reproduced with following command:

STM32MP> mmc erase 0 100000

MMC erase: dev # 0, block # 0, count 1048576 ... mmc erase failed
16384 blocks erased: ERROR

By setting SDMMC_BUSYD0END_TIMEOUT_US at 2 seconds and by adding
time measurement in stm32_sdmmc2_end_cmd() as shown below:

+start = get_timer(0);
/* Polling status register */
ret = readl_poll_timeout(priv->base + SDMMC_STA,
 status, status & mask,
   SDMMC_BUSYD0END_TIMEOUT_US);

+printf("time = %ld ms\n", get_timer(start));

We get the following trace:

STM32MP> mmc erase 0  100000

MMC erase: dev # 0, block # 0, count 1048576 ...
time = 17 ms
time = 1 ms
time = 1025 ms
time = 54 ms
time = 56 ms
time = 1021 ms
time = 57 ms
time = 56 ms
time = 1020 ms
time = 53 ms
time = 57 ms
time = 1021 ms
time = 53 ms
time = 57 ms
time = 1313 ms
time = 54 ms
time = 56 ms
time = 1026 ms
time = 54 ms
time = 56 ms
time = 1036 ms
time = 54 ms
time = 56 ms
time = 1028 ms
time = 53 ms
time = 56 ms
time = 1027 ms
time = 54 ms
time = 56 ms
time = 1024 ms
time = 54 ms
time = 56 ms
time = 1020 ms
time = 54 ms
time = 57 ms
time = 1023 ms
time = 54 ms
time = 56 ms
time = 1033 ms
time = 53 ms
time = 57 ms
....
time = 53 ms
time = 57 ms
time = 1021 ms
time = 56 ms
time = 56 ms
time = 1026 ms
time = 54 ms
time = 56 ms
1048576 blocks erased: OK

We see that 1 second timeout is not enough, we also see one measurement
up to 1313 ms. Set the timeout to 2 second to keep a security margin.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agomisc: i2c_eeprom: verify that the chip is functional at probe()
Baruch Siach [Mon, 5 Aug 2019 06:03:30 +0000 (09:03 +0300)]
misc: i2c_eeprom: verify that the chip is functional at probe()

Read a single byte from EEPROM to verify that it is actually there.

This is equivalent to Linux kernel commit 00f0ea70d2b8 ("eeprom: at24:
check if the chip is functional in probe()").

Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
hs: fixed style check prefer kernel type 'u8' over 'uint8_t'

5 years agoi2c: mxc_i2c: Remove i2c_idle_bus from probe
Ye Li [Wed, 10 Jul 2019 10:24:15 +0000 (10:24 +0000)]
i2c: mxc_i2c: Remove i2c_idle_bus from probe

i2c_idle_bus is already used in i2c_init_transfer. So before each transfer
if the bus is not ready, the i2c_idle_bus will be used to force idle.
It is unnecessary to call it again in probe.

We found a issue when enabling i2c mux with the mxc_i2c. The mxc_i2c is probed
after mux probing. However, at this moment the mux is still in idle state not
select any port. So if we call i2c_idle_bus in probe, it will fail and cause
mxc_i2c probe failed.

Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agoi2c-mux-gpio: Fix GPIO request flag issue
Ye Li [Wed, 10 Jul 2019 10:23:09 +0000 (10:23 +0000)]
i2c-mux-gpio: Fix GPIO request flag issue

When requesting GPIO, the GPIOD_IS_OUT is missed in flag, so the GPIO
is set the input mode not output and cause mux not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agoPrepare v2019.10-rc3
Tom Rini [Tue, 27 Aug 2019 00:16:42 +0000 (20:16 -0400)]
Prepare v2019.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch '2019-08-26-master-imports'
Tom Rini [Mon, 26 Aug 2019 21:45:20 +0000 (17:45 -0400)]
Merge branch '2019-08-26-master-imports'

- Assorted minor bugfixes

5 years agopowerpc: Enable device tree support for MPC8548CDS
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:36 +0000 (09:35 +0000)]
powerpc: Enable device tree support for MPC8548CDS

Add device tree for MPC8548CDS board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: mpc8548cds: extend the reserved length for monitor
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:35 +0000 (09:35 +0000)]
powerpc: mpc8548cds: extend the reserved length for monitor

Extend the reserved length for monitor to fix the following
build error:

BINMAN  u-boot-with-dtb.bin
Wrote map file './image.map' to show errors
binman: Section '/binman': contents size 0x80000 (524288)
exceeds section size 0x40000 (262144)
Makefile:1373: recipe for target 'u-boot-with-dtb.bin' failed
make: *** [u-boot-with-dtb.bin] Error 1

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: dts: add default definition of CONFIG_RESET_VECTOR_ADDRESS
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:34 +0000 (09:35 +0000)]
powerpc: dts: add default definition of CONFIG_RESET_VECTOR_ADDRESS

Add CONFIG_RESET_VECTOR_ADDRESS definition with the default value
in u-boot.dtsi to fix the build error below. In the configuration
header file of some MPC85xx boards, there is not the definition
of CONFIG_RESET_VECTOR_ADDRESS, while CONFIG_SYS_MPC85XX_NO_RESETVEC
is also not defined. In this case, it will lack of definition of
CONFIG_RESET_VECTOR_ADDRESS in u-boot.dtsi, and the address
0xfffffffc will be used as the boot page by default.

Error log:
  DTC     arch/powerpc/dts/mpc8548cds.dtb
  DTC     arch/powerpc/dts/mpc8548cds_36b.dtb
Error: arch/powerpc/dts/u-boot.dtsi:28.15-16 syntax error
FATAL ERROR: Unable to parse input tree
Error: arch/powerpc/dts/u-boot.dtsi:28.15-16 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:308: recipe for target
'arch/powerpc/dts/mpc8548cds.dtb' failed
make[2]: *** [arch/powerpc/dts/mpc8548cds.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.lib:308: recipe for target
'arch/powerpc/dts/mpc8548cds_36b.dtb' failed
make[2]: *** [arch/powerpc/dts/mpc8548cds_36b.dtb] Error 1
dts/Makefile:38: recipe for target 'arch-dtbs' failed
make[1]: *** [arch-dtbs] Error 2
Makefile:1038: recipe for target 'dts/dt.dtb' failed
make: *** [dts/dt.dtb] Error 2

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P5040DS
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:33 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P5040DS

Add device tree for P5040DS board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P4080DS
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:32 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P4080DS

Add device tree for P4080DS board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P3041DS
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:31 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P3041DS

Add device tree for P3041DS board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P2041RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:30 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P2041RDB

Add device tree for P1041RDB board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P2020RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:29 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P2020RDB

Add device tree for P1020RDB boards and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for P1020RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:28 +0000 (09:35 +0000)]
powerpc: Enable device tree support for P1020RDB

Add device tree for P1020RDB boards and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for T1042D4RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:27 +0000 (09:35 +0000)]
powerpc: Enable device tree support for T1042D4RDB

Add device tree for T1042D4RDB board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for T1024RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:26 +0000 (09:35 +0000)]
powerpc: Enable device tree support for T1024RDB

Add device tree for T1024RDB board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for T4240RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:25 +0000 (09:35 +0000)]
powerpc: Enable device tree support for T4240RDB

Add device tree for T4240RDB board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: Enable device tree support for T2080RDB
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:24 +0000 (09:35 +0000)]
powerpc: Enable device tree support for T2080RDB

Add device tree for T2080RDB board and enable CONFIG_OF_CONTROL
so that device tree can be compiled.
Update board README for device tree usage.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agotools: remove easylogo and include/video_logo.h
Heinrich Schuchardt [Thu, 22 Aug 2019 10:32:42 +0000 (12:32 +0200)]
tools: remove easylogo and include/video_logo.h

include/video_logo.h once was created via the tool easylogo and than used
in cpu/mpc8xx/video.c to display Tux. video_logo.h has been replaced by
include/linux_logo.h and is not needed anymore.

Delete the include and the tool,

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoARM: am3517-evm: Disable CONFIG_USB_EHCI_OMAP in SPL
Adam Ford [Thu, 22 Aug 2019 21:44:03 +0000 (16:44 -0500)]
ARM: am3517-evm: Disable CONFIG_USB_EHCI_OMAP in SPL

Found accidentally in omap3_logic, CONFIG_USB_EHCI_OMAP adds some
code size to SPL, so this patch disables it on the am3517-evm to
reduce the code a bit since it's tight for space.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: da850evm_direct_nor: Enable DM_GPIO
Adam Ford [Sun, 25 Aug 2019 15:01:14 +0000 (10:01 -0500)]
ARM: da850evm_direct_nor: Enable DM_GPIO

The SPI and NAND variants enable DM_GPIO, so this patch enables
DM_GPIO for the NOR / XIP version of the da850-evm.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: da850evm_nand: Enable Ethernet
Adam Ford [Sun, 25 Aug 2019 14:34:49 +0000 (09:34 -0500)]
ARM: da850evm_nand: Enable Ethernet

The NAND configuration has had the ethernet missing, so this patch
enables the on-board ethernet interface.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoKconfig: Varios: Fix more SPL, TPL dependencies
Adam Ford [Sat, 24 Aug 2019 18:50:34 +0000 (13:50 -0500)]
Kconfig: Varios: Fix more SPL, TPL dependencies

Several options are presenting themselves on a various boards
where the options are clearly not used.  (ie, SPL/TPL options
when SPL or TPL are not defined)

This patch is not attempting to be a complete list of items, but
more like low hanging fruit.  In some instances, I wasn't sure
of DM was required, so I simply made them SPL or TPL.

This patch attempts to reduce some of the menuconfig noise
by defining dependencies so they don't appear when not used.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoMAINTAINERS,board/siemens: update maintainer
Samuel Egli [Fri, 23 Aug 2019 14:11:45 +0000 (16:11 +0200)]
MAINTAINERS,board/siemens: update maintainer

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Acked-by: Roger Meier <r.meier@siemens.com>
Cc: Heiko Schocher <hs@denx.de>
5 years agopowerpc: mpc85xx: Add device tree support option for PBL boot image
Hou Zhiqiang [Tue, 20 Aug 2019 09:35:23 +0000 (09:35 +0000)]
powerpc: mpc85xx: Add device tree support option for PBL boot image

The current Makefile always use u-boot.bin to generate
PBL boot image (u-boot.pbl), this patch changes it to
use u-boot-with-dtb.bin to support device tree when
CONFIG_OF_SEPARATE is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agomailmap: Update mail address
Ricardo Ribalda Delgado [Fri, 23 Aug 2019 13:59:55 +0000 (15:59 +0200)]
mailmap: Update mail address

Update my email address from gmail to my domain.

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
5 years agoboard: ti: am43xx_evm_usbboot: Enable DM for USB, fix SPL build errors
Suniel Mahesh [Fri, 23 Aug 2019 08:36:34 +0000 (14:06 +0530)]
board: ti: am43xx_evm_usbboot: Enable DM for USB, fix SPL build errors

To address the following warning message:

===================== 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.
====================================================

CONFIG_DM_USB is enabled, this resulted in SPL build errors:

drivers/built-in.o: In function 'xhci_dwc3_probe':
u-boot/drivers/usb/host/xhci-dwc3.c:155: undefined reference to 'usb_get_dr_mode'
scripts/Makefile.spl:404: recipe for target 'spl/u-boot-spl' failed
make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1721: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error 2

Enabling usb common library and usb ethernet drivers in SPL
does the job. Target was compile tested, build was clean.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
5 years agonvme: Fix PRP Offset Invalid
Aaron Williams [Fri, 23 Aug 2019 03:37:26 +0000 (20:37 -0700)]
nvme: Fix PRP Offset Invalid

When large writes take place I saw a Samsung EVO 970+ return a status
value of 0x13, PRP Offset Invalid.  I tracked this down to the
improper handling of PRP entries.  The blocks the PRP entries are
placed in cannot cross a page boundary and thus should be allocated
on page boundaries.  This is how the Linux kernel driver works.

With this patch, the PRP pool is allocated on a page boundary and
other than the very first allocation, the pool size is a multiple of
the page size.  Each page can hold (4096 / 8) - 1 entries since the
last entry must point to the next page in the pool.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agocmd: pci: Adjust display of digits for 64bit address and size
Kunihiko Hayashi [Fri, 23 Aug 2019 01:56:55 +0000 (10:56 +0900)]
cmd: pci: Adjust display of digits for 64bit address and size

The command "pci bar" and "pci region" display the address and size in
16 characters including "0x", so the command can only display
14 hexadecimal digits if the number of digits in the address and size is
less than 14.

    ID   Base                Size                Width  Type
    ----------------------------------------------------------
     0   0x00000020000000  0x00000000100000  64     MEM   Prefetchable
     1   0xffff000080000000  0x00000000100000  64     MEM   Prefetchable

The 64-bit address and size should be displayed in 18(= 16+2) digits,
so this patch adjusts them.

Cc: Yehuda Yitschak <yehuday@marvell.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoARM: omap3_logic: Fix SPL boot failure when EHCI enabled
Adam Ford [Thu, 22 Aug 2019 20:32:42 +0000 (15:32 -0500)]
ARM: omap3_logic: Fix SPL boot failure when EHCI enabled

Some of the USB code is still being built into SPL even when the
SPL menu options have it explicitly disabled for SPL. Unit there is
a better solution, This patch undefines CONFIG_USB_EHCI_OMAP when
building SPL which reduces the code and lets the board boot again.

Fixes: 25e4ff45b17d ("ARM: omap3_logic: Enable OMAP EHCI support
for SOM-LV Boards")

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agocmd: gpio: remove redundant assignment
Heinrich Schuchardt [Thu, 22 Aug 2019 20:19:41 +0000 (22:19 +0200)]
cmd: gpio: remove redundant assignment

The assigned value NULL is overwritten before being used. Remove the
assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agovexpress/aemv8a: drop CONFIG_ARMV8_SWITCH_TO_EL1
Sudeep Holla [Wed, 21 Aug 2019 17:29:10 +0000 (18:29 +0100)]
vexpress/aemv8a: drop CONFIG_ARMV8_SWITCH_TO_EL1

To support KVM, we need to drop at EL2 and not EL1 before we boot Linux
kernel. This causes issues on platform with VHE and secondaries booting
at EL2 via TF-A PSCI CPU_ON call.

Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Liviu Dudau <liviu.dudau@foss.arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: David Feng <fenghua@phytium.com.cn>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoARM: vexpress_*_defconfig: replace earlyprintk with earlycon
Sudeep Holla [Wed, 21 Aug 2019 17:29:09 +0000 (18:29 +0100)]
ARM: vexpress_*_defconfig: replace earlyprintk with earlycon

earlyprintk no longer works on arm64 platforms. Replace it with earlycon
which works fine.

Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Liviu Dudau <liviu.dudau@foss.arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>