platform/kernel/u-boot.git
3 years agoMerge tag 'u-boot-atmel-2021.04-a' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 12 Jan 2021 14:32:20 +0000 (09:32 -0500)]
Merge tag 'u-boot-atmel-2021.04-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel features for 2021.04 cycle

This feature set includes the new board SAMA7G5 EK, the new evaluation
kit for Microchip AT91 SAMA7G5 SoC . The current board support includes
two configurations for booting from eMMC (SDMMC0), SD-Card (SDMMC1), and
support for two Ethernet interfaces.

3 years agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Tue, 12 Jan 2021 02:23:59 +0000 (21:23 -0500)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

- Pinecube board support
- 64-bit FEL support
- mkimage support for eGON images (superseding mksunxiboot)
- Bluetooth BD address generation
- some fixes

3 years agosunxi: board: add a config option to fixup a Bluetooth address
Andre Heider [Fri, 1 Oct 2021 18:29:00 +0000 (19:29 +0100)]
sunxi: board: add a config option to fixup a Bluetooth address

Some Bluetooth controllers, like the BCM4345C5 of the Orange Pi 3,
ship with the controller default address.

Add a config option to fix it up so it can function properly.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Ondrej Jirman <megous@megous.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
[rebased]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: board: extract creating a unique sid into a helper function
Andre Heider [Fri, 1 Oct 2021 18:29:00 +0000 (19:29 +0100)]
sunxi: board: extract creating a unique sid into a helper function

Refactor setup_environment() so we can use the created sid for a
Bluetooth address too.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[rebased]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: dram: h6: Improve DDR3 config detection
Jernej Skrabec [Thu, 12 Mar 2020 17:46:00 +0000 (17:46 +0000)]
sunxi: dram: h6: Improve DDR3 config detection

It turns out that in rare cases, current analytical approach to detect
correct DRAM bus width and rank on H6 doesn't work. On some TV boxes
with DDR3, incorrect DRAM configuration triggers write leveling error
which immediately stops initialization process. Exact reason why this
error appears isn't known. However, if correct configuration is used,
initalization works without problem.

In order to fix this issue, simply try another configuration when any
kind of error appears during initialization, not just those related to
rank and bus width.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Tested-by: Thomas Graichen <thomas.graichen@googlemail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: board: Move USB ethernet initialization to board_late_init()
Andy Shevchenko [Tue, 8 Dec 2020 15:45:31 +0000 (17:45 +0200)]
sunxi: board: Move USB ethernet initialization to board_late_init()

For the sake of consistency (*) and order of initialization, i.e.
after we have got the ethernet address, interrupt and timer initialized,
try to initialize USB ethernet gadget.

*) for example, zynqmp uses same order.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Add arm64 FEL support
Andre Przywara [Tue, 23 Aug 2016 21:19:30 +0000 (22:19 +0100)]
sunxi: Add arm64 FEL support

So far we did not support the BootROM based FEL USB debug mode on the
64-bit builds for Allwinner SoCs: The BootROM is using AArch32, but the
SPL runs in AArch64.
Returning back to AArch32 was not working as expected, since the RMR
reset into 32-bit mode always starts execution in the BootROM, but not
in the FEL routine.

After some debug and research and with help via IRC, the CPU hotplug
mechanism emerged as a solution: If a certain R_CPUCFG register contains
some magic, the BootROM will immediately branch to an address stored in
some other register. This works well for our purposes.

Enable the FEL feature by providing early AArch32 code to first save the
FEL state, *before* initially entering AArch64.
If we eventually determine that we should return to FEL, we reset back
into AArch32, and use the CPU hotplug mechanism to run some small
AArch32 code snippet that restores the initially saved FEL state.

That allows the normal AArch64 SPL build to be loaded via the sunxi-fel
tool, with it returning into FEL mode, so that other payloads can be
transferred via FEL as well.

Tested on A64, H5 and H6.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Priit Laes <plaes@plaes.org> (on Olimex A64-Olinuxino)
3 years agosunxi: Fix is_boot0_magic macro
Andre Przywara [Wed, 4 Nov 2020 01:00:31 +0000 (01:00 +0000)]
sunxi: Fix is_boot0_magic macro

The is_boot0_magic macro is missing parentheses around the macro
argument, breaking any usage with a more complex argument.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Use mkimage for SPL boot image generation
Andre Przywara [Thu, 20 Dec 2018 15:41:34 +0000 (15:41 +0000)]
sunxi: Use mkimage for SPL boot image generation

Switch the SPL boot image generation from using mksunxiboot to the new
sunxi_egon format of mkimage.

