oweals/u-boot.git
4 years agoARM: imx: m53menlo: Do not fail boot on invalid splash screen
Marek Vasut [Sat, 30 May 2020 20:44:45 +0000 (22:44 +0200)]
ARM: imx: m53menlo: Do not fail boot on invalid splash screen

None of these splash screen loading errors are so critical as to
justify complete failure to boot, so just print error message as
needed and return 0, the boot can very likely continue without
the splash.

Fix a couple of missing free(dst) instances as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: ddr: Add missing PHY reset
Marek Vasut [Sat, 30 May 2020 00:14:48 +0000 (02:14 +0200)]
ARM: imx: ddr: Add missing PHY reset

The iMX7D RM 9.2.4.9.3 Power removal flow Table 9-11. Re-enabling power
explicitly says both the DDR controller and the PHY must be reset in the
correct sequence. Currently the code only resets the controller. This
leads to a misbehavior where the system brings the DRAM up after reboot,
but the DRAM is unstable. Add the missing reset.

The easiest way to trigger this is by triggering WDT without having the
WDT assert WDOG_B signal, i.e. mw.w 0x30280000 0x25 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agopower: pmic: Add SPL Kconfig entry for PFUZE100
Marek Vasut [Fri, 29 May 2020 17:22:41 +0000 (19:22 +0200)]
power: pmic: Add SPL Kconfig entry for PFUZE100

Add Kconfig entry for the PFUZE PMIC, SPL variant.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoimx: imx8mp_evk: fix boot issue
Peng Fan [Tue, 26 May 2020 23:33:50 +0000 (20:33 -0300)]
imx: imx8mp_evk: fix boot issue

The u-boot-spl.bin pad with ddr firmware conflicts with the
CONFIG_MALLOC_F_ADDR area, the ddr firmware will be overwritten
by malloc in SPL stage and cause ddr initialization not able
to finish. So update the related addresses to fix the issue.

Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mp_evk: spl: no need the code since spl framework could do that
Peng Fan [Tue, 26 May 2020 23:33:49 +0000 (20:33 -0300)]
imx8mp_evk: spl: no need the code since spl framework could do that

We no need invoke the code, since spl framework could help
us do that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mp_evk: spl: use spl_early_init
Peng Fan [Tue, 26 May 2020 23:33:48 +0000 (20:33 -0300)]
imx8mp_evk: spl: use spl_early_init

Use spl_early_init to replace spl_init, spl_init will be invoked
in board_init_r, we only need use spl_early_init to setup malloc
and scan early dt.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mp_evk: spl: drop timer_init
Peng Fan [Tue, 26 May 2020 23:33:47 +0000 (20:33 -0300)]
imx8mp_evk: spl: drop timer_init

timer_init has been invoked in arch_cpu_init, no need to invoke
it again in board code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mp_evk: spl: drop useless code
Peng Fan [Tue, 26 May 2020 23:33:46 +0000 (20:33 -0300)]
imx8mp_evk: spl: drop useless code

Drop useless getting ccm device, there is no need to explicted do this
in board code, and we not enable SPL CLK currently.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: Update MTD partitions layout for display5 (i.MX6Q) board
Lukasz Majewski [Wed, 13 May 2020 15:45:15 +0000 (17:45 +0200)]
imx: Update MTD partitions layout for display5 (i.MX6Q) board

This change updates the MTD partition layout on SPI-NOR memory for display5
board.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoimx: rom api: fix image offset computation
Sébastien Szymanski [Wed, 13 May 2020 14:02:28 +0000 (16:02 +0200)]
imx: rom api: fix image offset computation

When not booting from FlexSPI, the offset computation is:

offset = image_offset + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000;

When booting from SD card or eMMC user partition, image_offset is
0x8000. It is useless to add and remove 0x8000.
When booting from other device, image_offset is 0 so this computation is wrong.

Simplfy this computation to work on all booting devices.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
4 years agoverdin-imx8mm: Select the watchdog driver
Fabio Estevam [Mon, 11 May 2020 14:00:31 +0000 (11:00 -0300)]
verdin-imx8mm: Select the watchdog driver

Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.

Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoimx8mp_evk: Select the watchdog driver
Fabio Estevam [Mon, 11 May 2020 14:00:30 +0000 (11:00 -0300)]
imx8mp_evk: Select the watchdog driver

Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.

Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mm_beacon: Select the watchdog driver
Fabio Estevam [Mon, 11 May 2020 14:00:29 +0000 (11:00 -0300)]
imx8mm_beacon: Select the watchdog driver

Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.

Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Adam Ford <aford173@gmail.com>
4 years agoimx8mn_ddr4_evk: Select the watchdog driver
Fabio Estevam [Mon, 11 May 2020 14:00:28 +0000 (11:00 -0300)]
imx8mn_ddr4_evk: Select the watchdog driver

Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.

Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mm_evk: Select the watchdog driver
Fabio Estevam [Mon, 11 May 2020 14:00:27 +0000 (11:00 -0300)]
imx8mm_evk: Select the watchdog driver

Currently the watchdog driver is not selected, which causes the following
warnings in both SPL and U-Boot proper:

