oweals/u-boot.git
6 years agoMerge tag 'xilinx-kconfig-for-v2018.03' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 1 Mar 2018 17:41:21 +0000 (12:41 -0500)]
Merge tag 'xilinx-kconfig-for-v2018.03' of git://denx.de/git/u-boot-microblaze

Xilinx Kconfig changes for v2018.03

- Moving some macros to Kconfig

# gpg: Signature made Thu 01 Mar 2018 10:45:58 AM EST using DSA key ID 294A0C21
# gpg: Good signature from "Michal Simek <monstr@monstr.eu>"
# gpg:                 aka "Michal Simek (Xilinx) <michals@xilinx.com>"
# gpg:                 aka "Michal Simek (Xilinx) <michal.simek@xilinx.com>"

6 years agommc: Added Kconfig support for CONFIG_ZYNQ_SDHCI_MIN_FREQ
Vipul Kumar [Wed, 28 Feb 2018 10:23:29 +0000 (15:53 +0530)]
mmc: Added Kconfig support for CONFIG_ZYNQ_SDHCI_MIN_FREQ

This patch added Kconfig support for CONFIG_ZYNQ_SDHCI_MIN_FREQ
and enabled it in respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agommc: Added Kconfig support for CONFIG_ZYNQ_SDHCI_MAX_FREQ
Vipul Kumar [Wed, 28 Feb 2018 10:23:28 +0000 (15:53 +0530)]
mmc: Added Kconfig support for CONFIG_ZYNQ_SDHCI_MAX_FREQ

This patch added Kconfig support for CONFIG_ZYNQ_SDHCI_MAX_FREQ
and enabled it in respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomicroblaze: Added Kconfig support for CONFIG_XILINX_GPIO
Vipul Kumar [Wed, 28 Feb 2018 06:02:22 +0000 (11:32 +0530)]
microblaze: Added Kconfig support for CONFIG_XILINX_GPIO

This patch added Kconfig support for CONFIG_XILINX_GPIO
and enabled it in respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Added kconfig support for CONFIG_ZYNQ_I2C0 and CONFIG_ZYNQ_I2C1
Vipul Kumar [Fri, 16 Feb 2018 13:37:22 +0000 (19:07 +0530)]
i2c: Added kconfig support for CONFIG_ZYNQ_I2C0 and CONFIG_ZYNQ_I2C1

This patch added Kconfig support for CONFIG_ZYNQ_I2C0 and
CONFIG_ZYNQ_I2C1 and enabled it in respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Added Kconfig support for CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET
Vipul Kumar [Fri, 16 Feb 2018 13:37:21 +0000 (19:07 +0530)]
i2c: Added Kconfig support for CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET

This patch added Kconfig support for CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET
and enabled it in respective defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SPEED
Vipul Kumar [Fri, 16 Feb 2018 13:37:20 +0000 (19:07 +0530)]
i2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SPEED

This patch added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SPEED
and set it to default value 100000.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SLAVE
Vipul Kumar [Fri, 16 Feb 2018 13:37:19 +0000 (19:07 +0530)]
i2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SLAVE

This patch added Kconfig support for CONFIG_SYS_I2C_ZYNQ_SLAVE
and set it default to 0.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Enabled CONFIG_SYS_I2C_ZYNQ in the respective defconfig
Vipul Kumar [Fri, 16 Feb 2018 13:37:18 +0000 (19:07 +0530)]
i2c: Enabled CONFIG_SYS_I2C_ZYNQ in the respective defconfig

This patch enabled CONFIG_SYS_I2C_ZYNQ in the respective
defconfig.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ
Vipul Kumar [Fri, 16 Feb 2018 13:37:17 +0000 (19:07 +0530)]
i2c: Added Kconfig support for CONFIG_SYS_I2C_ZYNQ

This patch added Kconfig support for CONFIG_SYS_I2C_ZYNQ.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: fpga: Added Kconfig support for CONFIG_FPGA_ZYNQPL
Vipul Kumar [Fri, 16 Feb 2018 12:32:51 +0000 (18:02 +0530)]
arm: zynq: fpga: Added Kconfig support for CONFIG_FPGA_ZYNQPL

This patch added Kconfig support for CONFIG_FPGA_ZYNQPL and migrates the
values over to the defconfigs.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
6 years agofpga: Added Kconfig support for FPGA_SPARTAN3
Vipul Kumar [Fri, 16 Feb 2018 12:32:49 +0000 (18:02 +0530)]
fpga: Added Kconfig support for FPGA_SPARTAN3

This patch added Kconfig support for FPGA_SPARTAN3 and migrates the
values over to the defconfigs.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
6 years agoMerge git://git.denx.de/u-boot-net
Tom Rini [Wed, 28 Feb 2018 01:10:28 +0000 (20:10 -0500)]
Merge git://git.denx.de/u-boot-net

6 years agoKconfig: cmd: Make networking command dependent on NET
Michal Simek [Mon, 26 Feb 2018 15:01:02 +0000 (16:01 +0100)]
Kconfig: cmd: Make networking command dependent on NET

Enable networking command only when NET is enabled.
And remove selecting NET for CMD_NET

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agonet: phy: smsc: Add SMSC LAN8741 support
Arno Steffens [Thu, 25 Jan 2018 12:08:35 +0000 (13:08 +0100)]
net: phy: smsc: Add SMSC LAN8741 support

