Commit Graph

311 Commits

Author SHA1 Message Date
Holger Brunck
6a0952a332 km: adapt defines and variables for new memory layout
Due to increasing kernel image sizes we get problems when decompressing
the kernel image. To fix this we need to change the addresses where we
load and where we extract the kernel. Also we need to adapt the address
where to load the CRAMFS image and where to load the DTB file.
While at it also harmonize all boards for PPC and ARM to have the
same values. Also we add a new variable "env_version", so that the
userspace is able to detect if this is a u-boot binary with updated
values or not.

CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Tom Rini <trini@konsulko.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Remove old values from kmp204x.h]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-10-22 11:25:33 -04:00
Holger Brunck
5d57dfad3f km: fix license string and compatible strings
As the ownership is now Hitachi Power Grids, change the license string
and adapt the compatible string in DTS files. For kmeter1.dts we
change it to "keymile,KMETER1" for now, as this is then compliant with
what is submitted to the linux kernel. All other boards don't have
a upstreamed version in linux mainline.

Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Marek Vasut <marex@denx.de>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-10-22 09:54:54 -04:00
Heiko Schocher
7bdfe85929 mpc83xx, keymile boards: enable DM_ETH and add DTS
enable DTS support for keymile mpc83xx based boards.

get rid of compile warning:
===================== WARNING ======================
This board does not use CONFIG_DM_ETH (Driver Model
for Ethernet drivers). Please update the board to use
CONFIG_DM_ETH before the v2020.07 release. Failure to
update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Therefore done:
- add DTS for all mpc83xx based boards from keymile
  mainly they are not mainlined to linux.
- add u-boot specific dtsi
- add stdout-path
- add missing ucc4 par_io definitions, which were
  in board code, but not in linux DTS
- remove not used ethernet nodes

Signed-off-by: Heiko Schocher <hs@denx.de>
Patch-cc: Mario Six <mario.six@gdsys.cc>
Patch-cc: Qiang Zhao <qiang.zhao@nxp.com>

Series-to: u-boot

Series-version: 3

Series-changes: 3
- rebase patchset to current mainline commit
  c0192950df
- update defconfig files

Series-changes: 2
- add patch which fixes Codingstyle errors in drivers/qe
- add patch which converts the mpc83xx based boards from
  keymile to DM_ETH

Cover-letter:
powerpc, mpc83xx: add DM_ETH support

This patch series adds DM ethernet support for mpc83xx based
keymile boards.

Travis build:

END
2020-09-17 06:09:54 +02:00
Holger Brunck
b72bbf575b board/km: update MAINTAINERS email
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
2020-07-17 10:47:19 -04:00
Masahiro Yamada
b75d8dc564 treewide: convert bd_t to struct bd_info by coccinelle
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h>

  #include <asm/u-boot.h>
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  <smpl>
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  </smpl>

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-17 09:30:13 -04:00
Heiko Schocher
d934b43a02 mpc83xx, abb: remove suvd3 board
the mpc83xxx suvd3 variant is not longer used, so
remove it.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-05-19 14:01:47 -04:00
Simon Glass
cd93d625fd common: Drop linux/bitops.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 21:19:23 -04:00
Simon Glass
c05ed00afb common: Drop linux/delay.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 21:19:23 -04:00
Simon Glass
f7ae49fc4f common: Drop log.h from common header
Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 21:19:18 -04:00
Simon Glass
0914011310 command: Remove the cmd_tbl_t typedef
We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 18:36:55 -04:00
Simon Glass
691d719db7 common: Drop init.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:33 -04:00
Simon Glass
4d72caa5b9 common: Drop image.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:33 -04:00
Simon Glass
90526e9fba common: Drop net.h from common header
Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:31 -04:00
Trevor Woerner
bb0fb4c0f4 rename symbol: CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD
Have this symbol follow the pattern of all other such symbols.
This patch also removes a TODO from the code.

