platform/kernel/u-boot.git
4 years agoMerge tag '2020-01-20-ti-2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Mon, 20 Jan 2020 19:54:55 +0000 (14:54 -0500)]
Merge tag '2020-01-20-ti-2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

K3 J721E:
* DMA support.
* MMC and ADMA support.
* EEPROM support.
* J721e High Security EVM support.
* USB DT nodes

K3 AM654:
* Fixed boot due to pmic probe error.
* USB support and DT nodes.
* ADMA support

DRA7xx/AM57xx:
* BBAI board support
* Clean up of net platform code under board/ti

AM33/AM43/Davinci:
* Reduce SPL size for omap3 boards.
* SPL DT support for da850-lcdk
* PLL divider fix for AM335x

4 years agoMerge tag 'u-boot-stm32-20200117' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Mon, 20 Jan 2020 19:54:42 +0000 (14:54 -0500)]
Merge tag 'u-boot-stm32-20200117' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- stm32mp1: split SOC and board and cleanup config

4 years agoMerge branch '2020-01-17-reduce-size-of-common-h-even-more'
Tom Rini [Mon, 20 Jan 2020 17:23:33 +0000 (12:23 -0500)]
Merge branch '2020-01-17-reduce-size-of-common-h-even-more'

- Bring in Simon Glass's series that reduces what we have in <common.h>
  even more.

4 years agogitlab/azure: Update to latest container tag
Tom Rini [Fri, 17 Jan 2020 18:07:23 +0000 (13:07 -0500)]
gitlab/azure: Update to latest container tag

- Based on bionic-20200112 tag from Ubuntu
- Add graphviz (Heinrich)

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoarm: omap: fix MPU DPLL divisor for 800MHz clock
Dario Binacchi [Tue, 3 Dec 2019 19:55:03 +0000 (20:55 +0100)]
arm: omap: fix MPU DPLL divisor for 800MHz clock

In locked condition CLKOUT = CLKINP * [M / (N + 1)].

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoclk: sci-clk: add slack to clk-set-rate passed to firmware
Lokesh Vutla [Fri, 17 Jan 2020 06:27:30 +0000 (11:57 +0530)]
clk: sci-clk: add slack to clk-set-rate passed to firmware

Add slack to the clock frequency parameters passed to firmware within
clk_set_rate. min-freq is changed to 0 and max-rate is changed to
ULONG_MAX. This fixes certain issues with pll clock rounding when the
firmware is not able to set the frequency exactly to the target, the
current implementation fails if the available frequency is even 1Hz off
the target. With the change, the firmware still tries its best to set
the frequency as close as possible to the target.

Reported-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoMAINTAINERS: Update ARM TI entry
Lokesh Vutla [Thu, 16 Jan 2020 07:50:05 +0000 (13:20 +0530)]
MAINTAINERS: Update ARM TI entry

Take over TI maintainership from Tom.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: am65x_evm: Enable USB keyboard as second stdin
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:36 +0000 (10:37 +0530)]
configs: am65x_evm: Enable USB keyboard as second stdin

Enable USB keyboard to be used as input device at U-Boot prompt. Both
serial and USB keyboard will be active inputs simultaneously.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoam65x_evm_a53_defconfig: Enable configs to support USB and DFU
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:35 +0000 (10:37 +0530)]
am65x_evm_a53_defconfig: Enable configs to support USB and DFU

Enable configs related to USB Host mode, Peripheral mode and DFU.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: am65x_evm: Add DFU related env variables
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:34 +0000 (10:37 +0530)]
configs: am65x_evm: Add DFU related env variables

Add env variables that set up dfu_alt_info for MMC/EMMC/OSPI. This
is required to allow update of firmware on these media.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-am654-base-board: enable USB1
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:33 +0000 (10:37 +0530)]
arm: dts: k3-am654-base-board: enable USB1

Add pinmux for USB1 and enable it as a peripheral port in U-Boot
specific dtsi since U-Boot does not support OTG.
Disable USB0 as its not available on the baseboard.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-am65-main: add USB support
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:32 +0000 (10:37 +0530)]
arm: dts: k3-am65-main: add USB support

Add support for USB0 and USB1 instances on the AM6 SoC.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agophy: omap-usb2-phy: Add support for AM654 USB2 PHY
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:31 +0000 (10:37 +0530)]
phy: omap-usb2-phy: Add support for AM654 USB2 PHY

AM654 SoC has USB2 PHY which is similar to existing USB2 PHYs on OMAP
SoCs. Add support for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agophy: omap-usb2-phy: Fix warnings when built for ARM64
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:30 +0000 (10:37 +0530)]
phy: omap-usb2-phy: Fix warnings when built for ARM64

Below warning is seen when this driver is built for devices with 64 bit
physical address space.

