]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 years agoAzure: Remove "spear" jobs
Tom Rini [Thu, 8 Jul 2021 11:50:08 +0000 (07:50 -0400)]
Azure: Remove "spear" jobs

With the spear family of platforms gone, remove references to them from
the build jobs.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoRevert "arm: Remove nsa310s board"
Tom Rini [Thu, 8 Jul 2021 02:55:41 +0000 (22:55 -0400)]
Revert "arm: Remove nsa310s board"

While this platform has not yet been converted, there is active efforts
to do so.  Keep the platform for now.

This reverts commit aa697e6904ba1b3144a46ec642d4695e7c0cdc3e.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2021-07-07-remove-non-migrated-platforms'
Tom Rini [Thu, 8 Jul 2021 02:50:41 +0000 (22:50 -0400)]
Merge branch '2021-07-07-remove-non-migrated-platforms'

- Remove a large number of platforms that did not migrate to DM_PCI or
  DM_USB by 2 years past the migration deadline and do not have a
  migration imminent.

3 years agousb: Add correct depends for CMD_USB_MASS_STORAGE
Tom Rini [Sat, 22 May 2021 12:47:16 +0000 (08:47 -0400)]
usb: Add correct depends for CMD_USB_MASS_STORAGE

We cannot build this without USB_GADGET_DOWNLOAD support enabled, add
the appropriate depends line.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agosniper: Add build guards around MUSB support code
Tom Rini [Sat, 22 May 2021 12:47:15 +0000 (08:47 -0400)]
sniper: Add build guards around MUSB support code

If MUSB support is disabled, these parts of the code will fail to build.

Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove spear600 boards and the rest of SPEAr support
Tom Rini [Sat, 22 May 2021 12:47:14 +0000 (08:47 -0400)]
arm: Remove spear600 boards and the rest of SPEAr support

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.  As this is
the last of the SPEAr platforms, so remove the rest of the remaining
support as well.

Cc: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove spear320 boards
Tom Rini [Sat, 22 May 2021 12:47:13 +0000 (08:47 -0400)]
arm: Remove spear320 boards

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.  As this is
also the last SPEAR3XX platform, remove that symbol as well.

Cc: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove spear310 boards
Tom Rini [Sat, 22 May 2021 12:47:12 +0000 (08:47 -0400)]
arm: Remove spear310 boards

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.

Cc: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove spear300 boards
Tom Rini [Sat, 22 May 2021 12:47:11 +0000 (08:47 -0400)]
arm: Remove spear300 boards

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.

Cc: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove nsa310s board
Tom Rini [Sat, 22 May 2021 12:47:10 +0000 (08:47 -0400)]
arm: Remove nsa310s board

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove it

Cc: Gerald Kerma <dreagle@doukki.net>
Cc: Tony Dinh <mibodhi@gmail.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove gplugd board
Tom Rini [Sat, 22 May 2021 12:47:09 +0000 (08:47 -0400)]
arm: Remove gplugd board

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove it

Cc: Ajay Bhargav <contact@8051projects.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove edb9315a board
Tom Rini [Sat, 22 May 2021 12:47:08 +0000 (08:47 -0400)]
arm: Remove edb9315a board

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove it.

This is also the last PL010_SERIAL using board, so remove those
references.

Cc: Sergey Kostanbaev <sergey.kostanbaev@fairwaves.ru>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoarm: Remove at91rm9200ek boards
Tom Rini [Sat, 22 May 2021 12:47:07 +0000 (08:47 -0400)]
arm: Remove at91rm9200ek boards

These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.

Cc: Andreas Bießmann <andreas@biessmann.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agomx6memcal: Disable USB GADGET in SPL
Tom Rini [Sat, 22 May 2021 12:47:06 +0000 (08:47 -0400)]
mx6memcal: Disable USB GADGET in SPL

As this board does not use CONFIG_OF_CONTROL and the DM_USB migration
deadline has passed, disable USB_GADGET support.

Cc: Eric Nelson <eric@nelint.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Eric Nelson <eric@nelint.com>
3 years agodockstar: Perform base CONFIG_DM enablement
Tom Rini [Sat, 22 May 2021 12:47:05 +0000 (08:47 -0400)]
dockstar: Perform base CONFIG_DM enablement

As these boards support CONFIG_OF_CONTROL today, perform a basic
CONFIG_DM migration.

Cc: Eric Cooper <ecc@cmu.edu>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoib62x0: Perform base CONFIG_DM enablement
Tom Rini [Sat, 22 May 2021 12:47:04 +0000 (08:47 -0400)]
ib62x0: Perform base CONFIG_DM enablement

As these boards support CONFIG_OF_CONTROL today, perform a basic
CONFIG_DM migration.

Cc: Luka Perkov <luka@openwrt.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoiconnect: Perform base CONFIG_DM enablement
Tom Rini [Sat, 22 May 2021 12:47:03 +0000 (08:47 -0400)]
iconnect: Perform base CONFIG_DM enablement

As these boards support CONFIG_OF_CONTROL today, perform a basic
CONFIG_DM migration.

Cc: Luka Perkov <luka@openwrt.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agopogo_e02: Perform base CONFIG_DM enablement
Tom Rini [Sat, 22 May 2021 12:47:02 +0000 (08:47 -0400)]
pogo_e02: Perform base CONFIG_DM enablement

