pandora-u-boot.git
5 years agogdsys: cmd_ioloop: Fix style violations
Mario Six [Fri, 29 Mar 2019 09:18:12 +0000 (10:18 +0100)]
gdsys: cmd_ioloop: Fix style violations

Fix some style violations in the ioloop command, and make the code more
readable where possible.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: mpc8308: Add FPGA flavor option
Mario Six [Fri, 29 Mar 2019 09:18:11 +0000 (10:18 +0100)]
gdsys: mpc8308: Add FPGA flavor option

More recent versions of IHS FPGAs feature a different memory layout.

Add a Kconfig option to differentiate between the legacy layout, and the
new layout (which is used on the upcoming "Gazerbeam" and later boards).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: Introduce GDSYS_LEGACY_DRIVERS
Mario Six [Fri, 29 Mar 2019 09:18:10 +0000 (10:18 +0100)]
gdsys: Introduce GDSYS_LEGACY_DRIVERS

Future gdsys boards will switch from the legacy drivers in board/gdsys/common
to DM-based drivers.

Define a Kconfig option that disables the legacy drivers.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: mpc8308: Don't use manual RAM config if RAM driver is active
Mario Six [Fri, 29 Mar 2019 09:18:09 +0000 (10:18 +0100)]
gdsys: mpc8308: Don't use manual RAM config if RAM driver is active

The "manual" RAM configuration should not be used if the DM RAM driver
is active, hence, disable the code if the CONFIG_MPC83XX_SDRAM config
variable is defined.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: mpc8308: Migrate SYS_FPGA{0, 1}_{BASE, SIZE} to Kconfig
Mario Six [Fri, 29 Mar 2019 09:18:08 +0000 (10:18 +0100)]
gdsys: mpc8308: Migrate SYS_FPGA{0, 1}_{BASE, SIZE} to Kconfig

Move CONFIG_SYS_FPGA0_BASE, CONFIG_SYS_FPGA0_SIZE, CONFIG_SYS_FPGA1_BASE, and
CONFIG_SYS_FPGA1_SIZE to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: mpc8308: Use shadow register for output GPIO values
Mario Six [Fri, 29 Mar 2019 09:18:07 +0000 (10:18 +0100)]
gdsys: mpc8308: Use shadow register for output GPIO values

Since the gpio output status on MPC8xxx cannot be read back, it has to
be buffered locally.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: mpc8308: Fix style violations
Mario Six [Fri, 29 Mar 2019 09:18:06 +0000 (10:18 +0100)]
gdsys: mpc8308: Fix style violations

Fix some style violations in the gdsys MPC8308 board files, and make the
code more readable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: Post ppc4xx removal cleanup
Mario Six [Fri, 29 Mar 2019 09:18:05 +0000 (10:18 +0100)]
gdsys: Post ppc4xx removal cleanup

The ppc4xx architecture was removed, and with it several old gdsys 44x
boards, but some "debris" from these purged boards was left over.

This patch removes these remnants (mostly entries in Makefiles, some now
superfluous data structures and some now obsolete config variables from
the whitelist).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys: phy: Adapt fixup_88e1518() to latest Release Notes
Dirk Eibach [Fri, 29 Mar 2019 09:18:04 +0000 (10:18 +0100)]
gdsys: phy: Adapt fixup_88e1518() to latest Release Notes

The initialization sequence in the newest release notes of the 88e1518
phy omits two commands.

Remove them from the sequence.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
5 years agoihs_mdio: Use new regmap interface
Mario Six [Mon, 28 Jan 2019 08:49:33 +0000 (09:49 +0100)]
ihs_mdio: Use new regmap interface

For the DM case, use the proper parameter for the regmap_init_mem call
(which is the ofnode, not the udevice).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agogdsys_rxaui_ctrl: Use new regmap interface
Mario Six [Mon, 28 Jan 2019 08:47:42 +0000 (09:47 +0100)]
gdsys_rxaui_ctrl: Use new regmap interface