drivers/phy/omap-usb2-phy.c: In function ‘omap_usb2_phy_probe’:
drivers/phy/omap-usb2-phy.c:187:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   priv->phy_base = (void *)base;
                    ^
Fix this by using dev_read_addr_ptr() instead of dev_read_addr().

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodwc3-generic: Add support for AM654 USB controller
Vignesh Raghavendra [Mon, 9 Dec 2019 05:07:29 +0000 (10:37 +0530)]
dwc3-generic: Add support for AM654 USB controller

AM654 has DWC3 USB controller that is very similar to other TI SoCs. Add
a new compatible to enable the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: am65x_evm: Add Support for ADMA
Faiz Abbas [Tue, 19 Nov 2019 08:36:41 +0000 (14:06 +0530)]
configs: am65x_evm: Add Support for ADMA

Add Support for ADMA in a53 and r5 defconfigs.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoARM: dts: omap3/omap35 Torpedo and SOM-LV: Unify and shrink SPL dtb
Adam Ford [Sun, 12 Jan 2020 12:52:10 +0000 (06:52 -0600)]
ARM: dts: omap3/omap35 Torpedo and SOM-LV: Unify and shrink SPL dtb

None of these boards boot, but the solution appears to be the same.
All the boards have SPL that is too large.  With a few defconfig
options removed, these corresponding options can be removed from
their respective SPL dtb files.

This patch unifies the DM37/OMAP35 boards' -u-boot.dtsi files
to remove gpio's, i2c, bandgap, thermal zones, unneeded uarts, and
unneeded MMC nodes.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: omap3/35_logic and omap3/35_logic_somlv: Reduce SPL size
Adam Ford [Sun, 12 Jan 2020 12:52:09 +0000 (06:52 -0600)]
configs: omap3/35_logic and omap3/35_logic_somlv: Reduce SPL size

Currently the DM37 and OMAP35 boards do not boot due to SPL
bring too large.

SPL doesn't need GPIO, I2C nor MMC sector access since it uses
a FAT file system.

This patch unifies all these boards to remove these unused features
from their defconfigs

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: Add configs for J721e High Security EVM
Andrew F. Davis [Fri, 10 Jan 2020 19:35:23 +0000 (14:35 -0500)]
configs: Add configs for J721e High Security EVM

Add new defconfig files for the J721e High Security EVM.

These defconfigs are the same as for the non-secure part, except for:
    CONFIG_TI_SECURE_DEVICE option set to 'y'
    CONFIG_FIT_IMAGE_POST_PROCESS option set to 'y'
    CONFIG_SPL_FIT_IMAGE_POST_PROCESS option set to 'y'
    CONFIG_BOOTCOMMAND uses FIT images for booting

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: K3: Increase default SYSFW image size allocation
Andrew F. Davis [Fri, 10 Jan 2020 19:35:22 +0000 (14:35 -0500)]
arm: K3: Increase default SYSFW image size allocation

The memory allocated to store the FIT image containing SYSFW and board
configuration data is statically defined to the largest size expected.
This was 276000 bytes but now needs to be grown to 277000 to make room
for the slightly larger SYSFW image used on J721e High-Security devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: K3: Disable ROM configured firewalls
Andrew F. Davis [Fri, 10 Jan 2020 19:35:21 +0000 (14:35 -0500)]
arm: K3: Disable ROM configured firewalls

ROM configures certain firewalls based on its usage, which includes
the one in front of boot peripherals. In specific case of boot
peripherals, ROM does not open up the full address space corresponding
to the peripherals. Like in OSPI, ROM only configures the firewall region
for 32 bit address space and mark 64bit address space flash regions
as in-accessible.

When security-cfg is initialized by sysfw, all the non-configured
firewalls are kept in bypass state using a global setting. Since ROM
configured firewalls for certain peripherals, these will not be touched.
So when bootloader touches any of the address space that ROM marked as
in-accessible, system raises a firewall exception causing boot hang.

It would have been ideal if sysfw cleans up the ROM configured boot
peripheral firewalls. Given the memory overhead to store this
information provided by ROM and the boot time increase in re configuring
the firewalls, it is concluded to clean this up in bootloaders.

So disable all the firewalls that ROM doesn't open up the full address
space.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: K3: Fix header comment match AM6 specific file function
Andrew F. Davis [Fri, 10 Jan 2020 19:35:20 +0000 (14:35 -0500)]
arm: K3: Fix header comment match AM6 specific file function

This file used to be the common location for K3 init when AM6 was the
only device, but common code was moved to common.c and this file became
AM6 specific, correct this header text.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: ti: Factor out call to 'args_mmc' into MMC common environment
Andrew F. Davis [Fri, 10 Jan 2020 19:35:19 +0000 (14:35 -0500)]
configs: ti: Factor out call to 'args_mmc' into MMC common environment

