]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 years agosun50i: h5: Orange Pi Zero Plus: Fix SdCard detection
Hauke Mehrtens [Sun, 13 Jan 2019 16:41:47 +0000 (17:41 +0100)]
sun50i: h5: Orange Pi Zero Plus: Fix SdCard detection

The Detection pin is at PF6 and not at PH13 like defined before. I
checked the schematics and now I am am not seeing this error message any
more:
Loading Environment from FAT... Card did not respond to voltage select!

CONFIG_MMC_SUNXI_SLOT_EXTRA is also not needed because the second MCC
slot is for the Wifi card.

Fixes: 76d69eb01de ("sun50i: h5: Add initial Orange Pi Zero Plus support")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agoarm: sunxi: Enable SPL/SPI boot for Olinuxino Lime2-eMMC boards
Priit Laes [Thu, 10 Jan 2019 09:30:06 +0000 (11:30 +0200)]
arm: sunxi: Enable SPL/SPI boot for Olinuxino Lime2-eMMC boards

Starting from revision K the Olimex-Lime2-eMMC boards include
eMMC 5.x chip. Unfortunately, the internal brom in the A20
cannot reliably initialize those chips resulting in random
boot failures on those boards.

To overcome this, all the latest Lime2-eMMC boards are
populated with 16MB SPI flash and therefore enable support
for SPI SPL boot.

For now, SPI flash can be managed using sunxi-fel's spiflash tools.