For the DM case, use the proper parameter for the regmap_init_mem call
(which is the ofnode, not the udevice).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agogdsys_rxaui_ctrl: Return old state
Mario Six [Mon, 28 Jan 2019 08:47:41 +0000 (09:47 +0100)]
gdsys_rxaui_ctrl: Return old state

Make the gdsys_rxaui_ctrl polarity setting function return the old
state to comply with the API requirements.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agoi2c: ihs: Improve error handling
Mario Six [Mon, 28 Jan 2019 08:45:58 +0000 (09:45 +0100)]
i2c: ihs: Improve error handling

Improve the error handling and reporting of the IHS I2C driver.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: ihs: Get rid of fpgamap
Mario Six [Mon, 28 Jan 2019 08:45:57 +0000 (09:45 +0100)]
i2c: ihs: Get rid of fpgamap

Since the IHS I2C driver want upstream, the surrounding infrastructure
has changed quite a bit (notably, the fpgamap driver was replaced with a
regmap driver).

Update the driver to work with these changes.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agocmd: binop: Use hex2bin
Mario Six [Mon, 28 Jan 2019 08:43:43 +0000 (09:43 +0100)]
cmd: binop: Use hex2bin

Use the new hex2bin function in the binop command instead of converting
the data manually.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: binop: Use new environment api
Mario Six [Mon, 28 Jan 2019 08:43:42 +0000 (09:43 +0100)]
cmd: binop: Use new environment api

Since the binop command was introduced, the environment API was changed.
Use the new API to make the command work again.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agompc83xx_clk: Add enable method
Mario Six [Mon, 28 Jan 2019 08:40:36 +0000 (09:40 +0100)]
mpc83xx_clk: Add enable method

Some DM drivers have hardcoded clk_enable calls when handling
clocks (for example the fsl_esdhc driver).

To work with these drivers, add an enable method to the MCP83xx clock
driver (which does nothing, because the clocks are always enabled).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Define _end symbol
Mario Six [Mon, 28 Jan 2019 08:36:23 +0000 (09:36 +0100)]
mpc83xx: Define _end symbol

To support OF_EMBED, the MPC83xx architecture has to define the "_end"
symbol to correctly access the appended DT.

Fortunately, MPC8xx already defines the symbol, and the linker script is
quite similar to that of MPC83xx, so copy this approach for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agopowerpc: Simplify processor.h
Mario Six [Mon, 28 Jan 2019 08:33:39 +0000 (09:33 +0100)]
powerpc: Simplify processor.h

Lots of stuff in processor.h was taken verbatim from the Linux kernel.
It was never synced, so most of it was removed or changed in the kernel
since it was imported.

Remove all the stuff that is unused in the current U-Boot sources;
should anybody feel the need to re-sync with the kernel, they can do it
later on.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agokeymile: Factor out common includes again
Mario Six [Mon, 21 Jan 2019 08:18:23 +0000 (09:18 +0100)]
keymile: Factor out common includes again