Both 'loadfit' and 'mmcloados' start with a call to 'args_mmc' so this
can be factored out to before eithers only call site. This also allows us
to remove that call from 'loadfit', which should not have been calling it
anyway as that command should not be MMC specific. Without the call to
'args_mmc' the command 'loadfit' becomes just a call to 'run_fit' so
remove the indirection and call 'run_fit' directly, this removes the need
for 'loadfit' command (which was misnamed anyway). Drop it.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm.h: Sync J721e environment configuration with AM65x
Andrew F. Davis [Fri, 10 Jan 2020 19:35:18 +0000 (14:35 -0500)]
configs: j721e_evm.h: Sync J721e environment configuration with AM65x

Some of the environment configuration in AM65x is not available in
J721e due to additions on one but not the other. These two platforms
are similar enough these common definitions should be factored out
to a common area, prepare for this by synchronizing them.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: am57xx: env: Fix DFU variables
Sam Protsenko [Fri, 10 Jan 2020 13:11:30 +0000 (15:11 +0200)]
arm: am57xx: env: Fix DFU variables

Commit 8502fe84a4fc ("configs: am57xx_evm: define
CONFIG_SPL_LOAD_FIT_ADDRESS for SPL-DFU") implements incorrect ifdef
logic, which leads to DFU variables absence in non-SPL environment. Fix
that in order to bring back DFU variables, by reflecting the logic in
include/configs/dra7xx_evm.h.

Fixes: 8502fe84a4fc ("configs: am57xx_evm: define CONFIG_SPL_LOAD_F...")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-am654-r5-base-board: Fix power-domains for wkup_vtm0
Lokesh Vutla [Fri, 10 Jan 2020 09:31:57 +0000 (15:01 +0530)]
arm: dts: k3-am654-r5-base-board: Fix power-domains for wkup_vtm0

wkup_vtm populates only 1 power-domain cell in it's node. But the
power-domain cell are defined as 2. Due to this the following warning
comes during build:

arch/arm/dts/k3-am654-r5-base-board.dtb: Warning (power_domains_property):
/interconnect@100000/interconnect@28380000/interconnect@42040000/
wkup_vtm@42050000:power-domains: property size (8) too small for cell size 2

Fix this by updating the power-domain cells.

Fixes: cfa6bd549c ("arm: dts: k3-am654-r5-base-board: Add VTM node")
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agopower: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe
Keerthy [Fri, 10 Jan 2020 09:22:05 +0000 (14:52 +0530)]
power: regulator: tps62360_regulator: Convert ofdata_to_platdata to the missing probe

commit 29f7d05a347a ("dm: core: Move ofdata_to_platdata() call earlier")
introduces changes in the order of device_probe execution.
ofdata_to_platdata now comes before the probe function which resulted in
a deadlock and caused boot hang on AM6 devices.

Deadlock sequence: tps62360_regulator_ofdata_to_platdata --> i2c_get_chip
--> device_probe(tps62360) --> tps62360_regulator_ofdata_to_platdata

Hence convert ofdata_to_platdata to the missing probe function to fix the
hang.

Fixes: 22e8f18980d6 ("power: regulator: tps6236x: add support for tps6236x regulators")
Signed-off-by: Keerthy <j-keerthy@ti.com>
Tested-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: mach-k3: security: Clean image out of cache before authentication
Andrew F. Davis [Tue, 7 Jan 2020 23:22:29 +0000 (18:22 -0500)]
arm: mach-k3: security: Clean image out of cache before authentication

On K3 systems U-Boot runs on both an R5 and a large ARM cores (usually
A53 or A72). The large ARMs are coherent with the DMA controllers and
the SYSFW that perform authentication. And previously the R5 core did
not enable caches. Now that R5 does enable caching we need to be sure
to clean out any of the image that may still only be in cache before we
read it using external DMA for authentication.

Although not expected to happen, it may be possible that the data was
read back into cache after the flush but before the external operation,
in this case we must invalidate our stale local cached version.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: mach-k3: Warn when node to disable is not found
Andrew F. Davis [Tue, 7 Jan 2020 23:12:40 +0000 (18:12 -0500)]
arm: mach-k3: Warn when node to disable is not found

Not finding a node that we try to disable does not always need to be
fatal to boot but should at least print out a warning. Return error
from fdt_disable_node as it did fail to disable the node, but only
warn in the case of disabling the TRNG as this will not prevent boot.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodefconfigs: am43xx_hs_evm: Sync HS and non-HS defconfigs
Andrew F. Davis [Tue, 7 Jan 2020 21:27:52 +0000 (16:27 -0500)]
defconfigs: am43xx_hs_evm: Sync HS and non-HS defconfigs

Sync new additions to non-HS defconfig with HS defconfig.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodefconfigs: am335x_hs_evm: Sync HS and non-HS defconfigs
Andrew F. Davis [Tue, 7 Jan 2020 21:24:14 +0000 (16:24 -0500)]
defconfigs: am335x_hs_evm: Sync HS and non-HS defconfigs

Sync new additions to non-HS defconfig with HS defconfig.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm_a72_defconfig: Enable I2C and EEPROM support
Vignesh Raghavendra [Tue, 7 Jan 2020 07:45:57 +0000 (13:15 +0530)]
configs: j721e_evm_a72_defconfig: Enable I2C and EEPROM support

Enable I2C and EEPROM related configs for A72 SPL/U-Boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm64: dts: k3-j721e-common-proc-board: Fully enable wkup_i2c0 use
Andreas Dannenberg [Tue, 7 Jan 2020 07:45:56 +0000 (13:15 +0530)]
arm64: dts: k3-j721e-common-proc-board: Fully enable wkup_i2c0 use

Make the wkup_i2c0 module usable across all stages of U-Boot by adding
the needed definitions including the associated pinmux definitions.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: j721e: Print board name and version during boot
Lokesh Vutla [Tue, 7 Jan 2020 07:45:55 +0000 (13:15 +0530)]
board: ti: j721e: Print board name and version during boot

Print the board name and ver along with the DT Model.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: j721e: Use EEPROM-based board detection
Andreas Dannenberg [Tue, 7 Jan 2020 07:45:54 +0000 (13:15 +0530)]
board: ti: j721e: Use EEPROM-based board detection

The TI J721E EVM system on module (SOM), the common processor board, and
the associated daughtercards have on-board I2C-based EEPROMs containing
board config data. Use the board detection infrastructure to do the
following:

1) Parse the J721E SOM EEPROM and populate items like board name, board
   HW and SW revision as well as board serial number into the TI common
   EEPROM data structure residing in SRAM scratch space