U-Boot SPL 2020.07-rc1-00387-g67887903af (May 07 2020 - 23:49:27 -0300)
Normal Boot
WDT:   Started without servicing (60s timeout)
Trying to boot from MMC1

U-Boot 2020.07-rc1-00387-g67887903af (May 07 2020 - 23:49:27 -0300)

CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM:  2 GiB
WDT:   Started without servicing (60s timeout)
....

System reboots after staying 60s in the U-Boot prompt.

Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.

Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8mp_evk: Add a README file
Fabio Estevam [Mon, 11 May 2020 12:45:51 +0000 (09:45 -0300)]
imx8mp_evk: Add a README file

Add a README file explaining the U-Boot build and SD card flash procedures.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: move ATF to the back of the FIT to fix loading over yModem
Patrick Wildt [Fri, 8 May 2020 09:59:47 +0000 (11:59 +0200)]
imx: move ATF to the back of the FIT to fix loading over yModem

With yModem the FIT Image is only supplied once, so we can only
seek forward in the yModem supplied image and never backwards.
With the recent changes to the SPL mechanism, including loading
U-Boot first, FDT after, then the loadables, we must also reorder
the FIT image script to make sure that the loadables are last in
the FIT image.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Tested-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
4 years agoimx: Kconfig: enable IMX_BOOTAUX for i.MX8M
Peng Fan [Tue, 5 May 2020 12:18:02 +0000 (20:18 +0800)]
imx: Kconfig: enable IMX_BOOTAUX for i.MX8M

i.MX8M could use imx bootaux to boot m4/m7 core, so let's add it
to the dependency list.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoARM: dts: imxrt1050: indent lcdif node correctly
Giulio Benetti [Tue, 28 Apr 2020 16:20:11 +0000 (18:20 +0200)]
ARM: dts: imxrt1050: indent lcdif node correctly

