oweals/u-boot.git
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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.

3 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.

3 years agoddr: Rework errata A008109, A008378, 009942 workaround
Jaiprakash Singh [Tue, 2 Jun 2020 07:14:02 +0000 (12:44 +0530)]
ddr: Rework errata A008109A008378, 009942 workaround

Move errata A008109A008378, 009942 workaround implementation from
compute_fsl_memctl_config_regs() to  fsl_ddr_set_memctl_regs()
and add register write after each workaround implementation.

Signed-off-by: Jaiprakash Singh <Jaiprakash.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoddr: fsl: Impl. Erratum A008109
Joakim Tjernlund [Wed, 20 Nov 2019 16:07:34 +0000 (17:07 +0100)]
ddr: fsl: Impl. Erratum A008109

Impl. erratum as descibed in errata doc.
Enable A008109 for T1040 and T1024

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agonet: tsec: Access TBI PHY through the corresponding MII
Hou Zhiqiang [Sun, 3 May 2020 14:48:43 +0000 (22:48 +0800)]
net: tsec: Access TBI PHY through the corresponding MII

When an eTSEC is configured to use TBI, configuration of the
TBI is done through the MIIM registers for that eTSEC.
For example, if a TBI interface is required on eTSEC2, then
the MIIM registers starting at offset 0x2_5520 are used to
configure it.

Fixes: 9a1d6af55ecd ("net: tsec: Add driver model ethernet support")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agonet: tsec: Access eTSEC registers using virtual address
Hou Zhiqiang [Sun, 3 May 2020 14:48:42 +0000 (22:48 +0800)]
net: tsec: Access eTSEC registers using virtual address

The current code accesses eTSEC registers using physical
address directly, it's not correct, though no problem on
current platforms. It won't work on platforms, which does
not support 1:1 virtual-physical address map.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agodoc: dt-bindings: tsec: Correct the Ethernet port compatible string
Hou Zhiqiang [Sun, 3 May 2020 14:48:41 +0000 (22:48 +0800)]
doc: dt-bindings: tsec: Correct the Ethernet port compatible string

Change the compatible string to "fsl,etsec2" for the Ethernet ports,
which is used in the current driver's match table.

Fixes: 69a00875e3db ("doc: dt-bindings: Describe Freescale TSEC ethernet controller")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs: enable DM_ETH support for T1024RDB
Madalin Bucur [Thu, 30 Apr 2020 13:00:15 +0000 (16:00 +0300)]
configs: enable DM_ETH support for T1024RDB

Enable DM_ETH on all the defconfigs for the T1024RDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs: enable DM_ETH support for P2041RDB
Madalin Bucur [Thu, 30 Apr 2020 13:00:14 +0000 (16:00 +0300)]
configs: enable DM_ETH support for P2041RDB