As these boards support CONFIG_OF_CONTROL today, perform a basic
CONFIG_DM migration.

Cc: Dave Purdy <david.c.purdy@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoopenrd: Perform base CONFIG_DM enablement
Tom Rini [Sat, 22 May 2021 12:47:01 +0000 (08:47 -0400)]
openrd: Perform base CONFIG_DM enablement

As these boards support CONFIG_OF_CONTROL today, perform a basic
CONFIG_DM migration.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agosnapper9260/snapper9g20: Disable USB
Tom Rini [Sat, 22 May 2021 12:47:00 +0000 (08:47 -0400)]
snapper9260/snapper9g20: Disable USB

These boards have not converted to DM_USB by the deadline, disable USB
support as they do not enable CONFIG_OF_CONTROL.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: Remove unnecessary CONFIG_DM_PCI_COMPAT=y
Tom Rini [Sat, 15 May 2021 01:34:31 +0000 (21:34 -0400)]
configs: Remove unnecessary CONFIG_DM_PCI_COMPAT=y

The following boards no longer need CONFIG_DM_PCI_COMPAT enabled, so
remove that.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove T4160RDB board
Tom Rini [Sun, 23 May 2021 14:58:05 +0000 (10:58 -0400)]
ppc: Remove T4160RDB board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.  As this is the last
ARCH_T4160 platform, remove that support as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC832XEMDS boards
Tom Rini [Sat, 15 May 2021 01:34:29 +0000 (21:34 -0400)]
ppc: Remove MPC832XEMDS boards

These boards have not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8323ERDB board
Tom Rini [Sat, 15 May 2021 01:34:28 +0000 (21:34 -0400)]
ppc: Remove MPC8323ERDB board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8315ERDB board
Tom Rini [Sat, 15 May 2021 01:34:27 +0000 (21:34 -0400)]
ppc: Remove MPC8315ERDB board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.  As this is the last
ARCH_MPC8315 platform, remove that support as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove sbc8641d board
Tom Rini [Sat, 15 May 2021 01:34:26 +0000 (21:34 -0400)]
ppc: Remove sbc8641d board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.  This is also the last
of the ARCH_MPC8641/MPC8610 platforms, so remove that support as well.

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoppc: Remove xpedite boards
Tom Rini [Sat, 15 May 2021 01:34:25 +0000 (21:34 -0400)]
ppc: Remove xpedite boards

These boards have not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove them.  As this includes
the last ARCH_MPC8572 platform, remove that as well.

Cc: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
3 years agoppc: Remove kmcoge4 board
Tom Rini [Sat, 15 May 2021 01:34:24 +0000 (21:34 -0400)]
ppc: Remove kmcoge4 board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.

Cc: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8568MDS board
Tom Rini [Sat, 15 May 2021 01:34:23 +0000 (21:34 -0400)]
ppc: Remove MPC8568MDS board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.  As this is the last
ARCH_MPC8568 platform, remove that support as well.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove T1023RBD boards and T1024RDB_SECURE_BOOT
Tom Rini [Sat, 15 May 2021 01:34:22 +0000 (21:34 -0400)]
ppc: Remove T1023RBD boards and T1024RDB_SECURE_BOOT

These boards have not been converted to CONFIG_DM_PCI by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.  As this is
the only ARCH_T1023 platform left, remove that support as well.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8555CDS boards
Tom Rini [Sat, 15 May 2021 01:34:21 +0000 (21:34 -0400)]
ppc: Remove MPC8555CDS boards

These boards have not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove them.  As this is the only
ARCH_MPC8555 platform left, remove that support as well.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8541CDS board
Tom Rini [Sat, 15 May 2021 01:34:20 +0000 (21:34 -0400)]
ppc: Remove MPC8541CDS board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.  As this is the only
MPC8541 target left, remove that architecture support as well.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove TQM834x board
Tom Rini [Sat, 15 May 2021 01:34:19 +0000 (21:34 -0400)]
ppc: Remove TQM834x board

This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove sbc8548 boards
Tom Rini [Sat, 15 May 2021 01:34:18 +0000 (21:34 -0400)]
ppc: Remove sbc8548 boards

These boards have not been converted to CONFIG_DM_PCI by the deadline and are
also missing conversion to CONFIG_DM.  Remove them.

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove caddy2 / vme8349 boards
Tom Rini [Sat, 15 May 2021 01:34:17 +0000 (21:34 -0400)]
ppc: Remove caddy2 / vme8349 boards

These boards have not been converted to CONFIG_DM_PCI by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.

Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove MPC8313ERDB boards
Tom Rini [Sat, 15 May 2021 01:34:16 +0000 (21:34 -0400)]
ppc: Remove MPC8313ERDB boards

These boards have not been converted to CONFIG_DM_PCI by the deadline.
Remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove ve8313 board
Tom Rini [Sat, 15 May 2021 01:34:15 +0000 (21:34 -0400)]
ppc: Remove ve8313 board

This board has not been converted to CONFIG_DM_PCI by the deadline.
Remove it.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
3 years agoppc: Remove mpc8308_p1m board
Tom Rini [Sat, 15 May 2021 01:34:14 +0000 (21:34 -0400)]
ppc: Remove mpc8308_p1m board

