]> Git Repo - u-boot.git/log
u-boot.git
5 years agompc83xx: Replace CONFIG_83XX_CLKIN in calculations
Mario Six [Mon, 21 Jan 2019 08:17:52 +0000 (09:17 +0100)]
mpc83xx: Replace CONFIG_83XX_CLKIN in calculations

CONFIG_SYS_CLK_FREQ is the standard way to set the system clock
frequency. On MPC83xx, CONFIG_83XX_CLKIN is used for this purpose.
Hence, the obvious way is to replace CONFIG_83XX_CLKIN with
CONFIG_SYS_CLK_FREQ.

A few MPC83xx boards use the CONFIG_83XX_CLKIN variable for computing
CONFIG_SYS_NS16550_CLK. This makes it harder to replace
CONFIG_83XX_CLKIN.

But the value of the multiplicator can be read from the SPMR register.

Hence, replace the static calculations with a call to a new get_bus_freq
function, as other architectures do.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Migrate legacy PCI options to Kconfig
Mario Six [Mon, 21 Jan 2019 08:17:51 +0000 (09:17 +0100)]
mpc83xx: Migrate legacy PCI options to Kconfig

The MPC83xx include files contain some settings of the PCI subsystem.

Migrate these to Kconfig until a proper DM PCI driver exists.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC837XERDB: Remove CONFIG_MPC837XERDB
Mario Six [Mon, 21 Jan 2019 08:17:50 +0000 (09:17 +0100)]
MPC837XERDB: Remove CONFIG_MPC837XERDB

CONFIG_MPC837XERDB is unused, and TARGET_MPC837XERDB could replace it.

Hence, get rid of CONFIG_MPC837XERDB.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC837XEMDS: Remove CONFIG_MPC837XEMDS
Mario Six [Mon, 21 Jan 2019 08:17:49 +0000 (09:17 +0100)]
MPC837XEMDS: Remove CONFIG_MPC837XEMDS

CONFIG_MPC837XEMDS is unused, and TARGET_MPC837XEMDS could replace it.

Hence, get rid of CONFIG_MPC837XEMDS.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC8315ERDB: Remove CONFIG_MPC8315ERDB
Mario Six [Mon, 21 Jan 2019 08:17:48 +0000 (09:17 +0100)]
MPC8315ERDB: Remove CONFIG_MPC8315ERDB

CONFIG_MPC8315ERDB is unused, and TARGET_MPC8315ERDB could replace it.

Hence, get rid of CONFIG_MPC8315ERDB.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC8313ERDB: Remove CONFIG_MPC8313ERDB
Mario Six [Mon, 21 Jan 2019 08:17:47 +0000 (09:17 +0100)]
MPC8313ERDB: Remove CONFIG_MPC8313ERDB

CONFIG_MPC8313ERDB is unused, and
TARGET_MPC8313ERDB_NAND/TARGET_MPC8313ERDB_NOR Kconfig could replace it.

Hence, get rid of CONFIG_MPC8313ERDB.

Signed-off-by: Mario Six <[email protected]>
5 years agostrider: Migrate to CONFIG_TARGET_STRIDER
Mario Six [Mon, 21 Jan 2019 08:17:46 +0000 (09:17 +0100)]
strider: Migrate to CONFIG_TARGET_STRIDER

Use the proper CONFIG_TARGET_STRIDER Kconfig option to replace the
CONFIG_STRIDER ad-hoc config option.

Signed-off-by: Mario Six <[email protected]>
5 years agohrcon: Migrate to CONFIG_TARGET_HRCON
Mario Six [Mon, 21 Jan 2019 08:17:45 +0000 (09:17 +0100)]
hrcon: Migrate to CONFIG_TARGET_HRCON

Use the proper CONFIG_TARGET_HRCON Kconfig option to replace
the CONFIG_HRCON ad-hoc config option.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC8349ITX: Migrate to CONFIG_TARGET_MPC8349ITX
Mario Six [Mon, 21 Jan 2019 08:17:44 +0000 (09:17 +0100)]
MPC8349ITX: Migrate to CONFIG_TARGET_MPC8349ITX

Use the proper CONFIG_TARGET_MPC8349ITX Kconfig option to replace the
CONFIG_MPC8349ITX ad-hoc config option.

Signed-off-by: Mario Six <[email protected]>
5 years agoMPC832XEMDS: Migrate to CONFIG_TARGET_MPC832XEMDS
Mario Six [Mon, 21 Jan 2019 08:17:43 +0000 (09:17 +0100)]
MPC832XEMDS: Migrate to CONFIG_TARGET_MPC832XEMDS

Use the proper CONFIG_TARGET_MPC832XEMDS Kconfig option to replace the
CONFIG_MPC832XEMDS ad-hoc config option.

Signed-off-by: Mario Six <[email protected]>
5 years agove8313: Merge BR/OR settings
Mario Six [Mon, 21 Jan 2019 08:17:42 +0000 (09:17 +0100)]
ve8313: Merge BR/OR settings

The ve8313 has the option of either configuring the eLBC (enhanced local system bus) such that

* NOR flash is the first memory bank, and NAND flash is the second memory bank, or
* NAND flash is the first memory bank, and NOR flash is the second memory bank,

by using CONFIG_SYS_NOR_{BR,OR}_PRELIM and
CONFIG_SYS_NAND_{BR,OR}_PRELIM for defining
CONFIG_SYS_{BR,OR}{0,1}_PRELIM.

After Kconfig migration, replacing some lines in the defconfig will have
the same effect.

Hence, we will not create distinct ve8313_{NOR,NAND} configs for such a
small change.

Instead, fix the current default (NOR first, NAND second), and unroll
the  CONFIG_SYS_NAND_{BR,OR}_PRELIM options. This will ease the Kconfig
migration

Signed-off-by: Mario Six <[email protected]>
5 years agompc8315erdb: Merge BR/OR settings
Mario Six [Mon, 21 Jan 2019 08:17:41 +0000 (09:17 +0100)]
mpc8315erdb: Merge BR/OR settings

The mpc8315erdb has the option of either configuring the eLBC (enhanced
local system bus) such that

* NOR flash is the first memory bank, and NAND flash is the second
  memory bank, or
* NAND flash is the first memory bank, and NOR flash is the second
  memory bank,