Accidentally submitted a patch with indentation not correct, let's fix it
by indenting wrong lines.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoconfigs: Resync with savedefconfig
Tom Rini [Thu, 4 Jun 2020 23:29:09 +0000 (19:29 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2020-06-04-misc-bugfixes'
Tom Rini [Thu, 4 Jun 2020 22:12:57 +0000 (18:12 -0400)]
Merge branch '2020-06-04-misc-bugfixes'

- Resync checkpatch.pl (largely) with v5.7 and introduce U-Boot specific
  checks in a localized area, so they aren't lost in the future.
- Complete / re-migrate some options from config headers to defconfigs
- Add dependencies to the various debug uart drivers

4 years agocheckpatch.pl: Add check for defining CONFIG_CMD_xxx via config files
Tom Rini [Tue, 26 May 2020 18:29:02 +0000 (14:29 -0400)]
checkpatch.pl: Add check for defining CONFIG_CMD_xxx via config files

All of our cmds have a Kconfig entry.  Making enabling a CMD via the
config file an error to checkpatch.pl.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agocheckpatch.pl: Request if() instead #ifdef
Simon Glass [Fri, 22 May 2020 22:32:40 +0000 (16:32 -0600)]
checkpatch.pl: Request if() instead #ifdef

There is a lot of use of #ifdefs in U-Boot. In an effort reduce this,
suggest using the compile-time construct.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocheckpatch.pl: Request a test when a new command is added
Simon Glass [Fri, 22 May 2020 22:32:39 +0000 (16:32 -0600)]
checkpatch.pl: Request a test when a new command is added

This request is made with nearly every new command. Point to some docs
on how to do it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocheckpatch.pl: Warn if the flattree API is used
Simon Glass [Fri, 22 May 2020 22:32:38 +0000 (16:32 -0600)]
checkpatch.pl: Warn if the flattree API is used

We want people to use the livetree API, so request it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocheckpatch.pl: Add a check for tests needed for uclasses
Simon Glass [Fri, 22 May 2020 22:32:37 +0000 (16:32 -0600)]
checkpatch.pl: Add a check for tests needed for uclasses

A common problem when submitting a new uclass is to forget to add sandbox
tests. Add a warning for this.

Of course tests should always be added for new code, but this one seems to
be missed by nearly every new contributor.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocheckpatch.pl: Add a U-Boot option
Simon Glass [Fri, 22 May 2020 22:32:36 +0000 (16:32 -0600)]
checkpatch.pl: Add a U-Boot option

Add an option to indicate that U-Boot-specific checks should be enabled.
Add a function to house the code that will be added.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocheckpatch.pl: Update to v5.7
Simon Glass [Fri, 22 May 2020 22:32:35 +0000 (16:32 -0600)]
checkpatch.pl: Update to v5.7

Keep the U-Boot changes to $logFunctions

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Resync with v5.7 release which changed the default max line
 length, update commit to reflect]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoConvert CONFIG_BOARD_LATE_INIT to Kconfig
Tom Rini [Tue, 26 May 2020 19:06:19 +0000 (15:06 -0400)]
Convert CONFIG_BOARD_LATE_INIT to Kconfig

This converts the following to Kconfig:
   CONFIG_BOARD_LATE_INIT

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoConvert CONFIG_CMD_ASKENV et al to Kconfig
Tom Rini [Tue, 26 May 2020 19:06:18 +0000 (15:06 -0400)]
Convert CONFIG_CMD_ASKENV et al to Kconfig

This converts the following to Kconfig:
   CONFIG_CMD_ASKENV
   CONFIG_CMD_BMP
   CONFIG_CMD_BOOTD
   CONFIG_CMD_CACHE
   CONFIG_CMD_CRC32
   CONFIG_CMD_DHCP
   CONFIG_CMD_ENV
   CONFIG_CMD_EXPORTENV
   CONFIG_CMD_EXT2
   CONFIG_CMD_EXT4
   CONFIG_CMD_FLASH
   CONFIG_CMD_FS_GENERIC
   CONFIG_CMD_FUSE
   CONFIG_CMD_GPIO
   CONFIG_CMD_GPT
   CONFIG_CMD_GREPENV
   CONFIG_CMD_I2C
   CONFIG_CMD_IMLS
   CONFIG_CMD_IMPORTENV
   CONFIG_CMD_LOADB
   CONFIG_CMD_LOADS
   CONFIG_CMD_MEMINFO
   CONFIG_CMD_MII
   CONFIG_CMD_MTDPARTS
   CONFIG_CMD_NAND
   CONFIG_CMD_NAND_TRIMFFS
   CONFIG_CMD_NFS
   CONFIG_CMD_PCA953X
   CONFIG_CMD_PCA953X_INFO
   CONFIG_CMD_PCI
   CONFIG_CMD_PING
   CONFIG_CMD_READ
   CONFIG_CMD_SF
   CONFIG_CMD_SPI
   CONFIG_CMD_SPL
   CONFIG_CMD_SPL_WRITE_SIZE
   CONFIG_CMD_TIME
   CONFIG_CMD_TRACE
   CONFIG_CMD_UBI
   CONFIG_CMD_UBIFS
   CONFIG_CMD_UNZIP
   CONFIG_FS_EXT4

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoConvert CONFIG_BZIP2 et al to Kconfig
Tom Rini [Tue, 26 May 2020 19:06:17 +0000 (15:06 -0400)]
Convert CONFIG_BZIP2 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_BZIP2
   CONFIG_GZIP
   CONFIG_LZO
   CONFIG_ZLIB
   CONFIG_LZMA
   CONFIG_LZO

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agotopic_miami: Disable GPIO
Tom Rini [Tue, 26 May 2020 19:06:16 +0000 (15:06 -0400)]
topic_miami: Disable GPIO

Per the boards config header file, there is no useful GPIO on these
boards.  Remove CONFIG_CMD_GPIO from the defconfigs.

Cc: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoARM: rmobile: blanche: Disable CONFIG_CMD_SF / CONFIG_CMD_SPI
Tom Rini [Tue, 26 May 2020 19:06:15 +0000 (15:06 -0400)]
ARM: rmobile: blanche: Disable CONFIG_CMD_SF / CONFIG_CMD_SPI

The config header for this platform disables both CMD_SF and CMD_SPI and
the defconfig leaves them enabled.  Disable them from the defconfig and
enable them in the header.

Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masakazu Mochizuki <masakazu.mochizuki.wd@hitachi.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agobcmstb: Migrate CONFIG_CMD_EXT[24]
Tom Rini [Tue, 26 May 2020 19:06:14 +0000 (15:06 -0400)]
bcmstb: Migrate CONFIG_CMD_EXT[24]

The common config header for bcm7260 and bcm7445 enable
CONFIG_CMD_EXT2/EXT4 but the defconfigs do not.  This results in the
commands being disabled.  Enable them via the defconfig.

Cc: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agomx6memcal: Finish migration to defconfig options
Tom Rini [Tue, 26 May 2020 19:06:13 +0000 (15:06 -0400)]
mx6memcal: Finish migration to defconfig options

The config header for this platform uses '#undef' in a number of cases.
All of the MMC related ones were already handled correctly in the
defconfig file.  In the case of CONFIG_CMD_FUSE, the command was being
built and enabled via defconfig.  Disable it in the defconfig, cleanup
the header.

Reviewed-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agopfla02: Rework excluding NAND from SPL
Tom Rini [Tue, 26 May 2020 19:06:12 +0000 (15:06 -0400)]
pfla02: Rework excluding NAND from SPL

Rather than only enable CONFIG_CMD_NAND for non-SPL builds, move the CMD
options to defconfig and rework the guards to not try and call the
function in SPL builds.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Stefano Babic <sbabic@denx.de>
4 years agoserial: Add missing Kconfig dependencies for debug consoles
Michal Simek [Thu, 28 May 2020 10:05:12 +0000 (12:05 +0200)]
serial: Add missing Kconfig dependencies for debug consoles

Debug console is the part of serial driver in the same file. It means to be
able to enable debug console you also need to enable driver itself.
That's why add all dependecies and list only debug consoles which are
enabled based on driver selection to avoid compilation error when user
asks for certain debug console but driver is not enable for it.

Error:
aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `putc':
/home/monstr/data/disk/u-boot/common/console.c:513: undefined reference to `printch'
aarch64-linux-gnu-ld.bfd: common/built-in.o: in function `puts':
/home/monstr/data/disk/u-boot/common/console.c:563: undefined reference to `printch'

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Fix ns16550 dependency, add ZYNQ_SERIAL, change S5P]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoserial: Convert ARM_DCC to Kconfig
Tom Rini [Tue, 2 Jun 2020 21:26:33 +0000 (17:26 -0400)]
serial: Convert ARM_DCC to Kconfig