Signed-off-by: Arno Steffens <star@gmx.li>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: e1000: Fix e1000_igb semaphore handling
Bernhard Messerklinger [Thu, 15 Feb 2018 07:55:49 +0000 (08:55 +0100)]
net: e1000: Fix e1000_igb semaphore handling

Fix commit f1bcad22dd19 ("net: e1000: add support for writing to
EEPROM").

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoNET: designware: fix clock enable
Eugeniy Paltsev [Tue, 6 Feb 2018 14:12:09 +0000 (17:12 +0300)]
NET: designware: fix clock enable

After commit ba1f966725223 ("net: designware: add clock support")
we got NET broken on axs101 and axs103 platforms.

Some clock don't support gating so their clock drivers don't
implement .enable/.disable callbacks. In such case clk_enable
returns -ENOSYS.
Also some clock drivers implement .enable/.disable callbacks not for all
clock IDs and return -ENOSYS (or -ENOTSUPP) for others.

If we have such clock in 'clocks' list of designware ethernet controller
node we fail to probe designware ethernet.

Fix it.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agophy: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:08:27 +0000 (11:08 +0100)]
phy: Fix style violations

Fix some style violations in the generic PHY management code.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocmd: mdio: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:08:26 +0000 (11:08 +0100)]
cmd: mdio: Fix style violations

Fix some style violations in the MDIO command.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agonet: phy: marvell 88e151x: Fix handling of bare RGMII interface type
Mario Six [Mon, 15 Jan 2018 10:08:25 +0000 (11:08 +0100)]
net: phy: marvell 88e151x: Fix handling of bare RGMII interface type

Commit 68e6ecadc551 ("net: phy: marvell 88e151x: Fix handling of RGMII
interface types") fixed the initialization of 88e151x phys, but made it
so that interfaces of type PHY_INTERFACE_MODE_RGMII had both RX and TX
delay bits cleared. The default (like in m88e1111s_config) is to have
both bits set.

Hence, this patch changes the behavior in the PHY_INTERFACE_MODE_RGMII
case so that both bits are set.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: phy: marvell: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:08:24 +0000 (11:08 +0100)]
net: phy: marvell: Fix style violations

Fix some style violations (mostly wrong indentions) in the Marvell PHY
driver.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agonet: tsec: Make live-tree compatible
Mario Six [Mon, 15 Jan 2018 10:08:23 +0000 (11:08 +0100)]
net: tsec: Make live-tree compatible

Make the tsec ethernet driver compatible with a live device tree.

Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agonet: tsec: Fix memory leak in error path
Mario Six [Mon, 15 Jan 2018 10:08:22 +0000 (11:08 +0100)]
net: tsec: Fix memory leak in error path

tsec_initialize allocates a private driver structure using malloc.
Should the memory allocation of this private structure fail, the
function execution is aborted with a return 0, but the previously
allocated device structure is never freed, hence leaked.

Free the device structure in the error case.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: tsec: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:08:21 +0000 (11:08 +0100)]
net: tsec: Fix style violations

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Mon, 26 Feb 2018 03:28:59 +0000 (22:28 -0500)]
Merge git://git.denx.de/u-boot-mmc

6 years agommc: omap_hsmmc: use a default 52MHz max clock rate if none is specified
Jean-Jacques Hiblot [Fri, 23 Feb 2018 09:40:19 +0000 (10:40 +0100)]
mmc: omap_hsmmc: use a default 52MHz max clock rate if none is specified

mmc_of_parse() doesn't set a default value if none is available in DT.
In that case, use a default 52MHz clock rate.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agommc: omap_hsmmc: make it possible to compile out ADMA support
Jean-Jacques Hiblot [Fri, 23 Feb 2018 09:40:18 +0000 (10:40 +0100)]
mmc: omap_hsmmc: make it possible to compile out ADMA support

Some platforms don't have ADMA controllers. For those platforms, compiling
it out reduces the size of the binary by about 600 bytes.
Leaving the support in doesn't break things as the driver checks at runtime
if the ADMA2 controller is present.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agommc: omap_hsmmc: compile out write support if not needed
Jean-Jacques Hiblot [Fri, 23 Feb 2018 09:40:17 +0000 (10:40 +0100)]
mmc: omap_hsmmc: compile out write support if not needed

This reduces the size of the binary by about 196 bytes.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agommc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
Jean-Jacques Hiblot [Fri, 23 Feb 2018 09:40:16 +0000 (10:40 +0100)]
mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat

The area for struct mmc can be allocated dynamically. It greatly reduces
the size of struct omap_hsmmc_plat. This is useful in cases where the board
level code declares one or two struct omap_hsmmc_plat because it doesn't
use the Driver Model.

This saves around 740 bytes for the am335x_evm SPL.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Sun, 25 Feb 2018 20:39:10 +0000 (15:39 -0500)]
Merge git://git.denx.de/u-boot-rockchip

6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Sun, 25 Feb 2018 20:38:42 +0000 (15:38 -0500)]
Merge git://git.denx.de/u-boot-imx

6 years agobootcount: Migrate CONFIG_SYS_BOOTCOUNT_ADDR
Tom Rini [Sat, 24 Feb 2018 21:50:41 +0000 (16:50 -0500)]
bootcount: Migrate CONFIG_SYS_BOOTCOUNT_ADDR

Migrate the users of CONFIG_SYS_BOOTCOUNT_ADDR to Kconfig.  We can
provide a default for BOOTCOUNT_AM33XX as that's a specific part of the
RTC in use.  We can also provide a default for ARCH_LS1043A and
ARCH_LS1021A as they had been previously calculated and their symbols
are in Kconfig.  In the case of other QE-enabled platforms, they are not
so we must update the relevant defconfig files.  The previous default
only applied in some cases, even on a specific SoC family.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoimx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"
Fabio Estevam [Thu, 15 Feb 2018 14:41:40 +0000 (12:41 -0200)]
imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