Verified to create identical results for all 152 Allwinner boards.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Samuel Holland <samuel@sholland.org>
3 years agotools: mkimage: Add Allwinner eGON support
Andre Przywara [Thu, 20 Dec 2018 01:15:18 +0000 (01:15 +0000)]
tools: mkimage: Add Allwinner eGON support

So far we used the separate mksunxiboot tool for generating a bootable
image for Allwinner SPLs, probably just for historical reasons.

Use the mkimage framework to generate a so called eGON image the
Allwinner BROM expects.
The new image type is called "sunxi_egon", to differentiate it
from the (still to be implemented) secure boot TOC0 image.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosunxi: Factor out eGON BROM header description
Andre Przywara [Tue, 17 Nov 2020 23:36:05 +0000 (23:36 +0000)]
sunxi: Factor out eGON BROM header description

To be able to easily share the Allwinner eGON BROM header structure
between the tools and the SPL code, move the struct definition into a
separate header file.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
3 years agosunxi: add PineCube board
Icenowy Zheng [Wed, 18 Nov 2020 10:27:00 +0000 (10:27 +0000)]
sunxi: add PineCube board

PineCube is an IP camera development kit released by Pine64.

It comes with the following compoents:

- A mainboard with Sochip S3 SoC, a 16MByte SPI Flash, AXP209 PMIC,
a power-only microUSB connector, a USB Type-A connector, a 10/100Mbps
Ethernet port and FPC connectors for camera and daughter board.
- An OV5640-based camera module which is connected to the parallel CSI
bus of the mainboard.
- A daughterboard with several buttons, a SD slot, some IR LEDs, a
microphone and a speaker connector.

As the device tree is synchronized in a previous commit, just add it to
Makefile, create a new MAINTAINER item and provide a defconfig.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoMerge branch 'next'
Tom Rini [Mon, 11 Jan 2021 18:55:03 +0000 (13:55 -0500)]
Merge branch 'next'

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoPrepare v2021.01
Tom Rini [Mon, 11 Jan 2021 18:11:43 +0000 (13:11 -0500)]
Prepare v2021.01

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoxea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)
Lukasz Majewski [Sat, 26 Dec 2020 00:09:02 +0000 (01:09 +0100)]
xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)

On the XEA board (imx28) one needs in the SPL support for GPIO, MMC and
SPI. Two last ones are necessary for booting the device. The GPIO support
allows deciding which medium will be used. For example the GPIO DTS node
(gpio@0 at imx28.dtsi) has pinctrl parent (pinctrl@80018000) for which we
don't need driver asigned for correct operation.
In the spl/dts/dt-platdata.c the gpio@0 has index 4 and its parent -
pinctrl@80018000 has index 5.

In the bind_drivers_pass() function (at drivers/core/lists.c) call to
device_bind_by_name() for `fsl_imx23_pinctrl` returns -2, which is
expected.

With current setup - when the SPL_OF_PLATDATA_PARENT=y
The gpio@0 node with index 4 is skipped as its parent with 5 is not yet
bound. It cannot be as we don't need and provide the driver for it.
As a result the gpio@0 is never bound and we end up with bricked board in
the SPL stage.

When CONFIG_SPL_OF_PLATDATA_PARENT is NOT set, all entries from
spl/dts/dt-platdata.c are scanned in ascending index order, so gpio@0 is
properly initialized. For `fsl_imx_pinctrl` we simply check 10 times if
the driver for is available (which is not) and exit.

As a result the GPIOs are initialized and can be used in early SPL stage.
This commit fixes XEA regression introduced with e41651fffda7da55f6.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoxea: config: Use CONFIG_PREBOOT from Kconfig
Lukasz Majewski [Sat, 26 Dec 2020 00:09:01 +0000 (01:09 +0100)]
xea: config: Use CONFIG_PREBOOT from Kconfig

The usage of the preboot feature is now controlled via a separate Kconfig
option - namely CONFIG_USE_PREBOOT.
It must be enabled for preboot code executing commands now defined in
CONFIG_PREBOOT (also moved to the Kconfig).

After defining both CONFIG_USE_PREBOOT and CONFIG_PREBOOT in
imx28_xea_defconfig the define of CONFIG_PREBOOT shall be removed from
xea.h as it is redundant.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoxea: spl: Disable pull UP for GPIO0_2{35}
Lukasz Majewski [Sat, 26 Dec 2020 00:09:00 +0000 (01:09 +0100)]
xea: spl: Disable pull UP for GPIO0_2{35}

On the imx287 pin GPMI_WRN (GPIO0_25) no PullUP is available that can be
enabled.

To get the same behavior for both boot select pins (i.e. GPIO0_2{35})
disable pull UPs on both.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agorockchip: pinebook-pro: default to SPI bus 1 for SPI-flash
Hugh Cole-Baker [Sun, 22 Nov 2020 13:03:44 +0000 (13:03 +0000)]
rockchip: pinebook-pro: default to SPI bus 1 for SPI-flash