2) Check for presence of daughter card(s) by probing associated I2C
   addresses used for on-board EEPROMs containing daughter card-specific
   data. If such a card is found, parse the EEPROM data such as for
   additional Ethernet MAC addresses and populate those into U-Boot
   accordingly
3) Dynamically apply daughter card DTB overlays to the U-Boot (proper)
   DTB during SPL execution
4) Dynamically create an U-Boot ENV variable called name_overlays
   during U-Boot execution containing a list of daugherboard-specific
   DTB overlays based on daughercards found to be used during Kernel
   boot.

This patch adds support for the J721E system on module boards containing
the actual SoC ("J721EX-PM2-SOM", accessed via CONFIG_EEPROM_CHIP_ADDRESS),
the common processor board ("J7X-BASE-CPB"), the Quad-Port Ethernet
Expansion Board ("J7X-VSC8514-ETH"), the infotainment board
("J7X-INFOTAN-EXP") as well as for the gateway/Ethernet switch/industrial
expansion board ("J7X-GESI-EXP").

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoti: common: board_detect: Handle EEPROM probe more gracefully
Andreas Dannenberg [Tue, 7 Jan 2020 07:45:53 +0000 (13:15 +0530)]
ti: common: board_detect: Handle EEPROM probe more gracefully

Use dm_i2c_probe() rather than i2c_get_chip() when trying to access
board-detection EEPROM devices. This has the advantage of more gracefully
handling the case when the EEPROM is not present by allowing to exit the
function early rather than failing and outputting an error message on the
I2C transactions that follow.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: beagleboneai: enable in am57xx_evm_defconfig
Caleb Robey [Thu, 2 Jan 2020 14:17:29 +0000 (08:17 -0600)]
board: ti: beagleboneai: enable in am57xx_evm_defconfig

Adding the configurations to the evm_defconfig file

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: beagleboneai: add dts file
Jason Kridner [Thu, 2 Jan 2020 14:17:28 +0000 (08:17 -0600)]
board: ti: beagleboneai: add dts file

BeagleBoard.org BeagleBone AI is an open source hardware single board
computer based on the Texas Instruments AM5729 SoC featuring dual-core
1.5GHz Arm Cortex-A15 processor, dual-core C66 digital signal
processor (DSP), quad-core embedded vision engine (EVE), Arm Cortex-M4
processors, dual programmable realtime unit industrial control
subsystems and more. The board features 1GB DDR3L, USB3.0 Type-C, USB
HS Type-A, microHDMI, 16GB eMMC flash, 1G Ethernet, 802.11ac 2/5GHz,
Bluetooth, and BeagleBone expansion headers.

For more information, refer to:
https://beaglebone.ai

The corresponding patch against the mainline linux kernel can be found
at: https://patchwork.kernel.org/patch/11254903/

This patch introduces the BeagleBone AI device tree.

Note that the device use the "ti,tpd12s016" component which is software
compatible with "ti,tpd12s015". Thus we only use the latter driver.

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: beagleboneai: add initial support
Caleb Robey [Thu, 2 Jan 2020 14:17:27 +0000 (08:17 -0600)]
board: ti: beagleboneai: add initial support