Commit d695d6627803 ("spl: eMMC/SD: Provide one __weak spl_boot_mode()
function") breaks the boot on several i.MX6 boards,
such as cuboxi and wandboard:

U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300)
Trying to boot from MMC1
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

Partially revert it so that we can boot U-Boot again on these
i.MX6 platforms.

Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
6 years agorockchip: clk: rk3399: handle set_rate/get_rate for PLL_PPLL
Philipp Tomsich [Fri, 23 Feb 2018 16:36:41 +0000 (17:36 +0100)]
rockchip: clk: rk3399: handle set_rate/get_rate for PLL_PPLL

The device-tree node for the PMU clk controller assigns to its parent
(i.e. PLL_PPLL) even though this clock currently is set up statically
by an init-function.

In order to avoid unexpected failures, a simple implementation of
set_rate (which accepts requests, but notifies the caller of the
preset frequency in its return value) and get_rate (which always
returns the preset frequency) are added.

Note that this is required for the RK808 PMIC to probe successfully on
the RK3399-Q7, following the support for the assigned-clocks property.

References: commit f4fcba5c5baa ("clk: implement clk_set_defaults()")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
6 years agorockchip: rk3288: Fix wrong TPL_TEXT_BASE
Jagan Teki [Fri, 23 Feb 2018 07:43:11 +0000 (13:13 +0530)]
rockchip: rk3288: Fix wrong TPL_TEXT_BASE

TPL offset 0xff704004 is unaligned address which is adding nearest
8-bytes for next instruction, So  0xff704004 is adding 0x20 for
proper alignment which is causing the next instruction data
0xefffffff is moved.

Hexdump with overlaped bytes:
-----------------------------
0000000 0000 0000 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 ffff eaff

So, Fix the TEXT_BASE for proper aligned address 0xff704000

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3288: Add TPL_LDSCRIPT
Jagan Teki [Fri, 23 Feb 2018 07:43:10 +0000 (13:13 +0530)]
rockchip: rk3288: Add TPL_LDSCRIPT

Due to size limitations in SPL by adding falcon mode,
rk3288 support TPL. In order to not overlap SPL_TEXT_BASE
add TPL_TEXT_BASE with u-boot-tpl.lds that intern call
u-boot-spl.lds with proper TEXT_BASE values.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3368: handle clk_enable requests for GMAC
Philipp Tomsich [Fri, 16 Feb 2018 15:07:25 +0000 (16:07 +0100)]
rockchip: clk: rk3368: handle clk_enable requests for GMAC

Since commit ba1f96672522 ("net: designware: add clock support"), the
designware GMAC driver enables all referenced clocks. While this is a
no-op for the RK3368 during boot-up (reset behaviour has all the clock
gates open anyway), we still need to handle the clock-ids passed in
the enable op of the clock-driver and return a success.

This change extends the RK3368 clk driver to:
(a) provide a enable op
(b) signals success to the caller when the clocks for the GMAC are
    enabled (no actual action is necessary as the gates are open
    after reset)

References: commit ba1f96672522 ("net: designware: add clock support")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
6 years agorockchip: clk: rk3399: handle clk_enable requests for GMAC
Philipp Tomsich [Fri, 16 Feb 2018 15:07:24 +0000 (16:07 +0100)]
rockchip: clk: rk3399: handle clk_enable requests for GMAC

Since commit ba1f96672522 ("net: designware: add clock support"), the
designware GMAC driver enables all referenced clocks. While this is a
no-op for the RK3399 during boot-up (reset behaviour has all the clock
gates open anyway), we still need to handle the clock-ids passed in
the enable op of the clock-driver and return a success.

This change extends the enable-op of the rk3399 clk driver to signal
success to the caller when the clocks for the GMAC are enabled.

References: commit ba1f96672522 ("net: designware: add clock support")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
6 years agoARM: dts: i.MX6QDL: icore-rqs: Fix eMMC detection during SPL
Jagan Teki [Wed, 21 Feb 2018 13:05:56 +0000 (18:35 +0530)]
ARM: dts: i.MX6QDL: icore-rqs: Fix eMMC detection during SPL

usdhc4 has eMMC on icore-rqs boards, SPL is not detecting
it becuase of u-boot,dm-spl flag so add it to make eMMC working.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoRemove CONFIG_SYS_BOOTCOUNT_SINGLEWORD
Alex Kiernan [Fri, 16 Feb 2018 15:50:48 +0000 (15:50 +0000)]
Remove CONFIG_SYS_BOOTCOUNT_SINGLEWORD

Tidy up CONFIG_SYS_BOOTCOUNT_SINGLEWORD from the whitelist as there's
no remaining uses of it left.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoMigrate CONFIG_BOOTCOUNT_ALEN to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:47 +0000 (15:50 +0000)]
Migrate CONFIG_BOOTCOUNT_ALEN to Kconfig

Convert CONFIG_BOOTCOUNT_ALEN to Kconfig
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoMigrate generic bootcount to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:46 +0000 (15:50 +0000)]
Migrate generic bootcount to Kconfig

Make generate boot counter selected in the same way as other boot count
drivers

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoIntegrate AT91 bootcount driver
Alex Kiernan [Fri, 16 Feb 2018 15:50:45 +0000 (15:50 +0000)]
Integrate AT91 bootcount driver