This board has not been converted to CONFIG_DM_PCI by the deadline.
Remove it.

Cc: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove many T104x boards
Tom Rini [Sat, 15 May 2021 01:34:13 +0000 (21:34 -0400)]
ppc: Remove many T104x boards

These boards have not been converted to CONFIG_DM_PCI, CONFIG_DM_USB or
in some cases CONFIG_DM itself by the deadline.  Remove them.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Remove sbc8349 board
Tom Rini [Sat, 15 May 2021 01:34:12 +0000 (21:34 -0400)]
ppc: Remove sbc8349 board

This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agom68k: Remove M5475x boards
Tom Rini [Sat, 15 May 2021 01:34:10 +0000 (21:34 -0400)]
m68k: Remove M5475x boards

These board has not been converted to CONFIG_DM_PCI by the deadline.
Remove them.  As this is the last of the mcf547x_8x family of boards,
remove that support as well.

Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agom68k: Remove M5485 boards
Tom Rini [Sat, 15 May 2021 01:34:09 +0000 (21:34 -0400)]
m68k: Remove M5485 boards

These board has not been converted to CONFIG_DM_PCI by the deadline.
Remove them.  As this is all of the CONFIG_M548x platforms as well,
remove that code.

Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoppc: Drop MPC837XERDB_SLAVE for now
Tom Rini [Sat, 15 May 2021 01:34:07 +0000 (21:34 -0400)]
ppc: Drop MPC837XERDB_SLAVE for now

Drop the MPC837XERDB_SLAVE configuration.

Cc: Sinan Akman <sinan@writeme.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agopci: Remove non-DM board_pci_fixup_dev() declaration
Tom Rini [Sat, 15 May 2021 01:34:06 +0000 (21:34 -0400)]
pci: Remove non-DM board_pci_fixup_dev() declaration

With the ventana boards migrated to DM_PCI and DM_ETH, we can remove
this prototype.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'dm-pull-6jul21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Wed, 7 Jul 2021 17:34:42 +0000 (13:34 -0400)]
Merge tag 'dm-pull-6jul21' of https://source.denx.de/u-boot/custodians/u-boot-dm

various minor sandbox improvements

3 years agoMerge branch '2021-07-06-update-to-gcc11-clang11'
Tom Rini [Wed, 7 Jul 2021 17:32:22 +0000 (13:32 -0400)]
Merge branch '2021-07-06-update-to-gcc11-clang11'