Enable DM_ETH on all the defconfigs for the P2041RDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan v3 to T1024RDB
Madalin Bucur [Thu, 30 Apr 2020 13:00:13 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan v3 to T1024RDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the T1024RDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan v3 for T102x
Madalin Bucur [Thu, 30 Apr 2020 13:00:12 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan v3 for T102x

Add the QorIQ DPAA 1 Frame Manager v3 device tree nodes for the
T102x SoCs. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan to P5040DS
Madalin Bucur [Thu, 30 Apr 2020 13:00:11 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan to P5040DS

Introduce the QorIQ DPAA 1 Frame Manager nodes in the P5040DS
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan for P5040
Madalin Bucur [Thu, 30 Apr 2020 13:00:10 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan for P5040

The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan to P3041DS
Madalin Bucur [Thu, 30 Apr 2020 13:00:09 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan to P3041DS

Introduce the QorIQ DPAA 1 Frame Manager nodes in the P3041DS
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan for P3041
Madalin Bucur [Thu, 30 Apr 2020 13:00:08 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan for P3041

The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan to P2041RDB
Madalin Bucur [Thu, 30 Apr 2020 13:00:07 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan to P2041RDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the P2041RDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan for P2041
Madalin Bucur [Thu, 30 Apr 2020 13:00:06 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan for P2041

The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan interfaces to P4080DS
Madalin Bucur [Thu, 30 Apr 2020 13:00:05 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan interfaces to P4080DS

Introduce the QorIQ DPAA 1 Frame Manager interfaces nodes in the
P4080DS device tree.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan for P4080
Madalin Bucur [Thu, 30 Apr 2020 13:00:04 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan for P4080

The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan v3 device tree nodes
Madalin Bucur [Thu, 30 Apr 2020 13:00:03 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan v3 device tree nodes

Add the QorIQ DPAA Frame Manager version 3 device tree nodes
description. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ DPAA 1 FMan device tree nodes
Madalin Bucur [Thu, 30 Apr 2020 13:00:02 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ DPAA 1 FMan device tree nodes

Add the QorIQ DPAA Frame Manager device tree nodes description.
The device tree fragments are copied over with little modification
from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: add QorIQ GPIOs
Madalin Bucur [Thu, 30 Apr 2020 13:00:01 +0000 (16:00 +0300)]
powerpc: dts: add QorIQ GPIOs

Add the QorIQ GPIO device tree nodes description. The device tree
fragments are copied over with little modification from the Linux
kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: dts: QorIQ: Add node(s) for the platform PLL
Madalin Bucur [Thu, 30 Apr 2020 13:00:00 +0000 (16:00 +0300)]
powerpc: dts: QorIQ: Add node(s) for the platform PLL

Add the QorIQ clock control device nodes include files.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agonet: tsec: fsl_mdio: add DM MDIO support
Madalin Bucur [Thu, 30 Apr 2020 12:59:59 +0000 (15:59 +0300)]
net: tsec: fsl_mdio: add DM MDIO support

Allow the MDIO devices to be probed based on the device tree.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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.

3 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)

3 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

3 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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 years agoboard/freescale: add the DM_ETH changes for the PPC DPAA platforms
Madalin Bucur [Thu, 30 Apr 2020 12:59:58 +0000 (15:59 +0300)]
board/freescale: add the DM_ETH changes for the PPC DPAA platforms

Add the required changes for compiling with DM_ETH on the PPC
DPAA platforms.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agodrivers: net: qe: deselect QE when DM_ETH is enabled
Madalin Bucur [Wed, 29 Apr 2020 09:26:59 +0000 (12:26 +0300)]
drivers: net: qe: deselect QE when DM_ETH is enabled

A compilation error appears when QE is compiled with DM_ETH
enabled:

drivers/qe/uec.c: In function 'init_phy':
drivers/qe/uec.c:425:28: error: dereferencing pointer to incomplete type 'struct eth_device'
  uec = (uec_private_t *)dev->priv;
                            ^~
drivers/qe/uec.c: In function 'uec_initialize':
drivers/qe/uec.c:1357:43: error: invalid application of 'sizeof' to incomplete type 'struct eth_device'
  dev = (struct eth_device *)malloc(sizeof(struct eth_device));
                                           ^~~~~~

The patch disables CONFIG_QE when CONFIG_DM_ETH is set.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc: mpc85xx: fix unused variable warning
Madalin Bucur [Wed, 29 Apr 2020 09:16:38 +0000 (12:16 +0300)]
powerpc: mpc85xx: fix unused variable warning

Fix unused variable warning when CONFIG_QE is not set.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopowerpc/mpc85xx: Fix compiling error with DM_GPIO
Madalin Bucur [Wed, 29 Apr 2020 05:33:33 +0000 (08:33 +0300)]
powerpc/mpc85xx: Fix compiling error with DM_GPIO

P4080DS compilation fails with DM_GPIO enabled:

drivers/gpio/gpio-uclass.c:355:5: error: redefinition of 'gpio_request'
 int gpio_request(unsigned gpio, const char *label)
     ^~~~~~~~~~~~
In file included from ./arch/powerpc/include/asm/arch/gpio.h:17:0,
                 from ./arch/powerpc/include/asm/gpio.h:1,
                 from drivers/gpio/gpio-uclass.c:16:
./arch/powerpc/include/asm/mpc85xx_gpio.h:68:19: note: previous definition of 'gpio_request' was here
 static inline int gpio_request(unsigned gpio, const char *label)
                   ^~~~~~~~~~~~

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agodrivers: net: e1000: with DM_ETH needs DM_PCI too
Madalin Bucur [Wed, 29 Apr 2020 05:26:17 +0000 (08:26 +0300)]
drivers: net: e1000: with DM_ETH needs DM_PCI too

Compilation error occur when DM_ETH is enabled without DM_PCI.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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
3 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>
3 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>
3 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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 years agox86: minnowmax: Add support for Winbond flash
Simon Glass [Wed, 27 May 2020 12:56:53 +0000 (06:56 -0600)]
x86: minnowmax: Add support for Winbond flash

This allows the use of the Dediprog em100pro so I can test SPI flash on
this board in my lab.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: apl: Add hex offsets for registers in FSP-S
Simon Glass [Wed, 27 May 2020 11:42:14 +0000 (05:42 -0600)]
x86: apl: Add hex offsets for registers in FSP-S

When comparing hex dumps it is useful to see the offsets of the registers.
Add them in where they correspond to a multiple of 16.

Possibly it would be useful to have a a command to output the FSP values
in human-readable form, making use of the fsp_bindings implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>