Integrate Boot counter for Atmel AT91SAM9XE into Kconfig

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoConvert CONFIG_BOOTCOUNT_EXT to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:44 +0000 (15:50 +0000)]
Convert CONFIG_BOOTCOUNT_EXT to Kconfig

This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_EXT

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoConvert CONFIG_BOOTCOUNT_I2C to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:43 +0000 (15:50 +0000)]
Convert CONFIG_BOOTCOUNT_I2C to Kconfig

This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_I2C

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoConvert CONFIG_BOOTCOUNT_RAM to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:42 +0000 (15:50 +0000)]
Convert CONFIG_BOOTCOUNT_RAM to Kconfig

This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_RAM

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoConvert CONFIG_BOOTCOUNT_ENV to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:41 +0000 (15:50 +0000)]
Convert CONFIG_BOOTCOUNT_ENV to Kconfig

This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_ENV

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoConvert CONFIG_BOOTCOUNT_AM33XX to Kconfig
Alex Kiernan [Fri, 16 Feb 2018 15:50:40 +0000 (15:50 +0000)]
Convert CONFIG_BOOTCOUNT_AM33XX to Kconfig

This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_AM33XX

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Acked-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoPrepare for multiple bootcount drivers
Alex Kiernan [Fri, 16 Feb 2018 15:50:39 +0000 (15:50 +0000)]
Prepare for multiple bootcount drivers

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoMerge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT
Alex Kiernan [Fri, 16 Feb 2018 15:50:38 +0000 (15:50 +0000)]
Merge CONFIG_BOOTCOUNT and CONFIG_BOOTCOUNT_LIMIT

CONFIG_BOOTCOUNT was only used in mx53ppd, merge it with
CONFIG_BOOTCOUNT_LIMIT

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Ian Ray <ian.ray@ge.com>
6 years agoMerge git://git.denx.de/u-boot-video
Tom Rini [Sat, 24 Feb 2018 13:02:17 +0000 (08:02 -0500)]
Merge git://git.denx.de/u-boot-video

6 years agoRemove config_distro_defaults.h
Adam Ford [Tue, 6 Feb 2018 13:49:32 +0000 (07:49 -0600)]
Remove config_distro_defaults.h

With the contents of config_distro_defaults.h migrated to Kconfig,
we can remove this header file completely

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_BOOTP_BOOTPATH et al to Kconfig
Adam Ford [Tue, 6 Feb 2018 13:58:59 +0000 (07:58 -0600)]
Convert CONFIG_BOOTP_BOOTPATH et al to Kconfig

This converts the following to Kconfig:
   CONFIG_BOOTP_BOOTPATH
   CONFIG_BOOTP_DNS
   CONFIG_BOOTP_GATEWAY
   CONFIG_BOOTP_HOSTNAME
   CONFIG_BOOTP_PXE
   CONFIG_BOOTP_SUBNETMASK
   CONFIG_CMDLINE_EDITING
   CONFIG_AUTO_COMPLETE
   CONFIG_SYS_LONGHELP
   CONFIG_SUPPORT_RAW_INITRD
   CONFIG_ENV_VARS_UBOOT_CONFIG

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Re-run the migration]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agorockchip: video: update MAINTAINERS
Philipp Tomsich [Fri, 23 Feb 2018 16:38:53 +0000 (17:38 +0100)]
rockchip: video: update MAINTAINERS

The video drivers (VOP, HDMI encoder, LVDS encoder, MIPI encoder) for
Rockchip SOCs are self-contained and are mainly impacted by other
changes in the architecture support (e.g. pinctrl, clocking, etc).

Let's add these to the list of files maintained as part of the
Rockchip port.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
6 years agorockchip: video: rk_vop: migrate to livetree
Philipp Tomsich [Fri, 23 Feb 2018 16:38:52 +0000 (17:38 +0100)]
rockchip: video: rk_vop: migrate to livetree

This migrates rk_vop (the shared functions used by multiple VOP
mini-drivers) to be compatible with a live tree.

Unfortunately, there's
(i)  a lot of tree traversal needed for a VOP (as each active VOP
     vnode references back to the endpoints in the encoders and vice
     versa) to configure the connection between VOPs and encoders;
(ii) the DTS binding is not too sane and one needs to walk a node's
     parents (the original code just assumed that the device would
     live 3 levels above the property linked through a phandle) until
     a UCLASS_DISPLAY device can be found.

As part of the migration, the code for finding the enclosing display
device has been changed to not assume a specific depth of nesting
(i.e. we walk until we reach the root or find a matching device) and
to use the newly introduced (in the same series) ofnode_get_parent()
function.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
6 years agorockchip: video: rk_hdmi: migrate to livetree
Philipp Tomsich [Fri, 23 Feb 2018 16:38:51 +0000 (17:38 +0100)]
rockchip: video: rk_hdmi: migrate to livetree

The rk_hdmi (shared functions for multiple HDMI mini-drivers) has been
using devfdt_get_addr() to read the HDMI controller's IO base address.
This will cause a failure with a live tree.

This changes the driver to use dev_read_addr() which is safe both for
flat trees and live trees.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
6 years agocore: add ofnode_get_by_phandle() api
Kever Yang [Fri, 23 Feb 2018 16:38:50 +0000 (17:38 +0100)]
core: add ofnode_get_by_phandle() api

We need to get ofnode from a phandle, add interface to support
both live dt and fdt.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agocore: ofnode: add ofnode_get_parent function
Philipp Tomsich [Fri, 23 Feb 2018 16:38:49 +0000 (17:38 +0100)]
core: ofnode: add ofnode_get_parent function