Signed-off-by: Priit Laes <priit.laes@paf.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sun, 10 Feb 2019 13:11:53 +0000 (08:11 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- SD/MMC fixes and ext4 memory leak fix

5 years agoMerge tag 'dm-pull-10feb19' of git://git.denx.de/u-boot-dm
Tom Rini [Sun, 10 Feb 2019 13:11:32 +0000 (08:11 -0500)]
Merge tag 'dm-pull-10feb19' of git://git.denx.de/u-boot-dm

Samsung sound patches (applied for Samsung maintainer)
Common sound support
buildman environment support
of-platdata documentation improvements

5 years agoMerge branch '2019-02-08-master-imports'
Tom Rini [Sun, 10 Feb 2019 13:04:53 +0000 (08:04 -0500)]
Merge branch '2019-02-08-master-imports'

- bcm6345 watchdog, bcm63158/bcm963158 initial support.
- Various TI platform resyncs and improvements.
- FDT support in Android-format images.
- stm32mp1 improvements.

5 years agosound: Allow audio codecs to be used by other SoCs
Simon Glass [Thu, 27 Dec 2018 20:24:39 +0000 (13:24 -0700)]
sound: Allow audio codecs to be used by other SoCs

At present there is still some samsung-specific code in the audio codecs.
Remove it so that these can be used by other SoCs.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosound: i2s: Tidy up a few comments
Simon Glass [Thu, 27 Dec 2018 20:24:38 +0000 (13:24 -0700)]
sound: i2s: Tidy up a few comments

Fix a struct typo and drop a comment (and function prototype) which is not
actually used.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosound: samsung: Fix 'regiter' typo
Simon Glass [Thu, 27 Dec 2018 20:24:37 +0000 (13:24 -0700)]
sound: samsung: Fix 'regiter' typo

Fix a typo that appears many times in this file.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agomisc: Allow child devices
Simon Glass [Thu, 27 Dec 2018 20:24:36 +0000 (13:24 -0700)]
misc: Allow child devices

Allow misc devices to have children, so that we can use this uclass for
cases where a child device (e.g. I2S) needs to access a misc driver for
transferring data.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobuildman: fix typo
Chris Packham [Fri, 18 Jan 2019 07:40:29 +0000 (20:40 +1300)]
buildman: fix typo

Fix a typo in the error message from CheckOutputDir().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoof-platdata: improve documentation
Simon Goldschmidt [Wed, 16 Jan 2019 19:40:18 +0000 (20:40 +0100)]
of-platdata: improve documentation

Improve some things in the documentation of OF_PLATDATA that I found
while porting socfgpa_gen5 to it.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agobuildman: Write the environment out to an 'env' file
Simon Glass [Mon, 7 Jan 2019 23:44:23 +0000 (16:44 -0700)]
buildman: Write the environment out to an 'env' file

Sometimes it is useful to see the environment that was used to build
U-Boot. Write this out to a file in the build directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agommc: omap_hsmmc: Use regulator_set_enable_if_allowed for enabling regulator
Lokesh Vutla [Fri, 11 Jan 2019 09:45:52 +0000 (15:15 +0530)]
mmc: omap_hsmmc: Use regulator_set_enable_if_allowed for enabling regulator

Use regulator_set_enable_if_allowed() api instead of regulator_set_enable()
while enabling io regulators. This way the driver doesn't see an error
when disabling an always-on regulator and when enabling is not supported.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agopower: regulator: Introduce regulator_set_enable_if_allowed api
Lokesh Vutla [Fri, 11 Jan 2019 09:45:51 +0000 (15:15 +0530)]
power: regulator: Introduce regulator_set_enable_if_allowed api

regulator_set_enable() api throws an error in the following three cases:
- when requested to disable an always-on regulator
- when set_enable() ops not provided by regulator driver
- when enabling is actually failed.(Error returned by the regulator driver)

Sometimes consumer drivers doesn't want to track the first two scenarios
and just need to worry about the case where enabling is actually failed.
But it is also a good practice to have an error value returned in the
first two cases.

So introduce an api regulator_set_enable_if_allowed() which ignores the
first two error cases and returns an error as given by regulator driver.
Consumer drivers can use this api need not worry about the first two
error conditions.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoRevert "power: regulator: Return success on attempt to disable an always-on regulator"
Lokesh Vutla [Fri, 11 Jan 2019 09:45:50 +0000 (15:15 +0530)]
Revert "power: regulator: Return success on attempt to disable an always-on regulator"

This reverts commit e17e0ceb83538c015a50b965547f2f4d38f81c5d.

It is advised to return an error when trying to disable an always-on
regulator and let the consumer driver handle the error if needed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agofdt: tegra: Drop COMPAT_AMS_AS3722
Simon Glass [Sat, 12 Jan 2019 01:37:15 +0000 (18:37 -0700)]
fdt: tegra: Drop COMPAT_AMS_AS3722

This is no-longer used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agofdt: samsung: Drop unused fdt_compat_id values
Simon Glass [Sat, 12 Jan 2019 01:37:14 +0000 (18:37 -0700)]
fdt: samsung: Drop unused fdt_compat_id values

This enum still exists but we can shrink it a little based on recent
driver-model conversions with samsung. Update it to remove unused items.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agosamsung: mmc: Drop old MMC init code
Simon Glass [Sat, 12 Jan 2019 01:37:13 +0000 (18:37 -0700)]
samsung: mmc: Drop old MMC init code

Now that these boards use driver model we can drop the old code. At
present s5p_mmc_init() is still used by goni and smdkv310 so cannot be
removed unless we remove those boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agosamsung: Drop board_enable_audio_codec()
Simon Glass [Sat, 12 Jan 2019 01:37:12 +0000 (18:37 -0700)]
samsung: Drop board_enable_audio_codec()

This function is not needed now since the audio codecs have been converted
to proper drivers. The codec-enable GPIO is handled there.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agospring: Update flashmap details
Simon Glass [Sat, 12 Jan 2019 01:37:11 +0000 (18:37 -0700)]
spring: Update flashmap details

Update the flashmap so that this board can be started over USB A-A. It
is slightly different from snow.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agospring: Update sound to use max98088 codec
Simon Glass [Sat, 12 Jan 2019 01:37:10 +0000 (18:37 -0700)]
spring: Update sound to use max98088 codec

Update the spring settings to use this codec, which is what it actually
shipped with.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agosound: Add a driver for max98088
Simon Glass [Sat, 12 Jan 2019 01:37:09 +0000 (18:37 -0700)]
sound: Add a driver for max98088

This chip is used by spring. Add a driver for it and update the
samsung_sound driver to pick it up.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoexynos: Convert to use CONFIG_BLK
Simon Glass [Sat, 12 Jan 2019 01:37:08 +0000 (18:37 -0700)]
exynos: Convert to use CONFIG_BLK

Move all exynos boards over to use CONFIG_BLK.

This converts s5p_goni also, but adding dummy functions for pinmux and
peripheral ID. This will not function correctly, but gives the maintainer
more time to convert the board if desired.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoexynos: Drop duplicate 'model' line
Simon Glass [Sat, 12 Jan 2019 01:37:07 +0000 (18:37 -0700)]
exynos: Drop duplicate 'model' line

At present the model is shown twice, once in the generic code and once
in the exynos code. Drop the latter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoConvert CONFIG_BOARD_TYPES to Kconfig
Simon Glass [Sat, 12 Jan 2019 01:37:06 +0000 (18:37 -0700)]
Convert CONFIG_BOARD_TYPES to Kconfig

This converts the following to Kconfig:
   CONFIG_BOARD_TYPES

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: mach-k3: common: Clean up ATF image startup function
Andreas Dannenberg [Mon, 4 Feb 2019 18:58:47 +0000 (12:58 -0600)]
arm: mach-k3: common: Clean up ATF image startup function

Perform some cosmetic cleanup of the ATF image startup function, namely
fixing a spelling mistake, capitalization of a few words, spacing, as
well aligning how errors are printed and as using panic() for cases that
were using a combination of printf() + hang().

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agobcm968580xref: switch to CONFIG_OF_SEPARATE
Philippe Reynes [Mon, 4 Feb 2019 14:14:18 +0000 (15:14 +0100)]
bcm968580xref: switch to CONFIG_OF_SEPARATE

The option OF_EMBED is deprecated,
so we switch to CONFIG_OF_SEPARATE

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm968580: rename to bcm968580xref
Philippe Reynes [Mon, 4 Feb 2019 14:14:17 +0000 (15:14 +0100)]
bcm968580: rename to bcm968580xref

The name of the board is bcm968580xref,
so rename the config to bcm968580xref too.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agoarmv7R: K3: am654: Fix order of debug elements in x509 template
Andrew F. Davis [Fri, 1 Feb 2019 21:04:58 +0000 (15:04 -0600)]
armv7R: K3: am654: Fix order of debug elements in x509 template

The first element in the debug section is expected to be debugUID.
ROM will not parse this correctly when out of order, fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoam65x_evm: Allow bootm to load larger kernels
Andrew F. Davis [Fri, 1 Feb 2019 21:04:57 +0000 (15:04 -0600)]
am65x_evm: Allow bootm to load larger kernels

Bootm will fail to load kernels over 8MB, this is not enough
for our 64bit kernel images. Increase this to 64MB.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoconfigs: am65x_evm_r5: Enable GPT support
Andrew F. Davis [Fri, 1 Feb 2019 21:04:56 +0000 (15:04 -0600)]
configs: am65x_evm_r5: Enable GPT support

The second loader stages may be stored on GPT partitions,
enable support for this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agocmd: sata: add null pointer check for dev
Marcel Ziswiler [Fri, 1 Feb 2019 15:01:08 +0000 (16:01 +0100)]
cmd: sata: add null pointer check for dev

Calling sata_scan() with a null pointer probably won't make much sense.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: device: fail uclass_find_first_device() if list_empty
Marcel Ziswiler [Fri, 1 Feb 2019 15:01:07 +0000 (16:01 +0100)]
dm: device: fail uclass_find_first_device() if list_empty

While uclass_find_device() fails with -ENODEV in case of list_empty
strangely uclass_find_first_device() returns 0.

Fix uclass_find_first_device() to also fail with -ENODEV instead.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agobcm963158: enable watchdog and reboot with watchdog
Philippe Reynes [Thu, 31 Jan 2019 17:57:39 +0000 (18:57 +0100)]
bcm963158: enable watchdog and reboot with watchdog

Enable watchdog and reboot with watchdog in the configuration.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm63158: add watchdog
Philippe Reynes [Thu, 31 Jan 2019 17:57:38 +0000 (18:57 +0100)]
dt: bcm63158: add watchdog

This commit add watchdog and sysreset watchdog
in the bcm63158 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agowatchdog: bcm6345: allow to use this driver on arm bcm63158
Philippe Reynes [Thu, 31 Jan 2019 17:57:37 +0000 (18:57 +0100)]
watchdog: bcm6345: allow to use this driver on arm bcm63158

This IP is also used on some arm SoC, so we allow to
use it on arm bcm63158 too.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm963158: add initial support
Philippe Reynes [Thu, 31 Jan 2019 17:57:36 +0000 (18:57 +0100)]
bcm963158: add initial support

This add the initial support of the broadcom reference
board bcm963158 with a bcm63158 SoC.

This board has 1 GB of ram, 512 MB of flash (nand),
2 usb port, 1 uart, 4 ethernet ports (LAN), 1 ethernet port (WAN).

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm63158: add initial support
Philippe Reynes [Thu, 31 Jan 2019 17:57:35 +0000 (18:57 +0100)]
bcm63158: add initial support

This add the initial support of the broadcom bcm63158 SoC family,
only the cpu, dram and uart are supported.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agoinitcall: Move to inline function
Alexander Graf [Thu, 31 Jan 2019 15:06:23 +0000 (16:06 +0100)]
initcall: Move to inline function

The board_r init function was complaining that we are looping through
an array, calling all our tiny init stubs sequentially via indirect
function calls (which can't be speculated, so they are slow).

The solution to that is pretty easy though. All we need to do is inline
the function that loops through the functions and the compiler will
automatically convert almost all indirect calls into direct inlined code.

With this patch, the overall code size drops (by 40 bytes on riscv64)
and boot time should become measurably faster for every target.

Signed-off-by: Alexander Graf <agraf@suse.de>
5 years agoboard/BuR/brppt1: drop DM_I2C_COMPAT
Hannes Schmelzer [Thu, 31 Jan 2019 08:24:45 +0000 (09:24 +0100)]
board/BuR/brppt1: drop DM_I2C_COMPAT

The TPS62517 PMIC driver has been partially converted to DM, so the
legacy I2C access layer isn't needed anymore.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agommc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929)
Faiz Abbas [Wed, 30 Jan 2019 12:38:42 +0000 (18:08 +0530)]
mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929)

Errata i929 in certain OMAP5/DRA7XX/AM57XX silicon revisions
(SPRZ426D - November 2014 - Revised February 2018 [1]) mentions
unexpected tuning pattern errors. A small failure band may be present
in the tuning range which may be missed by the current algorithm.
Furthermore, the failure bands vary with temperature leading to
different optimum tuning values for different temperatures.

As suggested in the related Application Report (SPRACA9B - October 2017
- Revised July 2018 [2]), tuning should be done in two stages.
In stage 1, assign the optimum ratio in the maximum pass window for the
current temperature. In stage 2, if the chosen value is close to the
small failure band, move away from it in the appropriate direction.

References:
[1] http://www.ti.com/lit/pdf/sprz426
[2] http://www.ti.com/lit/pdf/SPRACA9

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
5 years agoclk: stm32mp1: correctly handle Clock Spreading Generator
Patrick Delaunay [Wed, 30 Jan 2019 12:07:06 +0000 (13:07 +0100)]
clk: stm32mp1: correctly handle Clock Spreading Generator

To activate the csg option, the driver need to set the bit2
of PLLNCR register = SSCG_CTRL: Spread Spectrum Clock Generator
of PLLn enable.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agodts: stm32mp1: clock tree update
Patrick Delaunay [Wed, 30 Jan 2019 12:07:05 +0000 (13:07 +0100)]
dts: stm32mp1: clock tree update

- Add st,digbypass on clk_hse node (needed for board rev.C)
- MLAHB/AHB max frequency increased from 200 to 209MHz, with:
  - PLL3P set to 208.8MHz for MCU sub-system
  - PLL3Q set to 24.57MHz for 48kHz SAI/SPI2S
  - PLL3R set to 11.29MHz for 44.1kHz SAI/SPI2S
  - PLL4P set to 99MHz for SDMMC and SPDIFRX
  - PLL4Q set to 74.25MHz for EVAL board

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: stm32mp1: add debug information
Patrick Delaunay [Wed, 30 Jan 2019 12:07:04 +0000 (13:07 +0100)]
clk: stm32mp1: add debug information

Add support of clk dump command and
display information during probe (under CONFIG_DISPLAY_CPUINFO).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: stm32mp1: recalculate counter when switching freq
Patrick Delaunay [Wed, 30 Jan 2019 12:07:03 +0000 (13:07 +0100)]
clk: stm32mp1: recalculate counter when switching freq

Because stgen is initialized with HSI clock, we need to
recalculate the counter when changing frequency.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: stm32mp1: correct access to RCC_OCENSETR/RCC_OCENCLRR
Patrick Delaunay [Wed, 30 Jan 2019 12:07:02 +0000 (13:07 +0100)]
clk: stm32mp1: correct access to RCC_OCENSETR/RCC_OCENCLRR

Remove unnecessary setbits on set/clear registers.
Avoid to deactivate HSI with HSE.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: stm32mp1: add IPCC clock
Patrick Delaunay [Wed, 30 Jan 2019 12:07:01 +0000 (13:07 +0100)]
clk: stm32mp1: add IPCC clock

Add support for enable/disable of IPCC clock using AHB3 registers

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: stm32mp1: no more get ck_usbo_48m in device tree
Patrick Delaunay [Wed, 30 Jan 2019 12:07:00 +0000 (13:07 +0100)]
clk: stm32mp1: no more get ck_usbo_48m in device tree

Remove support of ck_usbo_48m clock node in device tree,
but force 48MHz frequency to prepare alignment
with kernel device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agodrivers: serial: dm: Enable DM_FLAG_PRE_RELOC in SBSA pl011 uart driver
Vabhav Sharma [Wed, 30 Jan 2019 11:24:00 +0000 (11:24 +0000)]
drivers: serial: dm: Enable DM_FLAG_PRE_RELOC in SBSA pl011 uart driver

The DM_FLAG_PRE_RELOC shall be enabled in SBSA PL011 uart driver
as this driver is used in NXP based SoCs

It is necessary to have Serial console running before relocation

The !CONFIG_IS_ENABLED(OF_CONTROL) [*] check is set as "workaround"
for DM problem : 4687919684e

This flag is set if board does not support device-tree and using
platform data, In DM Model either of device tree or platform data
can be used to fetch device configuration

It is possible to use SBSA UART with CONFIG_DM_SERIAL but witout
corresponding device tree description (OF_CONTROL)

Other board/SoCs have this flag set unconditionally

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
5 years agohashtable: fix environment variable corruption
Roman Kapl [Wed, 30 Jan 2019 10:39:54 +0000 (11:39 +0100)]
hashtable: fix environment variable corruption

Only first previously deleted entry was recognized, leading hsearch_r
to think that there was no previously deleted entry. It then conluded
that a free entry was found, even if there were no free entries and it
overwrote a random entry.

This patch makes sure all deleted or free entries are always found and
also introduces constants for the 0 and -1 numbers. Unit tests to excersise a
simple hash table usage and catch the corruption were added.

To trash your environment, simply run this loop:

setenv i 0
while true; do
    setenv v_$i $i
    setenv v_$i
    setexpr i $i + 1
done

Signed-off-by: Roman Kapl <rka@sysgo.com>
5 years agomoveconfig: add a second pass for empty #if/#endif blocks
Chris Packham [Wed, 30 Jan 2019 07:23:16 +0000 (20:23 +1300)]
moveconfig: add a second pass for empty #if/#endif blocks

Moveconfig already attempts to remove empty #if/#endif blocks when there
is a matching CONFIG_ being moved. Add a second pass which covers files
without a match.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
5 years agoomap3_cairo: remove empty #ifdef/#endif block
Chris Packham [Wed, 30 Jan 2019 07:19:28 +0000 (20:19 +1300)]
omap3_cairo: remove empty #ifdef/#endif block

The content between these guards was removed in commit 9baa2bce2890
("Removed unused references to CONFIG_SERIALx"). Remove the now
empty #ifdef/#endif block and the accompanying comment.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
5 years agotest: provide unit test for memory functions
Heinrich Schuchardt [Wed, 30 Jan 2019 06:53:31 +0000 (07:53 +0100)]
test: provide unit test for memory functions

Memory functions may have architecture specific implementations. These
should be tested.

Provide unit tests for memset(), memcpy(), memmove().

Provide a 'ut lib' sub-command to execute the tests.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodoc: ti-secure: Add ULO info for AM57xx/DRA7xx secure devices from TI
Andrew F. Davis [Mon, 28 Jan 2019 17:43:26 +0000 (11:43 -0600)]
doc: ti-secure: Add ULO info for AM57xx/DRA7xx secure devices from TI

Booting from UART and USB on HS devices is now supported for this
platform. Update documentation for the same.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodefconfigs: Add config for AM57xx High Security EVM with USB/UART Boot support
Andrew F. Davis [Mon, 28 Jan 2019 17:43:25 +0000 (11:43 -0600)]
defconfigs: Add config for AM57xx High Security EVM with USB/UART Boot support

Add a new defconfig file for the AM57xx High Security EVM. This config
is specific for the case of USB/UART booting.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodefconfigs: Add config for DRA7xx High Security EVM with USB Boot support
Andrew F. Davis [Mon, 28 Jan 2019 17:43:24 +0000 (11:43 -0600)]
defconfigs: Add config for DRA7xx High Security EVM with USB Boot support

Add a new defconfig file for the DRA7xx High Security EVM. This config
is specific for the case of USB booting.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodefconfigs: am57xx_hs_evm: Sync HS and non-HS defconfigs
Andrew F. Davis [Mon, 28 Jan 2019 17:43:23 +0000 (11:43 -0600)]
defconfigs: am57xx_hs_evm: Sync HS and non-HS defconfigs

Additions have been made to the non-HS defconfig without the same
being made to the HS defconfig, sync them.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agodefconfigs: dra7xx_hs_evm: Sync HS and non-HS defconfigs
Andrew F. Davis [Mon, 28 Jan 2019 17:43:22 +0000 (11:43 -0600)]
defconfigs: dra7xx_hs_evm: Sync HS and non-HS defconfigs

Additions have been made to the non-HS defconfig without the same
being made to the HS defconfig, sync them.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agobcm968580: enable watchdog and reboot with watchdog
Philippe Reynes [Mon, 28 Jan 2019 14:37:32 +0000 (15:37 +0100)]
bcm968580: enable watchdog and reboot with watchdog

Enable watchdog and reboot with watchdog in the configuration.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm968380gerg: enable watchdog and reboot with watchdog
Philippe Reynes [Mon, 28 Jan 2019 14:37:31 +0000 (15:37 +0100)]
bcm968380gerg: enable watchdog and reboot with watchdog

Enable watchdog and reboot with watchdog in the configuration.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm6858: add watchdog
Philippe Reynes [Mon, 28 Jan 2019 14:37:30 +0000 (15:37 +0100)]
dt: bcm6858: add watchdog

This commit add watchdog and sysreset watchdog
in the bcm6858 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm6838: add watchdog
Philippe Reynes [Mon, 28 Jan 2019 14:37:29 +0000 (15:37 +0100)]
dt: bcm6838: add watchdog

This commit add watchdog and sysreset watchdog
in the bcm6838 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agowatchdog: bcm6345: allow to use this driver on arm bcm6858
Philippe Reynes [Mon, 28 Jan 2019 14:37:28 +0000 (15:37 +0100)]
watchdog: bcm6345: allow to use this driver on arm bcm6858

This IP is also used on some arm SoC, so we allow to
use it on arm bcm6858 too.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agowatchdog: bcm6345: switch to raw I/O functions
Philippe Reynes [Mon, 28 Jan 2019 14:37:27 +0000 (15:37 +0100)]
watchdog: bcm6345: switch to raw I/O functions

This driver is used on several big endian mips board.
So we could use raw I/O function instead of forcing
big endian access.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agofs: ext4: Unmount FS in do_fs_type()
Marek Vasut [Wed, 6 Feb 2019 12:19:29 +0000 (13:19 +0100)]
fs: ext4: Unmount FS in do_fs_type()

Unlike other generic FS accessors, fs_get_info() does not call fs_close()
at the end of it's operation. Thus, using fs_get_info() in do_fs_type()
without calling fs_close() causes potential memory leak by creating new
filesystem structures on each call of do_fs_type().

The test case to trigger this problem is as follows. It is required to
have ext4 filesystem on the first partition of the SDMMC device, since
ext4 requires stateful mount and causes memory allocation.
=> while true ; do mmc rescan ; fstype mmc 1 ; done
Eventually, the mounting of ext4 will fail due to malloc failures
and the filesystem will not be correctly detected.

This patch fixes the problem by adding the missing fs_close().

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
5 years agommc: Do not poll using CMD13 when changing timing
Marek Vasut [Wed, 6 Feb 2019 10:34:27 +0000 (11:34 +0100)]
mmc: Do not poll using CMD13 when changing timing

When using CMD6 to switch eMMC card timing from HS200/HS400 to HS/legacy,
do not poll for the completion status using CMD13, but rather wait 50mS.

Once the card receives the CMD6 and starts executing it, the bus is in
undefined state until both the card finishes executing the command and
until the controller switches the bus to matching timing configuration.
During this time, it is not possible to transport any commands or data
across the bus, which includes the CMD13.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
5 years agommc: tmio: renesas: Add 1uS delay after DMA completion on older IPs
Marek Vasut [Fri, 11 Jan 2019 22:38:07 +0000 (23:38 +0100)]
mmc: tmio: renesas: Add 1uS delay after DMA completion on older IPs

The internal DMAC asserts DMA transfer end bit too early on older
version of the TMIO IPs which use bit 17 for DTRAEND. Add 1uS
delay after the completion of DMA transfer and before invalidating
the cache to let the DMAC fully complete the transfer. Otherwise,
it could happen that the last few bytes of a transferred data are
not available.

A test case to trigger this behavior is the following command, ran
on the U-Boot command line, with Sandisk 16 GiB UHS-I card inserted
into SDHI slot 0 and with first partition being of type FAT:
=> while true ; do mmc rescan ; fstype mmc 0:1 ; done

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: tmio: Make DMA transfer end bit configurable
Marek Vasut [Fri, 11 Jan 2019 22:45:54 +0000 (23:45 +0100)]
mmc: tmio: Make DMA transfer end bit configurable

Different versions of the SDHI core use either bit 17 or bit 20 for the
DTRAEND indication, which can differ even between SoC revisions. Make
the DTRAEND bit position part of the driver private data, so that the
probe function can set this accordingly. Set this to 20 on Socionext
SoCs and either 17 or 20 on Renesas SoCs, depending on the SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agofdt: support booting with dtb in Android image
Shawn Guo [Tue, 15 Jan 2019 14:26:37 +0000 (22:26 +0800)]
fdt: support booting with dtb in Android image

Some platforms choose to store device tree blob in Android image second
area.  Let's try to look for dtb from there when booting an Android
image, and use it for booting if found.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agoPrepare v2019.04-rc1
Tom Rini [Fri, 8 Feb 2019 02:32:19 +0000 (21:32 -0500)]
Prepare v2019.04-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: Resync with savedefconfig
Tom Rini [Thu, 7 Feb 2019 19:53:03 +0000 (14:53 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Thu, 7 Feb 2019 19:48:56 +0000 (14:48 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- SPI-NOR support

5 years agoMAINTAINERS: Add an entry for SPI NOR
Vignesh R [Tue, 5 Feb 2019 05:59:29 +0000 (11:29 +0530)]
MAINTAINERS: Add an entry for SPI NOR

Add myself as co-maintainer for U-Boot SPI NOR subsystem.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[jagan: drop mtd/spi file from SPI entry]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoconfigs: Don't use SPI_FLASH_BAR as default
Vignesh R [Tue, 5 Feb 2019 05:59:28 +0000 (11:29 +0530)]
configs: Don't use SPI_FLASH_BAR as default

Now that new SPI NOR layer uses stateless 4 byte opcodes by default,
don't enable SPI_FLASH_BAR. For SPI controllers that cannot support
4-byte addressing, (stm32_qspi.c, fsl_qspi.c, mtk_qspi.c, ich.c,
renesas_rpc_spi.c) add an imply clause to enable SPI_FLASH_BAR so as to
not break functionality.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agoconfigs: Remove SF_DUAL_FLASH
Vignesh R [Tue, 5 Feb 2019 05:59:27 +0000 (11:29 +0530)]
configs: Remove SF_DUAL_FLASH

SF_DUAL_FLASH claims to enable support for SF_DUAL_STACKED_FLASH and
SF_DUAL_PARALLEL_FLASH. But, in current U-Boot code, grepping for above
enums yield no user and therefore support seems to be incomplete. Remove
these configs so as to avoid confusion.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agospl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
Vignesh R [Tue, 5 Feb 2019 05:59:26 +0000 (11:29 +0530)]
spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL

SPL only needs to be able to read from SPI Flash to load next stage and
does not really need write/erase etc. Therefore in order to reduce SPI
Flash code size in SPL, enable SPI_FLASH_TINY, that only supports
reading from SPI flash, as default.

Note: Since, SPI_FLASH_TINY does not support SPI_FLASH_BAR,
SPI_FLASH_TINY is not enabled for boards with SPI controllers that
cannot support 4 byte addressing.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: Add lightweight SPI flash stack for SPL
Vignesh R [Tue, 5 Feb 2019 05:59:25 +0000 (11:29 +0530)]
mtd: spi: Add lightweight SPI flash stack for SPL

Add a tiny SPI flash stack that just supports reading data/images from
SPI flash. This is useful for boards that have SPL size constraints and
would need to use SPI flash framework just to read images/data from
flash. There is approximately 1.5 to 2KB savings with this.

Based on prior work of reducing spi flash id table by
Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: Remove unused files
Vignesh R [Tue, 5 Feb 2019 05:59:24 +0000 (11:29 +0530)]
mtd: spi: Remove unused files

spi_flash and spi_flash_ids are no longer needed after SPI NOR
migration. Remove them.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: Switch to new SPI NOR framework
Vignesh R [Tue, 5 Feb 2019 05:59:23 +0000 (11:29 +0530)]
mtd: spi: Switch to new SPI NOR framework

Switch spi_flash_* interfaces to call into new SPI NOR framework via MTD
layer. Fix up sf_dataflash to work in legacy way. And update sandbox to
use new interfaces/definitions

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: sf_probe: Add "jedec, spi-nor" compatible string
Vignesh R [Tue, 5 Feb 2019 05:59:22 +0000 (11:29 +0530)]
mtd: spi: sf_probe: Add "jedec, spi-nor" compatible string

Linux uses "jedec,spi-nor" as compatible string for JEDEC compatible
SPI Flash device nodes. Therefore make U-Boot also to look for the same
compatible string so that we can use Linux DTS files as is.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: spi-nor-core: Add back U-Boot specific features
Vignesh R [Tue, 5 Feb 2019 05:59:21 +0000 (11:29 +0530)]
mtd: spi: spi-nor-core: Add back U-Boot specific features

For legacy reasons, we will have to keep around U-Boot specific
SPI_FLASH_BAR and SPI_TX_BYTE. Add them back to the new framework

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: spi-nor-core: Add SFDP support
Vignesh R [Tue, 5 Feb 2019 05:59:20 +0000 (11:29 +0530)]
mtd: spi: spi-nor-core: Add SFDP support

Sync Serial Flash Discoverable Parameters (SFDP) parsing support from
Linux. This allows auto detection and configuration of Flash parameters.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: spi-nor-core: Add 4 Byte addressing support
Vignesh R [Tue, 5 Feb 2019 05:59:19 +0000 (11:29 +0530)]
mtd: spi: spi-nor-core: Add 4 Byte addressing support

Sync changes from Linux SPI NOR framework to add 4 byte addressing
support. This is required in order to support flashes like MT35x
that no longer support legacy Bank Address Register(BAR) way of accessing
>16MB region.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: spi-nor-core: Add SPI MEM support
Vignesh R [Tue, 5 Feb 2019 05:59:18 +0000 (11:29 +0530)]
mtd: spi: spi-nor-core: Add SPI MEM support

Many SPI controllers have special MMIO interfaces which provide
accelerated read/write access but require knowledge of flash parameters
to make use of it. Recent spi-mem layer provides a way to support such
controllers.
Therefore, add spi-mem support to spi-nor-core as a way to support SPI
controllers with MMIO interface. SPI MEM layer takes care of translating
spi_mem_ops to spi_xfer()s in case of legacy SPI controllers.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agomtd: spi: Port SPI NOR framework from Linux
Vignesh R [Tue, 5 Feb 2019 05:59:17 +0000 (11:29 +0530)]
mtd: spi: Port SPI NOR framework from Linux

Current U-Boot SPI NOR support (sf layer) is quite outdated as it does not
support 4 byte addressing opcodes, SFDP table parsing and different types of
quad mode enable sequences. Many newer flashes no longer support BANK
registers used by sf layer to a access >16MB of flash address space.
So, sync SPI NOR framework from Linux v4.19 that supports all the
above features. Start with basic sync up that brings in basic framework
subsequent commits will bring in more features.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agosh: bitops: add hweight*() macros
Vignesh R [Tue, 5 Feb 2019 05:59:16 +0000 (11:29 +0530)]
sh: bitops: add hweight*() macros

Add hweight*() macros required for moving to new SF layer

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agospi: Add non DM version of SPI_MEM
Vignesh R [Tue, 5 Feb 2019 05:59:15 +0000 (11:29 +0530)]
spi: Add non DM version of SPI_MEM

Add non DM version of SPI_MEM to support easy migration to new SPI NOR
framework. This can be removed once DM_SPI conversion is complete.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agospi: spi-mem: Claim SPI bus before spi mem access
Vignesh R [Tue, 5 Feb 2019 05:59:14 +0000 (11:29 +0530)]
spi: spi-mem: Claim SPI bus before spi mem access

It is necessary to call spi_claim_bus() before starting any SPI
transactions and this restriction would also apply when calling spi-mem
operations. Therefore claim and release bus before requesting transfer
via exec_op.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agospi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
Vignesh R [Tue, 5 Feb 2019 05:59:13 +0000 (11:29 +0530)]
spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size

Extend spi_mem_adjust_op_size() to take spi->max_write_size and
spi->max_read_size into account.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agospi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
Vignesh R [Tue, 5 Feb 2019 05:59:12 +0000 (11:29 +0530)]
spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes

SPI controllers support all types of SPI modes including dual/quad bus
widths. Therefore remove constraint wrt SPI mode from spi-mem layer.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agobitops: Fix GENMASK definition for Sandbox
Vignesh R [Tue, 5 Feb 2019 05:59:11 +0000 (11:29 +0530)]
bitops: Fix GENMASK definition for Sandbox

In arch/sandbox/include/asm/types.h we have
Therefore for 32 bit Sandbox build BITS_PER_LONG turns out to be 32 as
CONFIG_PHYS64 is not set

This messes up the current logic of GENMASK macro due to mismatch b/w
size of unsigned long (64 bit) and that of BITS_PER_LONG.
Fix this by using CONFIG_SANDBOX_BITS_PER_LONG which is set to 64/32
based on the host machine on which its being compiled.

Without this patch:
GENMASK(14,0) => 0x7fffffffffff
After this patch:
GENMASK(14,0) => 0x7fff

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoconfigs: Move CONFIG_SPI_FLASH into defconfigs
Vignesh R [Tue, 5 Feb 2019 05:59:10 +0000 (11:29 +0530)]
configs: Move CONFIG_SPI_FLASH into defconfigs

Completely move CONFIG_SPI_FLASH from remaining board header files to
defconfigs

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
5 years agoarm: dts: am33xx: introduce 'am33xx-u-boot.dtsi'
Hannes Schmelzer [Wed, 6 Feb 2019 11:49:50 +0000 (12:49 +0100)]
arm: dts: am33xx: introduce 'am33xx-u-boot.dtsi'

commit fdce9d35dc36 ("arm: dts: am33xx: Sync dts with Linux 4.20.0")
did remove the "u-boot,dm-spl" flag from the 'ocp' bus which was
introduced with
commit 19aa4ac09db9 ("dts: am33xx: add u-boot, dm-spl to ocp bus")

Due to this all boards having CONFIG_SPL_OF_CONTROL enabled are broken
because they cannot bind/probe the boot-media interface during SPL
stage.

This commit introduces the 'am33xx-u-boot.dtsi' which is included with
the auto include mechanism. The am33xx-u-boot-dtsi adds the important
"u-boot,dm-pre-reloc" to the 'ocp bus' (the root bus of almost all
peripherals, at least the bootable ones).

The peripherials (mmc, spi, ...) needed during SPL stage need to be
equipped with the 'u-boot,dm-pre-reloc' in their responsible dts file.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agoMAINTAINERS: update u-boot-atmel tree
Eugen Hristev [Tue, 5 Feb 2019 10:20:39 +0000 (10:20 +0000)]
MAINTAINERS: update u-boot-atmel tree

Update Atmel AT91 maintainership

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
5 years agoMAINTAINERS: Change fsl-qoriq, mpc85xx, mpc86xx maintainers
York Sun [Mon, 4 Feb 2019 16:22:58 +0000 (08:22 -0800)]
MAINTAINERS: Change fsl-qoriq, mpc85xx, mpc86xx maintainers

Change maintainers to Prabhakar Kushwaha for fsl-qoriq, mpc85xx
and mpc86xx.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 5 Feb 2019 13:37:21 +0000 (08:37 -0500)]
Merge git://git.denx.de/u-boot-marvell

- Move Armada XP / 38x PCIe driver to DM_PCI from me
- Move Armada XP / 38x LCD driver to DM_VIDEO from me
- Add uDPU board (Armada-3720) from Vladimir

[trini: Fix warning in pci-uclass.c by removing ret from
pci_uclass_child_post_bind as it no longer calls functions with
        a return code to catch.]
Signed-off-by: Tom Rini <trini@konsulko.com>II
5 years agoMerge tag 'for-master-20190205' of git://git.denx.de/u-boot-rockchip
Tom Rini [Tue, 5 Feb 2019 13:32:52 +0000 (08:32 -0500)]
Merge tag 'for-master-20190205' of git://git.denx.de/u-boot-rockchip

Removes artifacts (.rej-files) from the last merge.

5 years agoarm: mvebu: theadorable: Enable video / LCD support with the new DM driver
Stefan Roese [Wed, 30 Jan 2019 07:54:13 +0000 (08:54 +0100)]
arm: mvebu: theadorable: Enable video / LCD support with the new DM driver

With the new DM_VIDEO support in the Armada XP LCD driver, this patch
adds the needed DT node for the LCD controller to the theadorable dts
file. This DT property is not added to the Armada XP dtsi files, as this
LCD feature is pretty unusual for this SoC and I personally know of no
other board that uses this controller.

This patch also enables CONFIG_BMP_16BPP/24BPP/32BPP, as the "old" bmp
command supported these BMP files.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo: Armada XP: Move driver to DM_VIDEO
Stefan Roese [Wed, 30 Jan 2019 07:54:11 +0000 (08:54 +0100)]
video: Armada XP: Move driver to DM_VIDEO

This patch moves the Armada XP video / LCD driver to DM_VIDEO. With this
move, the legacy interface board_video_init() is removed from the
theadorable board code (only user of this video driver). The support
via DT will be added in a separate patch.

This patch also enables DM_VIDEO for the theadorable board, as this is
needed to not break git bisect'ability.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
5 years agoarm64: mvebu: Add basic support for uDPU board
Vladimir Vid [Mon, 28 Jan 2019 16:27:58 +0000 (17:27 +0100)]
arm64: mvebu: Add basic support for uDPU board

This adds initial support for micro-DPU (uDPU) board which is based on Armada-3720 SoC.
micro-DPU is the single-port FTTdp "distribution point unit" made by Methode Electronics
which offers complete modularity with replaceable SFP modules both for uplink and downlink
(G.hn over twisted-pair, G.hn over coax, 1G and 2.5G Ethernet over Cat-5e cable).

On-board features:
- 512 MiB DDR3
- 2 x 2.5G SFP via HSGMII SERDES interface to the A3720 SoC
- USB 2.0 Type-C connector
- 4GB eMMC
- ETSI TS 101548 reverse powering via twisted pair (RJ45) or coax (F Type)

Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Luis Torres <luis.torres@methode.com>
Cc: Scott Roberts <scott.roberts@telus.com>
Cc: Paul Arola <paul.arola@telus.com>
Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>