- Update CI to use gcc-11.1 and clang-11 to build everything.  This
  requires a few fixes to the code that these newer compilers have
  exposed.

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 7 Jul 2021 15:34:29 +0000 (11:34 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

3 years agoAzure/GitLab: Move to gcc-11.1.0 and LLVM-11
Tom Rini [Fri, 2 Jul 2021 14:41:58 +0000 (10:41 -0400)]
Azure/GitLab: Move to gcc-11.1.0 and LLVM-11

- Move to gcc-11.1.0 builds from kernel.org for supported platforms and
  LLVM-11 for those tests.
- As Heinrich has noted, the RISC-V platform specification has a profile
  OS-A for running rich operating systems like Linux and BSD. This profile
  requires 64bit and UEFI conforming to the EBBR. Only the 'embedded'
  profile may use 32bit.  Given this, drop grub for 32bit RISC-V as it no
  longer compiles with gcc-11.1 and upstream is unlikely to fix it:
  https://www.mail-archive.com/grub-devel@gnu.org/msg30736.html
- Update to grub-2.06 release to address other issues of building with
  gcc-11.1.
- Update to newer Xtensa (gcc-9.2.0) and ARC (gcc-10.2) toolchains

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Rick Chen <rick@andestech.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: Drop _X86EMU_env definition when CONFIG_BIOSEMU is used
Bin Meng [Wed, 7 Jul 2021 07:36:26 +0000 (15:36 +0800)]
x86: Drop _X86EMU_env definition when CONFIG_BIOSEMU is used

With x86 we can execute an option ROM either natively or using the
x86 emulator (if enabled with CONFIG_BIOSEMU). Both of these share
the _X86EMU_env variable, with the native code using it to hold
register state during interrupt processing.

At present, in 32-bit U-Boot, the variable is declared twice, once
in common code and once in code only compiled with CONFIG_BIOSEMU.

With GCC 11 this causes a 'multiple definitions' error on boards
with CONFIG_BIOSEMU.

Drop the emulator definition when CONFIG_BIOSEMU is used.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
3 years agobootstage: Eliminate when not enabled
Tom Rini [Mon, 3 May 2021 20:48:58 +0000 (16:48 -0400)]
bootstage: Eliminate when not enabled

When we do not have bootstage enabled, rather than include an empty
dummy function, we just don't reference it.  This saves us space in some
tight builds.  This also shows a few cases where show_boot_progress was
incorrectly guarded before.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMakefile: Disable gcc-10.0 introduced warnings
Tom Rini [Mon, 3 May 2021 20:48:57 +0000 (16:48 -0400)]
Makefile: Disable gcc-10.0 introduced warnings

Follow what the Linux Kernel does here and disable the
'zero-length-bounds', 'array-bounds' and 'stringop-overflow' warnings
here.

This brings in commits 5c45de21a222344720996e2d79 and 5a76021c2eff7
from the Linux Kernel.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agopinctrl: mscc: Fix multiple definition error
Tom Rini [Mon, 3 May 2021 20:48:56 +0000 (16:48 -0400)]
pinctrl: mscc: Fix multiple definition error

With gcc-11 we get a multiple errors here as the declarations for
mscc_pinctrl_ops and mscc_gpio_ops are missing an extern.

CC: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: Lars Povlsen <lars.povlsen@microchip.com>
Cc: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agoeb_cpu5282: Declare diplay_width / display_height as externs
Tom Rini [Mon, 3 May 2021 20:48:55 +0000 (16:48 -0400)]
eb_cpu5282: Declare diplay_width / display_height as externs

The board code here references the display_width / display_height
variables set in the video driver, declare these as externs as gcc-11
will notice and lead to a multiple definition error.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agofreescale: Drop unnecessary cpld_data_t non-typedef
Tom Rini [Mon, 3 May 2021 20:48:54 +0000 (16:48 -0400)]
freescale: Drop unnecessary cpld_data_t non-typedef

In some board cpld.h files the definition of the cpld_data struct
not-quite makes a typedef for cpld_data_t.  This problem is caught with
gcc-11 as a multiple definition error.  As there are no users of this
non-typedef, fix this by not declaring it one to begin with.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoARM: mvebu: a38x: Correct mismatched bound warnings
Tom Rini [Mon, 3 May 2021 20:48:53 +0000 (16:48 -0400)]
ARM: mvebu: a38x: Correct mismatched bound warnings

With gcc-11 we see:
drivers/ddr/marvell/a38x/ddr3_debug.c:672:47: error: argument 2 of type 'u32[5]' {aka 'unsigned int[5]'} with mismatched bound [-Werror=array-parameter=]
  672 | int ddr3_tip_read_adll_value(u32 dev_num, u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM],
      |                                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/ddr/marvell/a38x/ddr3_training_ip_engine.h:10,
                 from drivers/ddr/marvell/a38x/ddr3_init.h:17,
                 from drivers/ddr/marvell/a38x/ddr3_debug.c:6:
drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h:116:47: note: previously declared as 'u32[]' {aka 'unsigned int[]'}

And similar warnings.  Correct these by updating the prototype.  Remove
the prototype for ddr3_tip_read_pup_value as it is unused.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'u-boot-atmel-fixes-2021.10-a' of https://source.denx.de/u-boot/custodians...
Tom Rini [Wed, 7 Jul 2021 12:52:14 +0000 (08:52 -0400)]
Merge tag 'u-boot-atmel-fixes-2021.10-a' of https://source.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2021.10 cycle:

This small fixes set is dedicated to fixing the onewire subsystem for
the at91 boards which was broken since 2020.04.

3 years agoriscv: dts: add OpenPiton RISC-V board dts support
Tianrui Wei [Wed, 7 Jul 2021 07:48:22 +0000 (15:48 +0800)]
riscv: dts: add OpenPiton RISC-V board dts support

Previous device tree for OpenPiton emits a warning during compilation.
This commit fixes the previous warning adds dts to the OpenPiton RISC-V
board and added the device tree to MAINTAINER file.

Signed-off-by: Tianrui Wei <tianrui-wei@outlook.com>
Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoMerge branch '2021-07-06-platform-updates'
Tom Rini [Tue, 6 Jul 2021 22:10:10 +0000 (18:10 -0400)]
Merge branch '2021-07-06-platform-updates'

- mpc8379erdb DM_USB, DM_PCI and DM_ETH support.
- Drop PCI support from the integrator family of boards
- Add synquacer support
- Assorted lpc32xx updates and improvements
- snapdragon (and related) fixes, Broadcom iproc update

3 years agoserial: serial_msm: Ensure BAM/single character mode are disabled
Stephan Gerhold [Mon, 28 Jun 2021 08:40:09 +0000 (10:40 +0200)]
serial: serial_msm: Ensure BAM/single character mode are disabled

At the moment, the U-Boot serial_msm driver does not initialize the
UART_DM_DMEN register with the required value. Usually this does not
cause any problems, because there is Qualcomm's LK bootloader running
before U-Boot which initializes the register with the correct value.

It's important that this register is initialized correctly, because
the U-Boot driver does not make use of the BAM/DMA or single character
mode functionality of the UART controller. A different bootloader
before U-Boot might initialize the register differently.

For example, on DragonBoard 410c U-Boot can also be installed to the
"aboot" partition (replacing LK entirely). In this case U-Boot is
loaded directly by SBL, which seems to use the single-character mode
for some reason. In single character mode there is always just one
char in the FIFO, instead of the 4 characters expected by
msm_serial_fetch(). It also causes issues with "earlycon" later in
the Linux kernel, which tries to output 4 chars at once,
but only the first char will be written.

This causes early UART log in Linux to be corrupted like this:

    [ 00ano:ameoi .Q1B[ 00ac _idaM00080oo'ahani-lcle._20). 15NdNii 5 SPMSJ20:U2
    [ 00rkoolmsamel
    [ 00Fw ]elamletopsioble
    [ 00ore

instead of

    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd030]
    [    0.000000] Machine model: Qualcomm Technologies, Inc. APQ 8016 SBC
    [    0.000000] earlycon: msm_serial_dm0 at MMIO 0x00000000078b0000 (options '')
    [    0.000000] printk: bootconsole [msm_serial_dm0] enabled

Make sure to initialize UART_DM_DMEN correctly to fix this issue
when loading U-Boot directly after SBL (instead of through LK).

There is no functional difference when loading U-Boot through LK
since LK also initializes UART_DM_DMEN to 0x0. [1]

[1]: https://git.linaro.org/landing-teams/working/qualcomm/lk.git/tree/platform/msm_shared/uart_dm.c?h=dragonboard410c-LA.BR.1.2.7-03810-8x16.0-linaro3#n203

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agoarm: dts: db410c: Add missing cd-gpios for SD card detection
Stephan Gerhold [Sun, 27 Jun 2021 11:06:15 +0000 (13:06 +0200)]
arm: dts: db410c: Add missing cd-gpios for SD card detection

It looks like SD card detection is broken at the moment for DB410c.
The eMMC is detected correctly, but the SD card is not.

This is probably similar to the issue fixed in commit 850514740358
("mmc: msm_sdhci: Use mmc_of_parse for setting host_caps") for eMMC,
except that the SD card does not have a property like "non-removable"
that skips the card detection.

The SDHCI on DB410c cannot detect itself if a SD card is inserted,
so add the necessary cd-gpios to make SD card detection work again.

While at it, fix the #gpio-cells for the soc_gpios to avoid DTC
warnings - the soc_gpios are actually already used with two cells
for the gpio-leds so this was just wrong all the time.

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agoarm: snapdragon: Fix typo in clk_bcr_update()
Sheep Sun [Sun, 20 Jun 2021 02:34:35 +0000 (10:34 +0800)]
arm: snapdragon: Fix typo in clk_bcr_update()

Fix typo in clock-snapdragon.c

Signed-off-by: Sheep Sun <sunxiaoyang2003@gmail.com>
3 years agoarm: snapdragon: Use correct GICC register on APQ8016
Sheep Sun [Sun, 20 Jun 2021 02:34:34 +0000 (10:34 +0800)]
arm: snapdragon: Use correct GICC register on APQ8016

The GICC register used by u-boot is 0x0a20c000, which is actually a GICC
for WCNSS, the WLAN processor. U-boot runs on the Application Processor,
therefore it should use APCS GICC instead. Hence, correct it with APCS GICC
register address.

Signed-off-by: Sheep Sun <sunxiaoyang2003@gmail.com>
3 years agolpc32xx: ea-lpc3250devkitv2: enable i2c (DM)
Trevor Woerner [Fri, 11 Jun 2021 02:37:09 +0000 (22:37 -0400)]
lpc32xx: ea-lpc3250devkitv2: enable i2c (DM)

Enable a DMed i2c driver for the ea-lpc3250devkitv2 board.
Include some sample commands/output for testing.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agoKconfig: convert CONFIG_SYS_I2C_LPC32XX
Trevor Woerner [Fri, 11 Jun 2021 02:37:08 +0000 (22:37 -0400)]
Kconfig: convert CONFIG_SYS_I2C_LPC32XX

Convert the CONFIG_SYS_I2C_LPC32XX configuration symbol from an include
directive to a Kconfig value.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agolpc32xx: i2c: finish DM/OF code
Trevor Woerner [Fri, 11 Jun 2021 02:37:07 +0000 (22:37 -0400)]
lpc32xx: i2c: finish DM/OF code

Add the of_match/compatible string to the lpc32xx i2c driver so it works
correctly with device-tree.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agolpc32xx: i2c: fix base address
Trevor Woerner [Fri, 11 Jun 2021 02:37:06 +0000 (22:37 -0400)]
lpc32xx: i2c: fix base address

The lpc32xx driver was not obtaining the per-device base address correctly
from the device tree. Fix the FIXME in order to get the correct base address.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agolpc32xx: i2c: remove unused define
Trevor Woerner [Fri, 11 Jun 2021 02:37:05 +0000 (22:37 -0400)]
lpc32xx: i2c: remove unused define

The LPC32XX_I2C_STAT_DRMI is not used anywhere so remove it.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agoarm: lpc32xx: add EA LPC3250 DevKitv2 board support
Trevor Woerner [Fri, 11 Jun 2021 02:37:04 +0000 (22:37 -0400)]
arm: lpc32xx: add EA LPC3250 DevKitv2 board support

Add basic support for running U-Boot on the Embedded Artists LPC3250
Developer's Kit v2 board by launching U-Boot from the board's s1l loader
(which comes pre-installed on the board).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agolpc32xx: import device tree from Linux
Trevor Woerner [Fri, 11 Jun 2021 02:37:03 +0000 (22:37 -0400)]
lpc32xx: import device tree from Linux

Import the dtsi, dts, and clock binding files for the lpc32xx ea3250 board
directly and unmodified from the latest Linux kernel.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
3 years agolpc32xx: Kconfig: switch to CONFIG_CONS_INDEX
Trevor Woerner [Fri, 11 Jun 2021 02:37:02 +0000 (22:37 -0400)]
lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX

There's nothing special or unique to the lpc32xx that requires its own config
parameter for specifying the console uart index. Therefore instead of using
the lpc32xx-specific CONFIG_SYS_LPC32XX_UART include parameter, use the
already-available CONFIG_CONS_INDEX from Kconfig.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoconfigs: synquacer: Enable EFI capsule update support
Masami Hiramatsu [Fri, 4 Jun 2021 09:45:31 +0000 (18:45 +0900)]
configs: synquacer: Enable EFI capsule update support

Enable EFI capsule update support. With the EFI capsule update,
you can update U-Boot, TF-A and OP-TEE. TF-A and OP-TEE are
usually combined as a FIP binary, but if the binary is bigger
than 480KB, you have to modify FIP header, split the OP-TEE
and stores the OP-TEE binary in the different place. This
configuration supports both cases.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agodoc: qemu: arm64: Fix the documentation of capsule update
Masami Hiramatsu [Fri, 4 Jun 2021 09:45:21 +0000 (18:45 +0900)]
doc: qemu: arm64: Fix the documentation of capsule update

Since the EDK2 GenerateCapsule script is out of date and it
doesn't generate the supported version capsule file, the document
should refer the mkeficapsule in tools.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agoboard: synquacer: Add DeveloperBox 96boards EE support
Masami Hiramatsu [Fri, 4 Jun 2021 09:45:10 +0000 (18:45 +0900)]
board: synquacer: Add DeveloperBox 96boards EE support

Add the DeveloperBox 96boards EE support. This board is also
known as Socionext SynQuacer E-Series. It contians one "SC2A11"
SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots,
3 PCIe slots (1 4x port and 2 1x ports which are expanded via
PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA
ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard
MicroATX Form Factor.

For more information, see this page;
  https://www.96boards.org/product/developerbox/

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agoARM: dts: synquacer: Add device trees for DeveloperBox
Masami Hiramatsu [Fri, 4 Jun 2021 09:44:59 +0000 (18:44 +0900)]
ARM: dts: synquacer: Add device trees for DeveloperBox

Add device trees for 96boards EE DeveloperBox and basement SynQuacer
SoC dtsi. These files are imported from EDK2

commit 83d38b0b4c0f240d4488c600bbe87cea391f3922

as-is (except for the changes #include path and some macros).

And add U-Boot specific changes in synquacer-sc2a11-developerbox-u-boot.dtsi

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agoi2c: synquacer: SNI Synquacer I2C controller
Jassi Brar [Fri, 4 Jun 2021 09:44:48 +0000 (18:44 +0900)]
i2c: synquacer: SNI Synquacer I2C controller

Add driver for class of I2C controllers found on
Socionext Synquacer platform.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
3 years agospi: synquacer: Add HSSPI SPI controller driver for SynQuacer
Jassi Brar [Fri, 4 Jun 2021 09:44:27 +0000 (18:44 +0900)]
spi: synquacer: Add HSSPI SPI controller driver for SynQuacer

This is a driver for the HSSPI SPI controller on SynQuacer SoC.
The HSSPI has command sequence mode (memory mapped) and
direct mode (FIFO access). The driver will operate it under
the direct mode. And before booting OS, it switch back to the
command sequence mode since that is compatible with default
EDK2 behavior.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agommc: synquacer: Add SynQuacer F_SDH30 SDHCI driver
Jassi Brar [Fri, 4 Jun 2021 09:44:16 +0000 (18:44 +0900)]
mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agopci: synquacer: Add SynQuacer ECAM based PCIe driver
Masami Hiramatsu [Fri, 4 Jun 2021 09:44:06 +0000 (18:44 +0900)]
pci: synquacer: Add SynQuacer ECAM based PCIe driver

Add ECAM based SynQuacer PCIe RC driver. This driver configures the
PCIe RC and filter out a ghost pcie config.

Since the Linux kernel expects "socionext,synquacer-pcie-ecam" device
is configured by firmware (EDK2), it doesn't re-configure in the kernel.
So as same as EDK2, U-Boot needs to configure it before boot the kernel.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agogpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs
Masami Hiramatsu [Fri, 4 Jun 2021 09:43:55 +0000 (18:43 +0900)]
gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs

Since some SoCs and boards do not hae extra asm/arch/gpio.h,
introduce CONFIG_GPIO_EXTRA_HEADER instead of adding
!define(CONFIG_ARCH_XXXX) in asm/gpio.h.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
3 years agodm: pci: Skip setting VGA bridge bits if parent device is the host bus
Masami Hiramatsu [Fri, 4 Jun 2021 09:43:34 +0000 (18:43 +0900)]
dm: pci: Skip setting VGA bridge bits if parent device is the host bus

Commit bbbcb5262839 ("dm: pci: Enable VGA address forwarding on bridges")
sets the VGA bridge bits by checking pplat->class, but if the parent
device is the pci host bus device, it can be skipped. Moreover, it
shouldn't access the pplat because the parent has different plat data.

Without this fix, "pci enum" command cause a synchronous abort.

pci_auto_config_devices: start
PCI Autoconfig: Bus Memory region: [78000000-7fffffff],
Physical Memory [78000000-7fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
Physical Memory [77f00000-77f0ffffx]
pci_auto_config_devices: device pci_6:0.0
PCI Autoconfig: BAR 0, Mem, size=0x1000000, address=0x78000000 bus_lower=0x79000000

PCI Autoconfig: BAR 1, Mem, size=0x8000000, No room in resource, avail start=79000000 / size=8000000, need=8000000
PCI: Failed autoconfig bar 14

PCI Autoconfig: BAR 2, I/O, size=0x4, address=0x1000 bus_lower=0x1004

PCI Autoconfig: BAR 3, Mem, size=0x2000000, address=0x7a000000 bus_lower=0x7c000000

PCI Autoconfig: BAR 4, I/O, size=0x80, address=0x1080 bus_lower=0x1100

PCI Autoconfig: ROM, size=0x80000, address=0x7c000000 bus_lower=0x7c080000

"Synchronous Abort" handler, esr 0x96000006
elr: 00000000e002bd28 lr : 00000000e002bce8 (reloc)
elr: 00000000fff6fd28 lr : 00000000fff6fce8
x0 : 0000000000001041 x1 : 000000000000003e
x2 : 00000000ffb0f8c8 x3 : 0000000000000001
x4 : 0000000000000080 x5 : 0000000000000000
x6 : 00000000fff718fc x7 : 000000000000000f
x8 : 00000000ffb0f238 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000000010
x12: 0000000000000006 x13: 000000000001869f
x14: 00000000ffb0fcd0 x15: 0000000000000020
x16: 00000000fff71cc4 x17: 0000000000000000
x18: 00000000ffb13d90 x19: 00000000ffb14320
x20: 0000000000000000 x21: 00000000ffb14090
x22: 00000000ffb0f8c8 x23: 0000000000000001
x24: 00000000ffb14c10 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000ffb14c70 x29: 00000000ffb0f830

Code: 52800843 52800061 52800e00 97ffcf65 (b9400280)
Resetting CPU ...

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoata: ahci-pci: Use scsi_ops to initialize ops
Masami Hiramatsu [Fri, 4 Jun 2021 09:43:23 +0000 (18:43 +0900)]
ata: ahci-pci: Use scsi_ops to initialize ops

Without this fix, scsi-scan will cause a synchronous abort
when accessing ops->scan.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm: iproc: Add higher speed configurations
Chris Packham [Fri, 4 Jun 2021 02:25:36 +0000 (14:25 +1200)]
arm: iproc: Add higher speed configurations

Add support for 1.3GHz, 1.35GHz and 1.4GHz parts. This is based on
equivalent code in Broadcom's LDK 5.0.6.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
3 years agoARM: integrator: Drop PCI support
Linus Walleij [Sat, 15 May 2021 12:44:19 +0000 (14:44 +0200)]
ARM: integrator: Drop PCI support

We didn't convert the Integrator to use DM for PCI in
time, and we don't use it either so let's just drop
PCI support from the Integrator.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agompc8379erdb: enable DM_USB DM_PCI DM_ETH
Sinan Akman [Tue, 11 May 2021 18:18:02 +0000 (14:18 -0400)]
mpc8379erdb: enable DM_USB DM_PCI DM_ETH

Signed-off-by: Sinan Akman <sinan@writeme.com>
3 years agotools: Fix default target compile tools in Python tools
Alper Nebi Yasak [Mon, 7 Jun 2021 18:11:37 +0000 (21:11 +0300)]
tools: Fix default target compile tools in Python tools

In commit 1e4687aa47ed ("binman: Use target-specific tools when
cross-compiling"), a utility function was implemented to get preferred
compilation tools using environment variables like CC and CROSS_COMPILE.
Although it intended to provide custom default tools (same as those in
the global Makefile) when no relevant variables were set (for example
using "gcc" for "cc"), it is only doing so when CROSS_COMPILE is set and
returning the literal name of the tool otherwise.

Remove the check for an empty CROSS_COMPILE, which makes the function
use it as an empty prefix to the custom defaults and return the intended
executables.

Fixes: 1e4687aa47ed ("binman: Use target-specific tools when cross-compiling")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
3 years agosandbox: cros-ec: Add tests for the Chromium OS EC PWM driver
Alper Nebi Yasak [Wed, 19 May 2021 16:33:31 +0000 (19:33 +0300)]
sandbox: cros-ec: Add tests for the Chromium OS EC PWM driver

This patch adds a limited pulse-width modulator to sandbox's Chromium OS
Embedded Controller emulation. The emulated PWM device supports multiple
channels but can only set a duty cycle for each, as the actual EC
doesn't expose any functionality or information other than that. Though
the EC supports specifying the PWM channel by its type (e.g. display
backlight, keyboard backlight), this is not implemented in the emulation
as nothing in U-Boot uses this type specification.

This emulated PWM device is then used to test the Chromium OS PWM driver
in sandbox. Adding the required device node to the sandbox test
device-tree unfortunately makes it the first PWM device, so this also
touches some other tests to make sure they still use the sandbox PWM.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoremove struct uclass_driver::ops
Rasmus Villemoes [Wed, 19 May 2021 16:08:11 +0000 (18:08 +0200)]
remove struct uclass_driver::ops

Each _device_ belonging to a given uclass of course has its own ->ops,
of a type determined by and known to the uclass.

However, no instance of a uclass_driver seems to populate ->ops, and
the only reference to it in code is this relocation.

Moreover, it's not really clear what could sensibly be assigned; it
would have to be some "struct uclass_ops *" providing a set of methods
for the core to call on that particular uclass, but should the need
for that ever arise, it would be better to have a member of that
particular type instead of void*.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: don't refer to symbol _init
Heinrich Schuchardt [Wed, 19 May 2021 10:02:39 +0000 (12:02 +0200)]
sandbox: don't refer to symbol _init

GCC provides a symbol _init in crti.o on x86_64 and aarch64 but not on
RISC-V. The following lines leads to a build error for sandbox_defconfig on
RISC-V due to the missing symbol:

    common/board_f.c:269:
    #elif defined(CONFIG_SANDBOX) || defined(CONFIG_EFI_APP)
            gd->mon_len = (ulong)&_end - (ulong)_init;

The sandbox code is not copied into the memory allocated using mmap().
Hence we can safely use gd->mon_len = 0 to avoid the reference to _init.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
3 years agosandbox: fix sandbox_reset()
Heinrich Schuchardt [Wed, 12 May 2021 16:38:51 +0000 (18:38 +0200)]
sandbox: fix sandbox_reset()

state_uninit() and dm_uninit() are mutually exclusive:

state_uninit() prints via drivers. So it cannot be executed after
dm_uninit().

dm_uninit() requires memory. So it cannot be executed after state_uninit()
which releases all memory.

Just skip dm_uninit() when resetting the sandbox. We will wake up in a new
process and allocate new memory. So this cleanup is not required. We don't
do it in sandbox_exit() either.

This avoids a segmentation error when efi_reset_system_boottime() is
invoked by a UEFI application.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: ensure that state->ram_buf is in low memory
Heinrich Schuchardt [Tue, 11 May 2021 19:03:16 +0000 (21:03 +0200)]
sandbox: ensure that state->ram_buf is in low memory

Addresses in state->ram_buf must be in the low 4 GiB of the address space.
Otherwise we cannot correctly fill SMBIOS tables. This shows up in warnings
like:

    WARNING: SMBIOS table_address overflow 7f752735e020

Ensure that state->ram_buf is initialized by the first invocation of
os_malloc().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodm: define LOG_CATEGORY for all uclass
Patrick Delaunay [Tue, 27 Apr 2021 09:02:19 +0000 (11:02 +0200)]
dm: define LOG_CATEGORY for all uclass

Define LOG_CATEGORY for all uclass to allow filtering with
log command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: Support signal handling only when requested
Simon Glass [Mon, 22 Mar 2021 05:21:01 +0000 (18:21 +1300)]
sandbox: Support signal handling only when requested

At present if sandbox crashes it prints a message and tries to exit. But
with the recently introduced signal handler, it often seems to get stuck
in a loop until the stack overflows:

Segmentation violation

Segmentation violation

Segmentation violation

Segmentation violation

Segmentation violation

Segmentation violation

Segmentation violation
...

The signal handler is only useful for a few tests, as I understand it.
Make it optional.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 6 Jul 2021 16:22:39 +0000 (12:22 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

3 years agoMerge branch 'network_master' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Tue, 6 Jul 2021 16:22:10 +0000 (12:22 -0400)]
Merge branch 'network_master' of https://source.denx.de/u-boot/custodians/u-boot-net

3 years agoboard: sifive: support spl multi-dtb on unmatched board
Zong Li [Wed, 30 Jun 2021 15:23:50 +0000 (23:23 +0800)]
board: sifive: support spl multi-dtb on unmatched board

There are two revisions of unmatched board with different DDR timing,
we'd like to support multi-dtb mechanism in SPL, then it selects the
right DTB at runtime according to PCB revision in I2C EEPROM.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoriscv: dts: add dts for unmatched rev1
Zong Li [Wed, 30 Jun 2021 15:23:49 +0000 (23:23 +0800)]
riscv: dts: add dts for unmatched rev1

The difference between unmatched rev3 and rev1 is DDR timing, the rev3
uses 1866 MT/s for 16GiB, and rev1 uses 2133 MT/s for 8GiB.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoboard: sifive: Add an interface to get PCB revision
Zong Li [Wed, 30 Jun 2021 15:23:48 +0000 (23:23 +0800)]
board: sifive: Add an interface to get PCB revision

There are different DDR parameter settings for different board
revisions. Add a new interface to get the PCB revision to determine
which DT should be selected at runtime.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoriscv: sifive: fu740: Support i2c in spl
Zong Li [Wed, 30 Jun 2021 15:23:47 +0000 (23:23 +0800)]
riscv: sifive: fu740: Support i2c in spl

Enable SPL_I2C_SUPPORT for fu740, and add 'u-boot,dm-spl' property in
i2c node.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoriscv: sifive: fu740: kconfig: Enable support for Opencores I2C controller
Zong Li [Wed, 30 Jun 2021 15:23:46 +0000 (23:23 +0800)]
riscv: sifive: fu740: kconfig: Enable support for Opencores I2C controller

Enable the Opencores I2C controller on FU740

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 years agoboard: sifive: unmatched: add initial support for a platform ID EEPROM
Zong Li [Wed, 30 Jun 2021 15:23:45 +0000 (23:23 +0800)]
board: sifive: unmatched: add initial support for a platform ID EEPROM

Add initial support for the PCB description EEPROM for SiFive HiFive
Unmatched boards.

This implementation is refactored based on Paul Walmsley's porting and
adopt the suggestions from David Abdurachmanov.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>