The Rockchip video drivers need to walk the ofnode-parrents to find
an enclosing device that has a UCLASS_DISPLAY driver bound.  This
adds a ofnode_get_parent()-function that returns the parent-node.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Fri, 23 Feb 2018 18:05:03 +0000 (13:05 -0500)]
Merge git://git.denx.de/u-boot-sh

6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 23 Feb 2018 18:04:48 +0000 (13:04 -0500)]
Merge git://git.denx.de/u-boot-usb

6 years agoconfig_whitelist: remove false-positive CONFIG options
Masahiro Yamada [Fri, 5 Jan 2018 18:17:06 +0000 (03:17 +0900)]
config_whitelist: remove false-positive CONFIG options

U-Boot pulled in several core makefiles from Linux.  The following
are not used in U-Boot:

  - CONFIG_DEBUG_SECTION_MISMATCH
  - CONFIG_FTRACE_MCOUNT_RECORD
  - CONFIG_GCOV_KERNEL
  - CONFIG_GCOV_PROFILE_ALL
  - CONFIG_KASAN
  - CONFIG_MODVERSIONS

We can remove the unused code if we like. (although it will get the
scripts out of sync)

CONFIG_BOOM and CONFIG_HIS_DRIVER are just mentioned in the comment
block of scripts/basic/fixdep.c

CONFIG_SHELL is not configuration, but a variable for internal-use.
It is just a historical misnomer in Kbuild.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoomap3_logic: Fix Environmental location
Adam Ford [Thu, 22 Feb 2018 23:15:12 +0000 (17:15 -0600)]
omap3_logic: Fix Environmental location

For the omap3_logic boards, the environment is always in NAND.
This removes the ENV_IS_IN_FAT flag to eliminate the extra chatter.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agosf: Add ISSI IS25LP256 entry
Marek Vasut [Wed, 21 Feb 2018 20:12:02 +0000 (21:12 +0100)]
sf: Add ISSI IS25LP256 entry

Add entry for ISSI IS25LP256 part.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@openedev.com>
6 years agoMakefile: Don't mess with .text section location for selected arches
Alexey Brodkin [Wed, 21 Feb 2018 10:06:26 +0000 (13:06 +0300)]
Makefile: Don't mess with .text section location for selected arches

Most of architectures have .text section situated in the very beginning
of U-Boot binary and thus it is very logical that CONFIG_SYS_TEXT_BASE
is used on final linkage step to specify where U-Boot gets linked to.

For that we pass the following construction to the LD:
---------------------------->8-----------------------
xxx-ld ...  -Ttext $(CONFIG_SYS_TEXT_BASE) ...
---------------------------->8-----------------------

But there could be exceptions. For example:
 1. In case of ARCv2 we want to put vectors table in its own section
    .ivt in front of .text section which means we need either add an
    offset to CONFIG_SYS_TEXT_BASE to compensate for .ivt or don't
    pass "-Ttext" to the LD at all and specify link base in linker
    script directly.

 2. Some architectures even though have .text section in the very
    beginning of the U-Boot image still use different symbols to
    specify link-base:
       * NIOS2: CONFIG_SYS_MONITOR_BASE (which I really like because
         that exactly what makes sense - where out image starts but not
         beginning of its .text section which just happened to match the
         whole image beginning)
       * EXTENSA: CONFIG_SYS_TEXT_ADDR
       * X86: Which doesn't use CONFIG_SYS_MONITOR_BASE in case of EFI
         otherwise sets explicit link base in u-boot.lds

I think that's good to allow for flexibility and don't require each and
every architecture or even platform to specify CONFIG_SYS_TEXT_BASE as well
as use it to set .text section location.

So let's only pass "-Ttext xxx" for those architectures who don't set
link-base explicitly in their linker scripts.

This patch iaddresses comments for previously sent
https://patchwork.ozlabs.org/patch/867540/.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
6 years agoarm64: show_regs: Dump the LRs HW values
Karl Beldan [Tue, 20 Feb 2018 23:30:08 +0000 (23:30 +0000)]
arm64: show_regs: Dump the LRs HW values

These were dropped in [1], after relocation, for their values offset by
reloc_off.
Unconditionally show the HW values and add a '(reloc)' hint for the
offset values showed after relocation.
Also, the LRs' dumps are now formatted the same way the other regs' are.

[1] Commit 082693f4 ("arm64 :show_regs: show the address before relocation")

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
6 years agotools/kwbimage: fix LibreSSL build
Jonathan Gray [Tue, 20 Feb 2018 15:59:01 +0000 (02:59 +1100)]
tools/kwbimage: fix LibreSSL build

Fix build after addition of RSA_get0_key() to LibreSSL.
Patch from Theo Buehler and Stuart Henderson.

Signed-off-by: Theo Buehler <tb@openbsd.org>
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
6 years agonet: Remove Xilinx ll_temac driver
Michal Simek [Tue, 20 Feb 2018 09:19:00 +0000 (10:19 +0100)]
net: Remove Xilinx ll_temac driver

ll_temac driver was used by Xilinx Microblaze big endian and
Xilinx ppc405/ppc440 SoCs.

ppc support was removed by: "powerpc: remove 4xx support"
(sha1: 98f705c9cefdfdba62c069821bbba10273a0a8ed)
and Microblaze BE is not tested for a long time that's why this driver
can be removed because none is going to updated it to DM anyway.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoconfigs: am335x_evm_usbspl: Add CONFIG_SPL_NET_VCI_STRING
Faiz Abbas [Fri, 16 Feb 2018 08:11:23 +0000 (13:41 +0530)]
configs: am335x_evm_usbspl: Add CONFIG_SPL_NET_VCI_STRING