Not that the Kconfig conversion of a lot of variables is done, we can
factor out the common include files for the keymile boards again (which
now contain hardly any #ifdef logic at all).

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agokeymile: Remove CONFIG_SYS_APP{1, 2}_{BASE, SIZE}
Mario Six [Mon, 21 Jan 2019 08:18:22 +0000 (09:18 +0100)]
keymile: Remove CONFIG_SYS_APP{1, 2}_{BASE, SIZE}

CONFIG_SYS_APP1_BASE, CONFIG_SYS_APP2_BASE, CONFIG_SYS_APP1_SIZE, and
CONFIG_SYS_APP2_SIZE are no longer used in the keymile config files
(they were used for setting values, which were converted to Kconfig
earlier in the series).

Remove them from the configs and the whitelist.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Use pre-defined asm functions
Mario Six [Mon, 21 Jan 2019 08:18:21 +0000 (09:18 +0100)]
mpc83xx: Use pre-defined asm functions

For a lot of inline assembly calls in the mpc8xxx and mpc83xx
directories, we already have convenient pre-defined helper functions,
but they're not used, resulting in hard-to-read code.

Use these helper functions where ever possible and useful.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Replace ppcDWstore with inline assembly
Mario Six [Mon, 21 Jan 2019 08:18:20 +0000 (09:18 +0100)]
mpc83xx: Replace ppcDWstore with inline assembly

ppcDWstore/ppcDWload are hardly used by any board, but since they're
implemented in start.S, they're always present in every U-Boot image,
even if they're not needed.

Re-implement these fuctions in C with inline assembly, so that the
compiler can decide when to actually include them.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Don't define cpu_eth_init for DM eth
Mario Six [Mon, 21 Jan 2019 08:18:19 +0000 (09:18 +0100)]
mpc83xx: Don't define cpu_eth_init for DM eth

Don't use the legacy method of initializing the ethernet controller on
MPC83xx when DM is active.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Add arch clock.h to make SDHC work
Mario Six [Mon, 21 Jan 2019 08:18:18 +0000 (09:18 +0100)]
mpc83xx: Add arch clock.h to make SDHC work

The fsl-esdhc driver can be used for the SDHC functionality on MPC83xx,
but it needs some additional definitions.

Add a clock.h file, so we can use the driver for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Get rid of CONFIG_SYS_LBC_*
Mario Six [Mon, 21 Jan 2019 08:18:17 +0000 (09:18 +0100)]
mpc83xx: Get rid of CONFIG_SYS_LBC_*

Except for one counter example, CONFIG_SYS_LBC_LBCR always has a value
of either 0x00040000 or 0x00000000.

CONFIG_SYS_LBC_MRTPR always has the value 0x20000000.

CONFIG_SYS_LBC_LSDMR_{1,2,4,5} are not set for any mpc83xx board.

CONFIG_SYS_LBC_LSRT is set by one board (to 0x32000000).

To simplify the configuration files, hardcode the setting of these
values for mpc83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Get rid of CONFIG_SYS_DDR_SDRAM_BASE
Mario Six [Mon, 21 Jan 2019 08:18:16 +0000 (09:18 +0100)]
mpc83xx: Get rid of CONFIG_SYS_DDR_SDRAM_BASE

CONFIG_SYS_DDR_SDRAM_BASE is set to the same value as
CONFIG_SYS_SDRAM_BASE on all existing boards. Just use
CONFIG_SYS_SDRAM_BASE instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Get rid of CONFIG_SYS_DDR_BASE
Mario Six [Mon, 21 Jan 2019 08:18:15 +0000 (09:18 +0100)]
mpc83xx: Get rid of CONFIG_SYS_DDR_BASE

CONFIG_SYS_DDR_BASE is specific to mpc83xx an is always set to the same
value as CONFIG_SYS_SDRAM_BASE. Just use CONFIG_SYS_SDRAM_BASE instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate CONFIG_LCRR_* to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:14 +0000 (09:18 +0100)]
mpc83xx: Migrate CONFIG_LCRR_* to Kconfig

Migrate the CONFIG_LCRR_* settings to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate SPCR to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:13 +0000 (09:18 +0100)]
mpc83xx: Migrate SPCR to Kconfig

Migrate the SPCR setting to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate arbiter config to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:12 +0000 (09:18 +0100)]
mpc83xx: Migrate arbiter config to Kconfig

Migrate the arbiter configuration to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc8308: Migrate system io config to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:11 +0000 (09:18 +0100)]
mpc8308: Migrate system io config to Kconfig

Migrate the system IO configuration setting to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate CONFIG_SYS_IMMR to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:10 +0000 (09:18 +0100)]
mpc83xx: Migrate CONFIG_SYS_IMMR to Kconfig

Migrate CONFIG_SYS_IMMR to Kconfig for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate HID config to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:09 +0000 (09:18 +0100)]
mpc83xx: Migrate HID config to Kconfig