by using CONFIG_SYS_NOR_{BR,OR}_PRELIM and
CONFIG_SYS_NAND_{BR,OR}_PRELIM for defining
CONFIG_SYS_{BR,OR}{0,1}_PRELIM.

After Kconfig migration, replacing some lines in the defconfig will have
the same effect.

Hence, we will not create distinct ve8313_{NOR,NAND} configs for such a small change.

Instead, fix the current default (NOR first, NAND second), and unroll
the CONFIG_SYS_NAND_{BR,OR}_PRELIM options. This will ease the Kconfig
migration.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Make distinct MPC8349EMDS_SDRAM board
Mario Six [Mon, 21 Jan 2019 08:17:40 +0000 (09:17 +0100)]
mpc83xx: Make distinct MPC8349EMDS_SDRAM board

The MPC8349EMDS config file contains config options to enable SDRAM
support. To keep this ability after the Kconfig migration, create a new
MPC8349EMDS_SDRAM board that enables the SDRAM support and remove the
SDRAM support from the original board.

Signed-off-by: Mario Six <[email protected]>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 20 May 2019 17:53:51 +0000 (13:53 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- H6 WDT reset fix (Clément)
- H6 SPL_TEXT_BASE fixes (Clément, Jonas)
- NPI-M1+ emac enablment (Emmanuel)

5 years agosun8i: h3: NanoPi M1 Plus: Add emac configuration
Emmanuel Vadot [Tue, 16 Apr 2019 17:18:03 +0000 (19:18 +0200)]
sun8i: h3: NanoPi M1 Plus: Add emac configuration

NanoPi M1 plus have a 10/100/1000M ethernet with external phy.
Phy power is controlled by PD6.
Add the required configuration for it.

Signed-off-by: Emmanuel Vadot <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
5 years agosun50i: a64: teres_i: Fix broken SPL_TEXT_BASE
Jonas Smedegaard [Mon, 20 May 2019 16:57:18 +0000 (22:27 +0530)]
sun50i: a64: teres_i: Fix broken SPL_TEXT_BASE

SPL_TEXT_BASE was moved into Kconfig, which previously part of
include/configs before this teres_i support gets merged.

Fix it by explicitly define in defconfig like other boards does.

Signed-off-by: Jonas Smedegaard <[email protected]>
Signed-off-by: Jagan Teki <[email protected]>
5 years agosun50i: h6: Fix Beelink GS1 board config
Clément Péron [Tue, 14 May 2019 18:26:33 +0000 (20:26 +0200)]
sun50i: h6: Fix Beelink GS1 board config

SPL_TEXT_BASE has been moved to Kconfig with commit:
f89d6133ee configs: move CONFIG_SPL_TEXT_BASE to Kconfig

But Beelink GS1 config file has been introduced in the
same time without this modification.

Fix this by settings the CONFIG_SPL_TEXT_BASE

Suggested-by: Jonas Smedegaard <[email protected]>
Signed-off-by: Clément Péron <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
5 years agoarm: sunxi: h6: fix reset using r_wdog
Clément Péron [Wed, 17 Apr 2019 17:41:05 +0000 (19:41 +0200)]
arm: sunxi: h6: fix reset using r_wdog

Some H6 boards have a watchdog which didn't make the SoC
reboot properly.

Reason is still unknown but several people have test it.
Chen-Yu Tsai :
Pine H64 = H6 V200-AWIN H6448BA 7782 => OK
OrangePi Lite 2 = H6 V200-AWIN H8068BA 61C2 => KO

Martin Ayotte :
Pine H64 = H8069BA 6892 => OK
OrangePi 3 = HA047BA 69W2 => KO
OrangePi One Plus = H7310BA 6842 => KO
OrangePi Lite2 = H6448BA 6662 => KO

Clément Péron:
Beelink GS1 = H6 V200-AWIN H7309BA 6842 => KO

After the series of result, Icenowy try to reach Allwinner about this
issue but they seems not interested to investigate it.

As we don't have the ARIS coproc to do power management and watchdogis
the only solution to reset the board.

So, Change from watchdog to R_watchdog to allow a reboot on all H6
boards.

Signed-off-by: Clément Péron <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
5 years agopowerpc: Add LSDMR config values
Mario Six [Mon, 21 Jan 2019 08:17:39 +0000 (09:17 +0100)]
powerpc: Add LSDMR config values

The LSDMR_* macros are used to configure the system bus on MPC83xx.

A few of the possible LSDMR_* macros were never defined in the
respective include files. This renders the SDRAM support on the
MPC8349EMDS unusable, because it uses these undefined macros.

To make the SDRAM option work, introduce these macros into the proper
config file.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Make distinct caddy2 config
Mario Six [Mon, 21 Jan 2019 08:17:38 +0000 (09:17 +0100)]
mpc83xx: Make distinct caddy2 config

vme8349.h contains two separate boards: The vme8349 itself, and the
caddy2 board. The caddy2 board is chosen by setting certain config
variables. Create a proper config file for the caddy2 board to make
Kconfig migration easier.

Furthermore, simplify the vme8349 and caddy2 configs by keeping only the
options necessary for each board.

Signed-off-by: Mario Six <[email protected]>
5 years agovme8349: Migrate to CONFIG_TARGET_VME8349
Mario Six [Mon, 21 Jan 2019 08:17:37 +0000 (09:17 +0100)]
vme8349: Migrate to CONFIG_TARGET_VME8349

CONFIG_TARGET_VME8349 can replace CONFIG_VME8349. Hence, replace
CONFIG_VME8349 with CONFIG_TARGET_VME8349, and remove CONFIG_VME8349.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Make distinct MPC8313ERDB targets
Mario Six [Mon, 21 Jan 2019 08:17:36 +0000 (09:17 +0100)]
mpc83xx: Make distinct MPC8313ERDB targets

MPC8313ERDB has the option of either enabling NOR or NAND boot in its
config file (by commenting out certain #ifdefs). To keep this ability
after migrating options to Kconfig, we introduce two MPC8313ERDB
configs: one for NOR, and one for NAND.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Make distinct kmeter1, and kmcoge5ne configs
Mario Six [Mon, 21 Jan 2019 08:17:35 +0000 (09:17 +0100)]
keymile: Make distinct kmeter1, and kmcoge5ne configs

The kmeter1, and kmcoge5ne boards also build from the same config
file with #ifdef logic.

Create a separate include config for each board with the #ifdef logic
resolved as needed.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Unroll km/km83xx-common.h
Mario Six [Mon, 21 Jan 2019 08:17:34 +0000 (09:17 +0100)]
keymile: Unroll km/km83xx-common.h

Simplify the keymile config files once more by unrolling the
km/km83xx-common.h, and resolve the #ifdef logic as needed.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Make distinct kmsupx5, tuge1, kmopti2, and kmtepr2 configs
Mario Six [Mon, 21 Jan 2019 08:17:33 +0000 (09:17 +0100)]
keymile: Make distinct kmsupx5, tuge1, kmopti2, and kmtepr2 configs

The kmsupx5, tuge1, kmopti2, and kmtepr2 boards all build from the same
include config file with lots of #ifdef logic.

To ease Kconfig migration, create new config include files for these
boards, and resolve the #ifdef logic as needed.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Unroll includes
Mario Six [Mon, 21 Jan 2019 08:17:32 +0000 (09:17 +0100)]
keymile: Unroll includes

To further simplify config include files, unroll the km/km8309-common.h
and km/km8321-common.h include files.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Move config files
Mario Six [Mon, 21 Jan 2019 08:17:31 +0000 (09:17 +0100)]
keymile: Move config files

We want to unroll several include files, while keeping include
statements consistent.

To make it easier to not break the include statements, move the include
files to the main configs directory. All three include files moved will
be unrolled, so they won't pollute the directory for long.

Signed-off-by: Mario Six <[email protected]>
5 years agokeymile: Make distinct kmtegr1, kmvect1, suvd3 configs
Mario Six [Mon, 21 Jan 2019 08:17:30 +0000 (09:17 +0100)]
keymile: Make distinct kmtegr1, kmvect1, suvd3 configs

The kmtegr1, kmvect1, and suvd3 boards all use the same config include
file with lots of #ifdefs in it.

The Kconfig migation will become easier if we get rid of these #ifdefs
first.

Hence, create distinct config include files for these boards, and unwind
the #ifdef logic in these config files to only include the options
necessary for each board.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC837X
Mario Six [Mon, 21 Jan 2019 08:17:29 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC837X

Replace CONFIG_MPC837x with a proper CONFIG_ARCH_MPC837X Kconfig option.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC836*
Mario Six [Mon, 21 Jan 2019 08:17:28 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC836*

Replace CONFIG_MPC836* with proper CONFIG_ARCH_MPC836* Kconfig options.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC834*
Mario Six [Mon, 21 Jan 2019 08:17:27 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC834*

Replace CONFIG_MPC834* with proper CONFIG_ARCH_MPC834* Kconfig options.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC832*
Mario Six [Mon, 21 Jan 2019 08:17:26 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC832*

Replace CONFIG_MPC832* with proper CONFIG_ARCH_MPC832* Kconfig options.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC831*
Mario Six [Mon, 21 Jan 2019 08:17:25 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC831*

Replace CONFIG_MPC833* with proper CONFIG_ARCH_MPC833* Kconfig options.

Signed-off-by: Mario Six <[email protected]>
5 years agompc83xx: Introduce ARCH_MPC830*
Mario Six [Mon, 21 Jan 2019 08:17:24 +0000 (09:17 +0100)]
mpc83xx: Introduce ARCH_MPC830*

Replace CONFIG_MPC830* with proper CONFIG_ARCH_MPC830* Kconfig options.

Signed-off-by: Mario Six <[email protected]>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 20 May 2019 11:15:32 +0000 (07:15 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

- Fix for mxc_i2c driver in DM mode, thanks to Trent!

5 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Mon, 20 May 2019 11:15:09 +0000 (07:15 -0400)]
Merge git://git.denx.de/u-boot-marvell

- Fix SPL build on Armada XP (theadorable etc) (Stefan)

5 years agovideo: Factor out vidconsole_put_string()
Marek Vasut [Fri, 17 May 2019 18:22:31 +0000 (20:22 +0200)]
video: Factor out vidconsole_put_string()

Pull the vidconsole_put_string() function from DM tests, make it
available to e.g. boards that want to display information on the
LCD on boot.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
Reviewed-by: Anatolij Gustschin <[email protected]>
5 years agovideo: ipuv3: Set max display bpp to 32
Marek Vasut [Sun, 5 May 2019 23:11:32 +0000 (01:11 +0200)]
video: ipuv3: Set max display bpp to 32

The IPUv3 can handle 1920x1080x32bpp displays , set the max preallocated
framebuffer BPP to 32 to cater for all eventualities.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
5 years agoimx: mx6sabresd: fix boot hang with video
Peng Fan [Thu, 25 Apr 2019 02:36:22 +0000 (02:36 +0000)]
imx: mx6sabresd: fix boot hang with video

Meet the following boot hang.
"
U-Boot SPL 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800)
Trying to boot from MMC1

U-Boot 2019.04-00661-gdc80a012e4 (Apr 25 2019 - 10:31:57 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C)Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
Video device 'ipu@2400000' cannot allocate frame buffer memory -ensure the device is set up before relocation
Error binding driver 'ipuv3_video': -28
Video device 'ipu@2800000' cannot allocate frame buffer memory -ensure the device is set up before relocation
Error binding driver 'ipuv3_video': -28
Some drivers failed to bind
Error binding driver 'generic_simple_bus': -28
Some drivers failed to bind
initcall sequence 4ffe4500 failed at call 1780dfb7 (err=-28)
"

1. fdtdec_get_alias_seq will use "video" as base, however in alias node,
   we use ipux, so add new alias for U-Boot dts.
2. DM_VIDEO is enabled, however reserve_video is called before
   relocation, so to make DM_VIDEO work before relocation, need to
   set SYS_MALLOC_F_LEN
3. defconfig is updated with savedefconfig

 Note: I do not have a video panel to test, but with this patch, U-Boot
       boots up again, below log.

"
U-Boot SPL 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800)
Trying to boot from MMC1

U-Boot 2019.04-00662-g0b62453bff (Apr 25 2019 - 10:36:31 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 34C
Reset cause: POR
Model: Freescale i.MX6 Quad SABRE Smart Device Board
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 3
Loading Environment from MMC... *** Warning - bad CRC, using default environment

PCI:   pcie phy link never came up
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
"

Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Anatolij Gustschin <[email protected]>
5 years agoarm: imx: cx9020: remove unnecessary includes
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:19 +0000 (13:57 +0200)]
arm: imx: cx9020: remove unnecessary includes

There are several includes in mx53cx9020.c which are not required
anymore.

Acked-by: Patrick Bruenn <[email protected]>
Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agodm: arm: imx: cx9020: remove unused mmc functions
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:18 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: remove unused mmc functions

These mmc functions were not used anymore since DM_MMC was introduced.

Acked-by: Patrick Bruenn <[email protected]>
Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agodm: arm: imx: cx9020: migrate to dm_video
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:17 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: migrate to dm_video

Enable DM_VIDEO in config and don't overwrite console so it can be set
from environment

Acked-by: Patrick Bruenn <[email protected]>
Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agoarm: imx: add ipu to imx53.dts and set dm-pre-reloc
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:16 +0000 (13:57 +0200)]
arm: imx: add ipu to imx53.dts and set dm-pre-reloc

The ipu node in imx53 is needed for DM_VIDEO. We also need to set
u-boot,dm-pre-reloc to initialize before relocation.

Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agodm: arm: imx: video: add compatible for imx53-ipu
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:15 +0000 (13:57 +0200)]
dm: arm: imx: video: add compatible for imx53-ipu

This code also works with imx53 ipus so we can enable it for them.

Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agodm: arm: imx: cx9020: enable DM_GPIO
Steffen Dirkwinkel [Wed, 17 Apr 2019 11:57:14 +0000 (13:57 +0200)]
dm: arm: imx: cx9020: enable DM_GPIO

Switch to DM_GPIO and add gpio_request where necessary.
This is needed for DM_VIDEO and fixes an issue with sd card detection
which was introduced by the combination of these commits:

commit 7a0425dd969c ("mmc: fsl_esdhc: make get_cd work well in dm_mmc_ops")
commit 7e04b4c751a1 ("dm: arm: imx: migrate cx9020 to CONFIG_DM_MMC")

Acked-by: Patrick Bruenn <[email protected]>
Signed-off-by: Steffen Dirkwinkel <[email protected]>
5 years agosplash: Load internal and external data from FIT
Leo Ruan [Fri, 8 Feb 2019 09:51:36 +0000 (10:51 +0100)]
splash: Load internal and external data from FIT

The FIT image could contain the splash data in 3 different structure:
- The splash data is embedded in FIT image (internal)
  In this case, the property 'data' presents in FIT image header. And
  internal information 'start' and 'end' represent the location and
  size of splash data inside of FIT image.
- The splash data is external with absolute position in FIT image
  This case is made by 'mkimage -p [pos]'. The splash data is stored
  at the absolute position. Instead the property 'data', the properties
  'data-position' and 'data-size' are used to specify the location and
  size of the splash data.
- the splash data is external with relative offset in FIT image
  This case is made by 'mkimage -E'. The splash data is placed after
  the FIT image header with 4 byte alignment. Instead the property
  'data', the properties 'data-offset' and 'data-size' are used to
  specify the location and size of the splash data.

Currently, the splash only support to load external data with relative
offset from FIT image. This commit make it possible to load the splash
data embedded in FIT image or the external data with absolute position

This inspiration comes from Simon Glass <[email protected]>, see
common/spl_fit.c

Signed-off-by: Leo Ruan <[email protected]>
Signed-off-by: Mark Jonas <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Stefano Babic <[email protected]>
5 years agosplash: Use splashfile instead of location->name
Leo Ruan [Fri, 8 Feb 2019 09:51:35 +0000 (10:51 +0100)]
splash: Use splashfile instead of location->name

The splash image could be loaded from different sources (e.g. sf, mmc)
with different formats (e.g. raw, file-system). These sources are
structured by a board dependent object 'splash_location'. To decide
where is the splash image loaded, following environment variables are
used to select the splash source and file:
- 'splashsource' is used to select the splash source by setting its
  value to specified name of splash location.
- 'splashfile' specify the name of splash image file

But, when loads the splash image from FIT, the name of splash image
within FIT is specified by splash location name. Due to the splash
location name is already used for the splash source, its name may
conflicts with the name of splash image.

To solve the conflict, the environment variable 'splashfile' is used
to specify the splash image in FIT, and keeps the splash location
name for the splash source.

Signed-off-by: Leo Ruan <[email protected]>
Signed-off-by: Mark Jonas <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Stefano Babic <[email protected]>
Reviewed-by: Tomas Melin <[email protected]>
5 years agoarm: mvebu: armada-370-xp.dtsi: Add "u-boot, dm-pre-reloc" to "internal-regs"
Stefan Roese [Fri, 10 May 2019 11:34:05 +0000 (13:34 +0200)]
arm: mvebu: armada-370-xp.dtsi: Add "u-boot, dm-pre-reloc" to "internal-regs"

Without this U-Boot specific property, booting on Armada XP theadorable
fails in SPL. All nodes in the "internal-regs" (simple-bus) DT node are
not scanned, so the UART node is missing (and others).

I'm not adding this property in an *u-boot.dtsi file, since there is
none matching the generic rules for all files including this dtsi
file. So to not miss any of the boards using this dtsi file, I'm
adding it to this file directly, which makes the Linux merge a less
easy unforunately.

Signed-off-by: Stefan Roese <[email protected]>
Cc: Chris Packham <[email protected]>
Cc: Marek Behún <[email protected]>
Reviewed-by: Chris Packham <[email protected]>
5 years agoRevert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"
Lukasz Majewski [Tue, 7 May 2019 15:47:28 +0000 (17:47 +0200)]
Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue"

This reverts commit 72a89e0da5ac6a4ab929b15a2b656f04f50767f6, which
causes the imx53 HSC to hang as the eMMC is not working properly anymore.

The exact error message:
MMC write: dev # 0, block # 2, count 927 ... mmc write failed
0 blocks written: ERROR

imx53 is not using the DDR mode.

Debugging of pre_div and div generation showed that those values are
generated in a way, which is not matching the ones from working setup.

As the original patch was performing code refactoring, let's revert this
change, so all imx53 boards would work again.

Signed-off-by: Lukasz Majewski <[email protected]>
5 years agoRevert "Makefile: Prioritize external dtb if defined"
Tom Rini [Sun, 19 May 2019 22:09:05 +0000 (18:09 -0400)]
Revert "Makefile: Prioritize external dtb if defined"

This is causing unexpected size growth in the normal case and is likely
to have been mis-applied by myself.

This reverts commit 3eaf6dcd9362b56e3217559401287dd8fa35b5b2.

Signed-off-by: Tom Rini <[email protected]>
5 years agoMerge tag 'efi-2019-07-rc3-2' of git://git.denx.de/u-boot-efi
Tom Rini [Sun, 19 May 2019 20:46:24 +0000 (16:46 -0400)]
Merge tag 'efi-2019-07-rc3-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc3 (2)

Minor patches to improve UEFI specification compliance are provided.

To allow running the UEFI self compliance tests an outdated version of
the Unicode collation protocol has been added as a configuration option
(disabled by default).

5 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Sun, 19 May 2019 13:42:19 +0000 (09:42 -0400)]
Merge git://git.denx.de/u-boot-x86

- Allow coreboot to process unhandled tags
- Enable NVMe on QEMU x86_64 target

5 years agoMerge branch '2019-05-19-master-imports'
Tom Rini [Sun, 19 May 2019 13:36:48 +0000 (09:36 -0400)]
Merge branch '2019-05-19-master-imports'

- Convert SYS_[DI]CACHE_OFF to Kconfig, introduce SPL variant.
- Various bcm96* fixes.
- Import include/android_bootloader_message.h from AOSP
- Assorted other small fixes.

5 years agox86: qemu-x86_64: Enable NVMe
Bin Meng [Wed, 15 May 2019 15:51:51 +0000 (08:51 -0700)]
x86: qemu-x86_64: Enable NVMe

NVMe was turned on in qemu-x86 but somehow we missed it for 64-bit.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 years agonvme: Fix warning of cast from pointer to integer of different size
Bin Meng [Wed, 15 May 2019 15:37:56 +0000 (08:37 -0700)]
nvme: Fix warning of cast from pointer to integer of different size

When dma_addr_t is u32 in 64-bit, there are some warnings when
building NVME driver. Fix it by doing an additional (long) cast.

Signed-off-by: Bin Meng <[email protected]>
5 years agox86: coreboot: make it possible to process unhandled tags
Christian Gmeiner [Wed, 17 Apr 2019 12:42:05 +0000 (14:42 +0200)]
x86: coreboot: make it possible to process unhandled tags

coreboot makes it possible to add own entries into coreboot's
table at a per mainboard basis. As there might be some custom
ones it makes sense to provide a way to process them.

Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Signed-off-by: Bin Meng <[email protected]>
5 years agoefi_loader: parameter check OutputString
Heinrich Schuchardt [Sat, 18 May 2019 16:11:54 +0000 (18:11 +0200)]
efi_loader: parameter check OutputString

Check the parameters against NULL.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameter
Heinrich Schuchardt [Sat, 18 May 2019 15:07:52 +0000 (17:07 +0200)]
efi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameter

KeyToggleState is a pointer according to UEFI spec 2.8.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: GetNextMonotonicCount() check parameter
Heinrich Schuchardt [Fri, 17 May 2019 10:47:17 +0000 (12:47 +0200)]
efi_loader: GetNextMonotonicCount() check parameter

Do not write to address indicated by NULL pointer.

UEFI SCT II 2.6 (2017), 3.6.5 GetNextMonotonicCount(), 5.1.5.5.1

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: parameter checks CalculateCrc32()
Heinrich Schuchardt [Thu, 16 May 2019 21:31:29 +0000 (23:31 +0200)]
efi_loader: parameter checks CalculateCrc32()

Not checking the parameters may lead reading or writing from NULL.
Implement the parameter checks prescribed in the UEFI spec.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: check device path in InstallMultipleProtocolInterfaces
Heinrich Schuchardt [Thu, 16 May 2019 19:54:04 +0000 (21:54 +0200)]
efi_loader: check device path in InstallMultipleProtocolInterfaces

According to the UEFI spec InstallMultipleProtocolInterfaces() must check
if a device path has already been installed. In this case it must return
EFI_ALREADY_STARTED.

Cf. UEFI SCT II 2.6 A (2017),
3.3.16 InstallMultipleProtocolInterfaces(), 5.1.3.16.1.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: implement deprecated Unicode collation protocol
Heinrich Schuchardt [Thu, 16 May 2019 16:19:00 +0000 (18:19 +0200)]
efi_loader: implement deprecated Unicode collation protocol

In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2
language codes existed. This protocol is not part of the UEFI specification
any longer. Unfortunately it is required to run the UEFI Self Certification
Test (SCT) II, version 2.6, 2017. So we implement it here for the sole
purpose of running the SCT. It can be removed once a compliant SCT is
available.

The configuration option defaults to no.

Signed-off-by: Rob Clark <[email protected]>
Most of Rob's original patch is already merged. Only the deprecated
protocol is missing. Rebase it and make it configurable.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: rename Unicode collation protocol 2 variables
Heinrich Schuchardt [Thu, 16 May 2019 05:52:58 +0000 (07:52 +0200)]
efi_loader: rename Unicode collation protocol 2 variables

Rename variables to make it clear they refer to the Unicode collation
protocol identified by the EFI_UNICODE_PROTOCOL2_GUID.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: merge adjacent sprintf()
Heinrich Schuchardt [Thu, 16 May 2019 05:37:22 +0000 (07:37 +0200)]
efi_loader: merge adjacent sprintf()

In the implementation of the device path to text protocol join adjacent
sprintf() statements.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: parameter checks simple network protocol
Heinrich Schuchardt [Wed, 15 May 2019 21:27:43 +0000 (23:27 +0200)]
efi_loader: parameter checks simple network protocol

Check buffer pointers are not NULL as required by the UEFI 2.7 spec.

Return EFI_UNSUPPORTED instead of EFI_INVALID_PARAMETER when trying to
transmit with non-zero header_size.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoefi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALL
Heinrich Schuchardt [Wed, 15 May 2019 17:32:43 +0000 (19:32 +0200)]
efi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALL

UEFI spec 2.7 erratum A leaves it undefined if Attributes should be set if
GetVariable() returns EFI_BUFFER_TOO_SMALL.

UEFI spec 2.8 defines that Attributes should be set if the return value is
either EFI_SUCCESS or EFI_BUFFER_TOO_SMALL.

Set Attributes if the return value is EFI_BUFFER_TOO_SMALL.

Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoARM: da850evm: Enable block cache during SPL
Adam Ford [Wed, 15 May 2019 21:18:35 +0000 (16:18 -0500)]
ARM: da850evm: Enable block cache during SPL

There appears to be enough RAM to support cache in SPL.
This pach enables block cache in SPL.

Signed-off-by: Adam Ford <[email protected]>
5 years agoKconfig: fix FIT offset prompt text
Ibai Erkiaga [Wed, 15 May 2019 21:10:04 +0000 (22:10 +0100)]
Kconfig: fix FIT offset prompt text

The current prompt text for FIT external offset is identical to
SYS_TEXT_BASE which might confuse the users. Provided more accurate
description for the prompt text.

Signed-off-by: Ibai Erkiaga <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
5 years agoARM: omap3_logic/omap35_logic: Enable GPIO in SPL
Adam Ford [Wed, 15 May 2019 13:37:52 +0000 (08:37 -0500)]
ARM: omap3_logic/omap35_logic: Enable GPIO in SPL

The MMC controller enabled card detect, so this patch enables
the GPIO driver in SPL to support it.

Signed-off-by: Adam Ford <[email protected]>
5 years agoImport include/android_bootloader_message.h from AOSP
Alex Deymo [Tue, 14 May 2019 19:05:26 +0000 (21:05 +0200)]
Import include/android_bootloader_message.h from AOSP

This takes the latest changes from AOSP from the file
bootloader_message/include/bootloader_message/bootloader_message.h
in the repository
https://android.googlesource.com/platform/bootable/recovery
and re-licensed them to BSD-3 for U-Boot.

Minimum local changes have been applied (convert C++ to C comments and
adding #ifndef __UBOOT__ block to skip all the function declarations).

Signed-off-by: Alex Deymo <[email protected]>
Reviewed-by: Sam Protsenko <[email protected]>
5 years agotools: use read-only mmap in fit_check_sign
Luca Boccassi [Tue, 14 May 2019 18:35:02 +0000 (19:35 +0100)]
tools: use read-only mmap in fit_check_sign

Add an option to open files in read-only mode in mmap_fdt so
that fit_check_sign can be used to inspect files on read-only
filesystems.
For example, this is useful when a key is shipped in a read-only
rootfs or squashfs.

Signed-off-by: Luca Boccassi <[email protected]>
5 years agoata: ahci: drop read-only ahci_ioports members
Christian Gmeiner [Tue, 14 May 2019 08:33:41 +0000 (10:33 +0200)]
ata: ahci: drop read-only ahci_ioports members

Also get rid of ahci_setup_port(..).

Signed-off-by: Christian Gmeiner <[email protected]>
5 years agoconfigs: bcm968580 disable CONFIG_CMD_BOOTEFI_SELFTEST
Heinrich Schuchardt [Thu, 9 May 2019 15:35:12 +0000 (17:35 +0200)]
configs: bcm968580 disable CONFIG_CMD_BOOTEFI_SELFTEST

Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the
development of the UEFI sub-system. For production it is not needed.

Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm968580xref_ram_defconfig.

Suggested-by: Tom Rini <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agoconfigs: bcm963158 disable CONFIG_CMD_BOOTEFI_SELFTEST
Heinrich Schuchardt [Thu, 9 May 2019 15:34:15 +0000 (17:34 +0200)]
configs: bcm963158 disable CONFIG_CMD_BOOTEFI_SELFTEST

Configuration option CONFIG_CMD_BOOTEFI_SELFTEST is useful for the
development of the UEFI sub-system. For production it is not needed.

Remove CONFIG_CMD_BOOTEFI_SELFTEST from bcm963158_ram_defconfig.

Suggested-by: Tom Rini <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
5 years agospl: Set spl_image->fdt_addr pointer for full fitImage configuration
Marek Vasut [Tue, 7 May 2019 19:17:02 +0000 (21:17 +0200)]
spl: Set spl_image->fdt_addr pointer for full fitImage configuration

Set the spl_image->fdt_addr pointer both for simple fitImage configuration
as well as full fitImage configuration, to let spl_perform_fixups() access
the DT and perform modifications to it if necessary.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Tom Rini <[email protected]>
5 years agoARM: mediatek: mt8516: use PSCI to reset the SoC
Fabien Parent [Mon, 6 May 2019 14:17:56 +0000 (16:17 +0200)]
ARM: mediatek: mt8516: use PSCI to reset the SoC

Instead of using the watchdog, let's use PSCI to perform the reset
of the SoC.

Signed-off-by: Fabien Parent <[email protected]>
5 years agobcm968380gerg: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:44 +0000 (19:51 +0200)]
bcm968380gerg: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <[email protected]>
5 years agobcm963158: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:43 +0000 (19:51 +0200)]
bcm963158: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <[email protected]>
5 years agobcm968580xref: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
Philippe Reynes [Fri, 3 May 2019 17:51:42 +0000 (19:51 +0200)]
bcm968580xref: remove CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT

This board define the flag CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT
but it's a mistake. It's a workaround for an issue in nand core.
This issue was fixed by the commit 5f626e78491c ("mtd: nand: raw:
Fix CONFIG_SYS_NAND_DRIVER_ECC_LAYOUT behavior"). Now, this flag
break the nand on this board, so we simply remove it.

Signed-off-by: Philippe Reynes <[email protected]>
5 years agodt: bcm63158: watchdog should use a 50Mhz clock
Philippe Reynes [Fri, 3 May 2019 17:43:08 +0000 (19:43 +0200)]
dt: bcm63158: watchdog should use a 50Mhz clock

The watchdog should use a clock at 50 Mhz, so
instead of using the clock osc (200 Mhz), we
define a reference clock at 50Mhz and use it
for both watchdog.

Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
5 years agodt: bcm6858: watchdog should use a 50Mhz clock
Philippe Reynes [Fri, 3 May 2019 17:43:07 +0000 (19:43 +0200)]
dt: bcm6858: watchdog should use a 50Mhz clock

The watchdog should use a clock at 50 Mhz, so
instead of using the clock osc (200 Mhz), we
define a reference clock at 50Mhz and use it
for both watchdog.

Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
5 years agowatchdog: bcm6345: callback start use tick instead of ms
Philippe Reynes [Fri, 3 May 2019 17:43:06 +0000 (19:43 +0200)]
watchdog: bcm6345: callback start use tick instead of ms

The function bcm6345_wdt_start use the argument timeout
as tick but it should be used as milliseconds.

A clock is added as requirement for this driver.
The frequency of the clock is then used to convert the
millisecond to ticks in the function bcm6345_wdt_start.

Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
5 years agoMakefile: Prioritize external dtb if defined
Michal Simek [Mon, 25 Mar 2019 14:55:16 +0000 (15:55 +0100)]
Makefile: Prioritize external dtb if defined

Prioritize external dtb if its passed via EXT_DTB
than the dtb that was built in the tree. With this
patch it appends the specified external dtb to
the u-boot image.

Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 years agoCONFIG_SPL_SYS_[DI]CACHE_OFF: add
Trevor Woerner [Fri, 3 May 2019 13:41:00 +0000 (09:41 -0400)]
CONFIG_SPL_SYS_[DI]CACHE_OFF: add

While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances
where these configuration items are conditional on SPL. This commit adds SPL
variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates
the configurations as required.

Acked-by: Alexey Brodkin <[email protected]>
Signed-off-by: Trevor Woerner <[email protected]>
[trini: Make the default depend on the setting for full U-Boot, update
more zynq hardware]
Signed-off-by: Tom Rini <[email protected]>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig
Trevor Woerner [Fri, 3 May 2019 13:40:59 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: convert to Kconfig

CONFIG_SYS_[DI]CACHE_OFF had been partially converted to Kconfig
parameters; only for the ARC architecture. This patch turns these two
parameters into Kconfig items everywhere else they are found.

All of the include/configs/* and defconfig changes in this patch are
for arm machines only. The Kconfig changes for arc, nds32, riscv,
and xtensa have been included since these symbols are found in code
under arch/{arc,nds32,riscv,xtensa}, however, no currently-defined
include/configs/* or defconfigs for these architectures exist which
include these symbols.

These results have been confirmed with tools/moveconfig.py.

Acked-by: Alexey Brodkin <[email protected]>
Signed-off-by: Trevor Woerner <[email protected]>
[trini: Re-migrate for a few more boards]
Signed-off-by: Tom Rini <[email protected]>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: remove commented lines
Trevor Woerner [Fri, 3 May 2019 13:40:58 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: remove commented lines

Eventually these configuration items will be converted to Kconfig,
therefore there's little point in leaving commented-out versions of
them in include/configs.

Signed-off-by: Trevor Woerner <[email protected]>
5 years agoCONFIG_SYS_[DI]CACHE_OFF: remove superfluous "1"
Trevor Woerner [Fri, 3 May 2019 13:40:57 +0000 (09:40 -0400)]
CONFIG_SYS_[DI]CACHE_OFF: remove superfluous "1"

This config is the only config that uses:
#define CONFIG_SYS_DCACHE_OFF 1
in its #define.

Remove the superfluous "1" so this cache #define is like all the others.

Signed-off-by: Trevor Woerner <[email protected]>
5 years agoCONFIG_SYS_[ID]CACHE_OFF: unify the 'any' case
Trevor Woerner [Fri, 3 May 2019 13:40:56 +0000 (09:40 -0400)]
CONFIG_SYS_[ID]CACHE_OFF: unify the 'any' case

According to De Morgan's Law[1]:
!(A && B) = !A || !B
!(A || B) = !A && !B

There are 5 places in the code where we find:
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
and 4 places in the code where we find:
#if (!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF))

In words, the construct:
!defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE on?"
and the construct:
defined(CONFIG_SYS_[DI]CACHE_OFF)
means:
"is the [DI]CACHE off?"

Therefore
!(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
means:
"the opposite of 'are they both off?'"
in other words:
"are either or both on?"
and:
(!defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF)
means:
"are either or both on?"

As a result, I've converted the 4 instances of '(!A || !B)' to '!(A && B)' for
consistency.

[1] https://en.wikipedia.org/wiki/De_Morgan%27s_laws

Signed-off-by: Trevor Woerner <[email protected]>
5 years agoi2c: mxc: Hide kconfig based control in DM_I2C mode
Trent Piepho [Wed, 8 May 2019 23:30:06 +0000 (23:30 +0000)]
i2c: mxc: Hide kconfig based control in DM_I2C mode

These options only apply when not using DM_I2C.  When using device
trees, the dt will enable and control the speeds of the I2C
controller(s) and these configuration options have no effect.

So disable them in DM_I2C mode.  Otherwise they show up as decoys, and
make it look like one is enabling I2C controllers and setting the speed
when really it's doing nothing.

However, a system using a SPL build will not use DM_I2C in the SPL, even
if DM_I2C is enabled for the main u-boot.  And so the SPL might use the
kconfig based I2C speed controls while the main u-boot does not.

Cc: Sriram Dash <[email protected]>
Cc: Priyanka Jain <[email protected]>
Cc: Heiko Schocher <[email protected]>
Signed-off-by: Trent Piepho <[email protected]>
5 years agowandboard: Don't use I2C speed Kconfig settings with DM_I2C
Trent Piepho [Wed, 8 May 2019 23:30:01 +0000 (23:30 +0000)]
wandboard: Don't use I2C speed Kconfig settings with DM_I2C

When using DM_I2C the speed value supplied to setup_i2c() is not used,
so this code required CONFIG_SYS_MXC_I2C[12]_SPEED to be defined to
compile, but did not actually use them.

Change this so we no longer need to define an unused macro to compile in
DM_I2C mode.  Also make it more clear that they do not control the bus
speed.  Otherwise it is quite easy to mistakenly believe they are used
to set the bus speed.

Cc: Heiko Schocher <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
Signed-off-by: Trent Piepho <[email protected]>
5 years agoi2c: mxc_i2c: Fix read and read->write xfers in DM mode
Trent Piepho [Tue, 30 Apr 2019 16:08:19 +0000 (16:08 +0000)]
i2c: mxc_i2c: Fix read and read->write xfers in DM mode

This is an old driver that supports both device mapped and non-mapped
mode, and covers a wide range of hardware.  It's hard to change without
risking breaking something.  I have to tried to be exceedingly detailed
in this patch, so please excuse the length of the commit essay that
follows.

In device mapped mode the I2C xfer function does not handle plain read,
and some other, transfers correctly.

What it can't handle are transactions that:
    Start with a read, or,
    Have a write followed by a read, or,
    Have more than one read in a row.

The common I2C/SMBUS read register and write register transactions
always start with a write, followed by a write or a read, and then end.
These work, so the bug is not apparent for most I2C slaves that only use
these common xfer forms.

The existing xfer loop initializes by sending the chip address in write
mode after it deals with bus arbitration and master setup.  When
processing each message, if the next message will be a read, it sends a
repeated start followed by the chip address in read mode after the
current message.

Obviously, this does not work if the first message is a read, as the
chip is always addressed in write mode initially by i2c_init_transfer().

A write following a read does not work because the repeated start is
only sent when the next message is a read.  There is no logic to send it
when the current message is a read and next is write.  It should be sent
every time the bus changes direction.

The ability to use a plain read was added to this driver in
commit 2feec4eafd40 ("imx: mxc_i2c: tweak the i2c transfer method"),
but this applied only the non-DM code path.

This patch fixes the DM code path.  The xfer function will call
i2c_init_transfer() with an alen of -1 to avoid sending the chip
address.  The same way the non-DM code achieves this.  The xfer
function's message loop will send the address and mode before each
message if the bus changes direction, and on the first message.

When reading data, the master hardware is one byte ahead of what we
receive.  I.e., reading a byte from the data register returns a byte
*already received* by the master, and causes the master to start the RX
of the *next* byte.  Therefor, before we read the final byte of a
message, we must tell the master what to do next.  I add a "last" flag
to i2c_read_data() to tell it if the message is to be followed by a stop
or a repeated start.  When last == true it acts exactly as before.

The non-DM code can only create an xfer where the read, if any, is the
final message of the xfer.  And so the only callsite of i2c_read_data()
in the non-DM code has the "last" parameter as true.  Therefore, this
change has no effect on the non-DM code.  As all other changes are in
the DM xfer function, which is not even compiled in non-DM code, I am
confident that this patch has no effect on boards not using I2C_DM.
This greatly reduces the range of hardware that could be affected.

For DM boards, I have verified every transaction the "i2c" command can
create on a scope and they are all exactly as they are supposed to be.
I also tested write->read->write, which isn't possible with the i2c
command, and it works as well.  I didn't fix multiple reads in a row, as
it's a lot more invasive and obviously no one has every wanted them
since they've never worked.  It didn't seem like the extra complexity
was justified to support something no one uses.

Cc: Nandor Han <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Breno Matheus Lima <[email protected]>
Signed-off-by: Trent Piepho <[email protected]>
5 years agoi2c: mxc_i2c: Document how non-DM functions work
Trent Piepho [Tue, 30 Apr 2019 16:08:18 +0000 (16:08 +0000)]
i2c: mxc_i2c: Document how non-DM functions work

It is not very clear how these work in relation to the exact I2C xfers
they produce.  In paticular, the address length is somewhat overloaded
in the read method.  Clearly document the existing behavior.  Maybe this
will help the next person who needs to work on this driver and not break
non-DM boards.

Cc: Nandor Han <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Breno Matheus Lima <[email protected]>
Signed-off-by: Trent Piepho <[email protected]>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Tom Rini [Thu, 16 May 2019 11:09:59 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

- arndale fixes

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 16 May 2019 11:09:33 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- SoCFPGA DT and reset cleanup, AE MCVEVK board support.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 16 May 2019 11:09:18 +0000 (07:09 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Align env position on GR-Peach with downstream U-Boot.

5 years agoconfigs: arndale: Use appropriate driver for Asix AX88760
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:33 +0000 (13:24 +0200)]
configs: arndale: Use appropriate driver for Asix AX88760

Arndale board has an Asix AX88760 USB 2.0 Hub and Fast Ethernet combo.
The appropriate driver for it is USB_ETHER_ASIX.

The mistake probably came from misinterpretation of commit e9954b867ce0
("usb: eth: add ASIX AX88179 DRIVER") which was tested on RECS5250 COM
module.  This module indeed has Exynos5250 and some similarities with
Arndale 5250 board but the USB/Ethernet chip used there is apparently
different.

Fixes: f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Lukasz Majewski <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
5 years agoarm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:32 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPAT

The CONFIG_DM_I2C_COMPAT was introduced in
include/configs/exynos5-common.h in commit 189d80166b31 ("exynos5:
enable dm i2c") and then it propagated up to configs/arndale_defconfig.
However since beginning the Arndale board (Exynos5250) was not using
I2C.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.  This setting can be thus safely removed to fix build
warning:

    This board uses CONFIG_DM_I2C_COMPAT. Please remove
    (possibly in a subsequent patch in your series)
    before sending patches to the mailing list.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
5 years agoarm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C
Krzysztof Kozlowski [Sat, 11 May 2019 11:24:31 +0000 (13:24 +0200)]
arm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2C

The CONFIG_POWER and CONFIG_POWER_I2C were introduced in
include/configs/exynos5-common.h in commit 19bd3aaa5991 ("exynos5: fix
build break by adding CONFIG_POWER") and then it propagated up to
include/configs/arndale.h.  However before that commit, there was no
build break at all on Arndale and SMDK5250 boards.  It seems the commit
fixed nothing and just added unused defines.

In fact, the Arndale board is not configuring its PMIC (S5M8767) which
uses I2C bus.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
5 years agoPrepare v2019.07-rc2 v2019.07-rc2
Tom Rini [Wed, 15 May 2019 19:58:48 +0000 (15:58 -0400)]
Prepare v2019.07-rc2

Signed-off-by: Tom Rini <[email protected]>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Wed, 15 May 2019 11:10:52 +0000 (07:10 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

- micrel, ti PHY fixes
- rtl8169, mtk-eth fixes

This page took 0.096206 seconds and 4 git commands to generate.