Add CONFIG_SPL_NET_VCI_STRING to enable USB-Ethernet boot mode
support.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofdt: Fixup only valid memory banks
Thierry Reding [Thu, 15 Feb 2018 18:05:59 +0000 (19:05 +0100)]
fdt: Fixup only valid memory banks

Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
6 years agons16550: Fix mem mapped endian check
Bernhard Messerklinger [Thu, 15 Feb 2018 08:02:26 +0000 (09:02 +0100)]
ns16550: Fix mem mapped endian check

Do a explicit check for CONFIG_SYS_BIG_ENDIAN and
CONFIG_SYS_LITTLE_ENDIAN to avoid errors on platforms where both
are undefined (x86).

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agopci: Fix decode regions for memory banks
Bernhard Messerklinger [Thu, 15 Feb 2018 07:59:53 +0000 (08:59 +0100)]
pci: Fix decode regions for memory banks

Since memory banks may not be located behind each other we need to add
them separately.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agodefconfig: k2x_hs_evm: Re-enable TI_SECURE_DEVICE in HS K2x parts
Andrew F. Davis [Wed, 14 Feb 2018 17:53:39 +0000 (11:53 -0600)]
defconfig: k2x_hs_evm: Re-enable TI_SECURE_DEVICE in HS K2x parts

These got removed in config re-syncs due to a Kconfig bug. Add these
back here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoenv: Fix missed getenv_ulong to env_get_ulong conversion
Andrew F. Davis [Wed, 14 Feb 2018 17:53:38 +0000 (11:53 -0600)]
env: Fix missed getenv_ulong to env_get_ulong conversion

This seems to have been missed, possibly due to the inability to
enable TI_SECURE_DEVICE on Keystone2 devices previously.

Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoARM: Kconfig: Move TI_SECURE_DEVICE to a common area
Andrew F. Davis [Wed, 14 Feb 2018 17:53:37 +0000 (11:53 -0600)]
ARM: Kconfig: Move TI_SECURE_DEVICE to a common area

TI_SECURE_DEVICE is used by both OMAP2+ and Keystone2 family devices,
and so when ARCH_OMAP2PLUS was used to gate off the OMAP2+ Kconfig
Keystone2 family devices lost this config option.

Move this option out of mach-omap2 Kconfig to a spot accessible by both
families. We picked arch/arm/Kconfig over the TI specific board/ti/
location as this option is not specific to our boards but rather our
architecture.

Plus at some point this option can be changed to just
SECURE_DEVICE, as having secure parts is not exclusive to TI and
so other vendors can interpret this option as needed by their device
configurations.

Fixes: a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoxtensa: clean up CONFIG_SYS_TEXT_ADDR
Max Filippov [Mon, 12 Feb 2018 23:39:19 +0000 (15:39 -0800)]
xtensa: clean up CONFIG_SYS_TEXT_ADDR

Drop CONFIG_SYS_MEMORY_TOP. Rename CONFIG_SYS_TEXT_ADDR to
XTENSA_SYS_TEXT_ADDR.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
6 years agoconfigs: Re-sync with CONFIG_DISTRO_DEFAULTS
Tom Rini [Sat, 10 Feb 2018 21:54:38 +0000 (16:54 -0500)]
configs: Re-sync with CONFIG_DISTRO_DEFAULTS

A number of platforms include config_distro_defaults.h but do not enable
CONFIG_DISTRO_DEFAULTS.  As they plainly intended to, set that flag and
re-sync config files.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agommc: fix off-by-one bug in mmc_startup_v4()
Alexander Kochetkov [Tue, 20 Feb 2018 11:35:55 +0000 (14:35 +0300)]
mmc: fix off-by-one bug in mmc_startup_v4()

MMC card with EXT_CSD_REV value 9 will trigger off-by-one
bug while accessing mmc_versions array. The patch fix that.

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
6 years agommc: Drop unnecessary case for mmc_probe()
Faiz Abbas [Mon, 12 Feb 2018 14:05:24 +0000 (19:35 +0530)]
mmc: Drop unnecessary case for mmc_probe()

Drop the unnecessary empty function case for mmc_probe().

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
6 years agommc: uniphier-sd: Add compatible strings for RCar Gen2
Marek Vasut [Wed, 17 Jan 2018 22:59:47 +0000 (23:59 +0100)]
mmc: uniphier-sd: Add compatible strings for RCar Gen2

Add DT compatible strings for RCar Gen2 SoCs, so that this driver
can bind with them. Unlike Gen3, which uses 64bit FIFO, the Gen2
uses 16bit FIFO.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agosh: Do not provide strncmp
Tom Rini [Sat, 17 Feb 2018 22:30:41 +0000 (17:30 -0500)]
sh: Do not provide strncmp

With modern GCC, we get warnings such as:
cmd/jffs2.c: In function 'mtdparts_init':
arch/sh/include/asm/string.h:110:38:
warning: array subscript is above array bounds [-Warray-bounds]
   : "0" (__cs), "1" (__ct), "r" (__cs+__n)
                                  ~~~~^~~~

This results in a small size reduction as well.

Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoimx6q: engicam: Use SPL_LOAD_FIT for MMC boards
Jagan Teki [Tue, 20 Feb 2018 07:16:28 +0000 (12:46 +0530)]
imx6q: engicam: Use SPL_LOAD_FIT for MMC boards

