]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 years agodoc: Fix outdated ohci board hook documentation
Krzysztof Kozlowski [Tue, 2 Apr 2019 07:32:12 +0000 (09:32 +0200)]
doc: Fix outdated ohci board hook documentation

The ohci driver calls board_usb_init(), not usb_board_init().

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 1 Apr 2019 16:31:22 +0000 (12:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- clk: sunxi: a10: Add CLK_AHB_GMAC

5 years agoclk: sunxi: a10: Add CLK_AHB_GMAC
Jagan Teki [Thu, 28 Mar 2019 08:16:11 +0000 (13:46 +0530)]
clk: sunxi: a10: Add CLK_AHB_GMAC

CLK_AHB_GMAC was suppose to be part of previous commit
"clk: sunxi: Implement A10 EMAC clocks" add it so-that
we can get rid of sunxi_set_gate warning on boot message.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoMerge tag 'u-boot-imx-20190401' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 1 Apr 2019 13:39:38 +0000 (09:39 -0400)]
Merge tag 'u-boot-imx-20190401' of git://git.denx.de/u-boot-imx

Fixes for 2019.01

- pico-imx6ul: fix after conversion
- engicam boards
- pico-imx7d _ README due to hang with imx-usb-loader

5 years agopico-imx7d: README: Recommend the usage of a USB hub
Fabio Estevam [Wed, 27 Mar 2019 23:03:39 +0000 (20:03 -0300)]
pico-imx7d: README: Recommend the usage of a USB hub

Since commit 9e3c0174da842 ("pico-imx7d: Add LCD support") we started to
notice some hangs in U-Boot.

There is not an issue on such commit per se, but due to the LCD support
the current drawn is increased and this may cause issues when powering
pico-imx7d-pi from USB.

Some computers may be a bit strict with USB current draw and will
shut down their ports if the draw is too high.

The solution for that is to use an externally powered USB hub between the
board and the host computer.

Add such recommendation to the README file.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoconfigs: icorem6: Use imx6 cratch register for bootcount
Jagan Teki [Thu, 21 Mar 2019 08:35:53 +0000 (14:05 +0530)]
configs: icorem6: Use imx6 cratch register for bootcount

SRAM address used for bootcount on exiting code is erasing
previous count value when system reset from Linux. So use
the dedicated imx6 scratch register, GPR2 to preserve the
contents even if the system reset from Linux.

Fixes: 4eb9aa39350e ("configs: imx6qdl_icore_mmc: Enable watchdog and bootcounter")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
5 years agoconfigs: icore: Fix U-Boot proper loading from nand
Michael Trimarchi [Fri, 8 Mar 2019 07:35:03 +0000 (13:05 +0530)]
configs: icore: Fix U-Boot proper loading from nand

SPL on Engicam i.Core M6 boards enabled DM, so it would require some
malloc() pool before relocation in order to load U-Boot proper properly.

So, enable SPL malloc() pool of 0x2000 size similarly like what we have
used for icore mmc defconfigs.

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoARM: imx6q_logic: Enable UUID support
Adam Ford [Sun, 3 Mar 2019 22:22:45 +0000 (16:22 -0600)]
ARM: imx6q_logic: Enable UUID support

With UUID support, the root can now point to UUID.  This makes
swiching between mmc 0 and mmc 1 easier by simplying changing
mmcdev between 0 and 1.  From there, the scripts handle the rest.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agopico-imx6ul: Fix eMMC boot after DM_MMC conversion
Fabio Estevam [Thu, 21 Mar 2019 13:59:06 +0000 (10:59 -0300)]
pico-imx6ul: Fix eMMC boot after DM_MMC conversion

After the DM_MMC conversion the following eMMC boot error is observed:

U-Boot SPL 2019.04-rc4 (Mar 20 2019 - 18:53:28 +0000)
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device 0. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

This happens because the SPL code does not initialize the SDHC pins
and clock.

