oweals/u-boot.git
5 years agoclk: Add fixed-factor clock driver
Anup Patel [Mon, 25 Feb 2019 08:14:55 +0000 (08:14 +0000)]
clk: Add fixed-factor clock driver

This patch adds fixed-factor clock driver which derives clock
rate by dividing (div) and multiplying (mult) fixed factors
to a parent clock.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoclk: Add SiFive FU540 PRCI clock driver
Anup Patel [Mon, 25 Feb 2019 08:14:49 +0000 (08:14 +0000)]
clk: Add SiFive FU540 PRCI clock driver

Add driver code for the SiFive FU540 PRCI IP block.  This IP block
handles reset and clock control for the SiFive FU540 device and
implements SoC-level clock tree controls and dividers.

Based on code written by Wesley Terpstra <wesley@sifive.com>
found in commit 999529edf517ed75b56659d456d221b2ee56bb60 of:
https://github.com/riscv/riscv-linux

Boot and PLL rate change were tested on a SiFive HiFive Unleashed
board.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
5 years agonet: macb: Fix GEM hardware detection
Atish Patra [Mon, 25 Feb 2019 08:14:42 +0000 (08:14 +0000)]
net: macb: Fix GEM hardware detection

Fix MID bit field check to correctly identify all GEM hardwares.

The check is updated as per macb driver in Linux location:
<linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: macb: Fix clk API usage for RISC-V systems
Anup Patel [Mon, 25 Feb 2019 08:14:36 +0000 (08:14 +0000)]
net: macb: Fix clk API usage for RISC-V systems

Don't fail in macb_enable_clk() if clk_enable() returns
-ENOSYS because we get -ENOSYS for fixed-rate clocks.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: generic: Ensure that U-Boot runs within 4GB for 64bit systems
Anup Patel [Mon, 25 Feb 2019 08:14:30 +0000 (08:14 +0000)]
riscv: generic: Ensure that U-Boot runs within 4GB for 64bit systems

On 64bit systems, the DRAM top can be easily beyond 4GB and U-Boot
DMA mapping APIs will generate DMA addresses beyond 4GB. This
breaks DMA programming in 32bit DMA capable devices (such as
Cadence MACB ethernet). For example, If DRAM is more then 2GB
on QEMU sifive_u machine then Cadence MACB ethernet stops working
for U-Boot because it is a 32bit DMA capable device.

To handle 32bit DMA capable devices on 64bit systems, we provide
custom implementation of board_get_usable_ram_top() which ensures
that usable ram top is not more then 4GB. This in-turn ensures
that U-Boot always runs within 4GB hence DMA addresses generated
by DMA mapping APIs will be within 4GB too.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: Add place-holder asm/arch/clk.h for driver compilation
Anup Patel [Mon, 25 Feb 2019 08:14:24 +0000 (08:14 +0000)]
riscv: Add place-holder asm/arch/clk.h for driver compilation

Some of the drivers (such as Cadence MACB ethernet driver) expect
asm/arch/clk.h to be provided by arch support so we add place-holder
asm/arch-generic/clk.h for RISC-V generic CPU.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: Add asm/dma-mapping.h for DMA mappings
Anup Patel [Mon, 25 Feb 2019 08:14:17 +0000 (08:14 +0000)]
riscv: Add asm/dma-mapping.h for DMA mappings

This patch adds asm/dma-mapping.h for Linux-like DMA mappings
APIs required by some of the drivers (such as, Cadance MACB
Ethernet driver).

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: Rename cpu/qemu to cpu/generic
Anup Patel [Mon, 25 Feb 2019 08:14:10 +0000 (08:14 +0000)]
riscv: Rename cpu/qemu to cpu/generic

The QEMU CPU support under arch/riscv is pretty much generic
and works fine for SiFive Unleashed as well. In fact, there
will be quite a few RISC-V SOCs for which QEMU CPU support
will work fine.

This patch renames cpu/qemu to cpu/generic to indicate the
above fact. If there are SOC specific errata workarounds
required in cpu/generic then those can be done at runtime
in cpu/generic based on CPU vendor specific DT compatible
string.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: Enable create symlink using kconfig
Anup Patel [Mon, 25 Feb 2019 08:14:04 +0000 (08:14 +0000)]
riscv: Enable create symlink using kconfig

We select CREATE_ARCH_SYMLINK for RISC-V so that we can have
include/asm/arch linked to include/asm/arch-xyz.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMerge tag 'efi-2019-04-rc3' of https://github.com/xypron2/u-boot
Tom Rini [Tue, 26 Feb 2019 13:45:08 +0000 (08:45 -0500)]
Merge tag 'efi-2019-04-rc3' of https://github.com/xypron2/u-boot

Pull request for the UEFI sub-system for v2019.04-rc3

A new option -e is added to the env command which allows to display and
change UEFI variables in a user friendly way.

A new command efidebug is introduced to edit the UEFI boot sequence and to
display different aspects of the state of the UEFI sub-system: memory map,
loaded images, handles, drivers and devices.

A bug in the UEFI boot manager is fixed.