Currently SPL_LOAD_FIT is unable to boot from nand on
i.MX6QDL platform, so enable only for MMC boards.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoimx6: engicam: Drop SPL_EXT_SUPPORT
Jagan Teki [Tue, 20 Feb 2018 07:16:27 +0000 (12:46 +0530)]
imx6: engicam: Drop SPL_EXT_SUPPORT

i.MX6 boards still using raw MMC write for SPL and
u-boot-dtb.img along with Falcon mode configurations,
so drop filesystem based write through SPL_EXT_SUPPORT.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoimx6ul: engicam: Drop isiot-mmc defconfig
Jagan Teki [Tue, 20 Feb 2018 07:16:26 +0000 (12:46 +0530)]
imx6ul: engicam: Drop isiot-mmc defconfig

Engicam Is.IoT has eMMC and NAND cpu modules where MMC
is common for both, so remove explicit mmc defconfig.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoarm: imx: hab: Define HAB_RVT_BASE according to the processor version
Breno Lima [Tue, 20 Feb 2018 01:19:26 +0000 (01:19 +0000)]
arm: imx: hab: Define HAB_RVT_BASE according to the processor version

Currently the following devices are using a different definition for ROM
Vector Table addresses:

- i.MX6DQP =  All rev
- i.MX6DQ >= rev 1.5
- i.MX6SDL >= rev 1.2

There is no need to create a new RVT macros since the only update were the
RVT base address. Remove HAB_RVT_*_NEW macros and define a new RVT base
address.

More details about RVT base address can be found on processors Reference
Manual and in the following documents:

EB803: i.MX 6Dual/6Quad Applications Processor Silicon Revision 1.2 to 1.3
Comparison

EB804: i.MX 6Solo/6DualLite Application Processor Silicon Revision 1.1
to 1.2/1.3 Comparison

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Check if CSF contains deprecated commands
Utkarsh Gupta [Tue, 20 Feb 2018 01:19:25 +0000 (01:19 +0000)]
imx: hab: Check if CSF contains deprecated commands

Write, Check and Set MID commands have been deprecated from the Code
Signing Tool (CST) v2.3.3 and will not be implemented in newer versions
of HAB, hence the following features are no longer available:

- Write Data
- Clear Mask
- Set Mask
- Check All Clear
- Check All Set
- Check Any Clear
- Check Any Set
- Set MID

The inappropriate use of Write Data command may lead to an incorrect
authentication boot flow. Since no specific application has been identified
that requires the use of any of these features, it is highly recommended to
add this check.

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Check if CSF is valid before authenticating image
Utkarsh Gupta [Tue, 20 Feb 2018 01:19:24 +0000 (01:19 +0000)]
imx: hab: Check if CSF is valid before authenticating image

For proper authentication the HAB code must check if the CSF is valid.
Users must call the csf_is_valid() function to parse the CSF prior to
authenticating any additional images. The function will return a failure
if any of the following invalid conditions are met:

- CSF pointer is NULL
- CSF Header does not exist
- CSF does not lie within the image bounds
- CSF command length zero

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Ensure the IVT DCD pointer is Null prior to calling HAB authenticate function.
Utkarsh Gupta [Tue, 20 Feb 2018 01:19:23 +0000 (01:19 +0000)]
imx: hab: Ensure the IVT DCD pointer is Null prior to calling HAB authenticate function.

DCD commands should only be present in the initial boot image loaded by
the SoC ROM. DCD should not be present in images that will be verified
by software using HAB RVT authentication APIs. Newer versions of HAB
will generate an error if a DCD pointer is present in an image being
authenticated by calling the HAB RVT API. Older versions of HAB will
process and run DCD if it is present, and this could lead to an incorrect
authentication boot flow.

It is highly recommended this check is in place to ensure additional HAB
verified images do not include a DCD table.

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: hab: Keep CAAM clock enabled after authenticating additional images
Breno Lima [Tue, 20 Feb 2018 01:19:22 +0000 (01:19 +0000)]
imx: hab: Keep CAAM clock enabled after authenticating additional images

Currently it is not possible to run CMD_DEK on i.MX SPL targets:

=> dek_blob 0x12000000 0x12001000 128

The system hangs after running dek_blob because the CAAM clock is being
disabled by the HAB code. There is no need to disable CAAM clock after
authenticating additional boot images, thus keep CAAM clock enabled to
address this issue.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoRevert "mx6: ddr: Allow changing REFSEL and REFR fields"
Maxim Yu. Osipov [Tue, 20 Feb 2018 10:08:09 +0000 (11:08 +0100)]
Revert "mx6: ddr: Allow changing REFSEL and REFR fields"

This reverts commit edf0093732225c2fd0791c3864e9a3eef1f92f19 for
cm_fx6 iMX.6 Solo module as it causes frequent (around 10 percent of
power cycles) board's hangs.

These hangs happen in SPL when BSS is being initialized in SDRAM -
it appear that variables from BSS contain trash values which lead to board
hangs. Looks like that SDRAM doesn't yet finish initialization in these
cases.

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
6 years agosh: Use -m2a-nofpu only
Tom Rini [Sat, 17 Feb 2018 22:30:38 +0000 (17:30 -0500)]
sh: Use -m2a-nofpu only