SPI flash on this machine is located on bus 1, default to using bus 1
for SPI flash and stop aliasing it to bus 0.

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob")

3 years agoARM: dts: sama7g5ek: fix TXC pin configuration
Nicolas Ferre [Fri, 30 Oct 2020 17:33:14 +0000 (18:33 +0100)]
ARM: dts: sama7g5ek: fix TXC pin configuration

TXC line is directly connected from the SoC to the KSZ9131 PHY. There
is a transient state on this signal, before configuring it to RGMII,
which leads to packet transmit being blocked.
Keeping a pull-up when muxing this pin as function A (G0_TXCK) fixes
the issue.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
3 years agoconfigs: sama7g5ek: add i2c and eeprom
Eugen Hristev [Fri, 31 Jul 2020 12:21:45 +0000 (15:21 +0300)]
configs: sama7g5ek: add i2c and eeprom

Add drivers for flexcom, i2c and eeproms

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoboard: atmel: sama7g5ek: add support for MAC address retreival
Eugen Hristev [Fri, 31 Jul 2020 12:20:56 +0000 (15:20 +0300)]
board: atmel: sama7g5ek: add support for MAC address retreival

Obtain two MAC addresses from the two EEPROMs and configure the two
available Ethernet interfaces accordingly.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: sama7g5ek: add i2c1 bus and eeproms
Eugen Hristev [Fri, 31 Jul 2020 12:20:01 +0000 (15:20 +0300)]
ARM: dts: sama7g5ek: add i2c1 bus and eeproms

Add node for flx1 i2c1 subnode (and alias to bus 0)
This bus has two eeprom devices connected.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: at91: sama7g5: add flexcom1 and i2c subnode
Eugen Hristev [Fri, 31 Jul 2020 12:19:23 +0000 (15:19 +0300)]
ARM: dts: at91: sama7g5: add flexcom1 and i2c subnode

Add flexcom1 and i2c subnode.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoconfigs: sama7g5: add mmc config for sdmmc0
Eugen Hristev [Thu, 30 Jul 2020 13:22:53 +0000 (16:22 +0300)]
configs: sama7g5: add mmc config for sdmmc0

Add new config for storing environment from sdmmc0.
Also clean-up sama7g5ek_emmc1 to point to the proper mmc device.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoboard: atmel: sama7g5ek: clean-up header bootcommand
Eugen Hristev [Thu, 30 Jul 2020 13:21:46 +0000 (16:21 +0300)]
board: atmel: sama7g5ek: clean-up header bootcommand

Clean-up boot command to use the predefined device and part for FAT
environment.
According to this device and partition, select the proper boot media.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: at91: sama7g5ek: enable sdmmc0 with pinctrl
Eugen Hristev [Thu, 30 Jul 2020 12:52:51 +0000 (15:52 +0300)]
ARM: dts: at91: sama7g5ek: enable sdmmc0 with pinctrl

Enable sdmmc0 on this board. A non-removable eMMC is connected on this
block.
Configure pincontrol accordingly.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: at91: sama7g5: add node for sdmmc0
Eugen Hristev [Thu, 30 Jul 2020 12:52:13 +0000 (15:52 +0300)]
ARM: dts: at91: sama7g5: add node for sdmmc0

Add node for sdmmc0 block.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: at91: sama7g5: add assigned clocks for sdmmc1
Eugen Hristev [Thu, 30 Jul 2020 12:50:59 +0000 (15:50 +0300)]
ARM: dts: at91: sama7g5: add assigned clocks for sdmmc1

SDMMC1 requires clock specification with assigned-clocks, such that
the PMC will know which parent to assign and the initial start-up frequency.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoconfigs: sama7g5ek: enable CCF
Claudiu Beznea [Tue, 2 Jun 2020 12:15:55 +0000 (15:15 +0300)]
configs: sama7g5ek: enable CCF

Enable CCF for SAMA7G5.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5ek: enable support for KSZ9131
Claudiu Beznea [Tue, 9 Jun 2020 10:48:26 +0000 (13:48 +0300)]
configs: sama7g5ek: enable support for KSZ9131

Enable support for KSZ9131.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoboard: atmel: sama7g5ek: increase arp timeout and retry count
Claudiu Beznea [Tue, 9 Jun 2020 10:58:21 +0000 (13:58 +0300)]
board: atmel: sama7g5ek: increase arp timeout and retry count

Increase ARP timeout and retry count as this will increase
the speed of communication.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add GMAC1
Claudiu Beznea [Tue, 9 Jun 2020 10:53:45 +0000 (13:53 +0300)]
ARM: dts: sama7g5: add GMAC1