5 years agocmd: efidebug: add memmap command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:43 +0000 (15:54 +0900)]
cmd: efidebug: add memmap command

"memmap" command prints uefi-specific memory map information.
=> efi memmap
Type             Start            End              Attributes
================ ================ ================ ==========
CONVENTIONAL     0000000040000000-000000007de27000 WB
RUNTIME DATA     000000007de27000-000000007de28000 WB|RT
RESERVED         000000007de28000-000000007de2a000 WB
RUNTIME DATA     000000007de2a000-000000007de2b000 WB|RT
RESERVED         000000007de2b000-000000007de2c000 WB
RUNTIME DATA     000000007de2c000-000000007de2d000 WB|RT
LOADER DATA      000000007de2d000-000000007ff37000 WB
RUNTIME CODE     000000007ff37000-000000007ff38000 WB|RT
LOADER DATA      000000007ff38000-0000000080000000 WB

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: efidebug: add images command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:42 +0000 (15:54 +0900)]
cmd: efidebug: add images command

"images" command prints loaded images-related information.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: efidebug: add dh command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:41 +0000 (15:54 +0900)]
cmd: efidebug: add dh command

"dh" command prints all the uefi handles used in the system.

=> efi dh
        7ef3bfa0: Device Path, Device Path To Text, Device Path Utilities,
  Unicode Collation 2
        7ef31d30: Driver Binding
        7ef31da0: Simple Text Output
        7ef31e10: Simple Text Input, Simple Text Input Ex
        7ef3cca0: Block IO, Device Path
        7ef3d070: Block IO, Device Path
        7ef3d1b0: Block IO, Device Path, Simple File System
        7ef3d3e0: Block IO, Device Path, Simple File System

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: efidebug: add drivers command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:40 +0000 (15:54 +0900)]
cmd: efidebug: add drivers command

"drivers" command prints all the uefi drivers on the system.

=> efi drivers
Driver           Name                 Image Path
================ ==================== ====================
000000007ef003d0 <NULL>               <built-in>

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: efidebug: add devices command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:39 +0000 (15:54 +0900)]
cmd: efidebug: add devices command

"devices" command prints all the uefi variables on the system.

=> efi devices
Scanning disk ahci_scsi.id0lun0...
Scanning disk ahci_scsi.id1lun0...
Found 4 disks
Device           Device Path
================ ====================
000000007ef07ea0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)
000000007ef00c10 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(0,0)
000000007ef00dd0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(1,0)
000000007ef07be0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(1,0)/HD(1,MBR,0x086246ba,0x800,0x40000)
000000007ef07510 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Scsi(1,0)/HD(2,MBR,0x086246ba,0x40800,0x3f800)

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: add efidebug command
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:38 +0000 (15:54 +0900)]
cmd: add efidebug command

Currently, there is no easy way to add or modify UEFI variables.
In particular, bootmgr supports BootOrder/BootXXXX variables, it is
quite hard to define them as u-boot variables because they are represented
in a complicated and encoded format.

The new command, efidebug, helps address these issues and give us
more friendly interfaces:
 * efidebug boot add: add BootXXXX variable
 * efidebug boot rm: remove BootXXXX variable
 * efidebug boot dump: display all BootXXXX variables
 * efidebug boot next: set BootNext variable
 * efidebug boot order: set/display a boot order (BootOrder)

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: define load option attributes
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:37 +0000 (15:54 +0900)]
efi_loader: define load option attributes

See UEFI specification v2.7a, section 3.1.3, "Load Option Processing."

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agocmd: env: add "-e" option for handling UEFI variables
AKASHI Takahiro [Mon, 25 Feb 2019 06:54:36 +0000 (15:54 +0900)]
cmd: env: add "-e" option for handling UEFI variables

"env [print|set] -e" allows for handling uefi variables without
knowing details about mapping to corresponding u-boot variables.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: fix entry count in bootmgr
Heinrich Schuchardt [Sun, 24 Feb 2019 04:09:26 +0000 (05:09 +0100)]
efi_loader: fix entry count in bootmgr

Since commit 914df75b0c97 ("efi_loader: fix EFI entry counting")
entry_count is already set to 1 before efi_bootmgr_load() is called. So we
should not increment it when entering the function.

Without the patch an assert error occurs in efi_get_variable() if DEBUG is
defined.

Fixes: 914df75b0c97 ("efi_loader: fix EFI entry counting")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: error message if BootOrder not defined
Heinrich Schuchardt [Sun, 24 Feb 2019 03:44:48 +0000 (04:44 +0100)]
efi_loader: error message if BootOrder not defined

For booting via `bootefi bootmgr` it is necessary that the EFI variable
BootOrder is defined. Provide a diagnostic message if the variable is
missing.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge branch '2019-02-22-master-imports'
Tom Rini [Sat, 23 Feb 2019 03:40:24 +0000 (22:40 -0500)]
Merge branch '2019-02-22-master-imports'

- Migrate PREBOOT to Kconfig
- LED Kconfig correction
- defconfig resync