Based on reading over the GCC manual, passing both -m2a and -m2a-nofpu
are redundant, as -m2a-nofpu will provide functional code for both.  As
-m2a-nofpu functions with more toolchains and does what is expected,
switch.

Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agocmd: fastboot: Kconfig: solve config issue
Patrick Delaunay [Thu, 7 Dec 2017 17:26:17 +0000 (18:26 +0100)]
cmd: fastboot: Kconfig: solve config issue

When FASTBOOT is activated, only one the supported device is supported in
code at the same time
- CONFIG_FASTBOOT_FLASH_MMC_DEV
- CONFIG_FASTBOOT_FLASH_NAND_DEV

But Today the choice is not exclusive in Kconfig
and that cause Kconfig issue when :
- CONFIG_FASTBOOT, CONFIG_MMC, CONFIG_NAND are activated
- CONFIG_FASTBOOT_FLASH_MMC_DEV = 0
- CONFIG_FASTBOOT_FLASH_NAND_DEV is not activated

The patch add a choice in Kconfig to select the FLASH provider
- CONFIG_FASTBOOT_FLASH_MMC
- CONFIG_FASTBOOT_FLASH_NAND

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agodfu: tftp: Fix arm64 build warnings
Marek Vasut [Fri, 16 Feb 2018 15:41:19 +0000 (16:41 +0100)]
dfu: tftp: Fix arm64 build warnings

Fix two build warnings when building for arm64:

drivers/dfu/dfu_tftp.c: In function ‘dfu_tftp_write’:
drivers/dfu/dfu_tftp.c:59:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ret = dfu_write_from_mem_addr(dfu, (void *)addr, len);
                                     ^
and

drivers/dfu/dfu_tftp.c: In function ‘dfu_tftp_write’:
drivers/dfu/dfu_tftp.c:41:8: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘__kernel_size_t {aka long unsigned int}’ [-Wformat=]
  debug("%s: image name: %s strlen: %u\n", __func__, sb, strlen(sb));
        ^

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agodfu: Rename _FUNCTION_DFU to DFU_OVER_
Marek Vasut [Fri, 16 Feb 2018 15:41:18 +0000 (16:41 +0100)]
dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agodfu: Fix up the Kconfig mess
Marek Vasut [Fri, 16 Feb 2018 15:41:17 +0000 (16:41 +0100)]
dfu: Fix up the Kconfig mess

Clean up the screaming mess of configuration options that DFU is.
It was impossible to configure DFU such that TFTP is enabled and
USB is not, this patch fixes that and assures that DFU TFTP and
DFU USB can be enabled separatelly and that the correct pieces
of code are compiled in.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agousb: kbd: select SYS_STDIO_DEREGISTER
Heinrich Schuchardt [Wed, 21 Feb 2018 03:57:09 +0000 (03:57 +0000)]
usb: kbd: select SYS_STDIO_DEREGISTER

If SYS_STDIO_DEREGISTER is not selected and USB_KEYBOARD is selected
U-Boot cannot be built due to missing function stdio_deregister_dev.

So USB_KEYBOARD should select SYS_STDIO_DEREGISTER.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agousb: gadget: sdp: fix pointer cast warnings for 64bit archs
Andre Heider [Thu, 15 Feb 2018 09:17:29 +0000 (10:17 +0100)]
usb: gadget: sdp: fix pointer cast warnings for 64bit archs

The SDP protocol contains multiple 32bit pointers. Add a helper function
to get a valid pointer from these values and use it.

This fixes the following warnings:

drivers/usb/gadget/f_sdp.c: In function ‘sdp_rx_data_complete’:
drivers/usb/gadget/f_sdp.c:347:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   memcpy((void *)sdp->dnl_address, req->buf + 1, datalen);
          ^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_jump_imxheader’:
drivers/usb/gadget/f_sdp.c:625:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  entry = (void *)headerv2->entry;
          ^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_handle_in_ep’:
drivers/usb/gadget/f_sdp.c:668:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   memcpy(&data[1], (void *)sdp_func->dnl_address, datalen);
                    ^
drivers/usb/gadget/f_sdp.c:679:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   status = sdp_jump_imxheader((void *)sdp_func->jmp_address);
                               ^

Signed-off-by: Andre Heider <a.heider@gmail.com>
6 years agousb: gadget: sdp: add missing line breaks
Andre Heider [Thu, 15 Feb 2018 06:08:55 +0000 (07:08 +0100)]
usb: gadget: sdp: add missing line breaks

Cosmetic change.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
6 years agommc: synchronize the sequence with enum bus_mode in mmc.h
Jaehoon Chung [Tue, 30 Jan 2018 05:10:16 +0000 (14:10 +0900)]
mmc: synchronize the sequence with enum bus_mode in mmc.h

If some configs are disabled, number of freqs array will not assigned to
correct value with bus_mode.
Synchornize the ordering with enum bus_mode in mmc.h.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoPrepare v2018.03-rc3 v2018.03-rc3
Tom Rini [Tue, 20 Feb 2018 21:51:56 +0000 (16:51 -0500)]
Prepare v2018.03-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoscript: Make the get_default_envs.sh script working with newest u-boot
Lukasz Majewski [Wed, 14 Feb 2018 10:39:48 +0000 (11:39 +0100)]
script: Make the get_default_envs.sh script working with newest u-boot

This commit fixes several issues:

- After moving env related code to ./env directory the env_common.o file
is no longer present in the system (has been replaced with built-in.o).

- Use ${OBJCOPY} if available, fallback to system default's objcopy if not
present.

- Extend the script to accept different build directory than current one.
It is extremely handy with OE usage, where source code is separated from
build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Alex Kiernan <alex.kiernan@gmail.com>