Add GMAC1.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add GMAC0
Claudiu Beznea [Tue, 9 Jun 2020 10:53:00 +0000 (13:53 +0300)]
ARM: dts: sama7g5: add GMAC0

Add GMAC0.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5ek: enable mii command
Claudiu Beznea [Tue, 9 Jun 2020 10:49:12 +0000 (13:49 +0300)]
configs: sama7g5ek: enable mii command

Enable mii command as ethernet's PHY specific programming is
based on it.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: at91: sama7g5ek: add pinctrl for sdmmc1 and flx3
Eugen Hristev [Thu, 4 Jun 2020 07:38:49 +0000 (10:38 +0300)]
ARM: dts: at91: sama7g5ek: add pinctrl for sdmmc1 and flx3

Add pinctrl for sdmmc1 and flx3.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: at91: sama7g5: add pinctrl node
Eugen Hristev [Thu, 4 Jun 2020 07:37:13 +0000 (10:37 +0300)]
ARM: dts: at91: sama7g5: add pinctrl node

Add pioA pinctrl node.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: sama7g5: add pit64b support
Claudiu Beznea [Tue, 2 Jun 2020 15:42:18 +0000 (18:42 +0300)]
ARM: dts: sama7g5: add pit64b support

Add DT bindings for PIT64B driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: enable autoboot
Claudiu Beznea [Tue, 2 Jun 2020 15:43:20 +0000 (18:43 +0300)]
ARM: dts: sama7g5: enable autoboot

Enable autoboot.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5: use PIT64B
Claudiu Beznea [Tue, 2 Jun 2020 15:42:59 +0000 (18:42 +0300)]
configs: sama7g5: use PIT64B

Use PIT64B driver. ATMEL_PIT is not available for SAMA7G5.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add CPU bindings
Claudiu Beznea [Tue, 2 Jun 2020 12:35:55 +0000 (15:35 +0300)]
ARM: dts: sama7g5: add CPU bindings

Add CPU DT bindings.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5: enable CONFIG_CPU
Claudiu Beznea [Tue, 2 Jun 2020 12:35:12 +0000 (15:35 +0300)]
configs: sama7g5: enable CONFIG_CPU

Enable CONFIG_CPU.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: switch to PMC bindings
Claudiu Beznea [Tue, 2 Jun 2020 12:26:12 +0000 (15:26 +0300)]
ARM: dts: sama7g5: switch to PMC bindings

Get rid of software defined MCK and switch to PMC bindings
for IPs currently present in device tree.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add PMC bindings
Claudiu Beznea [Tue, 2 Jun 2020 12:24:25 +0000 (15:24 +0300)]
ARM: dts: sama7g5: add PMC bindings

Add DT bindings for PMC driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add slow clock bindings
Claudiu Beznea [Tue, 2 Jun 2020 12:23:49 +0000 (15:23 +0300)]
ARM: dts: sama7g5: add slow clock bindings

Add DT bindings for slow clock driver.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add u-boot,dm-pre-reloc bindings for xtals
Claudiu Beznea [Tue, 2 Jun 2020 12:23:02 +0000 (15:23 +0300)]
ARM: dts: sama7g5: add u-boot,dm-pre-reloc bindings for xtals

Add dm-pre-reloc DT binding property for cristals.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: add slow rc and main rc oscillators
Claudiu Beznea [Tue, 2 Jun 2020 12:22:21 +0000 (15:22 +0300)]
ARM: dts: sama7g5: add slow rc and main rc oscillators

Add slow rc and main rc oscillators to dtsi.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoARM: dts: sama7g5: move clock frequencies for xtals in board file
Claudiu Beznea [Tue, 2 Jun 2020 12:19:19 +0000 (15:19 +0300)]
ARM: dts: sama7g5: move clock frequencies for xtals in board file

Move clock frequencies for crystals on board specific files.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5ek: enable pll driver
Claudiu Beznea [Tue, 2 Jun 2020 12:15:25 +0000 (15:15 +0300)]
configs: sama7g5ek: enable pll driver

Enable PLL driver for SAMA7G5.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoconfigs: sama7g5ek: set malloc pool to 68K
Claudiu Beznea [Tue, 2 Jun 2020 12:14:14 +0000 (15:14 +0300)]
configs: sama7g5ek: set malloc pool to 68K

Set malloc pool to 68K for sama7g5ek.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoboard: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR
Claudiu Beznea [Tue, 2 Jun 2020 07:32:08 +0000 (10:32 +0300)]
board: atmel: sama7g5ek: add SYS_MALLOC_F_LEN to SYS_INIT_SP_ADDR