These are necessities for beaglebone ai boot. There is the addition of
CONFIG_SUPPORT_EMMC_CONFIG to the Kconfig file. This is present upstream
but not in 19.01 yet.

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: beagleboneai: IODELAY and pinmux
Caleb Robey [Thu, 2 Jan 2020 14:17:26 +0000 (08:17 -0600)]
board: ti: beagleboneai: IODELAY and pinmux

This patch configures the pinmux settings for the BeagleBone AI after
the emmc read has completed.

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: beagleboneai: emmc read changes
Caleb Robey [Thu, 2 Jan 2020 14:17:25 +0000 (08:17 -0600)]
board: ti: beagleboneai: emmc read changes

BeagleBoard.org BeagleBone AI rev A1 does not include a board
identifier I2C EEPROM due to a design oversight. These boards have
been put into production and are generally available now.

The board identifier information, however, has been included in the
second eMMC linear boot partition (/dev/mmcblk1boot1).

This patch works by:
* First, looking for a board identifier I2C EEPROM and if not found,
* Then seeing if the boot mode matches BeagleBone AI with eMMC in the
  boot chain to make sure we don't enable eMMC pinmuxes on boards
  that don't support it, and
* Finally, initializes the eMMC pins and reading the header.

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm: Add configs for environment in eMMC
Faiz Abbas [Thu, 16 Jan 2020 14:12:24 +0000 (19:42 +0530)]
configs: j721e_evm: Add configs for environment in eMMC

Add config to save and read back environment from eMMC.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm_a72: Add Support for GPT partitions
Faiz Abbas [Thu, 16 Jan 2020 14:12:23 +0000 (19:42 +0530)]
configs: j721e_evm_a72: Add Support for GPT partitions

Introduce a default GPT partition table for eMMC.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm: Add configs for ADMA Support
Faiz Abbas [Thu, 16 Jan 2020 14:12:22 +0000 (19:42 +0530)]
configs: j721e_evm: Add configs for ADMA Support

Add configs for ADMA Support.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-j721e-common-proc-board: Add pinmux for SD card
Faiz Abbas [Thu, 16 Jan 2020 14:12:21 +0000 (19:42 +0530)]
arm: dts: k3-j721e-common-proc-board: Add pinmux for SD card

Add pinmux for sdhci1 node connected to the SD card.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-j721e-common-proc-board: Remove voltage-ranges from sdhci nodes
Faiz Abbas [Thu, 16 Jan 2020 14:12:20 +0000 (19:42 +0530)]
arm: dts: k3-j721e-common-proc-board: Remove voltage-ranges from sdhci nodes

voltage-ranges properties are NOP. Remove them.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agommc: am654_sdhci: Add Support for configuring PHY in J721e
Faiz Abbas [Thu, 16 Jan 2020 14:12:19 +0000 (19:42 +0530)]
mmc: am654_sdhci: Add Support for configuring PHY in J721e

Add Support for writing to PHY registers for J721e. There are number of
differences between the J721e 8 bit PHY, J721e 4 bit PHY and AM654 PHY.
Create a driver_data structure with an ops and flags field and use the
flags field to indicate these differences. The differences are as
follows:

1. The J721e 4 bit instance PHY does not have a DLL. Introduce a
DLL_PRESENT flag to make sure that DLL related registers are accessed
only where they are present. Also add a separate set_ios_post()
callback.

2. The J721e 8 bit instance is not muxed with anything else inside the
SoC and hence the IOMUX_ENABLE filed does not exist. Add a flag which is
used to indicate the presence of this field.

3. The register field used to select DLL frequency is 3 bit wide in
J721e as compared to 2 bits in AM65x. Add another flag that
distinguishes these fields.

4. The strobe select field is 8 bit wide as compared to 4 bit wide for
AM65x. Add yet another flag to indicate this difference. Strobe select
is used only for HS400 speed mode, support for which has not been added
in AM65x.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agommc: am654_sdhci: Get Xin clock by name
Faiz Abbas [Thu, 16 Jan 2020 14:12:18 +0000 (19:42 +0530)]
mmc: am654_sdhci: Get Xin clock by name

Get clk_xin by name instead of by index to avoid having to put clocks in
the same order in all devices.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Fix build warnings when building for 32 bit platforms
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:39 +0000 (10:25 +0530)]
dma: ti: k3-udma: Fix build warnings when building for 32 bit platforms

Cast pointers properly so as to avoid warnings when driver is built for
32 bit platforms

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Fix ring push operation for 32 bit cores
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:38 +0000 (10:25 +0530)]
dma: ti: k3-udma: Fix ring push operation for 32 bit cores

UDMA always expects 64 bit address pointer of the transfer descriptor in
the Ring. But on 32 bit cores like R5, pointer is always 32 bit in size.
Therefore copy over 32 bit pointer value to 64 bit variable before
pushing it over to the ring, so that upper 32 bits are 0s.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Switch to exposed ring mode
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:37 +0000 (10:25 +0530)]
dma: ti: k3-udma: Switch to exposed ring mode