Reviewed-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2020-05-15 14:47:35 -04:00
Ashok Reddy Soma
702de89cc6 treewide: mem: Move mtest related defines to Kconfig
Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-08 12:02:56 -04:00
Holger Brunck
468ba8d00b ARM: socfpga: Add initial support for the ABB SECU board
Add initial support for the ABB SECU board, which is an ArriaV-based
SoCFPGA system with ethernet and booting from Denali NAND.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2020-03-03 22:11:36 +01:00
Holger Brunck
b0405e08f4 arm/km: remove unmaintained board kmsuv31
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Holger Brunck
95e3ce6a7f arm/km: remove unmaintained board SUGP1
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Holger Brunck
0e1c0f361e arm/km: add support for SUSE2
This board is similar to SUV31, but the FPGA is reset concept is quite
different.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-23 07:29:58 -05:00
Holger Brunck
d4348a8db7 km/scripts: product env and auto-reset for ramfs
This patch adds the possibility in both debug and ramfs modes to
optionally load an env file from /tftpboot/$tftppath (this is ignored if
not present, so the change is backward compatible). This gives the debug
and ramfs scripts the possibility to set uboot environment variables
that were previously asked the users to manually set (nfs path in debug
and rootfs size in ramfs).

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Tom Rini <trini@konsulko.com>
2020-01-23 07:29:58 -05:00
Holger Brunck
27a5f833ff km/scripts: fix run ramfs and COGE5 tftppath problem
The tftppath was not set in case of run ramfs. It worked only by chance
if was already set before.

Also check the boardname before setting the tftppath for COGE5.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Tom Rini <trini@konsulko.com>
2020-01-23 07:29:58 -05:00
Rainer Boschung
db4256f60d km/common: fix for CPUWD reset reason
The CPUWD reset reason is used for kmp204x.
And the qrio cpu reset request is configured to operate in
core reset mode.
But for the evaluation of the qrio's reset reason register
the CPUWD figures as a unit reset source rather than a core
reset source. This patch defines the CPUWD reset as a core
reset source when evaluating the reset reason register.

Signed-off-by: Rainer Boschung <rainer.boschung@ch.abb.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-23 07:29:58 -05:00
Holger Brunck
78a408bb49 KM/kmp204x: qrio and i2c deblock code moved to common
This patch moves the qrio and i2c deblocking code to
keymile/common as it will also be used by the upcoming CENT2 board.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-23 07:29:58 -05:00
Holger Brunck
ac32e7d109 kmp204x: do not make FPGA config error fail board_early_init_r
This prevents the board from booting which is not the expected behavior.

Signed-off-by: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-23 07:29:58 -05:00
Simon Glass
807765b067 common: Move device-tree setup functions to fdt_support.h
These functions relate to setting up the device tree for booting the OS.
The fdt_support.h header file supports similar functions, so move these
there.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:27:27 -05:00
Simon Glass
5e6267af31 common: Move reset_phy() to net.h
This is a network function so let's move it into that header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:26:50 -05:00
Holger Brunck
e7fdb3462d arm/km: remove board KMCOGE3UN
This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-10 10:25:13 -05:00
Holger Brunck
fd7c400962 km/boards: add MAC address offset as argument to ivm_populate_env
For upcoming SECU board we have different MAC address offsets depending
on which functional unit we are running. In this case we need to pass
this value to the ivm_populate_env function instead of using the hard
coded config option there.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Marek Vasut <marex@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-10 10:25:13 -05:00
Holger Brunck
58e1fdb051 km/boards: fix typo for MAC address offset config option
This patch only fixes a typo.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-10 10:25:13 -05:00
Holger Brunck
aeda123a20 board/km: remove CONFIG_KM_BOARD_NAME
We can use the existing CONFIG_SYS_CONFIG_NAME define for that and
remove the option. Also fix the boot string for all km83xx boards.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
2019-12-23 14:06:47 +05:30
Holger Brunck
05577fa518 ppc/km: convert KM_DEF_NETDEV to Kconfig
Remove this from the board header files and move it to Kconfig. Also use
the correct default address for kmtegr1.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
2019-12-23 14:06:47 +05:30
Simon Glass
2cf431c228 common: Move pci_init_board() out of common.h
This function can be dropped when all boards use driver model for PCI. For
now, move it into init.h with a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02 18:25:25 -05:00
Simon Glass
5255932f01 common: Move some board functions out of common.h
A number of board function belong in init.h with the others. Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02 18:25:21 -05:00
Tom Rini
88c7a0a8c2 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Various improvements to Keymile boards - mostly DT conversation
  (Pascal & Holger)