5 years agopreboot: Introduce CONFIG_USE_PREBOOT and migrate CONFIG_PREBOOT
Masahiro Yamada [Thu, 14 Feb 2019 02:05:33 +0000 (11:05 +0900)]
preboot: Introduce CONFIG_USE_PREBOOT and migrate CONFIG_PREBOOT

This is the same migration path as commit b6251db8c3f0 ("Kconfig:
Introduce USE_BOOTCOMMAND and migrate BOOTCOMMAND").

I also moved the description in README to the Kconfig help.
I ripped off the sentence about 'LWMON' since it is gone already.

I only let my boards migrate, leaving the rest to platform maintainers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agocmd: Kconfig: LED command depends on LED subsystems
Jan Kiszka [Thu, 3 Jan 2019 08:08:42 +0000 (09:08 +0100)]
cmd: Kconfig: LED command depends on LED subsystems

Without CONFIG_LED, we get

cmd/built-in.o: In function `show_led_state':
cmd/led.c:40: undefined reference to `led_get_state'
cmd/built-in.o: In function `do_led':
cmd/led.c:99: undefined reference to `led_get_by_label'
cmd/led.c:108: undefined reference to `led_set_state'

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
5 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 22 Feb 2019 15:17:41 +0000 (10:17 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Wed, 20 Feb 2019 17:28:57 +0000 (12:28 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

5 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Wed, 20 Feb 2019 17:28:40 +0000 (12:28 -0500)]
Merge git://git.denx.de/u-boot-x86

- Add support for sound.

Albeit the big changeset, changes are pretty limited to x86 only and a
few new sound drivers used by x86 so I think it would be good to have
this in the next release.

5 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Wed, 20 Feb 2019 17:26:05 +0000 (12:26 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

- Support of NXP's LX2160RDB and LX2160QDS platform
- Enable SATA DM model for NXP's ARM SoCs

5 years agoboard: toradex: turn off lcd backlight before OS handover
Gerard Salvatella [Mon, 19 Nov 2018 14:54:10 +0000 (15:54 +0100)]
board: toradex: turn off lcd backlight before OS handover

U-Boot typically tears down the display controller before handing
control over to Linux. On LCD displays disabling pixel clock leads to a
fading out effect with vertical/horizontal lines. Make sure to disable
back light before booting Linux.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agonyan-big: drop CONFIG_KEYBOARD
Peter Robinson [Wed, 20 Feb 2019 12:17:29 +0000 (12:17 +0000)]
nyan-big: drop CONFIG_KEYBOARD

The CONFIG_KEYBOARD does nothing as it's legacy and unused
so just drop it from the config.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoKconfig: tegra: Migrate TEGRA_KEYBOARD
Peter Robinson [Wed, 20 Feb 2019 12:17:28 +0000 (12:17 +0000)]
Kconfig: tegra: Migrate TEGRA_KEYBOARD

Migrate TEGRA_KEYBOARD from headers to Kconfig, only the seaboard uses it but we
drop CONFIG_KEYBOARD as the driver doesn't use the legacy drv_keyboard_init.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoKconfig: tegra: Migrate USB_EHCI_TEGRA
Peter Robinson [Wed, 20 Feb 2019 12:17:27 +0000 (12:17 +0000)]
Kconfig: tegra: Migrate USB_EHCI_TEGRA

Migrate USB_EHCI_TEGRA from headers to Kconfig

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Peter.Chubb@data61.csiro.au
Cc: Lucas Stach <dev@lynxeye.de>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
Cc: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoKconfig: tegra: Migrate SYS_I2C_TEGRA
Peter Robinson [Wed, 20 Feb 2019 12:17:26 +0000 (12:17 +0000)]
Kconfig: tegra: Migrate SYS_I2C_TEGRA

Migrate SYS_I2C_TEGRA from headers to Kconfig

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Peter.Chubb@data61.csiro.au
Cc: Lucas Stach <dev@lynxeye.de>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
Cc: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: Reserve 32MB for the Linux kernel
Jonathan Hunter [Tue, 12 Feb 2019 16:03:14 +0000 (16:03 +0000)]
ARM: tegra: Reserve 32MB for the Linux kernel

Booting recently Linux -next kernels on 32-bit Tegra devices has been
failing when using the 'multi_v7_defconfig' kenrel configuration because
the size of has grown such that it is overwriting the FDT blob.

Current Linux -next kernels built with the 'multi_v7_defconfig' have a
total size of ~19.5MB (where .text is ~12.5MB, .data is ~6.5MB and .bss
is ~0.5MB). Therefore, increase the memory location reserved for the
Linux kernel to 32MB from 16MB for 32-bit Tegra devices.

This change has been boot tested on Tegra20 Ventana, Tegra30 Cardhu and
Tegra124 Jetson TK1 with the Linux next tree (20190212).

Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agoARM: tegra: enable ums on nyan boards
Tristan Bastian [Thu, 14 Feb 2019 23:25:49 +0000 (00:25 +0100)]
ARM: tegra: enable ums on nyan boards

This patch enables UMS on the nyan devices like the nyan-big.
A patch like this has been sent in by Stephen Warren some time ago for
other tegra devices: commit e6607cffef965011ef0ddc0fbe6f4b7c0d53aeec.
But the nyan devices never received that functionality.

Signed-off-by: Tristan Bastian <tristan-c.bastian@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agonyan-big: add padding to its file
Tristan Bastian [Wed, 16 Jan 2019 18:49:56 +0000 (19:49 +0100)]
nyan-big: add padding to its file

Without this padding nyan-big ends at a blank screen on boot.
Details on how to get to this padding can be found in the README.chromium under Notes.

Signed-off-by: Tristan Bastian <tristan-c.bastian@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agonyan-big: change spi delay
Tristan Bastian [Wed, 16 Jan 2019 18:49:55 +0000 (19:49 +0100)]
nyan-big: change spi delay

Internal keyboard of nyan-big is only working when cold booting by pressing [reload/refresh]+[power] button.
With this patch keyboard is working by only pressing [power] button.

Signed-off-by: Tristan Bastian <tristan-c.bastian@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra20: common: fix USB_EHCI_TXFIFO_THRESH value
Peter Robinson [Sun, 16 Sep 2018 17:22:58 +0000 (18:22 +0100)]
tegra20: common: fix USB_EHCI_TXFIFO_THRESH value

All other Tegra devices that define USB_EHCI_TXFIFO_THRESH use hex
representation, fix tegra20 to be the same format.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agotegra: cleanup dangling comments in include/configs
Peter Robinson [Sun, 16 Sep 2018 17:22:57 +0000 (18:22 +0100)]
tegra: cleanup dangling comments in include/configs

There's a number of dangling comments in various tegra configs post migrations
of various configs so lets clean them up.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Peter.Chubb@data61.csiro.au
Cc: Lucas Stach <dev@lynxeye.de>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
Cc: Allen Martin <amartin@nvidia.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
5 years agox86: Add sound support for samus
Simon Glass [Sun, 17 Feb 2019 03:25:07 +0000 (20:25 -0700)]
x86: Add sound support for samus

Enable sound on samus using the broadwell I2S and an RT5677 audio codec.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agox86: sound: Add sound support for samus (broadwell)
Simon Glass [Sun, 17 Feb 2019 03:25:06 +0000 (20:25 -0700)]
x86: sound: Add sound support for samus (broadwell)

Add a sound driver for samus which ties together the audio codec and
I2S controller.

For now broadwell_sound is commented out in the makefile since we cannot
compile it without sound support enabled. The next commit fixes this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: Add a driver for RealTek RT5677
Simon Glass [Sun, 17 Feb 2019 03:25:05 +0000 (20:25 -0700)]
sound: Add a driver for RealTek RT5677

This audio codec is used on samus. Add a driver for it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: sound: Add support for broadwell I2S
Simon Glass [Sun, 17 Feb 2019 03:25:04 +0000 (20:25 -0700)]
x86: sound: Add support for broadwell I2S

I2S is used to send digital audio data to an audio codec. Add support for
this on broadwell.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: broadwell: Add support for serial I/O devices
Simon Glass [Sun, 17 Feb 2019 03:25:03 +0000 (20:25 -0700)]
x86: broadwell: Add support for serial I/O devices

Add support for initing the I2C device and ADSP on broadwell. These are
needed for sound to work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: broadwell: Don't bother probing the PCH for pinctrl
Simon Glass [Sun, 17 Feb 2019 03:25:02 +0000 (20:25 -0700)]
x86: broadwell: Don't bother probing the PCH for pinctrl

At present the pinctrl probes the PCH but since it only uses it to obtain
a PCI address, this is no necessary. Avoiding this fixes one of the two
co-dependent loops in broadwell.

This driver really should be a proper pinctrl driver, but for now it
remains a syscon device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: broadwell: Add support for the ADSP
Simon Glass [Sun, 17 Feb 2019 03:25:01 +0000 (20:25 -0700)]
x86: broadwell: Add support for the ADSP

The Application Digital Signal Processor is used for sound processing with
broadwell. Add a driver to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: coreboot: Enable the beeper sound driver
Simon Glass [Sun, 17 Feb 2019 03:25:00 +0000 (20:25 -0700)]
x86: coreboot: Enable the beeper sound driver

Use the i8254 sound driver to support creating simple beeps.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: Add a driver for the i8254 beep
Simon Glass [Sun, 17 Feb 2019 03:24:59 +0000 (20:24 -0700)]
sound: Add a driver for the i8254 beep

Add a sound driver which can output simple beeps using this legacy timer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: x86: Add beeping support in i8254
Simon Glass [Sun, 17 Feb 2019 03:24:58 +0000 (20:24 -0700)]
sound: x86: Add beeping support in i8254

Adjust the code to allow beeping at different frequencies, using a
calculated value for timer 2.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: x86: link: Add sound support
Simon Glass [Sun, 17 Feb 2019 03:24:57 +0000 (20:24 -0700)]
sound: x86: link: Add sound support

Add sound support for link, using the HDA codec implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosandbox: sound: Silence sound for testing
Simon Glass [Sun, 17 Feb 2019 03:24:56 +0000 (20:24 -0700)]
sandbox: sound: Silence sound for testing

When testing the sound system we don't need the hear the beeps. The
testing works by checking the data that would be emitted. Add a
device-tree property to silence the sound, and enable it for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: Add support for Intel HDA
Simon Glass [Sun, 17 Feb 2019 03:24:55 +0000 (20:24 -0700)]
sound: Add support for Intel HDA

The Intel High-definition Audio is a newer-generation audio system which
provides for transfer of a large number of audio stream, each containing
up to 16 channels.

Add support for HDA as a library which can be used by other drivers.
U-Boot currently uses only two channels (stereo).

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: Add uclass operations for beeping
Simon Glass [Sun, 17 Feb 2019 03:24:54 +0000 (20:24 -0700)]
sound: Add uclass operations for beeping

Some audio codecs such as Intel HDA do not need to use digital data to
play sounds, but instead have a way to emit beeps. Add this interface as
an option. If the beep interface is not supported, then the sound uclass
falls back to the I2S interface.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosound: Mark sound_setup() as optional
Simon Glass [Sun, 17 Feb 2019 03:24:53 +0000 (20:24 -0700)]
sound: Mark sound_setup() as optional

This method in the sound API is optional since some drivers can do this
when probing or as part of SoC init. Mark it as such.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: ivybridge: Add a way to get the HDA config setting
Simon Glass [Sun, 17 Feb 2019 03:24:52 +0000 (20:24 -0700)]
x86: ivybridge: Add a way to get the HDA config setting

Add a way check to whether HD audio is enabled. Use ioctl() to avoid
adding too many unusual operations to PCH.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopch: Add ioctl support
Simon Glass [Sun, 17 Feb 2019 03:24:51 +0000 (20:24 -0700)]
pch: Add ioctl support

At present the PCH has 4 operations and these are reasonably widely used
in the drivers. But sometimes we want to add rarely used operations, and
each of these currently adds to the size of the PCH operations table.

Add an ioctl() method which can be easily expanded without any more impact
on the operations table.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosandbox: pch: Add a test for the PCH uclass
Simon Glass [Sun, 17 Feb 2019 03:24:50 +0000 (20:24 -0700)]
sandbox: pch: Add a test for the PCH uclass

This uclass currently has no tests. Add a sandbox driver and some simple
tests to provide basic coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: Use "sandbox,pch" for the compatible string, for consistency]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: sandbox: pch: Add a CONFIG option for PCH
Simon Glass [Sun, 17 Feb 2019 03:24:49 +0000 (20:24 -0700)]
x86: sandbox: pch: Add a CONFIG option for PCH

At present this uclass is selected only on x86. In order to add a test for
it, it must also support sandbox. Create a new CONFIG_PCH option and
enable it on x86 and sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: link: Increase malloc size and decrease code size
Simon Glass [Sun, 17 Feb 2019 03:24:48 +0000 (20:24 -0700)]
x86: link: Increase malloc size and decrease code size

At present link does not boot since it has outgrown its pre-relocation
malloc() size and its assigned code area. Increase the former and drop
EFI loader support, which adds about 45KB!

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: samus: Increase the pre-reloc memory
Simon Glass [Sun, 17 Feb 2019 03:24:47 +0000 (20:24 -0700)]
x86: samus: Increase the pre-reloc memory

This is too small now, likely due to the pre_reloc_only fixes. Increase
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agox86: Adjust I/O macros to work on 64-bit machines
Simon Glass [Sun, 17 Feb 2019 03:24:46 +0000 (20:24 -0700)]
x86: Adjust I/O macros to work on 64-bit machines

At present these macros give warnings on 64-bit machines and do not
correctly do 32-bit accesses. Update them to use linux types.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agosandbox: Add a note about the growing state_info struct
Simon Glass [Sun, 17 Feb 2019 03:24:45 +0000 (20:24 -0700)]
sandbox: Add a note about the growing state_info struct

This struct is getting larger and in some cases is being used for things
which would be better put into a driver. For example hwspinlock is not
used outside of sandbox_hwspinlock.c.

Add a note to encourage people to put things elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopci: Add IDs for Intel high-definition audio
Simon Glass [Sun, 17 Feb 2019 03:24:44 +0000 (20:24 -0700)]
pci: Add IDs for Intel high-definition audio

Add a few IDs for common HDA blocks and the ADSP used on samus.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agogpio: Use case-insentive matching on the GPIO name
Simon Glass [Sun, 17 Feb 2019 03:24:43 +0000 (20:24 -0700)]
gpio: Use case-insentive matching on the GPIO name

Allow the 'gpio' command to match GPIO bank names regardless of the case
of each. While these are generally in upper case, it is useful to be able
to provide lower case with the command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agogpio: Show inactive GPIOs when explicitly requested
Simon Glass [Sun, 17 Feb 2019 03:24:42 +0000 (20:24 -0700)]
gpio: Show inactive GPIOs when explicitly requested

At present the gpio command only shows GPIOs which are marked as in use.
This makes sense with 'gpio status' since we already have the '-a' flag
to indicate that all GPIOs should be shown. But when a particular GPIO is
requested, it seems better to always display it. At present the request is
simply ignored.

For example if GPIO a10 is not in use, then:

   > gpio status a10

shows nothing, not even the function being used for that GPIO. With this
change, it shows the pin status:

   > gpio status a10
   a10: input: 0 [ ]

Add an extra parameter for this to avoid changing the existing flag
parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct the 'gpio' command in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopci: Fix comment in struct pci_child_platdata
Simon Glass [Sun, 17 Feb 2019 03:24:41 +0000 (20:24 -0700)]
pci: Fix comment in struct pci_child_platdata

This is platdata, not private data, so the comment is currently incorrect.
Fix it to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopci: Don't export pci_hose_config_device()
Simon Glass [Sun, 17 Feb 2019 03:24:40 +0000 (20:24 -0700)]
pci: Don't export pci_hose_config_device()

This function is not used outside this file so make it static.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoi2c: designware: Add error checking on init
Simon Glass [Sun, 17 Feb 2019 03:24:39 +0000 (20:24 -0700)]
i2c: designware: Add error checking on init

At present this driver does not check whether it is able to actually
communicate with the I2C controller. It prints a timeout message but still
considers the probe to be successful.

To fix this, add some checking that the init succeeds.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agodm: syscon: Don't require a regmap for PCI devices
Simon Glass [Sun, 17 Feb 2019 03:24:38 +0000 (20:24 -0700)]
dm: syscon: Don't require a regmap for PCI devices

At present it is not possible to use the syscon devices for PCI devices
since a regmap is required. Since PCI uses a 3-cell address the conversion
of the 'reg' property to an address always fails. In any case, the regmap
is not useful with PCI since devices are accessed through the PCI bus
which regmap does not support.

Add a special case for PCI syscon devices, so that they don't set up a
regmap.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agolog: Allow #define LOG_DEBUG to enable logging in a file
Simon Glass [Sun, 17 Feb 2019 03:24:37 +0000 (20:24 -0700)]
log: Allow #define LOG_DEBUG to enable logging in a file

At present it is possible to '#define DEBUG' at the top of a file which
causes all debug() statements in that file to become active. There is
currently no equivalent with logging, but this is a useful function.

Add a LOG_DEBUG define along with documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agolog: Add documentation for convenience functions
Simon Glass [Sun, 17 Feb 2019 03:24:36 +0000 (20:24 -0700)]
log: Add documentation for convenience functions

The log_debug(), etc. function are documented only in the header file at
present. Add a section to README.log also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agolog: Add a Kconfig option to set the default log level
Simon Glass [Sun, 17 Feb 2019 03:24:35 +0000 (20:24 -0700)]
log: Add a Kconfig option to set the default log level

At present the default log level is set to LOGL_INFO on start-up. Allow
this to be controlled from Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agolog: Fix up Kconfig log level names
Simon Glass [Sun, 17 Feb 2019 03:24:34 +0000 (20:24 -0700)]
log: Fix up Kconfig log level names

The log level numbers in the Kconfig are not actually correct. Fix them
and also add a missing space in the header-file comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoMerge branch '2019-02-19-master-imports'
Tom Rini [Wed, 20 Feb 2019 01:48:11 +0000 (20:48 -0500)]
Merge branch '2019-02-19-master-imports'

- Convert some OMAP3 platforms to DM+SPL
- Various minor fixes
- Updates for hikey, DaVinci, am57xx platforms,
- Make FAT use less memory

5 years agotravis: Exclude omap from the arm926ejs job
Tom Rini [Tue, 19 Feb 2019 21:58:56 +0000 (16:58 -0500)]
travis: Exclude omap from the arm926ejs job

We build the platform here that matches with "omap" in its own job,
don't need to have it here as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agocmd: pcmcia: Build only if CONFIG_CMD_PCMCIA=y
Ismael Luceno Cortes [Mon, 18 Feb 2019 09:17:04 +0000 (09:17 +0000)]
cmd: pcmcia: Build only if CONFIG_CMD_PCMCIA=y

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
5 years agodm: Fix typo 'Watchdot' -> 'Watchdog'
Chris Packham [Sun, 17 Feb 2019 19:48:04 +0000 (08:48 +1300)]
dm: Fix typo 'Watchdot' -> 'Watchdog'

Signed-off-by: Chris Packham <judge.packham@gmail.com>
5 years agoARM: omap3: evm: Update DM SPL support
Derald D. Woods [Sat, 16 Feb 2019 22:56:50 +0000 (16:56 -0600)]
ARM: omap3: evm: Update DM SPL support

- Switch to using the omap3-u-boot.dtsi file for needed properties
- Enable SPL_OF_CONTROL

This commit is based on the following series:

https://patchwork.ozlabs.org/project/uboot/list/?series=92472
https://patchwork.ozlabs.org/project/uboot/list/?series=92462

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoomap3_beagle: Enable DM_SPI
Tom Rini [Sat, 16 Feb 2019 21:36:30 +0000 (16:36 -0500)]
omap3_beagle: Enable DM_SPI

Switch to DM_SPI support now.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoomap3_beagle: Update for DM SPL support
Tom Rini [Sat, 16 Feb 2019 21:36:29 +0000 (16:36 -0500)]
omap3_beagle: Update for DM SPL support

- Switch to using the omap3-u-boot.dtsi file for needed properties.
- Remove a few SPL features to free up more SRAM space.
- Switch CONFIG_SYS_TEXT_BASE to the normal default, we don't need to
  worry about X-Loader at this point anymore.
- A few related updates to SPL options as part of switching to DM SPL.

Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
5 years agocmd/fs: fix build if CMD_BOOTEFI is not set
Gervais, Francois [Sat, 16 Feb 2019 21:10:32 +0000 (21:10 +0000)]
cmd/fs: fix build if CMD_BOOTEFI is not set

Fixes:
cmd/fs.c:29: undefined reference to `efi_set_bootdev'

Signed-off-by: Francois Gervais <fgervais@distech-controls.com>
5 years agoARM: omap3_logic: Enable SPL booting device tree
Adam Ford [Sat, 16 Feb 2019 19:31:24 +0000 (13:31 -0600)]
ARM: omap3_logic: Enable SPL booting device tree

With the generic omap3-u-boot.dtsi file available, this patch
increased the memory of the various incarnations of the omap3_logic
board, and points their respective u-boot.dtsi files to the newly
created generic one, and removes the PLATDATA from the board file.

These are all done at once because the're all utilizing the same
omap3logic.c board file.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: omap3-u-boot.dtsi
Adam Ford [Sat, 16 Feb 2019 19:31:23 +0000 (13:31 -0600)]
ARM: DTS: omap3-u-boot.dtsi

Create generic omap3-u-boot.dtsi file that omap3 based boards
can include to generate device tree in SPL for booting MLO.

Credit should go to Tom Rini.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
5 years agoARM: da8xxevm: Add NAND instructions for da850-evm to README
Adam Ford [Fri, 15 Feb 2019 02:13:53 +0000 (20:13 -0600)]
ARM: da8xxevm: Add NAND instructions for da850-evm to README

The README.da850 file continues information on how to burn NAND
for the LCDK, but not the DA850-EVM.  This patch adds both the
commands and dip switch instructions for burning and booting
NAND.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: am3517_evm: Enable Falcon Mode
Adam Ford [Thu, 14 Feb 2019 20:06:35 +0000 (14:06 -0600)]
ARM: am3517_evm: Enable Falcon Mode

The other OMAP3 based Logic PD boards have Falcon Mode enabled,
so this patch makes it possible on the AM3517-evm as well.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: da850evm: Increase Malloc Size
Adam Ford [Wed, 13 Feb 2019 19:06:37 +0000 (13:06 -0600)]
ARM: da850evm: Increase Malloc Size

The SPI NOR frameware was recently updated, but they require a little
more memory that we had previosly allocated, so it stopped booting.
This patch doubles the size of CONFIG_SPL_SYS_MALLOC_F_LEN to 0x800.

Fixes: c4e8862308d4 ("mtd: spi: Switch to new SPI NOR framework")

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agohikey: Allow environment to store in eMMC and increase bootdelay
Manivannan Sadhasivam [Wed, 13 Feb 2019 08:58:54 +0000 (14:28 +0530)]
hikey: Allow environment to store in eMMC and increase bootdelay

Current Hikey configuration allows us to store u-boot environment on uSD
card. But this will be useless if uSD card is not inserted, hence use
the onboard eMMC memory for storing environment at Boot1 partition.
While we are at it, let's increase the boot delay to 10s also.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 years agotest: let use gdbserver for all sandbox targets
Igor Opaniuk [Tue, 12 Feb 2019 14:18:14 +0000 (16:18 +0200)]
test: let use gdbserver for all sandbox targets

Enable usage of gdbserver for all sandbox targets (sandbox,
sandbox_flattree etc.).

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agobcm963158: use TARGET_BCM963158 instead of ARCH_BCM63158
Philippe Reynes [Mon, 11 Feb 2019 14:56:14 +0000 (15:56 +0100)]
bcm963158: use TARGET_BCM963158 instead of ARCH_BCM63158

We use TARGET_BCM63158 in the Kconfig instead of ARCH_BCM63158,
so we could add other board that use a bcm63158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodtbo: Fix dtbo generation rules
Michal Simek [Mon, 11 Feb 2019 13:51:02 +0000 (14:51 +0100)]
dtbo: Fix dtbo generation rules

Take the first prerequisite (dts overlay file) instead of standard
input.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agofs: fat: Reduce default max clustersize 64KiB from malloc pool
Tien Fong Chee [Mon, 11 Feb 2019 06:56:20 +0000 (14:56 +0800)]
fs: fat: Reduce default max clustersize 64KiB from malloc pool

Release cluster block immediately when no longer use would help to reduce
64KiB memory allocated to the memory pool.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agofs: fat: dynamically allocate memory for temporary buffer
Tien Fong Chee [Mon, 11 Feb 2019 06:56:19 +0000 (14:56 +0800)]
fs: fat: dynamically allocate memory for temporary buffer

Drop the statically allocated get_contents_vfatname_block and
dynamically allocate a buffer only if required. This saves
64KiB of memory.

Signed-off-by: Stefan Agner <stefan.ag...@toradex.com>
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agospl: implement CRC check on U-Boot uImage
Simon Goldschmidt [Sun, 10 Feb 2019 20:34:37 +0000 (21:34 +0100)]
spl: implement CRC check on U-Boot uImage

SPL currently does not check uImage CRCs when loading U-Boot.

This patch adds checking the uImage CRC when SPL loads U-Boot. It does
this by reusing the existing config option SPL_CRC32_SUPPORT to allow
leaving out the CRC check on boards where the additional code size or
boot time is a problem (adding the CRC check currently adds ~1.4 kByte
to flash).

The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL
support for legacy images is enabled to check the CRC on all boards
that don't actively take countermeasures.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoconfigs: am57xx_evm: define CONFIG_SPL_LOAD_FIT_ADDRESS for SPL-DFU
Bin Liu [Fri, 8 Feb 2019 17:01:37 +0000 (11:01 -0600)]
configs: am57xx_evm: define CONFIG_SPL_LOAD_FIT_ADDRESS for SPL-DFU

Define CONFIG_SPL_LOAD_FIT_ADDRESS to enable SPL-DFU for am57x platform.

Signed-off-by: Bin Liu <b-liu@ti.com>
5 years agocmd: date: Do not overwrite arguments
Roman Kapl [Fri, 8 Feb 2019 09:01:02 +0000 (10:01 +0100)]
cmd: date: Do not overwrite arguments

Arguments are const and belong to the caller. Calling date in a hush
loop will yield different results from the second invocation.

Signed-off-by: Roman Kapl <rka@sysgo.com>
5 years agoelf: fix cache flushing in 'bootelf -p' command
Kurban Mallachiev [Thu, 7 Feb 2019 11:19:45 +0000 (14:19 +0300)]
elf: fix cache flushing in 'bootelf -p' command

Currently there are two problems in 'bootelf -p' (load elf by segments)
command:
- bss section is not flushed, so booted elf can have non zero values
  in bss;
- at least on ARM there are 'CACHE: Misaligned operation at
  range...' warnings

Use p_memsz instead of p_filesz during cache flushing for elf segment.
p_filesz doesn't include zero initialized memory (e.g. bss section),
which also should be flushed.

Align these cache flushes to line boundaries.

Signed-off-by: Kurban Mallachiev <mallachiev@ispras.ru>
5 years agoboard/BuR/brxre1: convert do DM
Hannes Schmelzer [Wed, 6 Feb 2019 12:25:59 +0000 (13:25 +0100)]
board/BuR/brxre1: convert do DM

This commit converts the brxre1 board to DM,
for this we have todo following things:

- add a devicetree-file for this board
- drop all obsolete settings from board header-file
- use dm_i2c_xxx calls for read/write to the resetcontroller
- request gpios before operate them

Serues-cc: trini@konsulko.com
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
5 years agodm: scsi: report correct device number
Heinrich Schuchardt [Tue, 5 Feb 2019 17:06:24 +0000 (18:06 +0100)]
dm: scsi: report correct device number

Before the patch scsi would report the same device number for all SCSI
devices, e.g.

  Device 0: (1:0) Vendor: ATA Prod.: Crucial_CT128M55 Rev: MU01
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
  Device 0: (1:0) Vendor: ATA Prod.:  Rev:
            Type: Hard Disk
            Capacity: not available

With the patch the same device number is reported as is used in
scsi_read():

  Device 0: (1:0) Vendor: ATA Prod.: Crucial_CT128M55 Rev: MU01
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
  Device 1: (1:0) Vendor: ATA Prod.:  Rev:
            Type: Hard Disk
            Capacity: not available

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agotpm: simplify: tpm_set_global_lock()
Heinrich Schuchardt [Tue, 5 Feb 2019 00:38:41 +0000 (01:38 +0100)]
tpm: simplify: tpm_set_global_lock()

When in pack_byte_string() memcpy() is called for size 0 the source buffer
address has no relevance. So we can use NULL here.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoconfigs: ls1021a: enable sata configs for all ls1021a defconfigs
Peng Ma [Wed, 30 Jan 2019 11:19:40 +0000 (19:19 +0800)]
configs: ls1021a: enable sata configs for all ls1021a defconfigs

Add CONFIG_AHCI CONFIG_SATA_CEVA CONFIG_DM_SCSI for some ls1021a
defconfigs that missing one of them or more.
enable CONFIG_DM_MMC for some defconfigs to support CONFIG_BLK
Support sata for all ls1021a defconfigs

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoconfigs: ls1012afrwy: enable sata configs for all ls1012afrwy defconfigs
Peng Ma [Wed, 30 Jan 2019 11:18:43 +0000 (19:18 +0800)]
configs: ls1012afrwy: enable sata configs for all ls1012afrwy defconfigs

Add CONFIG_AHCI CONFIG_SATA_CEVA CONFIG_DM_SCSI for some ls1012afrwy
and ls1012afrwy defconfigs that missing one of them or more.
Support sata for all ls1012afrwy defconfigs

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>