Exposed ring mode works well with 32 bit and 64 bit cores without need
for Proxies for 32 bit cores. Therefore switch to exposed ring mode.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Fix debug prints during enabling MEM_TO_DEV transfers
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:36 +0000 (10:25 +0530)]
dma: ti: k3-udma: Fix debug prints during enabling MEM_TO_DEV transfers

Fix up the debug prints that were dumping state of TCHAN RT registers to
use tchan for MEM_TO_DEV transfers.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Remove coherency check for cache ops
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:35 +0000 (10:25 +0530)]
dma: ti: k3-udma: Remove coherency check for cache ops

Remove redundant coherency checks before calling cache ops in UDMA
driver. This is now handled in arch specific cache operation
implementation based on Kconfig option

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agosoc: ti: k3-navss-ringacc: Get SYSFW reference from DT phandle
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:34 +0000 (10:25 +0530)]
soc: ti: k3-navss-ringacc: Get SYSFW reference from DT phandle

Instead of looking getting reference to SYSFW device using name which
is not guaranteed to be constant, use phandle supplied in the DT node to
get reference to SYSFW

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agosoc: ti: k3-navss-ringacc: Flush/invalidate caches on ring push/pop
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:33 +0000 (10:25 +0530)]
soc: ti: k3-navss-ringacc: Flush/invalidate caches on ring push/pop

Flush caches when pushing an element to ring and invalidate caches when
popping an element from ring in Exposed Ring mode. Otherwise DMA
transfers don't work properly in R5 SPL (with caches enabled) where the
core is not in coherency domain.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agodma: ti: k3-udma: Query DMA channels allocated from Resource Manager
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:32 +0000 (10:25 +0530)]
dma: ti: k3-udma: Query DMA channels allocated from Resource Manager

On K3 SoCs, DMA channels are shared across multiple entities, therefore
U-Boot DMA driver needs to query resource range from centralised
resource management controller i.e SystemFirmware and use DMA channels
allocated for A72 host. Add support for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agolib: Import few bitmap functions from Linux
Vignesh Raghavendra [Mon, 9 Dec 2019 04:55:31 +0000 (10:25 +0530)]
lib: Import few bitmap functions from Linux

Import few basic bitmap functions (bitmap_{weight,fill,set,clear,or}())
and their dependencies from Linux. These are required for upcoming DMA
resource allocation support for TI's K3 SoCs.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: am43xx: remove net platform code
Grygorii Strashko [Fri, 22 Nov 2019 17:26:31 +0000 (19:26 +0200)]
board: ti: am43xx: remove net platform code

The TI AM43xx platform has DM_ETH and OF_CONTROL enabled,
so remove networking platform code.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard: ti: dra7-evm: remove net platform code
Grygorii Strashko [Fri, 22 Nov 2019 17:26:17 +0000 (19:26 +0200)]
board: ti: dra7-evm: remove net platform code

The DRA7 has DM_ETH and OF_CONTROL enabled, so remove networking platform
code.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoARM: dts: da850-lcdk: Update DTS files for SPL device tree support
Adam Ford [Wed, 13 Nov 2019 15:46:32 +0000 (09:46 -0600)]
ARM: dts: da850-lcdk: Update DTS files for SPL device tree support

Currently, the da850-lcdk uses SPL_OF_PLATDATA and manually loads
the necessary source code instead of using the auto-generated,
because the drivers don't properly autogenerate the code.

This patch simply enables the various device tree options to
mimic the da850-evm which doesn't need or use OF_PLATDATA for
device tree support.  It does not disable OF_PLATDATA.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agothermal: ti-bandgap: Fix adc value datatype
Faiz Abbas [Mon, 11 Nov 2019 09:45:30 +0000 (15:15 +0530)]
thermal: ti-bandgap: Fix adc value datatype

The CORE_TEMP_SENSOR_MPU register gives a raw adc value which needs to
be indexed into a lookup table to get the actual temperature. Fix the
naming and datatype of the adc value variable.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoconfigs: j721e_evm_a72_defconfig: Enable USB related configs
Vignesh Raghavendra [Mon, 18 Nov 2019 13:46:36 +0000 (19:16 +0530)]
configs: j721e_evm_a72_defconfig: Enable USB related configs

Enable USB host and device related configs.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-j721e: Add DT nodes for USB
Vignesh Raghavendra [Mon, 18 Nov 2019 13:46:35 +0000 (19:16 +0530)]
arm: dts: k3-j721e: Add DT nodes for USB

J721e has two instances of Cadence USB3 controller. Add DT nodes for the
same. USB0 is configured to device mode and USB1 is configured to host
mode. For now only high speed mode is supported.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoenvironment: ti: Add DFU environment variables k3_dfu.h
Vignesh Raghavendra [Mon, 18 Nov 2019 13:46:34 +0000 (19:16 +0530)]
environment: ti: Add DFU environment variables k3_dfu.h