The symbol "CONFIG_ARM_DCC" is used to control building
drivers/serial/arm_dcc.c.  Provide a simple Kconfig entry for this.

Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom McLeod <tom.mcleod@opalkelly.com>
Cc: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 4 Jun 2020 17:50:39 +0000 (13:50 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv

- Fixes 7e249bc13aaf: ("riscv: Move all SMP related SBI calls to
  SBI_v01") Move sbi_probe_extension() out of CONFIG_SBI_V01.
- SiFive FU540 support SPL.

4 years agoMerge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 4 Jun 2020 14:21:51 +0000 (10:21 -0400)]
Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2020.07 cycle

This set includes just two small commits that fix a build warning and
add a missing serial node.

4 years agoriscv: sbi: Move sbi_probe_extension() out of CONFIG_SBI_V01
Bin Meng [Wed, 27 May 2020 09:04:53 +0000 (02:04 -0700)]
riscv: sbi: Move sbi_probe_extension() out of CONFIG_SBI_V01

sbi_probe_extension() is an API defined in SBI v0.2, not v0.1.

Fixes 7e249bc13aaf: ("riscv: Move all SMP related SBI calls to SBI_v01")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
4 years agoriscv: sbi: Remove sbi_spec_version
Bin Meng [Wed, 27 May 2020 09:04:52 +0000 (02:04 -0700)]
riscv: sbi: Remove sbi_spec_version

U-Boot defaults to use SBI v0.2. Howerver there is a global variable
sbi_spec_version that stills refers to v0.1. Since it is not used
anywhere, let's remove it.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
4 years agodoc: sifive: fu540: Add description for OpenSBI generic platform
Pragnesh Patel [Fri, 29 May 2020 06:03:39 +0000 (11:33 +0530)]
doc: sifive: fu540: Add description for OpenSBI generic platform

OpenSBI generic platform support provides platform specific
functionality based on the FDT passed by previous booting stage.

Depends on OpenSBI commit:
platform: Add generic FDT based platform support
(sha1: f1aa9e54e00006ae70aeac638d5b75093520f65d)

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoconfigs: fu540: Add config options for U-Boot SPL
Pragnesh Patel [Fri, 29 May 2020 06:03:38 +0000 (11:33 +0530)]
configs: fu540: Add config options for U-Boot SPL

With sifive_fu540_defconfig:

User can use FSBL or u-boot-spl.bin anyone at a time.

For FSBL,
fsbl->fw_payload.bin (opensbi + U-Boot)

For u-boot-spl.bin,
u-boot-spl.bin->FIT image (opensbi + U-Boot proper + dtb)

U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with
u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT
image u-boot.itb from SD card into RAM.

U-Boot SPL expects u-boot.itb FIT image at the starting of SD card sector
number (0x822) of GUID type "2E54B353-1271-4842-806F-E436D6AF6985"

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agosifive: fu540: Add U-Boot proper sector start
Jagan Teki [Fri, 29 May 2020 06:03:37 +0000 (11:33 +0530)]
sifive: fu540: Add U-Boot proper sector start

Add U-Boot proper sector start offset for SiFive FU540.
This value is based on the partition layout supported
by SiFive FU540.

u-boot.itb need to write on this specific offset so-that
the SPL will retrieve it from here and load.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agosifive: fu540: Add sample SD gpt partition layout
Jagan Teki [Fri, 29 May 2020 06:03:36 +0000 (11:33 +0530)]
sifive: fu540: Add sample SD gpt partition layout

This is a sample GPT partition layout for SD card,
right now three important partitions are added to
make the system bootable.

partition layout:

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000022      0x00000821      "loader1"
        attrs:  0x0000000000000000
        type:   5b193300-fc78-40cd-8002-e86c45580b47
        guid:   cbcbef44-e627-42bc-b134-93b6f3784b8c
  2     0x00000822      0x00002821      "loader2"
        attrs:  0x0000000000000000
        type:   2e54b353-1271-4842-806f-e436d6af6985
        guid:   f54eba28-d8de-4852-978d-1a673777e2ae
  3     0x00002822      0x00020821      "rootfs"
        attrs:  0x0000000000000004
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   9561df46-8d55-4799-a83b-cfee9ef6ff93

Note:
- loader1 would be fsbl or spl
- loader2 would be U-Boot or U-Boot proper

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
4 years agoriscv: sifive: fu540: add SPL configuration
Pragnesh Patel [Fri, 29 May 2020 06:03:35 +0000 (11:33 +0530)]
riscv: sifive: fu540: add SPL configuration

Add a support for SPL which will boot from L2 LIM (0x0800_0000) and
then SPL will boot U-Boot FIT image (OpenSBI FW_DYNAMIC + u-boot.bin)
from MMC boot devices.

SPL related code is leveraged from FSBL
(https://github.com/sifive/freedom-u540-c000-bootloader.git)

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: cpu: fu540: Add support for cpu fu540
Pragnesh Patel [Fri, 29 May 2020 06:03:34 +0000 (11:33 +0530)]
riscv: cpu: fu540: Add support for cpu fu540

Add SiFive fu540 cpu to support RISC-V arch

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: dts: sifive: Sync hifive-unleashed-a00 dts from linux
Pragnesh Patel [Fri, 29 May 2020 06:03:33 +0000 (11:33 +0530)]
riscv: dts: sifive: Sync hifive-unleashed-a00 dts from linux

This sync has changes required to use GPIO in U-Boot and
U-Boot SPL.

Sync dts from linux v5.7-rc2 commit:
"riscv: dts: Add GPIO reboot method to HiFive Unleashed DTS file"
(sha1: 0a91330b2af9f71ceeeed483f92774182b58f6d9)

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: sifive: dts: fu540: set ethernet clock rate
Pragnesh Patel [Fri, 29 May 2020 06:03:32 +0000 (11:33 +0530)]
riscv: sifive: dts: fu540: set ethernet clock rate

Set ethernet clock rate to 125 Mhz so that it will work with 1000Mbps,
Earlier this is done by FSBL. With this change We can remove the
ethernet clock rate code from FSBL.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoclk: sifive: fu540-prci: Release ethernet clock reset
Pragnesh Patel [Fri, 29 May 2020 06:03:31 +0000 (11:33 +0530)]
clk: sifive: fu540-prci: Release ethernet clock reset

U-Boot ethernet works with FSBL flow where releasing ethernet clock
reset is part of FSBL itself but with the SPL, We need to release
ethernet clock reset explicitly for U-Boot proper. With this change
Release ethernet clock reset code in FSBL might not be needed or
unaffected.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoclk: sifive: fu540-prci: Add ddr clock initialization
Pragnesh Patel [Fri, 29 May 2020 06:03:30 +0000 (11:33 +0530)]
clk: sifive: fu540-prci: Add ddr clock initialization

Release ddr clock reset once clock is initialized

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoclk: sifive: fu540-prci: Add clock enable and disable ops
Pragnesh Patel [Fri, 29 May 2020 06:03:29 +0000 (11:33 +0530)]
clk: sifive: fu540-prci: Add clock enable and disable ops

Added clock enable and disable functions in prci ops

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: sifive: dts: fu540: add U-Boot dmc node
Pragnesh Patel [Fri, 29 May 2020 06:03:28 +0000 (11:33 +0530)]
riscv: sifive: dts: fu540: add U-Boot dmc node

Add dmc node to enable ddr driver. dmc is used to
initialize the memory controller.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agosifive: dts: fu540: Add DDR controller and phy register settings
Pragnesh Patel [Fri, 29 May 2020 06:03:27 +0000 (11:33 +0530)]
sifive: dts: fu540: Add DDR controller and phy register settings

Add DDR controller and phy register settings, taken from fsbl
(https://github.com/sifive/freedom-u540-c000-bootloader.git)

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agosifive: fu540: add ddr driver
Pragnesh Patel [Fri, 29 May 2020 06:03:26 +0000 (11:33 +0530)]
sifive: fu540: add ddr driver

Add driver for fu540 to support ddr initialization in SPL.
This driver is based on FSBL
(https://github.com/sifive/freedom-u540-c000-bootloader.git)

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoriscv: sifive: dts: fu540: Add board -u-boot.dtsi files
Pragnesh Patel [Fri, 29 May 2020 06:03:25 +0000 (11:33 +0530)]
riscv: sifive: dts: fu540: Add board -u-boot.dtsi files

Devicetree files in FU540 platform is synced from Linux, like other
platforms does. Apart from these U-Boot in FU540 would also require
some U-Boot specific node like clint.

So, create board specific -u-boot.dtsi files. This would help of
maintain U-Boot specific changes separately without touching Linux
dts(i) files which indeed easy for syncing from Linux between
releases.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agolib: Makefile: build crc7.c when CONFIG_MMC_SPI
Pragnesh Patel [Fri, 29 May 2020 06:03:24 +0000 (11:33 +0530)]
lib: Makefile: build crc7.c when CONFIG_MMC_SPI

When build U-Boot SPL, meet an issue of undefined reference to
'crc7' for drivers/mmc/mmc_spi.c, so let's compile crc7.c when
CONFIG_MMC_SPI selected.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: Add _image_binary_end for SPL
Pragnesh Patel [Fri, 29 May 2020 06:03:23 +0000 (11:33 +0530)]
riscv: Add _image_binary_end for SPL

For SPL_SEPARATE_BSS, Device tree will be put at _image_binary_end

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoriscv: sifive: fu540: Use OTP DM driver for serial environment variable
Pragnesh Patel [Fri, 29 May 2020 06:03:22 +0000 (11:33 +0530)]
riscv: sifive: fu540: Use OTP DM driver for serial environment variable

Use the OTP DM driver to set the serial environment variable.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agomisc: add driver for the SiFive otp controller
Pragnesh Patel [Fri, 29 May 2020 06:03:21 +0000 (11:33 +0530)]
misc: add driver for the SiFive otp controller

Added a misc driver to handle OTP memory in SiFive SoCs.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agoMerge tag 'efi-2020-07-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 3 Jun 2020 18:10:03 +0000 (14:10 -0400)]
Merge tag 'efi-2020-07-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc4

This patch series addresses the following issues:

* allow compiling with clang
* add missing function descriptions to the HTML documentation
* simplify the validation of UEFI images
* validate load options in the UEFI boot manager

In a preparatory patch a structure definition is moved.

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
Tom Rini [Wed, 3 Jun 2020 16:27:51 +0000 (12:27 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi

- Toshiba spinand (Yoshio)
- SPI/SPI Flash cleanup (Jagan)
- Remove SH SPI (Jagan)

4 years agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Wed, 3 Jun 2020 15:52:13 +0000 (11:52 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

- H6 emac support
- USB PHY H6 logic alignment

4 years agoMerge branch '2020-06-03-misc-bugfixes'
Tom Rini [Wed, 3 Jun 2020 15:44:12 +0000 (11:44 -0400)]
Merge branch '2020-06-03-misc-bugfixes'

- Update various docs to not have 'ARCH=' in them as that's not part of
  how U-Boot builds.
- Add macOS tools-only build to Azure to help catch problems on BSD
  hosts with tools.
- Bugfixes from the latest header cleanup around ARCH_DMA_MINALIGN
- Assorted small Kconfig logic/typo corrections
- Add a default hash to FIT images that have their its auto generated.
- Other assorted fixes

4 years agoefi_loader: signature: move efi_guid_cert_type_pkcs7 to efi_signature.c
AKASHI Takahiro [Fri, 29 May 2020 06:41:18 +0000 (15:41 +0900)]
efi_loader: signature: move efi_guid_cert_type_pkcs7 to efi_signature.c

The global variable, efi_guid_cert_type_pkcs7, will also be used in
efi_image_loader.c in a succeeding patch so as to correctly handle
a signature type of authenticode in signed image.

Meanwhile, it is currently defined in efi_variable.c. Once some secure
storage solution for UEFI variables is introduced, efi_variable.c may
not always be compiled in.

So move the definition to efi_signature.c as a common place.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: simplify PE consistency check
Heinrich Schuchardt [Sat, 30 May 2020 05:35:59 +0000 (07:35 +0200)]
efi_loader: simplify PE consistency check

Knowing that at least one section header follows the optional header we
only need to check for the length of the 64bit header which is longer than
the 32bit header.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: function description cmp_pe_section()
Heinrich Schuchardt [Sat, 30 May 2020 04:44:48 +0000 (06:44 +0200)]
efi_loader: function description cmp_pe_section()

Rework the description of function cmp_pe_section().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: function descriptions efi_image_loader.c
Heinrich Schuchardt [Sat, 30 May 2020 03:48:08 +0000 (05:48 +0200)]
efi_loader: function descriptions efi_image_loader.c

We want to follow the Linux kernel style for function descriptions.

Add missing parentheses after function names.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: allow compiling with clang
Heinrich Schuchardt [Tue, 26 May 2020 23:58:30 +0000 (01:58 +0200)]
efi_loader: allow compiling with clang

On ARM systems gd is stored in register r9 or x18. When compiling with
clang gd is defined as a macro calling function gd_ptr(). So we can not
make assignments to gd.

In the UEFI sub-system we need to save gd when leaving to UEFI binaries and
have to restore gd when reentering U-Boot.

Define a new function set_gd() for setting gd and use it in the UEFI
sub-system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tom Rini <trini@konsulko.com>
4 years agoefi_loader: validate load option
Heinrich Schuchardt [Sun, 31 May 2020 20:46:09 +0000 (22:46 +0200)]
efi_loader: validate load option

For passing the optional data of the load option to the loaded imaged
protocol we need its size.

efi_deserialize_load_option() is changed to return the size of the optional
data.

As a by-product we get a partial validation of the load option.
Checking the length of the device path remains to be implemented.

Some Coverity defects identified the load options as user input because
get_unaligned_le32() and get_unaligned_le16() is called. But non of these
Coverity defects can be resolved without marking functions with Coverity
specific tags.

Reported-by: Coverity (CID 303760)
Reported-by: Coverity (CID 303768)
Reported-by: Coverity (CID 303776)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI
Masahiro Yamada [Wed, 20 May 2020 02:43:34 +0000 (11:43 +0900)]
ARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI

arch/arm/include/asm/system.h declares psci_arch_init(), but it is
surrounded by #ifdef CONFIG_ARMV8_PSCI.

psci_arch_init() is called for CONFIG_ARMV7_PSCI too. Add the missing
function declaration.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agobootcount_ext: Add Ext4 build dependency
Frédéric Danis [Wed, 20 May 2020 07:13:26 +0000 (09:13 +0200)]
bootcount_ext: Add Ext4 build dependency

This config option depends on EXT4 support.
If Ext4 write capability is not selected, it generate write error messages
and is unable to maintain boot counter.

Signed-off-by: Frédéric Danis <frederic.danis@collabora.com>
4 years agokconfig: fix typo for OHCI host and add to DM list
Marcin Juszkiewicz [Tue, 26 May 2020 17:07:16 +0000 (19:07 +0200)]
kconfig: fix typo for OHCI host and add to DM list

Description said that OHCI is not supported for driver model
while it was converted too.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
4 years agokconfig: fix some typos
Marcin Juszkiewicz [Tue, 26 May 2020 17:07:15 +0000 (19:07 +0200)]
kconfig: fix some typos

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
4 years agokconfig: mark SPL/TPL options for DM_KEYBOARD
Marcin Juszkiewicz [Tue, 26 May 2020 17:07:14 +0000 (19:07 +0200)]
kconfig: mark SPL/TPL options for DM_KEYBOARD

All three options had the same description.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
4 years agocmd: fitupd: move config check to Kconfig
Heinrich Schuchardt [Tue, 26 May 2020 16:34:15 +0000 (18:34 +0200)]
cmd: fitupd: move config check to Kconfig

Configuration checks should not be in the C files but in the Kconfig files.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agocubieboard7: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:55 +0000 (14:36 -0400)]
cubieboard7: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

While in here, add the doc file to the MAINTAINERS entry.

Cc: Amit Singh Tomar <amittomer25@gmail.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Amit Singh Tomar <amittomer25@gmail.com>
4 years agofu540: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:54 +0000 (14:36 -0400)]
fu540: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

While in here, add the doc file to the MAINTAINERS entry.

Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Anup Patel <anup.patel@wdc.com>
Cc: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agom68k: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:53 +0000 (14:36 -0400)]
m68k: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

While in here, add the doc file to the MAINTAINERS entry for coldfire.

Cc: Huan Wang <alison.wang@nxp.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoarm: ti: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:52 +0000 (14:36 -0400)]
arm: ti: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agorockchip: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:51 +0000 (14:36 -0400)]
rockchip: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

Acked-by: Kever Yang <kever.yang@rock-chips.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopowerpc: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:50 +0000 (14:36 -0400)]
powerpc: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

Cc: Po Liu <po.liu@nxp.com>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoimx: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:49 +0000 (14:36 -0400)]
imx: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