Mirate the HID configuration settings to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Prepare usage of DM gpio driver
Mario Six [Mon, 21 Jan 2019 08:18:08 +0000 (09:18 +0100)]
mpc83xx: Prepare usage of DM gpio driver

The MPC85xx GPIO driver was converted to handle a broader range of SoCs.

Prepare the MPC83xx code for usage of this driver.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Remove last CONFIG_MPC83xx
Mario Six [Mon, 21 Jan 2019 08:18:07 +0000 (09:18 +0100)]
mpc83xx: Remove last CONFIG_MPC83xx

Remove the last instances of the CONFIG_MPC83xx symbol.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agopowerpc: mpc83xx: fdt: Use get_serial_clock()
Mario Six [Mon, 21 Jan 2019 08:18:06 +0000 (09:18 +0100)]
powerpc: mpc83xx: fdt: Use get_serial_clock()

Replace the hard-coded CONFIG_SYS_NS16550_CLK value for the FDT fixup
with the previously introduced get_serial_clock function

This will make it possible to activate DM for serial devices on MPC83xx
later on.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agopowerpc: mpc83xx: Implement get_serial_clock()
Mario Six [Mon, 21 Jan 2019 08:18:05 +0000 (09:18 +0100)]
powerpc: mpc83xx: Implement get_serial_clock()

DM serial drivers on PowerPC determine their clock frequency via the
get_serial_clock function. This function is not Implemented yet for
MPC83xx.

This patch Implements the function so that DM serial drivers work on
MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agopowerpc: mpc83xx: Fix MPC8308 IMMR memory layout
Mario Six [Mon, 21 Jan 2019 08:18:04 +0000 (09:18 +0100)]
powerpc: mpc83xx: Fix MPC8308 IMMR memory layout

The MPC8308 has two I2C controllers, but no PCI controller.

Fix the register map layout for this SoC.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate CONFIG_SYS_{BR, OR}*_PRELIM to Kconfig
Mario Six [Mon, 21 Jan 2019 08:18:03 +0000 (09:18 +0100)]
mpc83xx: Migrate CONFIG_SYS_{BR, OR}*_PRELIM to Kconfig

Migrate the BR/OR settings to Kconfig. These must be known at compile
time, so cannot be configured via DT.

Configuration of this crucial variable should still be somewhat
comfortable. Hence, make its fields configurable in Kconfig, and
assemble the final value from these.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agosbc8349: Remove SDRAM functionality
Mario Six [Mon, 21 Jan 2019 08:18:02 +0000 (09:18 +0100)]
sbc8349: Remove SDRAM functionality

The MPC8349EMDS configuration was the basis for the sbc8349, so it also
contains its SDRAM option.

Since
* the SDRAM has to be soldered onto the board,
* the sbc8349 never used the support, and
* the support never worked (see previous patch fixing it),

we can assume that the support on the sbc8349 is an artifact created by
copying the MPC8349EMDS config wholesome.

Hence, instead of creating a separate sbc8349 config that supports
SDRAM, we can remove the SDRAM option for this board.

Should it be needed in the future, it can be copied from the new
MPC8349EMDS_SDRAM board.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Simplify BR,OR lines
Mario Six [Mon, 21 Jan 2019 08:18:01 +0000 (09:18 +0100)]
mpc83xx: Simplify BR,OR lines

Re-format all BR,OR #define lines into single lines. This makes them
harder to read, but accessible to semi-automatic replacement.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agotqm834x: Expand CONFIG_SYS_OR_TIMING_FLASH macro
Mario Six [Mon, 21 Jan 2019 08:18:00 +0000 (09:18 +0100)]
tqm834x: Expand CONFIG_SYS_OR_TIMING_FLASH macro

We want to normalize all BR/OR config lines as much as possible.

The TQM834x board uses CONFIG_SYS_OR_TIMING_FLASH in a OR definition,
which we want to remove. But CONFIG_SYS_OR_TIMING_FLASH is also used
outside of the config file.