Setup env variables for updating firmwares on eMMC/OSPI/MMC via DFU

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agocommon: Update comment to show progress
Simon Glass [Sat, 28 Dec 2019 17:45:12 +0000 (10:45 -0700)]
common: Update comment to show progress

This file doesn't include any declarations anymore but it does include
other headers. Update the header comment to mention this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Collect all the header files together
Simon Glass [Sat, 28 Dec 2019 17:45:11 +0000 (10:45 -0700)]
common: Collect all the header files together

There are many header files included here. Put them all together since the
blank lines are not useful.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move and rename CONFIG_SYS_SUPPORT_64BIT_DATA
Simon Glass [Sat, 28 Dec 2019 17:45:10 +0000 (10:45 -0700)]
common: Move and rename CONFIG_SYS_SUPPORT_64BIT_DATA

This is not really a CONFIG since it is not intended to be set by boards.
Move it into the compiler header with other similar defines, and rename
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move ROUND() into kernel.h
Simon Glass [Sat, 28 Dec 2019 17:45:09 +0000 (10:45 -0700)]
common: Move ROUND() into kernel.h

Move this macro in with all the other rounding macros.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move check_member() to kernel.h
Simon Glass [Sat, 28 Dec 2019 17:45:08 +0000 (10:45 -0700)]
common: Move check_member() to kernel.h

The kernel.h file has a number of useful macros including a few related
to structures. Move check_member() there too.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move hang() to the same header as panic()
Simon Glass [Sat, 28 Dec 2019 17:45:07 +0000 (10:45 -0700)]
common: Move hang() to the same header as panic()

At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Migrate a few more files]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agocommon: Move testdram() into init.h
Simon Glass [Sat, 28 Dec 2019 17:45:06 +0000 (10:45 -0700)]
common: Move testdram() into init.h

This function is called during init so move it to the init header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move RAM-sizing functions to init.h
Simon Glass [Sat, 28 Dec 2019 17:45:05 +0000 (10:45 -0700)]
common: Move RAM-sizing functions to init.h

These functions relate to memory init so move them into the init
header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Rename and move source()
Simon Glass [Sat, 28 Dec 2019 17:45:04 +0000 (10:45 -0700)]
common: Rename and move source()

This function has a very generic name which does not adequately describe
its purpose. Rename it and move it to image.h, since it relates to reading
a script from an image.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move the image globals into image.h
Simon Glass [Sat, 28 Dec 2019 17:45:03 +0000 (10:45 -0700)]
common: Move the image globals into image.h

These three globals relate to image handling. Move them to the image
header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoimage: Rename load_addr, save_addr, save_size
Simon Glass [Sat, 28 Dec 2019 17:45:02 +0000 (10:45 -0700)]
image: Rename load_addr, save_addr, save_size

These global variables are quite short and generic. In fact the same name
is more often used locally for struct members and function arguments.

Add a image_ prefix to make them easier to distinguish.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move reset_cpu() to the CPU header
Simon Glass [Sat, 28 Dec 2019 17:45:01 +0000 (10:45 -0700)]
common: Move reset_cpu() to the CPU header

Move this function out of common.h and into a relevant header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move reset_misc() function to arch header
Simon Glass [Sat, 28 Dec 2019 17:45:00 +0000 (10:45 -0700)]
common: Move reset_misc() function to arch header

This function is only used on ARM devices. Move it out of the common file
and to a arch-specific header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move get_tbclk() to time.h
Simon Glass [Sat, 28 Dec 2019 17:44:59 +0000 (10:44 -0700)]
common: Move get_tbclk() to time.h

This function related to timer and most of the timer functions are in
time.h, so move this function there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move clock functions into a new file
Simon Glass [Sat, 28 Dec 2019 17:44:58 +0000 (10:44 -0700)]
common: Move clock functions into a new file

These three clock functions don't use driver model and should be migrated.
In the meantime, create a new file to hold them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move upmconfig() to ppc.h
Simon Glass [Sat, 28 Dec 2019 17:44:57 +0000 (10:44 -0700)]
common: Move upmconfig() to ppc.h

This file is only used by PowerPC so move it to an arch-specific header
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move ll_boot_init() to init.h
Simon Glass [Sat, 28 Dec 2019 17:44:56 +0000 (10:44 -0700)]
common: Move ll_boot_init() to init.h

This is an init-related function so belongs in that file. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: arm: Move s_init() to an ARM-specific header
Simon Glass [Sat, 28 Dec 2019 17:44:55 +0000 (10:44 -0700)]
common: arm: Move s_init() to an ARM-specific header