Cc: Adam Ford <aford173@gmail.com>
Cc: Vanessa Maegima <vanessa.maegima@nxp.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Igor Opaniuk <igor.opaniuk@toradex.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoamlogic: Remove ARCH= references from documentation
Tom Rini [Tue, 26 May 2020 18:36:48 +0000 (14:36 -0400)]
amlogic: Remove ARCH= references from documentation

When building U-Boot we select the architecture via Kconfig and not ARCH
being passed in via the environment or make cmdline.

Cc: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Cc: u-boot-amlogic@groups.io
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoAzure: Add 'tools-only' build for macOS X hosts
Tom Rini [Wed, 27 May 2020 00:39:03 +0000 (20:39 -0400)]
Azure: Add 'tools-only' build for macOS X hosts

Add building the 'tools-only' target on macOS X 'Catalina'.  Hopefully
this will catch changes to host tools that are incompatible on BSD style
environments.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agomkimage: Default to adding a crc32 hash with '-f auto'
Simon Glass [Wed, 27 May 2020 13:24:55 +0000 (07:24 -0600)]
mkimage: Default to adding a crc32 hash with '-f auto'

This option currently does not add any sort of hash to the images in the
FIT.

Add a hash node requesting a crc32 checksum, which at least provides some
protection.

The crc32 value is easily ignored (e.g. in SPL) if not needed. and takes
up only about 48 bytes per image, including overhead.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Denk <wd@denx.de>
4 years agotools: fw_env: Fix warning when reading too little
Harald Seiler [Thu, 28 May 2020 15:54:45 +0000 (17:54 +0200)]
tools: fw_env: Fix warning when reading too little