Fix it by moving the original eMMC initialization from U-Boot proper
to SPL.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Berton <fabio.berton@ossystems.com.br>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Sun, 31 Mar 2019 17:54:10 +0000 (19:54 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
5 years agoMerge tag 'video-fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-video
Tom Rini [Sun, 31 Mar 2019 11:25:11 +0000 (07:25 -0400)]
Merge tag 'video-fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-video

sunxi HDMI clock fix

5 years agoMerge tag 'rockchip-fixes-for-2019.04' of git://git.denx.de/u-boot-rockchip
Tom Rini [Sun, 31 Mar 2019 11:25:00 +0000 (07:25 -0400)]
Merge tag 'rockchip-fixes-for-2019.04' of git://git.denx.de/u-boot-rockchip

Last-minute fixes for Rockchip for 2019.04:
- reverts the deprecation of the 'download-key' detection
  (with a full solution pending for the next release)
- applies a temporary fix for the 32bit pinctrl registers on the RK3288

5 years agodfu: usb: Update MAINTAINERS file regarding DFU/USB gadget support
Lukasz Majewski [Sat, 30 Mar 2019 15:22:21 +0000 (16:22 +0100)]
dfu: usb: Update MAINTAINERS file regarding DFU/USB gadget support

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoMerge branch '2019-03-29-master-imports'
Tom Rini [Fri, 29 Mar 2019 14:53:28 +0000 (10:53 -0400)]
Merge branch '2019-03-29-master-imports'

- Bugfixes:
  - mmc: correct the HS400 initialization process
  - configs: ti: Move FIT image load address to avoid overwrite
  - lib: time: update module enable MACRO
  - Add mbrugger as RPi board maintainer, correct agraf's email address.

5 years agolib: time: update module enable MACRO
Kever Yang [Fri, 29 Mar 2019 14:17:33 +0000 (22:17 +0800)]
lib: time: update module enable MACRO

We'd better use correct way to check if module has enabled.
for we have 3 timer MACRO:
- CONFIG_TIMER
- CONFIG_SPL_TIMER
- CONFIG_TPL_TIMER

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agodoc/git-mailrc: correct entry 'agraf'
Heinrich Schuchardt [Thu, 28 Mar 2019 21:51:35 +0000 (22:51 +0100)]
doc/git-mailrc: correct entry 'agraf'

Correct Alex's email address.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoRPi: Add mbrugger as board maintainer
Matthias Brugger [Thu, 28 Mar 2019 13:47:39 +0000 (14:47 +0100)]
RPi: Add mbrugger as board maintainer

I took over maintainership from Alex Graf with commit
3157bbfa18 ("rpi: Make Matthias maintainer")
But I forgot to update the board maintainer file.
This patch adds myself to the game.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoconfigs: ti: Move FIT image load address to avoid overwrite
Andrew F. Davis [Tue, 26 Mar 2019 15:12:01 +0000 (10:12 -0500)]
configs: ti: Move FIT image load address to avoid overwrite

The FIT image is loaded to 0x8700_0000 followed by extracting from that
several large images also into the 0x8x00_0000 range. Large images
can end up overwriting the FIT image as it is being extracted from.
Move the FIT load address clear out to 0x9000_0000, this will require
a board to have at least 256MB of DRAM, if less then more careful
planning will be required for that platform.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agommc: correct the HS400 initialization process
BOUGH CHEN [Tue, 26 Mar 2019 06:24:17 +0000 (06:24 +0000)]
mmc: correct the HS400 initialization process

After the commit b9a2a0e2e9c0 ("mmc: Add support for downgrading
HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
which indicates that the HS200/HS400 to HS downgrade is happening.

During the HS400 initialization, first select to HS200, and config
the related clock rate, then downgrade to HS mode. So here also need
to config the downgrade value to be true for two reasons. First,
make sure in the function mmc_set_card_speed(), after switch to HS
mode, first config the clock rate, then read the EXT_CSD, avoid
receiving data of EXT_CSD in HS mode at 200MHz. Second, after issue
the MMC_CMD_SWITCH command, it need to wait a bit then switch bus
properties.

Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
mode in this case, and USDHC will never get data transfer complete
status, cause the uboot hang.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
5 years agoMerge tag 'efi-2019-04-rc5-2' of git://git.denx.de/u-boot-efi
Tom Rini [Fri, 29 Mar 2019 13:21:30 +0000 (09:21 -0400)]
Merge tag 'efi-2019-04-rc5-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI system for v2019.04-rc5-2

This patch series contains a bug fix for a double free in a UEFI unit
test. The other patches are documentation only (except for the definition
of two additional constants).

5 years agopinctrl: rockchip: Add 32bit writing function for rk3288 gpio0 pinctrl
David Wu [Tue, 12 Feb 2019 11:51:51 +0000 (19:51 +0800)]
pinctrl: rockchip: Add 32bit writing function for rk3288 gpio0 pinctrl

There are no higher 16 writing corresponding bits for pmu_gpio0's
iomux/drive/pull at rk3288, need to read the value from register
firstly. Add the flag to distinguish it from normal registers.

Signed-off-by: David Wu <david.wu@rock-chips.com>
5 years agoRevert "rockchip: Drop call to rockchip_dnl_mode_check() for now"
Philipp Tomsich [Fri, 29 Mar 2019 08:21:13 +0000 (09:21 +0100)]
Revert "rockchip: Drop call to rockchip_dnl_mode_check() for now"

Due to a final resolution not coming up in time for 2019.04 and
following the consensus on the discussion, we'll keep this around
for 2019.04 after all.

This reverts commit 0d968ceb1ff63b0d220a571f438f0d5fe6350e88.

5 years agoMerge tag 'arc-last-minute-for-2019.04' of git://git.denx.de/u-boot-arc
Tom Rini [Fri, 29 Mar 2019 01:44:49 +0000 (21:44 -0400)]
Merge tag 'arc-last-minute-for-2019.04' of git://git.denx.de/u-boot-arc

This is last minute change which fixes problems in runtime on
AXS10x board caused by some changes in NAND framework and
tiny documentation improvement.

Anyways NAND flash storage was never really used on the board for various
reasons and now we decided to drop it for good.

Note this change only touches 1 ARC board so that should be safe for others.
As usual - build tested in TravisCI, see
https://travis-ci.org/abrodkin/u-boot/builds/512041342

5 years agosunxi: video: HDMI: Fix clock setup
Jernej Skrabec [Sun, 24 Mar 2019 18:26:40 +0000 (19:26 +0100)]
sunxi: video: HDMI: Fix clock setup

Currently, HDMI driver doesn't consider minimum and maximum allowed rate
of pll3 (video PLL). It works most of the time, but not always.

Consider monitor with resolution 1920x1200, which has pixel clock rate
of 154 MHz. Current code would determine that pll3 rate has to be set to
154 MHz. However, minimum supported rate is 192 MHz. In this case video
output just won't work.

The reason why the driver is written in the way it is, is that at the
time HDMI PHY and clock configuration wasn't fully understood. But now
we have needed knowledge, so the issue can be fixed.

With this fix, clock configuration routine uses full range (1-16) for
clock divider instead of limited one (1, 2, 4, 11). It also considers
minimum and maximum allowed rate for pll3.

Fixes: 56009451d843 ("sunxi: video: Add A64/H3/H5 HDMI driver")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
5 years agohsdk: readme: Suggest getting pyelftools with pip
Alexey Brodkin [Mon, 18 Feb 2019 12:03:34 +0000 (15:03 +0300)]
hsdk: readme: Suggest getting pyelftools with pip

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Suggested-by: Yunir Salimzyanov <yunir@synopsys.com>
5 years agoARC: AXS10x: drop NAND support
Eugeniy Paltsev [Wed, 27 Mar 2019 13:53:43 +0000 (16:53 +0300)]
ARC: AXS10x: drop NAND support

On AXS10x boards we have non-standard NAND controller
which was never really used a lot as there're other much more
convenient [as they are standard & removable] persistent media
like SD-card and USB mass storage.

Moreover after recent changes we face with some NAND controller
runtime issues. So instead of keeping support of yet another
non-standard peripheral we're dropping its support for good.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoefi_loader: define development target in README.uefi
Heinrich Schuchardt [Thu, 28 Mar 2019 07:09:16 +0000 (08:09 +0100)]
efi_loader: define development target in README.uefi

Describe the target scope of the UEFI implementation in U-Boot.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: update TODOs in doc/README.uefi
Heinrich Schuchardt [Wed, 27 Mar 2019 21:02:30 +0000 (22:02 +0100)]
efi_loader: update TODOs in doc/README.uefi

The following TODOs are closed:

- GetNextVariableName is not implemented
- event groups
- manage events in a linked list

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMAINTAINERS: adjust git repository for EFI PAYLOAD
Heinrich Schuchardt [Wed, 20 Mar 2019 17:47:07 +0000 (18:47 +0100)]
MAINTAINERS: adjust git repository for EFI PAYLOAD

The EFI PAYLOAD will use git://git.denx.de/u-boot-efi.git in future.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: TODO for the EFI file protocol
Heinrich Schuchardt [Wed, 27 Mar 2019 20:41:04 +0000 (21:41 +0100)]
efi_loader: TODO for the EFI file protocol

We currently only support EFI_FILE_PROTOCOL_REVISION while
UEFI specs 2.4 - 2.7 prescribe EFI_FILE_PROTOCOL_REVISION2.
Add a todo.

Add missing constants for the EFI file protocol revision.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: avoid double free in dp utilities test
Heinrich Schuchardt [Tue, 26 Mar 2019 04:56:31 +0000 (05:56 +0100)]
efi_selftest: avoid double free in dp utilities test

Avoid duplicate FreePool() in unit test for the device patch utilities
protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 27 Mar 2019 03:19:31 +0000 (23:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- configs: Stratix10: Remove CONFIG_USE_TINY_PRINTF

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 27 Mar 2019 03:19:11 +0000 (23:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Various fixes for bugs found by u-boot test.py

5 years agoMerge branch '2019-03-25-master-imports'
Tom Rini [Wed, 27 Mar 2019 03:17:21 +0000 (23:17 -0400)]
Merge branch '2019-03-25-master-imports'

- Convert various SPI related options to Kconfig

5 years agoConvert CONFIG_ENV_SPI_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:38 +0000 (15:20 +0100)]
Convert CONFIG_ENV_SPI_* to Kconfig

This converts the following to Kconfig:
  CONFIG_ENV_SPI_BUS
  CONFIG_ENV_SPI_CS
  CONFIG_ENV_SPI_MAX_HZ
  CONFIG_ENV_SPI_MODE

Most of time these value are not needed, CONFIG_SF_DEFAULT
with same value is used, so I introduced CONFIG_USE_ENV_SPI_*
to force the associated value for the environment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoConvert CONFIG_DEFAULT_SPI_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:37 +0000 (15:20 +0100)]
Convert CONFIG_DEFAULT_SPI_* to Kconfig

This converts the following to Kconfig:
   CONFIG_DEFAULT_SPI_BUS
   CONFIG_DEFAULT_SPI_MODE

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoConvert CONFIG_SF_DEFAULT_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:36 +0000 (15:20 +0100)]
Convert CONFIG_SF_DEFAULT_* to Kconfig

This converts the following to Kconfig:
  CONFIG_SF_DEFAULT_BUS
  CONFIG_SF_DEFAULT_CS
  CONFIG_SF_DEFAULT_MODE
  CONFIG_SF_DEFAULT_SPEED

I use moveconfig script and then manual check on generated u-boot.cfg
to solve the remaining issue.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agotqma6s_wru4_mmc: manage board_spi_cs_gpio correctly
Patrick Delaunay [Wed, 27 Feb 2019 14:20:35 +0000 (15:20 +0100)]
tqma6s_wru4_mmc: manage board_spi_cs_gpio correctly

Define the function board_spi_cs_gpio only when needed,
only called in drivers/spi/mxc_spi.c.
That avoid compilation issue for tqma6s_wru4_mmc_defconfig
when CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS are not
defined (CMD_SF not defined) after migration in KConfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoexynos: replace CONFIG_ENV_SPI_BASE by CONFIG_SYS_SPI_BASE
Patrick Delaunay [Wed, 27 Feb 2019 14:20:34 +0000 (15:20 +0100)]
exynos: replace CONFIG_ENV_SPI_BASE by CONFIG_SYS_SPI_BASE

Replace CONFIG_ENV_SPI_BASE by the better CONFIG_SYS_SPI_BASE
(it is not the location for environment but the location for U-Boot)
and, as it is the only platform with use this define, remove
it from whitelist.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agocontrolcenterdc: move some configuration in defconfig file
Patrick Delaunay [Wed, 27 Feb 2019 14:20:33 +0000 (15:20 +0100)]
controlcenterdc: move some configuration in defconfig file

Move some configurations in defconfig file
- CONFIG_CMD_I2C
- CONFIG_CMD_SPI

This allow correct dependency handling in Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agobcm7445: move some configuration in defconfig file
Patrick Delaunay [Wed, 27 Feb 2019 14:20:32 +0000 (15:20 +0100)]
bcm7445: move some configuration in defconfig file

Move some configurations in defconfig file
- CONFIG_DM_SPI (removed by syncing defconfigs )
- CONFIG_CMD_SF
- CONFIG_CMD_SPI
- CONFIG_CMD_SF_TEST

This allow correct dependency handling in Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMerge branch '2019-03-25-master-imports'
Tom Rini [Mon, 25 Mar 2019 21:26:38 +0000 (17:26 -0400)]
Merge branch '2019-03-25-master-imports'

- 3 bugfixes:
  - mmc: Align MMC_TRACE with tiny printf
  - scripts/Makefile.extrawarn: Silence more DTC warnings
  - rsa: check that pointer checksum isn't NULL before using it

5 years agommc: tmio: Clamp SD_SECCNT to 16bit values on 16bit IP
Marek Vasut [Mon, 18 Mar 2019 22:43:10 +0000 (23:43 +0100)]
mmc: tmio: Clamp SD_SECCNT to 16bit values on 16bit IP

On 16bit variants of the TMIO SD IP, the SECCNT register can only be
programmed to 16bit values, while on the 32bit and 64bit variants it
can be programmed to 32bit values. The SECCNT register indicates the
maximum number of blocks in a continuous transfer. Hence, limit the
maximum continuous transfer block count to 65535 blocks on 16bit
variants of the TMIO IP and to BIT(32)-1 blocks on 32bit and 64bit
variants.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: sh_mmcif: Set default MMCIF clock rate
Marek Vasut [Mon, 18 Mar 2019 05:04:17 +0000 (06:04 +0100)]
mmc: sh_mmcif: Set default MMCIF clock rate

Set MMCIF clock rate to 97.5 MHz, which is the default according
to Gen2 datasheet.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoclk: renesas: Add support for setting MMCIF clock divider on Gen2
Marek Vasut [Mon, 18 Mar 2019 05:04:02 +0000 (06:04 +0100)]
clk: renesas: Add support for setting MMCIF clock divider on Gen2

Add code for configuring the MMC0CKCR/MMC1CKCR on Gen2 platforms.
This allows the MMCIF driver to set higher clock rate if desired.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoclk: renesas: Fix swapped div and mul in debug output on Gen2
Marek Vasut [Mon, 18 Mar 2019 04:38:08 +0000 (05:38 +0100)]
clk: renesas: Fix swapped div and mul in debug output on Gen2

The $div and $mul values were swapped in the debug output,
fix this.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoclk: renesas: Fix SDH clock divider decoding on Gen2
Marek Vasut [Mon, 18 Mar 2019 04:11:42 +0000 (05:11 +0100)]
clk: renesas: Fix SDH clock divider decoding on Gen2

The gen2_clk_get_sdh_div() function is supposed to look up the
$val value read out of the SDCKCR register in the supplied table
and return the matching divider value. The current implementation
was matching the value from SDCKCR on the divider value in the
table, which is wrong. Fix this and rework the function a bit
to make it more readable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator
Marek Vasut [Mon, 18 Mar 2019 02:20:31 +0000 (03:20 +0100)]
ARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator

An ADATA 16GB Industrial MLC card has so much capacitance on the Vcc
pin that the usual toggling of regulator to power the card off and on
is insufficient. When the card is calibrated into UHS SDR104 mode, it
will remain in that mode across the power cycle and subsequent attempt
to communicate with the card will fail.

The test with this card is to insert it into an SDHI slot and perform
"mmc dev 0 ; mmc dev 0", where the second "mmc dev 0" will fail.

Fix this problem by increasing the off-on delay from 0 to 20 mS.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoconfigs: Stratix10: Remove CONFIG_USE_TINY_PRINTF
Ley Foon Tan [Fri, 22 Mar 2019 09:21:40 +0000 (17:21 +0800)]
configs: Stratix10: Remove CONFIG_USE_TINY_PRINTF

Use full printf instead of tiny printf in SPL.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agommc: Align MMC_TRACE with tiny printf
Marek Vasut [Sat, 23 Mar 2019 17:54:45 +0000 (18:54 +0100)]
mmc: Align MMC_TRACE with tiny printf

The tiny printf implementation only supports %x format specifier,
it does not support %X . Since it makes little difference whether
the debug output prints hex numbers in capitals or not, change it
to %x and make the MMC_TRACE output work with tiny printf too.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
5 years agoscripts/Makefile.extrawarn: Silence more DTC warnings
Tom Rini [Fri, 22 Mar 2019 13:47:39 +0000 (09:47 -0400)]
scripts/Makefile.extrawarn: Silence more DTC warnings

While our "extrawarns" logic has gotten out of sync with upstream
Kbuild, for now lets start by bringing in the latest set of DTC_FLAGS
from the Linux Kernel 5.0 to match their behavior in silencing warnings
from dtc.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agorsa: check that pointer checksum isn't NULL before using it
Philippe Reynes [Tue, 19 Mar 2019 09:55:40 +0000 (10:55 +0100)]
rsa: check that pointer checksum isn't NULL before using it

The pointer checksum were used before checking that it
isn't NULL. We move the code that use it after the check.

Reported-by: Coverity (CID: 185835)
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch '2019-03-22-master-imports'
Tom Rini [Fri, 22 Mar 2019 23:09:58 +0000 (19:09 -0400)]
Merge branch '2019-03-22-master-imports'

- Don't attempt to write to ext4 volumes with the metadata_csum feature
  we don't support
- Correct how we build dtb files.
- Fix regression on SPL_FIT with FIT_IMAGE_TINY
- Minor TI platform fixes

5 years agofs: ext4: do not write on filesystem with metadata_csum feature
Sébastien Szymanski [Fri, 22 Mar 2019 08:33:52 +0000 (09:33 +0100)]
fs: ext4: do not write on filesystem with metadata_csum feature

U-Boot doesn't support metadata_csum feature. Writing to filesystem with
metadata_csum feature makes the filesystem corrupted and unbootable by
Linux:

[    2.527495] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 0 failed (52188!=0)
[    2.537421] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 1 failed (5262!=0)
...
[    2.653308] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 14 failed (42611!=0)
[    2.662179] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 15 failed (21527!=0)
[    2.687920] JBD2: journal checksum error
[    2.691982] EXT4-fs (mmcblk0p2): error loading journal
[    2.698292] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -74

Don't write to filesystem with meatadata_csum feature to not corrupt the
filesystem.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
5 years agoboard: ti: Move fastboot functions out of TI_SECURE_DEVICE ifdef
Andrew F. Davis [Mon, 11 Feb 2019 14:00:08 +0000 (08:00 -0600)]
board: ti: Move fastboot functions out of TI_SECURE_DEVICE ifdef

When these were moved from mach-omap2 to board files they got placed
inside TI_SECURE_DEVICE ifdef block, they are not secure only, move
them up and out.

Fixes: 413b90777f8d ("ti: fastboot: Move weak overrides to board files")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agopci: Add comment to mention difference in DEVFN usage in U-Boot vs Linux
Stefan Roese [Mon, 11 Feb 2019 07:43:25 +0000 (08:43 +0100)]
pci: Add comment to mention difference in DEVFN usage in U-Boot vs Linux

This patch adds a comment to the header with the PCI_foo macros related
to DEVFN to explain the difference in U-Boot vs Linux.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocommon: image-android-dt: Fix out-of-bounds access
Eugeniu Rosca [Thu, 14 Mar 2019 17:31:39 +0000 (18:31 +0100)]
common: image-android-dt: Fix out-of-bounds access

Currently, 'dtimg' allows users to check indexes equal to
dt_entry_count [1]. Forbid that [2].

[1] Behavior w/o the patch:

=> ext2load mmc 0:1 0x48000000 dtb.img
105695 bytes read in 5 ms (20.2 MiB/s)

=> dtimg dump 0x48000000
dt_table_header:
               magic = d7b7ab1e
          total_size = 105695
         header_size = 32
       dt_entry_size = 32
      dt_entry_count = 2
   dt_entries_offset = 32
           page_size = 4096
             version = 0
dt_table_entry[0]:
             dt_size = 105599
           dt_offset = 96
                  id = 0b779520
                 rev = 00000000
           custom[0] = 00000000
           custom[1] = 00000000
           custom[2] = 00000000
           custom[3] = 00000000
           (FDT)size = 105599
     (FDT)compatible = shimafuji,kingfisher
dt_table_entry[1]:
             dt_size = 105599
           dt_offset = 96
                  id = 0b779530
                 rev = 00000000
           custom[0] = 00000000
           custom[1] = 00000000
           custom[2] = 00000000
           custom[3] = 00000000
           (FDT)size = 105599
     (FDT)compatible = shimafuji,kingfisher

=> dtimg size 0x48000000 0 z; print z
z=19c7f
=> dtimg size 0x48000000 1 z; print z
z=19c7f
=> dtimg size 0x48000000 2 z; print z
z=d00dfeed
=> dtimg size 0x48000000 3 z
Error: index > dt_entry_count (3 > 2)

[2] Behavior with the patch:

=> dtimg size 0x48000000 0 z; print z
z=19c7f
=> dtimg size 0x48000000 1 z; print z
z=19c7f
=> dtimg size 0x48000000 2 z
Error: index >= dt_entry_count (2 >= 2)

Fixes: c04473345712 ("common: Add support for Android DT image")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
5 years agoconfigs: am335x_evm: Add CONFIG_BLK
Faiz Abbas [Thu, 14 Mar 2019 14:09:04 +0000 (19:39 +0530)]
configs: am335x_evm: Add CONFIG_BLK

With DM_MMC and DM_USB enabled, enable CONFIG_BLK.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
5 years agoRevert "Ensure device tree DTS is compiled"
Masahiro Yamada [Thu, 14 Mar 2019 05:58:36 +0000 (14:58 +0900)]
Revert "Ensure device tree DTS is compiled"

This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.

I am not sure if I correctly understood the log of commit 27cb7300ffda
("Ensure device tree DTS is compiled"), but the code-diff looks like
it was trying to solve the missed re-compilation when .dts was modified.

Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
fixed the issue in a more correct and more complete way.

Anyway, since the former commit, we see a clumsy log like this:

  make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date

Another problem is, it created multiple paths to descend into
arch/*/dts/, causing a race in parallel building.

So, let's revert it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agomips: add missing dtb-y to arch/mips/dts/Makefile
Masahiro Yamada [Thu, 14 Mar 2019 05:58:35 +0000 (14:58 +0900)]
mips: add missing dtb-y to arch/mips/dts/Makefile

Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"),
build succeeds irrespective of the correctness of Makefile.

In fact, you can compile any defconfig without adding any entry in
arch/*/dts/Makefile.

I am going to revert that commit, so device tree must be explicitly
listed in Makefile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agopowerpc: fix arch/powerpc/dts/Makefile
Masahiro Yamada [Thu, 14 Mar 2019 05:58:34 +0000 (14:58 +0900)]
powerpc: fix arch/powerpc/dts/Makefile

Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"),
build succeeds irrespective of the correctness of Makefile.

I am going to revert that commit, so wrong code must be fixed.

CONFIG_MCR3000 is not defined anywhere. CONFIG_TARGET_MCR3000 is the
correct one.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: fix arch/arm/dts/Makefile
Masahiro Yamada [Thu, 14 Mar 2019 05:58:33 +0000 (14:58 +0900)]
ARM: fix arch/arm/dts/Makefile

Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"),
build succeeds irrespective of the correctness of Makefile.

In fact, you can compile any defconfig without adding any entry in
arch/*/dts/Makefile.

As a result, a lot of wrong code have been merged unnoticed.

I am going to revert that commit, and lots of hidden issues have
come to light:

[1] Typos

  armada-3720-uDPU.dts, sun8i-a83t-tbs-a711.dts

  use the extension ".dts" instead of ".dtb"

[2] DTB is associated to undefined CONFIG option

  For example, mx6sllevk_defconfig defines CONFIG_MX6SLL, but
  associates its device tree to CONFIG_MX6SL, which is undefined.

[3] Lots of entries are missing

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
[trini: add imx6ul pico dtbs]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agotools: fit_image: Add the loadable property to configs
Abel Vesa [Tue, 12 Mar 2019 08:34:32 +0000 (08:34 +0000)]
tools: fit_image: Add the loadable property to configs

When running mkimage with "-f auto", the loadable property
needs to be set in order to allow SPL FIT support to boot.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
5 years agocommon: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled
Abel Vesa [Tue, 12 Mar 2019 08:34:31 +0000 (08:34 +0000)]
common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled

If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP.
In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
5 years agoarmv8: Disable exception vectors in SPL by default
Alexander Graf [Wed, 20 Feb 2019 16:14:49 +0000 (17:14 +0100)]
armv8: Disable exception vectors in SPL by default

Commit 1416e2d2253 ("armv8: make SPL exception vectors optional") had a
typo in it which effectively disabled exception handling in SPL code always.

Since nobody complained, I guess we may as well disable exception handling
in SPL always by default.

So fix the bug to make the config option effective, but disable exception
handling in SPL by default. This gets us to the same functionality as before
by default, but with much less code included in the binary.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agoMakefile: Do not pass -E to mkimage when SPL has full fitImage support
Marek Vasut [Wed, 6 Mar 2019 21:04:00 +0000 (22:04 +0100)]
Makefile: Do not pass -E to mkimage when SPL has full fitImage support

When the SPL has full fitImage support, do not generate fitImage with
external data. The full fitImage code assumes the entire fitImage is
loaded in RAM, and the SPL uses fdt_totalsize() to determine the size
of the whole fitImage, which can not work with external data.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
5 years agocmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10
Heinrich Schuchardt [Thu, 28 Feb 2019 05:17:56 +0000 (06:17 +0100)]
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10

CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any
arguments.

CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoconfigs: dra7xx_evm: Remove ENV_IS_IN_FAT
Faiz Abbas [Tue, 26 Feb 2019 17:15:44 +0000 (22:45 +0530)]
configs: dra7xx_evm: Remove ENV_IS_IN_FAT

With U-boot supporting environment in multiple places, enable only
ENV_IS_IN_EMMC

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: lib: bootm: Push the Starting kernel print to the end
Keerthy [Wed, 20 Feb 2019 12:47:22 +0000 (18:17 +0530)]
arm: lib: bootm: Push the Starting kernel print to the end

Push the Starting kernel print to the end just before the
dm_remove_devices call.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 21 Mar 2019 17:11:06 +0000 (13:11 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- ARM: socfpga: Build sfp image only for Gen5 and Arria10 devices

5 years agoMerge tag 'efi-2019-04-rc5' of git://git.denx.de/u-boot-efi
Tom Rini [Thu, 21 Mar 2019 17:07:42 +0000 (13:07 -0400)]
Merge tag 'efi-2019-04-rc5' of git://git.denx.de/u-boot-efi

Pull request for UEFI system for v2019.04-rc5

A bunch of small fixes. The major ones being

- avoid illegal memory access in efi_allocate_pool() on 32 bit systems
- avoid endless loop in HII protocol

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Thu, 21 Mar 2019 17:04:42 +0000 (13:04 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

- i2c: i2c_cdns: Fix below warnings with checker tool

5 years agoi2c: i2c_cdns: Fix below warnings with checker tool
Siva Durga Prasad Paladugu [Thu, 14 Mar 2019 08:18:37 +0000 (09:18 +0100)]
i2c: i2c_cdns: Fix below warnings with checker tool

This patch fixes below warnings found with checker tool.
The variable len in i2c_msg struct is of unsigned type
and it is received as recv_count which is unsigned type
but it is checked with < 0 which is always false, hence
removed it.
The local variable curr_recv_count is declared as signed
type and compared aginst unsigned recv_count which is
incorrect. This is fixed by declaring it as unsigned type.

drivers/i2c/i2c-cdns.c: In function ‘cdns_i2c_read_data’:
drivers/i2c/i2c-cdns.c:317:18: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
  if ((recv_count < 0))
                  ^
drivers/i2c/i2c-cdns.c:340:24: warning: comparison of
integer expressions of different signedness:
‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
  updatetx = recv_count > curr_recv_count;
                        ^
drivers/i2c/i2c-cdns.c:361:39: warning: comparison of
integer expressions of different signedness:
‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
    while (readl(&regs->transfer_size) !=

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoARM: socfpga: Build sfp image only for Gen5 and Arria10 devices
Dalon Westergreen [Wed, 20 Mar 2019 20:15:21 +0000 (13:15 -0700)]
ARM: socfpga: Build sfp image only for Gen5 and Arria10 devices

The sfp file is only valid for Gen5 (Cyclone5 & Arria5) and Arria10
devices.  The file should only be built for these devices.

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
5 years agoefi_selftest: fix test_hii_string_get_string()
Heinrich Schuchardt [Tue, 19 Mar 2019 19:08:46 +0000 (20:08 +0100)]
efi_selftest: fix test_hii_string_get_string()

The check testing the string result of get_string() returned the wrong
result. The result was ignored.

Use efi_st_strcmp_16_8() for the string comparison.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: superfluous conversion in efi_file_open()
Heinrich Schuchardt [Tue, 19 Mar 2019 18:16:23 +0000 (19:16 +0100)]
efi_loader: superfluous conversion in efi_file_open()

printf("%ls", ..) expects u16 * as argument to print. There is not need for
a conversion to wchar_t *.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: remove superfluous check in efi_setup_loaded_image()
Heinrich Schuchardt [Tue, 19 Mar 2019 17:58:58 +0000 (18:58 +0100)]
efi_loader: remove superfluous check in efi_setup_loaded_image()

It does not make any sense to check if a pointer is NULL if we have
dereferenced it before.

Reported-by: Coverity (CID 185827)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: memory leak in efi_dump_single_var()
Heinrich Schuchardt [Tue, 19 Mar 2019 17:44:05 +0000 (18:44 +0100)]
efi_loader: memory leak in efi_dump_single_var()

A misplaced return statement lead to a memory leak in
efi_dump_single_var().

Reported-by: Coverity (CID 185829)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: missing return in efi_get_next_variable_name()
Heinrich Schuchardt [Tue, 19 Mar 2019 17:36:21 +0000 (18:36 +0100)]
efi_loader: missing return in efi_get_next_variable_name()

Add a missing return statement in efi_get_next_variable_name().

Reported-by: Coverity (CID 185834)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: endless loop in add_strings_package()
Heinrich Schuchardt [Tue, 19 Mar 2019 11:30:27 +0000 (12:30 +0100)]
efi_loader: endless loop in add_strings_package()

Avoid an endless loop in add_strings_package().

Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org>
Reported-by: Coverity (CID 185833)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: correct parameter size in efi_allocate_pool
Heinrich Schuchardt [Mon, 18 Mar 2019 19:01:59 +0000 (20:01 +0100)]
efi_loader: correct parameter size in efi_allocate_pool

efi_allocate_pages() expects a (uint64_t *) pointer to pass the address of
the assigned memory. If we pass the address of a pointer here, an illegal
memory access occurs on 32bit systems.

Fixes: 282a06cbcae8 ("efi_loader: Expose U-Boot addresses in memory map
for sandbox")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 19 Mar 2019 23:58:48 +0000 (19:58 -0400)]
Merge git://git.denx.de/u-boot-marvell

- Enable network interface on clearfog_gt_8k (Baruch)
- Fix dreamplug boot by adding an spi0 alias to the DT (Chris)
- Fix / enhance Marvell ddr3 setup / parameters (Chris)
- Change CONFIG_SYS_MALLOC_F_LEN to 0x2000 on db-88f6820-amc (Chris)
- Enable SPL_FLASH_BAR on db-88f6820-amc (Chris)
- Use correct pcie controller name in Armada-38x dts files (Chris)
- Disable d-cache on Kirkwood platforms as currently needed (Chris)
- Add a more descriptive comment to pci_mvebu.c (Stefan)
- Update Marvell maintainers entry (Stefan)

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Tue, 19 Mar 2019 11:13:23 +0000 (07:13 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Tue, 19 Mar 2019 11:13:03 +0000 (07:13 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- Fastboot fixes

5 years agoARM: kirkwood: disable dcache for Kirkwood boards
Chris Packham [Mon, 18 Mar 2019 07:51:58 +0000 (20:51 +1300)]
ARM: kirkwood: disable dcache for Kirkwood boards

Prior to commit 93b283d49f93 ("ARM: CPU: arm926ejs: Consolidate cache
routines to common file") the kirkwood boards didn't have and dcache
support. The network and usb drivers rely on this. Set
CONFIG_SYS_DCACHE_OFF in the Kirkwood specific config.h.

Reported-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: mvebu: use correct name for pcie controller
Chris Packham [Sat, 16 Mar 2019 07:46:20 +0000 (20:46 +1300)]
ARM: mvebu: use correct name for pcie controller

When armada-385.dtsi was sync'd from Linux the name of the node
describing the pcie controller was changed from pcie-controller to pcie.
Some of the boards that include armada-385.dtsi were missed in the
update retaining the old name. This updates the affected boards.

Reported-by: Влад Мао <vlaomao@gmail.com>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: mvebu: db-88f6820-amc: enable SPI_FLASH_BAR
Chris Packham [Sat, 2 Mar 2019 07:45:35 +0000 (20:45 +1300)]
ARM: mvebu: db-88f6820-amc: enable SPI_FLASH_BAR

This board uses Micron N25Q256A SPI flash. Enable SPI_FLASH_BAR to allow
us to access the whole chip.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Cc: Vignesh R <vigneshr@ti.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: mvebu: set CONFIG_SYS_MALLOC_F_LEN to 0x2000
Chris Packham [Fri, 1 Mar 2019 01:30:03 +0000 (14:30 +1300)]
ARM: mvebu: set CONFIG_SYS_MALLOC_F_LEN to 0x2000

Set CONFIG_SYS_MALLOC_F_LEN to match the rest of the mvebu boards. The
default of 0x400 is not enough when booting from SPI.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agomv_ddr: ddr3: only use active chip-selects when tuning ODT
Chris Packham [Thu, 28 Feb 2019 21:11:14 +0000 (10:11 +1300)]
mv_ddr: ddr3: only use active chip-selects when tuning ODT

Inactive chip-selects will give invalid values for read_sample so don't
consider them when trying to determine the overall min/max read sample.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
[https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/18]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agomv_ddr: ddr3: fix tRAS timimg parameter
Chris Packham [Thu, 28 Feb 2019 21:11:13 +0000 (10:11 +1300)]
mv_ddr: ddr3: fix tRAS timimg parameter

Based on the JEDEC standard JESD79-3F. The tRAS timings should include
the highest speed bins at a given frequency. This is similar to commit
683c67b ("mv_ddr: ddr3: fix tfaw timimg parameter") where the wrong
comparison was used in the initial implementation.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
[https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/15]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoARM: kirkwood: add spi0 alias for dreamplug
Chris Packham [Thu, 28 Feb 2019 07:53:23 +0000 (20:53 +1300)]
ARM: kirkwood: add spi0 alias for dreamplug

The conversion to DM_SPI managed to break accessing the environment on
dreamplug. This is because the environment code relies on being to able
to select the SPI device based on the sequence number. Add an alias so
that the spi0 bus gets sequence number 0.

Reported-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoMAINTAINERS: Update u-boot-marvell entry
Stefan Roese [Fri, 15 Feb 2019 12:56:56 +0000 (13:56 +0100)]
MAINTAINERS: Update u-boot-marvell entry

This patch does the following changes to the u-boot-marvell maintainers
entry:

- Add Armada-7k/8k to the list
- Remove Prafulla and Luka since they have been silent on the list for
  a long time. Please speak up, if you would like to continue or better
  start maintaining.
- Add multiple Marvell / MVEBU related driver directories and files

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoconfigs/clearfog_gt_8k: add network interface support
Baruch Siach [Mon, 11 Feb 2019 12:19:55 +0000 (14:19 +0200)]
configs/clearfog_gt_8k: add network interface support

Enable the mvpp2 network driver for the Armada 8K SoC.

Enable the Marvell PHY driver for the on-board 1512 PHY.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agopci: pci_mvebu: Add comment about missing of_n_addr_cells() call
Stefan Roese [Mon, 11 Feb 2019 06:53:34 +0000 (07:53 +0100)]
pci: pci_mvebu: Add comment about missing of_n_addr_cells() call

This patch adds a comment to explain the use of the hardcoded value for
the number of address cells in mvebu_get_tgt_attr(). This should help to
rework this function, once CONFIG_OF_LIVE is enabled for MVEBU in
general.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
5 years agoPrepare v2019.04-rc4
Tom Rini [Tue, 19 Mar 2019 01:14:02 +0000 (21:14 -0400)]
Prepare v2019.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoarm: socfpga: make SPL_TEXT_BASE overridable
Simon Goldschmidt [Fri, 15 Mar 2019 19:44:32 +0000 (20:44 +0100)]
arm: socfpga: make SPL_TEXT_BASE overridable

To boot from fpga on socfpga gen5, we need to set CONFIG_SPL_TEXT_BASE to
0xC0000000 (hps2fpgaslaves base address).

Since converting CONFIG_SPL_TEXT_BASE to Kconfig hasn't been successful so
far, let's make this value overridable in socfpga_common.h, so that we can
have different board configs override this in socfpga_common.h.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoARM: dts: socfpga: Add missing altr,sysmgr-syscon for EMAC
Ley Foon Tan [Wed, 13 Mar 2019 03:03:35 +0000 (11:03 +0800)]
ARM: dts: socfpga: Add missing altr,sysmgr-syscon for EMAC

Syscon register is required in dts to select correct
PHY interface.

Fix error below:

Net:   Failed to get syscon: -2

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agofastboot: common: fix default fastboot_boot on 64-bit
Neil Armstrong [Wed, 20 Feb 2019 10:36:12 +0000 (11:36 +0100)]
fastboot: common: fix default fastboot_boot on 64-bit

When booting on a 64-bit system, the boot_addr_start buffer is not
large enough to contain a 64-bit number, thus leading to a crash
even if fastboot_buf_addr is valid, only the high part of the address
will be printed to boot_addr_start :

fastboot with fastboot_buf_addr = 0x0000000006000000:
  downloading of 92239872 bytes finished
  Booting kernel at 0x00000000...

  "Synchronous Abort" handler, esr 0x96000004
  elr: 00000000010561f4 lr : 0000000001056fac (reloc)
  <snip>
  x28: 000000007df2d38f x29: 000000007df2d1b0

  Resetting CPU ...

With this fix, boot_addr_start can have the full 64-bit address passed
to bootm.

Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot")
Cc: Simon Glass <sjg@chromium.org>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agousb: udc-uclass: Fixed problem when no alias is defined in DT
Jean-Jacques Hiblot [Thu, 24 Jan 2019 14:44:53 +0000 (15:44 +0100)]
usb: udc-uclass: Fixed problem when no alias is defined in DT

commit 801f1fa442 "dm: usb: udc: Use SEQ_ALIAS to index the USB gadget
ports" changed the way the udevice if found. It uses the alias to find
a udevice for a given USB port number. In the commit log it was stated
that if no alias is provided, the bind order will be used instead. However
it doesn't work. Fixing this by adding a call to uclass_get_device() if
uclass_get_device_by_seq() fails.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Vignesh R <vigneshr@ti.com>
5 years agocmd: fastboot: handle watchdog while waiting for fastboot commands.
Sean Nyekjaer [Thu, 24 Jan 2019 14:17:21 +0000 (15:17 +0100)]
cmd: fastboot: handle watchdog while waiting for fastboot commands.

Watchdog is not handled while waiting for fastboot commands.

Tested on a i.MX6 ULL EVK board.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>