This function is only used on ARM devices so does not belong in the global
common header file. Move it to an ARM header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move device-tree setup functions to fdt_support.h
Simon Glass [Sat, 28 Dec 2019 17:44:54 +0000 (10:44 -0700)]
common: Move device-tree setup functions to fdt_support.h

These functions relate to setting up the device tree for booting the OS.
The fdt_support.h header file supports similar functions, so move these
there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move type declarations to linux/types.h
Simon Glass [Sat, 28 Dec 2019 17:44:53 +0000 (10:44 -0700)]
common: Move type declarations to linux/types.h

This file already has lots of type declarations so it seems better to put
all of them there.

Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop the symbol_lookup() declaration
Simon Glass [Sat, 28 Dec 2019 17:44:52 +0000 (10:44 -0700)]
common: Drop the symbol_lookup() declaration

This function is not called anywhere so we can drop the declaration. If
it is needed one day, it should be added in its own header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop CONFIG_HAS_POST
Simon Glass [Sat, 28 Dec 2019 17:44:51 +0000 (10:44 -0700)]
common: Drop CONFIG_HAS_POST

This only exists to control whether the post/ directory is build. It is
just as easy to check this in the Makefile. Remove CONFIG_HAS_POST and use
an ifdef in the Makefile instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop CONFIG_POST_STD/ALT_LIST
Simon Glass [Sat, 28 Dec 2019 17:44:50 +0000 (10:44 -0700)]
common: Drop CONFIG_POST_STD/ALT_LIST

These CONFIG options are not used anymore. CONFIG_POST_ALT_LIST just
causes CONFIG_POST_STD_LIST to be set and it causes tests.c to be
compiled. So just make compiling tests.c unconditional.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move CONFIG_SYS_DEF_EEPROM_ADDR out of common.h
Simon Glass [Sat, 28 Dec 2019 17:44:49 +0000 (10:44 -0700)]
common: Move CONFIG_SYS_DEF_EEPROM_ADDR out of common.h

This define seems better suited to the eeprom header file, particularly
as it is only used in the eeprom.c file.

Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move reset_phy() to net.h
Simon Glass [Sat, 28 Dec 2019 17:44:48 +0000 (10:44 -0700)]
common: Move reset_phy() to net.h

This is a network function so let's move it into that header.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop floppy disk support
Simon Glass [Sat, 28 Dec 2019 17:44:47 +0000 (10:44 -0700)]
common: Drop floppy disk support

This seems pretty old now. It has not been converted to driver model and
is not used by any boards.

Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move jumptable_init() out of common.h
Simon Glass [Sat, 28 Dec 2019 17:44:46 +0000 (10:44 -0700)]
common: Move jumptable_init() out of common.h

This function is defined in exports.c so move it to its header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocommon: Move relocate_code() to init.h
Simon Glass [Sat, 28 Dec 2019 17:44:45 +0000 (10:44 -0700)]
common: Move relocate_code() to init.h

This is an init function so move it out of the common header. Avoid using
the typedef so that we don't have to include the global_data header file.

Also tidy up the function style in comments while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move functions for loading from fat/ext2 to fs.h
Simon Glass [Sat, 28 Dec 2019 17:44:44 +0000 (10:44 -0700)]
common: Move functions for loading from fat/ext2 to fs.h

These are filesystem functions and belong in the filesystem header file.
Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move do_tftpb() to net.h
Simon Glass [Sat, 28 Dec 2019 17:44:43 +0000 (10:44 -0700)]
common: Move do_tftpb() to net.h

This function belongs in the network header file. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move embedded fdt location to fdtdec.h
Simon Glass [Sat, 28 Dec 2019 17:44:42 +0000 (10:44 -0700)]
common: Move embedded fdt location to fdtdec.h

These declarations are only used in fdtdec.c so move them to its header
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Drop checkflash() and checkdram()
Simon Glass [Sat, 28 Dec 2019 17:44:41 +0000 (10:44 -0700)]
common: Drop checkflash() and checkdram()

These functions are not used in U-Boot. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move flash_perror() to flash.h
Simon Glass [Sat, 28 Dec 2019 17:44:40 +0000 (10:44 -0700)]
common: Move flash_perror() to flash.h

This function belongs more in flash.h than common.h so move it.

Also remove the space before the bracket in some calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agocommon: Move main_loop() to init.h
Simon Glass [Sat, 28 Dec 2019 17:44:39 +0000 (10:44 -0700)]
common: Move main_loop() to init.h

Move this function out of common.h and into a better place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agocommon: Drop mdm_init()
Simon Glass [Sat, 28 Dec 2019 17:44:38 +0000 (10:44 -0700)]
common: Drop mdm_init()

This is not used in U-Boot. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoMerge branch '2020-01-17-improve-aes-support'
Tom Rini [Fri, 17 Jan 2020 18:23:32 +0000 (13:23 -0500)]
Merge branch '2020-01-17-improve-aes-support'

- Add support and tests for AES192 and AES256