When using CONFIG_ENV_IS_IN_FAT and the config-file specifies a size
larger than what U-Boot wrote into the env-file, a confusing error
message is shown:

    $ fw_printenv
    Read error on /boot/uboot.env: Success

Fix this by showing a different error message when read returns too
little data.

Signed-off-by: Harald Seiler <hws@denx.de>
4 years agoimage: android: fix abootimg support
Christian Gmeiner [Fri, 29 May 2020 15:53:45 +0000 (17:53 +0200)]
image: android: fix abootimg support

abootimg creates images where all load addresses are 0.

 Android Boot Image Info:
* file name = artifacts/fastboot.img
* image size = 31381504 bytes (29.93 MB)
  page size  = 2048 bytes
* Boot Name = ""
* kernel size       = 9397406 bytes (8.96 MB)
  ramdisk size      = 21981144 bytes (20.96 MB)
* load addresses:
  kernel:       0x00000000
  ramdisk:      0x00000000
  tags:         0x00000000

Without this fix we end in a data abort:

Booting kernel at 0x15000000...
*  kernel: cmdline image address = 0x15000000
Kernel load addr 0x00000000 size 9178 KiB
Kernel command line: ip=dhcp console=ttymxc0,115200n8
   kernel data at 0x15000800, len = 0x008f649e (9397406)