- Removal of now unsupported Keymile boards (Pascal & Holger)
- Small MVEBU PCI fix (Marek)
- Turris Omnia defconfig update (Marek)
- Misc Allied Telesis defconfig updates (Chris)
2019-08-12 23:03:44 -04:00
Holger Brunck
00f9baf8eb powerpc/km: remove unmaintained board KMLION1
This board is unmaintained and can be removed. This also allows us to
remove kmp204x-common.h and integrate it in kmp204x.h.

Signed-off-by: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Holger Brunck
7b472733d8 powerpc/km: remove unmaintained target KMVECT1
Signed-off-by: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Pascal Linder
1bd17b9f7b km/arm: remove unmaintained target PORTL2
Remove the PORTL2 board and all its dependencies as it is no longer
supported by the company.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Pascal Linder
abbaa8ed14 km/rgmii: port Ethernet interface of KM Kirkwood boards to driver model
Activate the driver model for the Ethernet interface (RGMII) in the KM
Kirkwood Kconfig file. Additionally, raise the auto negotiation timeout
to eight seconds as more time is required for those boards.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Pascal Linder
b75e9e3fce km/uart: port UART interface of KM Kirkwood boards to driver model
Activate the driver model for the serial interface in the KM Kirkwood
Kconfig file. The associated preprocessor definitions could be removed
from the header file. However, the clock of 200 MHz needs to be declared
in the device tree.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Pascal Linder
432579c4d1 km: remove obsolete definitions in KM header files
After moving the KM specific configurations to Kconfig, the associated
preprocessor definitions can now be removed in the headers. Moreover, the
whitelist has been adapted correspondingly.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Pascal Linder
707f06f331 km: add Kconfig menus for KM boards
To execute the conversion away from board specific header files, Kconfig
menus have been implemented for all KM boards and additionally for those
having an ARM architecture.

For the moment, the preprocessor definitions stay in the headers. The
boolean types, however, needed a modification (#define CONFIG_* 1).

The default configuration files of some boards required an update in order
to not change the currently defined values of the configurations.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Simon Glass
9fb625ce05 env: Move env_set() to env.h
Move env_set() over to the new header file.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11 16:43:41 -04:00
Pascal Linder
fd9d70d738 km/spi: remove deprecated SPI flash driver code for KM Kirkwood boards
KM Kirkwood boards now implement the driver model for its SPI flash
interface. Therefore, the old board specific claim and release functions
can be deleted. The preprocessor definition CONFIG_SYS_KW_SPI_MPP is yet
unused as well. All its appearances and dependencies are removed in the
kirkwood_spi driver, header files and finally the configuration whitelist.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-11 10:58:03 +02:00
Pascal Linder
c2cd4ec00c km/spi: activate driver model for SPI flash on KM Kirkwood boards
The corresponding configurations are selected in the common Kconfig file.
This is easier than changing every affected board default configuration
file. The default configuration for the PORTL2 board, however, still needs
some modifications to correctly use the driver model.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-11 10:58:03 +02:00
Pascal Linder
53c3050d0d km/spi: overwrite kirkwood_spi weak functions for KM Kirkwood boards
As the SPI NOR and NAND devices share the same hardware pins, the MPP
configuration has to be changed when claiming/releasing the bus. The
current configuration is saved when claiming and restored when releasing.
Furthermore, a general-purpose output is used to switch the chip-select
signal. This is now also implemented for the DM part of the kirkwood_spi
driver.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-11 10:58:03 +02:00
Pascal Linder
c0fed3ac25 km: modify Kconfig file organization for KM boards
As preparation for the upcoming transferring of configurations from header
files to Kconfig, a common Kconfig file for all KM boards was created. For
the moment, it only sources the other three, more specific, Kconfig files.
Therefore, the architecture Kconfig files now include the common Kconfig
file. Also, the configuration selection for KM boards was moved from the
architecture Kconfig files to the board specific Kconfig files.

Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-11 10:58:03 +02:00
Holger Brunck
072d1528fa board/km: update maintainer e-mail
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
2019-06-05 12:14:02 -04:00
Mario Six
8a81bfd271 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>
2019-05-21 07:52:33 +02:00
Mario Six
009c87a2ab 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>
2019-05-20 13:50:34 +02:00
Mario Six
71c790097b 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>
2019-05-20 13:50:34 +02:00