Replace these usages with the definition of the variable, so we can
remove the variable in the next patch.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Normalize BR/OR option lines
Mario Six [Mon, 21 Jan 2019 08:17:59 +0000 (09:17 +0100)]
mpc83xx: Normalize BR/OR option lines

All BR/OR option lines should have the same layout to make them easier
to migrate to Kconfig. This includes using the same option macros
everywhere.

The normalize the lines,
* replace function macros with their results, and
* replace hardcoded hex values with standard macros

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate LBLAW_* to Kconfig
Mario Six [Mon, 21 Jan 2019 08:17:58 +0000 (09:17 +0100)]
mpc83xx: Migrate LBLAW_* to Kconfig

The LBLAW_* values determine the window configuration of the memory
controller. Hence, they must be known at compile time, and cannot be
implemented in the DT mechanism.

Configuration of this crucial variable should still be somewhat
comfortable. Hence, make its fields configurable in Kconfig, and
assemble the final value from these.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Migrate BATS config to Kconfig
Mario Six [Mon, 21 Jan 2019 08:17:57 +0000 (09:17 +0100)]
mpc83xx: Migrate BATS config to Kconfig

The BATs (block address translation registers) determine the initial
memory window mappings. Hence, they must be known at compile time and
cannot be implemented in the DT mechanism.

Configuration of this crucial variable should still be somewhat
comfortable. Hence, make its fields configurable in Kconfig, and
assemble the final value from these.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agopowerpc: Migrate HIGH_BATS to Kconfig
Mario Six [Mon, 21 Jan 2019 08:17:56 +0000 (09:17 +0100)]
powerpc: Migrate HIGH_BATS to Kconfig

Migrate the CONFIG_HIGH_BATS variable to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: pcie: Read the clock from registers
Mario Six [Mon, 21 Jan 2019 08:17:55 +0000 (09:17 +0100)]
mpc83xx: pcie: Read the clock from registers

The MPC83xx DM timer driver disables arch.pciexp*_clk, and uses
clk_get_rate instead. But the legacy MPC83xx PCIe driver still uses
arch.pciexp*_clk for the clock.

Hence, read the PCIe clock from the registers in the legacy MPC83xx PCIe
driver.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Kconfig: Migrate HRCW to Kconfig
Mario Six [Mon, 21 Jan 2019 08:17:54 +0000 (09:17 +0100)]
mpc83xx: Kconfig: Migrate HRCW to Kconfig

The HRCW (hardware reset configuration word) is a constant that must be
hard-coded into the boot loader image. So, it must be available at
compile time, and cannot be migrated to the DT mechanism, but has to be
kept in Kconfig.

Configuration of this crucial variable should still be somewhat
comfortable. Hence, make its fields configurable in Kconfig, and
assemble the final value from these.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agompc83xx: Get rid of CONFIG_83XX_CLKIN
Mario Six [Mon, 21 Jan 2019 08:17:53 +0000 (09:17 +0100)]
mpc83xx: Get rid of CONFIG_83XX_CLKIN

MPC83xx uses CONFIG_83XX_CLKIN instead of CONFIG_SYS_CLK_FREQ to set the
system clock. To migrate the architecture, we can replace
CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ.

To do this
* replace all occurrences of CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ
* set CONFIG_SYS_CLK_FREQ to the old value of CONFIG_83XX_CLKIN in all
  MPC83xx config files

Signed-off-by: Mario Six <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <manu@freebsd.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
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 <dr@jones.dk>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
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 <dr@jones.dk>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
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 <peron.clem@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <mario.six@gdsys.cc>
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 <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
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 <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
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 <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
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 <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
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 <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
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 <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
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 <s.dirkwinkel@beckhoff.com>
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 <s.dirkwinkel@beckhoff.com>
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 <p.bruenn@beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
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 <sjg@chromium.org>, see
common/spl_fit.c

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefano Babic <sbabic@denx.de>
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 <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
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 <sr@denx.de>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
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 <lukma@denx.de>
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 <trini@konsulko.com>