*  ramdisk: cmdline image address = 0x15000000
RAM disk load addr 0x00000000 size 21473 KiB
   ramdisk start = 0x158f7000, ramdisk end = 0x16def35c
   kernel loaded at 0x00000000, end = 0x00000000
   Loading Kernel Image
data abort
pc : [<8ff8c004>]    lr : [<5d7ac70f>]
sp : 8f57ed64  ip : 48f17668  fp : 00000000
r10: 00000002  r9 : 8f58aed0  r8 : 03fa4c58
r7 : 5e842497  r6 : fbe73965  r5 : 7c459955  r4 : df020fde
r3 : 1b7aa45b  r2 : 007f23fe  r1 : 15104820  r0 : 00104000
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32 (T)
Code: f07c e8b1 51f8 3a20 (e8a0) 51f8
Resetting CPU ...
resetting ...

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
4 years agodma-mapping: Add header file for ARCH_DMA_MINALIGN
Simon Glass [Sat, 30 May 2020 16:29:04 +0000 (10:29 -0600)]
dma-mapping: Add header file for ARCH_DMA_MINALIGN

This is defined in the asm/cache.h header file. Update this header file to
include it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Adam Ford <aford173@gmail.com> #da850-evm
4 years agousb: ohci: Add header file for ARCH_DMA_MINALIGN
Simon Glass [Sat, 30 May 2020 16:29:03 +0000 (10:29 -0600)]
usb: ohci: Add header file for ARCH_DMA_MINALIGN