Heap base address is computed based on SYS_INIT_SP_ADDR by
subtracting the SYS_MALLOC_F_LEN value in
board_init_f_init_reserve().

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoboard: atmel: sama7g5ek: add initial support for sama7g5ek
Eugen Hristev [Tue, 10 Mar 2020 09:56:38 +0000 (11:56 +0200)]
board: atmel: sama7g5ek: add initial support for sama7g5ek

Add initial support for sama7g5 evaluation kit board.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoARM: dts: sama7g5: add initial DT for sama7g5 SoC
Eugen Hristev [Tue, 10 Mar 2020 09:56:03 +0000 (11:56 +0200)]
ARM: dts: sama7g5: add initial DT for sama7g5 SoC

Add initial basic devicetree for sama7g5 SoC

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
3 years agoarm: at91: configs: Enable CONFIG_SYS_NAND_USE_FLASH_BBT on all boards
Nicolas Ferre [Wed, 25 Nov 2020 13:17:48 +0000 (14:17 +0100)]
arm: at91: configs: Enable CONFIG_SYS_NAND_USE_FLASH_BBT on all boards

As highlighted by Stefan in the commit e074d0f79b2e ("arm: at91:
gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT")
it's important to use BBT when Linux enables it. We use it for a long
time on all our boards.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Alexander Dahl <ada@thorsis.com>
3 years agoMerge tag 'xilinx-for-v2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 6 Jan 2021 12:57:33 +0000 (07:57 -0500)]
Merge tag 'xilinx-for-v2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2021.04

arm64:
- DT updates

microblaze:
- Add support for NOR device support

spi:
- Fix unaligned data write issue

nand:
- Minor code change

xilinx:
- Fru fix in limit calculation
- Fill git repo link for all Xilinx boards

video:
- Add support for seps525 spi display

tools:
- Minor Vitis file support

cmd/common
- Minor code indentation fixes

serial:
- Uartlite debug uart initialization fix

3 years agoMerge tag 'u-boot-stm32-20210106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 6 Jan 2021 12:48:19 +0000 (07:48 -0500)]
Merge tag 'u-boot-stm32-20210106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- Fix GPIO hog flags on DHCOM boards

3 years agoARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02
Marek Vasut [Sat, 2 Jan 2021 16:44:47 +0000 (17:44 +0100)]
ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02

The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0.
Since GPIO_ACTIVE_HIGH is defined as 0, this change only increases the
correctness of the DT.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX
Marek Vasut [Sat, 2 Jan 2021 16:44:46 +0000 (17:44 +0100)]
ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX

The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0.
Due to a change in gpiolib-of.c, setting flags to GPIO_ACTIVE_LOW and
using output-low DT property leads to the GPIO being set high instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoMerge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into next
Tom Rini [Wed, 6 Jan 2021 03:34:43 +0000 (22:34 -0500)]
Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into next

Driver model: make some udevice fields private
Driver model: Rename U_BOOT_DEVICE et al.
dtoc: Tidy up and add more tests
ns16550 code clean-up
x86 and sandbox minor fixes for of-platdata
dtoc prepration for adding build-time instantiation

3 years agoMerge tag 'v2021.01-rc5' into next
Tom Rini [Tue, 5 Jan 2021 21:20:26 +0000 (16:20 -0500)]
Merge tag 'v2021.01-rc5' into next

Prepare v2021.01-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'ti-v2021.01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Tue, 5 Jan 2021 21:10:33 +0000 (16:10 -0500)]
Merge tag 'ti-v2021.01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

- Fix I2C speed for Nokia RX51

3 years agodtoc: Tidy up src_scan tests
Simon Glass [Tue, 29 Dec 2020 03:35:08 +0000 (20:35 -0700)]
dtoc: Tidy up src_scan tests

Some of these tests don't actually check anything. Add a few more checks
to complete the tests.

Also add a simple scan test that does the basics.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Move src_scan tests to a separate file
Simon Glass [Tue, 29 Dec 2020 03:35:07 +0000 (20:35 -0700)]
dtoc: Move src_scan tests to a separate file

Move the tests related to scanning into their own class, updating them
to avoid using dtb_platdata as a pass-through.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Split source-code scanning to a separate file
Simon Glass [Tue, 29 Dec 2020 03:35:06 +0000 (20:35 -0700)]
dtoc: Split source-code scanning to a separate file

Before expanding the scanning features any more, move this into a separate
file. This will make it easier to maintain in the future. In particular,
it reduces the size of dtb_platdata.py and allows us to add tests
specifically for scanning, without going through that file.

The pieces moved are the Driver class, the scanning code and the various
naming functions, since they mostly depend on the scanning results.

So far there is are no separate tests for src_scan. These will be added
as new functionality appears.

This introduces no functional change.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Drop dm_populate_phandle_data()
Simon Glass [Tue, 29 Dec 2020 03:35:05 +0000 (20:35 -0700)]
dtoc: Drop dm_populate_phandle_data()

This has not been needed since parent information was added and we started
using indicies for references to other drivers instead of pointers. It was
kept around in the expectation that it might be needed later.

However with the latest updates, it doesn't seem likely that we'll need
this in the foreseeable future.

Drop dm_populate_phandle_data() from dtoc and driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Output nodes in order
Simon Glass [Tue, 29 Dec 2020 03:35:04 +0000 (20:35 -0700)]
dtoc: Output nodes in order

Previously we had to worry about nodes being output before those that they
depended on, thus causing build errors.  So the current algorithm is
careful to output nodes in the right order.

We now use a different method for outputting phandles that does not
involve pointers. Also we plan to add a 'declarations' header file to
declare all drivers as 'extern'.

Update the code to drop the dependency checking and output in a simple
loop. This makes the output easier to follow since drivers are in order of
thier indices (0, 1, ...), which is also the order it appears in in the
linker list.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Allow specifying the base directory for tests
Simon Glass [Tue, 29 Dec 2020 03:35:03 +0000 (20:35 -0700)]
dtoc: Allow specifying the base directory for tests

The base directory of U-Boot, where the source is, it currently calculated
from the directory of the dtb_platdata.py script. If this is installed
elsewhere that will not work. Also it is inconvenient for tests.

Add a parameter to allow specifying this base directory.

To test this, pass a temporary directory with some files in it and check
that they are passed to scan_driver().

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Add the method for each command to OutputFile
Simon Glass [Tue, 29 Dec 2020 03:35:02 +0000 (20:35 -0700)]
dtoc: Add the method for each command to OutputFile

Rather than the if/else construct, update OutputFile with the method to
call to process each command. This is easier to maintain as the number of
commands increases.

Rename generate_tables to generate_plat since it better describes what is
being generated ('plat' is the U-Boot name for platform data).

With this, each output method needs to have the same signature. Store the
output structures in a member variable instead of using parameters, to
accomplish this.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Rename dt-platdata.c to dt-plat.c
Simon Glass [Tue, 29 Dec 2020 03:35:01 +0000 (20:35 -0700)]
dtoc: Rename dt-platdata.c to dt-plat.c

Use this new name to be consistent with the rest of U-Boot, which talks
about 'plat' for the platform data, which is what this file holds.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Add a header comment to each generated file
Simon Glass [Tue, 29 Dec 2020 03:35:00 +0000 (20:35 -0700)]
dtoc: Add a header comment to each generated file

It is currently fairly obvious what the two generated files are for, but
this will change as more are added. It is helpful for readers to describe
the purpose of each file.

Add a header commment field to OutputFile and use it to generate a comment
at the top of each file.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Run tests using test_util
Simon Glass [Tue, 29 Dec 2020 03:34:59 +0000 (20:34 -0700)]
dtoc: Run tests using test_util

Use the standard function for running tests and reported results. This
allows the tests to run in parallel, which is a significant speed-up on
most machines (e.g. 4.5 seconds -> 1.5s on mine).

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoconcurrencytest: Fix Python3 warning
Simon Glass [Tue, 29 Dec 2020 03:34:58 +0000 (20:34 -0700)]
concurrencytest: Fix Python3 warning

This gives a warning in some situations:

  File "tools/dtoc/../concurrencytest/concurrencytest.py", line 95,
       in do_fork
    stream = os.fdopen(c2pread, 'rb', 1)
  File "/usr/lib/python3.8/os.py", line 1023, in fdopen
    return io.open(fd, *args, **kwargs)
RuntimeWarning: line buffering (buffering=1) isn't supported in binary
    mode, the default buffer size will be used

Fix this by dropping the line-buffer parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS
Simon Glass [Tue, 29 Dec 2020 03:34:57 +0000 (20:34 -0700)]
dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS

We use the U_BOOT_ prefix (i.e. U_BOOT_DRIVER) to declare a driver but
in every other case we just use DM_. Update the alias macros to use the
DM_ prefix.

We could perhaps rename U_BOOT_DRIVER() to DM_DRIVER(), but this macro
is widely used and there is at least some benefit to indicating it us a
U-Boot driver, particularly for code ported from Linux. So for now, let's
keep that name.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()
Simon Glass [Tue, 29 Dec 2020 03:34:56 +0000 (20:34 -0700)]
dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: Rename DM_GET_DEVICE() to DM_DRVINFO_GET()
Simon Glass [Tue, 29 Dec 2020 03:34:55 +0000 (20:34 -0700)]
dm: Rename DM_GET_DEVICE() to DM_DRVINFO_GET()

This does not get a device (struct udevice *) but a struct driver_info *
so the name is confusing.

Rename it accordingly. Since we plan to have several various of these
macros, put GET at the end instead of the middle, so it is easier to spot
the related macros.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()
Simon Glass [Tue, 29 Dec 2020 03:34:54 +0000 (20:34 -0700)]
dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()

The current macro is a misnomer since it does not declare a device
directly. Instead, it declares driver_info record which U-Boot uses at
runtime to create a device.

The distinction seems somewhat minor most of the time, but is becomes
quite confusing when we actually want to declare a device, with
of-platdata. We are left trying to distinguish between a device which
isn't actually device, and a device that is (perhaps an 'instance'?)

It seems better to rename this macro to describe what it actually is. The
macros is not widely used, since boards should use devicetree to declare
devices.

Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is
declaring a new driver_info record, not a device.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMakefile: Invoke dtoc only once
Simon Glass [Tue, 29 Dec 2020 03:34:53 +0000 (20:34 -0700)]
Makefile: Invoke dtoc only once

Update the Makefile to run dtoc only once, generating all required files.
This saves time since there is a lot of processing in each invocation of
dtoc.

We already have a variable for the object files to build, so use that
instead of repeating the same filenames. Add a C version of this also,
for the same reason.

This makes it easier to add new C files (generated by dtoc) to the build
later, as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Add an 'all' command
Simon Glass [Tue, 29 Dec 2020 03:34:52 +0000 (20:34 -0700)]
dtoc: Add an 'all' command

With upcoming changes, dtoc will output several files for different
of-platdata components.

Add a way to output all ava!ilable files at once ('all'), to the
appropriate directories, without needing to specify each one invidually.

This puts the commands in alphabetical order, so update the tests
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Allow outputing to multiple files
Simon Glass [Tue, 29 Dec 2020 03:34:51 +0000 (20:34 -0700)]
dtoc: Allow outputing to multiple files

Implement the 'output directory' feature, allowing dtoc to write the
output files separately to the supplied directories. This allows us to
handle the struct and platdata output in one run of dtoc.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Allow providing a directory to write files to
Simon Glass [Tue, 29 Dec 2020 03:34:50 +0000 (20:34 -0700)]
dtoc: Allow providing a directory to write files to

At present dtoc writes only a single file on each invocation. U-Boot
writes the two files it needs by separate invocations of dtoc. Since dtoc
now scans all U-Boot driver source, this is fairly slow (about 1 second
per file).

It would be better if dtoc could write all the files at once.

In preparation for this, add a way to specify an output directory for the
files.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Test the stdout output
Simon Glass [Tue, 29 Dec 2020 03:34:49 +0000 (20:34 -0700)]
dtoc: Test the stdout output

Normally dtoc outputs to a file but it also offers a way to write output
to stdout. At present the test for that does not actually check that the
output is correct. Add this to the test.

This uses a member variable to hold the expected text, so it can be used
in muitiple places.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Use None to mean stdout
Simon Glass [Tue, 29 Dec 2020 03:34:48 +0000 (20:34 -0700)]
dtoc: Use None to mean stdout

At present dtoc uses '-' internally to mean that output should go to
stdout. This is not necessary and None is more convenient. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodtoc: Tidy up pylint warnings in test
Simon Glass [Tue, 29 Dec 2020 03:34:47 +0000 (20:34 -0700)]
dtoc: Tidy up pylint warnings in test

Tidy up this file to reduce the number of pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Add logging when lists_bind_fdt() fails
Simon Glass [Sat, 19 Dec 2020 17:40:18 +0000 (10:40 -0700)]
dm: core: Add logging when lists_bind_fdt() fails

It is useful to see the error code when this fails. Add logging for this
function.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Allow the uclass list to move
Simon Glass [Sat, 19 Dec 2020 17:40:17 +0000 (10:40 -0700)]
dm: core: Allow the uclass list to move

At present the uclass list head is in global_data. This is convenient
but with the new of-platdata we need the list head to be declared by
the generated code.

Change this over to be a pointer. Provide a 'static' version in
global_data to retain the current behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Split out scanning code to dm_scan()
Simon Glass [Sat, 19 Dec 2020 17:40:16 +0000 (10:40 -0700)]
dm: core: Split out scanning code to dm_scan()

Move the code related to scanning for devices to bind, into a new
function. This will make it easier to skip this step with the new
of-platdata improvements.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Rename device node to indicate it is private
Simon Glass [Sat, 19 Dec 2020 17:40:15 +0000 (10:40 -0700)]
dm: core: Rename device node to indicate it is private

To avoid having people accidentally access this member, add a trailing
underscore. Also remove it when of-platdata is enabled, since it is not
used.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Access device ofnode through functions
Simon Glass [Sat, 19 Dec 2020 17:40:14 +0000 (10:40 -0700)]
dm: core: Access device ofnode through functions

At present ofnode is present in the device even if it is never used. With
of-platdata this field is not used, so can be removed. In preparation for
this, change the access to go through inline functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Use dev_has_ofnode() instead of dev_of_valid()
Simon Glass [Sat, 19 Dec 2020 17:40:13 +0000 (10:40 -0700)]
dm: core: Use dev_has_ofnode() instead of dev_of_valid()

We have two functions which do the same thing. Standardise on
dev_has_ofnode() since there is no such thing as an 'invalid' ofnode in
normal operation: it is either null or missing.

Also move the functions into one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 years agodm: core: Rename dev_has_of_node() to dev_has_ofnode()
Simon Glass [Sat, 19 Dec 2020 17:40:12 +0000 (10:40 -0700)]
dm: core: Rename dev_has_of_node() to dev_has_ofnode()

We use 'ofnode' rather than 'of_node' in U-Boot. Rename this function to
fit.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Rename device flags to indicate it is private
Simon Glass [Sat, 19 Dec 2020 17:40:11 +0000 (10:40 -0700)]
dm: core: Rename device flags to indicate it is private

To avoid having people accidentally access this member, add a trailing
underscore.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Access device flags through functions
Simon Glass [Sat, 19 Dec 2020 17:40:10 +0000 (10:40 -0700)]
dm: core: Access device flags through functions

At present flags are stored as part of the device. In preparation for
storing them separately, change the access to go through inline functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Rename sqq to seq_
Simon Glass [Sat, 19 Dec 2020 17:40:09 +0000 (10:40 -0700)]
dm: core: Rename sqq to seq_

Now that the sequence-numbering migration is complete, rename this member
back to seq_, adding an underscore to indicate it is internal to driver
model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 years agodm: core: Split out alloc code into a new function
Simon Glass [Sat, 19 Dec 2020 17:40:08 +0000 (10:40 -0700)]
dm: core: Split out alloc code into a new function

Add a new function to handle the allocation of private/platform data for
a device. This will make it easier to skip this feature when using the new
of-platdata.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agox86: Drop rtc from SPL
Simon Glass [Sat, 19 Dec 2020 17:40:07 +0000 (10:40 -0700)]
x86: Drop rtc from SPL

The RTC is not currently used in SPL. Drop it so that it does not take up
space.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agox86: coral: Remove unwanted nodes from SPL/TPL
Simon Glass [Sat, 19 Dec 2020 17:40:06 +0000 (10:40 -0700)]
x86: coral: Remove unwanted nodes from SPL/TPL

Some devices are not needed in SPL/TPL. For TPL this causes the
generation of unnecessary of-platadata structs. Make some adjustments to
fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agox86: apl: Adjust how the UART gets its platform data
Simon Glass [Sat, 19 Dec 2020 17:40:05 +0000 (10:40 -0700)]
x86: apl: Adjust how the UART gets its platform data

At present this driver calls malloc() to start a new platform data
structure, fills it in and tells driver model to use it.

We want to avoid malloc, particularly with the new version of of-platdata.
Create a new struct which encompasses both the dtd struct and the ns16550
one, to avoid this. Unfortunately we must copy the data into the right
place for the ns16550 driver. Add some comments about this.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agox86: sysreset: Move priv/plat structs to headers
Simon Glass [Sat, 19 Dec 2020 17:40:04 +0000 (10:40 -0700)]
x86: sysreset: Move priv/plat structs to headers

With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them and add the dtd struct too.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 years agodm: core: Move priv/plat structs for simple_bus to headers
Simon Glass [Sat, 19 Dec 2020 17:40:03 +0000 (10:40 -0700)]
dm: core: Move priv/plat structs for simple_bus to headers

With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agox86: apl: Use struct spi_nor instead of struct spi_flash
Simon Glass [Sat, 19 Dec 2020 17:40:02 +0000 (10:40 -0700)]
x86: apl: Use struct spi_nor instead of struct spi_flash

This construct effectively uses struct spi_nor due to a #define in
spi-nor.h so we may as well use that struct here. This allows dtoc to
parse it correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agospi: Tweak a few strange SPI NOR features for of-platdata
Simon Glass [Sat, 19 Dec 2020 17:40:01 +0000 (10:40 -0700)]
spi: Tweak a few strange SPI NOR features for of-platdata

The #define of one struct to another has been around for a while. It
confuses dtoc and makes it think that struct spi_flash does not exist.

Make a few changes to improve things while we wait for migration to be
completed:

- Move the 'struct spi_flash' to column 1 so dtoc scans it
- Remove the #define when compiling dt-platdata.c
- Update the strange mtd_get/set_of_node() functions
- Use struct spi_nor in the drivers, so dtoc sees the correct struct

Signed-off-by: Simon Glass <sjg@chromium.org>