This is defined in the asm/cache.h header file. Update this header file to
include it so it gets the same value consistently across U-Boot.

This fixes 'usb host' on omapl138_lcdk.

Fixes: 90526e9fbac ("common: Drop net.h from common header")
Reported-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotest/py: use actual core count for parallel builds
Heinrich Schuchardt [Sat, 30 May 2020 22:44:24 +0000 (00:44 +0200)]
test/py: use actual core count for parallel builds

When building U-Boot we should not blindly use make -j8 but consider the
actual core count given by os.cpu_count().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Tue, 2 Jun 2020 03:34:18 +0000 (23:34 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Corrected some FSP-M/FSP-S settings for Chromebook Coral
- ICH SPI driver and mrccache fixes for obtaining the SPI memory map
- Fixed various warnings generated by latest version IASL when compiling
  ACPI tables

4 years agox86: quark: acpi: Replace _ADR() by _UID() in description of PCI host bridge
Bin Meng [Mon, 1 Jun 2020 04:15:15 +0000 (21:15 -0700)]
x86: quark: acpi: Replace _ADR() by _UID() in description of PCI host bridge

PCI Firmware specification requires _UID() and doesn't require _ADR()
to be set. Replace latter by former. This fixes the following warning
reported by ACPICA 20200430:

  Warning 3073 - Multiple types (Device object requires either a _HID
  or _ADR, but not both)

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agox86: baytrail: acpi: Replace _ADR() by _UID() in description of PCI host bridge
Bin Meng [Mon, 1 Jun 2020 04:15:14 +0000 (21:15 -0700)]
x86: baytrail: acpi: Replace _ADR() by _UID() in description of PCI host bridge

PCI Firmware specification requires _UID() and doesn't require _ADR()
to be set. Replace latter by former. This fixes the following warning
reported by ACPICA 20200430:

  Warning 3073 - Multiple types (Device object requires either a _HID
  or _ADR, but not both)

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agox86: baytrail: acpi: Create buffers outside of the methods
Bin Meng [Mon, 1 Jun 2020 04:15:13 +0000 (21:15 -0700)]
x86: baytrail: acpi: Create buffers outside of the methods

Create buffers outside of the methods as ACPICA 20200430 complains
about this:

  Remark 2173 - Creation of named objects within a method is highly
  inefficient, use globals or method local variables instead
  (\_SB.PCI0.LPCB.IURT._CRS)

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agox86: tangier: acpi: Drop _HID() where enumerated by _ADR()
Andy Shevchenko [Thu, 28 May 2020 09:17:36 +0000 (12:17 +0300)]
x86: tangier: acpi: Drop _HID() where enumerated by _ADR()

ACPICA complains that either _HID() or _ADR() should be used.
For General Purpose DMA we may not drop the _ADR() because
the device is enumerated by PCI. Thus, simple drop _HID().

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: tangier: acpi: Drop _ADR() where _HID() is present
Andy Shevchenko [Thu, 28 May 2020 09:17:35 +0000 (12:17 +0300)]
x86: tangier: acpi: Drop _ADR() where _HID() is present

ACPICA complains that either _HID() or _ADR() should be used.
Drop _ADR() where _HID() is present.

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: tangier: acpi: Replace _ADR() by _UID() in description of PCI host bridge
Andy Shevchenko [Thu, 28 May 2020 09:17:34 +0000 (12:17 +0300)]
x86: tangier: acpi: Replace _ADR() by _UID() in description of PCI host bridge

PCI Firmware specification requires _UID() and doesn't require _ADR()
to be set. Replace latter by former.

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: tangier: acpi: Create buffers outside of the methods
Andy Shevchenko [Thu, 28 May 2020 09:17:33 +0000 (12:17 +0300)]
x86: tangier: acpi: Create buffers outside of the methods

Create buffers outside of the methods as ACPICA 20200214 complains about this:

Remark 2173 - Creation of named objects within a method is
highly inefficient, use globals or method local variables
instead

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>