[PATCH v7 28/28] board: ti: am335x-ice: get CDCE913 clock device

2020-12-23 Thread Dario Binacchi
With support for other clock drivers, the potentially supported CDCE913 device can no longer be probed without specifying its DT node name. Signed-off-by: Dario Binacchi --- (no changes since v1) board/ti/am335x/board.c | 2 +- board/ti/am43xx/board.c | 2 +- 2 files changed, 2

[PATCH v7 26/28] video: omap: split the legacy code from the DM code

2020-12-23 Thread Dario Binacchi
The schedule for deprecating the features of the pre-driver-model puts 2019.17 as the deadline for the video subsystem. Furthermore, the latest patches applied to the am335x-fb.c module have decreased the amount of code shared with the pre-driver-model implementation. Splitting the two

[PATCH v7 23/28] video: omap: add panel driver

2020-12-23 Thread Dario Binacchi
The previous version of am335x-fb.c contained the functionalities of two drivers that this patch has split. It was a video type driver that used the same registration compatible string that now registers a panel type driver. The proof of this is that two compatible strings were referred to within

[PATCH v7 27/28] video: omap: move drivers to 'ti' directory

2020-12-23 Thread Dario Binacchi
Add drivers/video/ti/ folder and move all TI's code in this folder for better maintenance. Signed-off-by: Dario Binacchi --- Changes in v7: - Fix building errors for: brppt1_mmc_defconfig brppt1_nand_defconfig brppt1_spi_defconfig brxre1_defconfig brsmarc1_defconfig

[PATCH v7 25/28] video: omap: set LCD clock rate through DM API

2020-12-23 Thread Dario Binacchi
The patch configures the display DPLL using the functions provided by the driver model API for the clock. The device tree contains everything needed to get the DPLL clock. The round rate function developed for calculating the DPLL multiplier and divisor and the platform routines for accessing the

[PATCH v7 22/28] dm: core: add a function to decode display timings

2020-12-23 Thread Dario Binacchi
The patch adds a function to get display timings from the device tree node attached to the device. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/test.dts | 46 ++ drivers/core/read.c | 6 +++ include/dm/read.h

[PATCH v7 24/28] video: omap: drop domain clock enabling by SOC api

2020-12-23 Thread Dario Binacchi
Enabling the domain clock is performed by the sysc interconnect target module driver during the video device probing. Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Remove clock domain enabling/disabling. - Update the commit message.

[PATCH v7 21/28] bus: ti: am33xx: add pwm subsystem driver

2020-12-23 Thread Dario Binacchi
The TI PWMSS driver is a simple bus driver for providing clock and power management for the PWM peripherals on TI AM33xx SoCs, namely eCAP, eHRPWM and eQEP. For DT binding details see Linux doc: - Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt Signed-off-by: Dario Binacchi --- (no

[PATCH v7 16/28] clk: move clk-ti-sci driver to 'ti' directory

2020-12-23 Thread Dario Binacchi
The patch moves the clk-ti-sci.c file to the 'ti' directory along with all the other TI's drivers, and renames it clk-sci.c. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/clk/Kconfig| 8 drivers/clk/Makefile | 1 -

[PATCH v7 17/28] fdt: translate address if #size-cells = <0>

2020-12-23 Thread Dario Binacchi
The __of_translate_address routine translates an address from the device tree into a CPU physical address. A note in the description of the routine explains that the crossing of any level with #size-cells = <0> is to be considered an error not by specification but since inherited from IBM. This

[PATCH v7 20/28] pwm: ti: am33xx: add enhanced pwm driver

2020-12-23 Thread Dario Binacchi
Enhanced high resolution PWM module (EHRPWM) hardware can be used to generate PWM output over 2 channels. This commit adds PWM driver support for EHRPWM device present on AM33XX SOC. The code is based on the drivers/pwm/pwm-tiehrpwm.c driver of the Linux kernel version 5.9-rc7. For DT binding

[PATCH v7 18/28] omap: timer: fix the rate setting

2020-12-23 Thread Dario Binacchi
The prescaler (PTV) setting must be taken into account even when the timer input clock frequency has been set. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/timer/omap-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v7 19/28] arm: dts: am335x: enable scm_clocks auto binding

2020-12-23 Thread Dario Binacchi
Adding the 'simple-bus' compatible string to the scm_clocks node will allow its automatic binding. Signed-off-by: Dario Binacchi --- Changes in v7: - Add dm8168-evm-u-boot.dtsi to fix building errors for ti816x_evm_defconfig. Changes in v6: - Remove the 'am3-scm' driver. - Add the

[PATCH v7 15/28] arm: dts: am335x: enable prcm_clocks auto binding

2020-12-23 Thread Dario Binacchi
Adding the 'simple-bus' compatible string to the prcm_clocks node will allow its automatic binding. Signed-off-by: Dario Binacchi --- (no changes since v6) Changes in v6: - Remove the 'am3-prcm' driver. - Add the 'simple-bus' compatible string to the prcm_clocks node. Changes in v4: -

[PATCH v7 14/28] clk: ti: omap4: add clock manager driver

2020-12-23 Thread Dario Binacchi
This minimal driver is only used to bind child devices. For DT binding details see Linux doc: - Documentation/devicetree/bindings/arm/omap/prcm.txt Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - doc/device-tree-bindings/arm/omap,prcm.txt. - Add to commit message the

[PATCH v7 04/28] arm: dts: sync am33xx with Linux 5.9-rc7

2020-12-23 Thread Dario Binacchi
There have been several changes to the am33xx.dtsi, so this patch re-syncs it with Linux. Let's add proper interconnect hierarchy for l4 interconnect instances with the related ti-sysc interconnect module data as documented in Documentation/devicetree/bindings/bus/ti-sysc.txt of the Linux kernel.

[PATCH v7 10/28] clk: ti: add gate clock driver

2020-12-23 Thread Dario Binacchi
The patch adds support for TI gate clock binding. The code is based on the drivers/clk/ti/gate.c driver of the Linux kernel version 5.9-rc7. For DT binding details see: - Documentation/devicetree/bindings/clock/ti/gate.txt Signed-off-by: Dario Binacchi --- (no changes since v5) Changes in v5:

[PATCH v7 13/28] clk: ti: add support for clkctrl clocks

2020-12-23 Thread Dario Binacchi
Until now the clkctrl clocks have been enabled/disabled through platform routines. Thanks to this patch they can be enabled and configured directly by the probed devices that need to use them. For DT binding details see Linux doc: - Documentation/devicetree/bindings/clock/ti-clkctrl.txt

[PATCH v7 09/28] clk: ti: add divider clock driver

2020-12-23 Thread Dario Binacchi
The patch adds support for TI divider clock binding. The driver uses routines provided by the common clock framework (ccf). The code is based on the drivers/clk/ti/divider.c driver of the Linux kernel version 5.9-rc7. For DT binding details see: -

[PATCH v7 11/28] arm: dts: am335x: include am33xx-u-boot.dtsi

2020-12-23 Thread Dario Binacchi
Include the SoC U-boot DTS in each am335x--u-boot.dtsi. Signed-off-by: Dario Binacchi --- (no changes since v1) arch/arm/dts/am335x-chiliboard-u-boot.dtsi | 2 ++ arch/arm/dts/am335x-evm-u-boot.dtsi| 2 ++ arch/arm/dts/am335x-evmsk-u-boot.dtsi | 2 ++

[PATCH v7 12/28] ti: am33xx: fix do_enable_clocks() to accept NULL parameters

2020-12-23 Thread Dario Binacchi
Up till this commit passing NULL as input parameter was allowed, but not handled properly. When a NULL parameter was passed to the function a data abort was raised. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v1) arch/arm/mach-omap2/am33xx/clock.c | 10

[PATCH v7 08/28] clk: ti: am33xx: add DPLL clock drivers

2020-12-23 Thread Dario Binacchi
The digital phase-locked loop (DPLL) provides all interface clocks and functional clocks to the processor of the AM33xx device. The AM33xx device integrates five different DPLLs: * Core DPLL * Per DPLL * LCD DPLL * DDR DPLL * MPU DPLL The patch adds support for the compatible strings: *

[PATCH v7 06/28] clk: ti: add mux clock driver

2020-12-23 Thread Dario Binacchi
The driver manages a register-mapped multiplexer with multiple input clock signals or parents, one of which can be selected as output. It uses routines provided by the common clock framework (ccf). The code is based on the drivers/clk/ti/mux.c driver of the Linux kernel version 5.9-rc7. For DT

[PATCH v7 03/28] bus: ti: add minimal sysc interconnect target driver

2020-12-23 Thread Dario Binacchi
We can handle the sysc interconnect target module in a generic way for many TI SoCs. Initially let's just enable domain clocks before the children are probed. The code is loosely based on the drivers/bus/ti-sysc.c of the Linux kernel version 5.9-rc7. For DT binding details see: -

[PATCH v7 05/28] clk: add clk_round_rate()

2020-12-23 Thread Dario Binacchi
It returns the rate which will be set if you ask clk_set_rate() to set that rate. It provides a way to query exactly what rate you'll get if you call clk_set_rate() with that same argument. So essentially, clk_round_rate() and clk_set_rate() are equivalent except the former does not modify the

[PATCH v7 07/28] arm: ti: am33xx: add DPLL_EN_FAST_RELOCK_BYPASS macro

2020-12-23 Thread Dario Binacchi
Add missing DPLL_EN_FAST_RELOCK_BYPASS macro. Used to put the DPLL in idle bypass fast relock mode. Signed-off-by: Dario Binacchi --- (no changes since v1) arch/arm/include/asm/arch-am33xx/clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/arch-am33xx/clock.h

[PATCH v7 02/28] dt-bindings: bus: ti-sysc: resync with Linux 5.9-rc7

2020-12-23 Thread Dario Binacchi
Add support for PRUSS SYSC type: The PRUSS module has a SYSCFG which is unique. The SYSCFG has two additional unique fields called STANDBY_INIT and SUB_MWAIT in addition to regular IDLE_MODE and STANDBY_MODE fields. Add the bindings for this new sysc type. Add support for MCAN on dra76x: The

[PATCH v7 01/28] clk: export generic routines

2020-12-23 Thread Dario Binacchi
Export routines that can be used by other drivers avoiding duplicating code. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - Add the clk_ prefix to the divider functions. - Add kernel-doc comments to the exported functions.

RE: [v6 10/18] net: designware: socfpga: Add ATF support for MAC driver

2020-12-23 Thread Tan, Ley Foon
> -Original Message- > From: Lim, Elly Siew Chin > Sent: Wednesday, December 23, 2020 10:56 PM > To: u-boot@lists.denx.de > Cc: Marek Vasut ; Tan, Ley Foon > ; See, Chin Liang ; > Simon Goldschmidt ; Chee, Tien Fong > ; Westergreen, Dalon > ; Simon Glass ; Gan, > Yau Wai ; Ang, Chee

RE: [v6 07/18] arm: socfpga: Add secure register access helper functions for SoC 64bits

2020-12-23 Thread Tan, Ley Foon
> -Original Message- > From: Lim, Elly Siew Chin > Sent: Wednesday, December 23, 2020 10:56 PM > To: u-boot@lists.denx.de > Cc: Marek Vasut ; Tan, Ley Foon > ; See, Chin Liang ; > Simon Goldschmidt ; Chee, Tien Fong > ; Westergreen, Dalon > ; Simon Glass ; Gan, > Yau Wai ; Lim, Elly

Re: Please pull u-boot-x86

2020-12-23 Thread Tom Rini
On Tue, Dec 22, 2020 at 03:27:49PM +0800, Bin Meng wrote: > Hi Tom, > > This PR includes the following changes for v2021.01 release: > > - Update Intel Edison doc information about xFSTK > - Move and rename fsp_types.h file to signatures.h > > Azure results: PASS >

[PATCH] cmd: mmc: add mmcboot command

2020-12-23 Thread Ravik Hasija
Similar to usbboot, add command line to boot from raw mmc partition using common_diskboot(), which supports legacy or FIT images. Usage: mmcboot loadAaddr dev:part Where defaults to CONFIG_SYS_LOAD_ADDR, and defaults to ${bootdevice}. Also fixing config macro usage for

Please pull u-boot-dm/next into -next

2020-12-23 Thread Simon Glass
Hi Tom, This is for the -next branch, Build here: https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/5664 The following changes since commit 8351a29d2df18c92d8e365cfa848218c3859f3d2: Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next (2020-12-14 18:57:57

[PATCH v5 12/13] configs: rpi4: Enable DM_DMA across all RPi4 configurations

2020-12-23 Thread Nicolas Saenz Julienne
The DM_DMA option is needed in order to translate physical address into bus addresses on a per-device basis. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Simon Glass --- configs/rpi_4_32b_defconfig | 1 + configs/rpi_4_defconfig | 1 + configs/rpi_arm64_defconfig | 1 + 3 files

[PATCH v5 13/13] video: arm: rpi: Add brcm,bcm2711-hdmi0 compatible

2020-12-23 Thread Nicolas Saenz Julienne
The 'brcm,bcm2711-hdmi0' compatible string is used on RPi4 instead of 'brcm,bcm2835-hdmi' since the IP core was upgraded (now called VC6 instead of VC4). This has no functional change as far as u-boot driver is concerned. So simply add the compatible string. Signed-off-by: Nicolas Saenz Julienne

[PATCH v5 11/13] mmc: Introduce mmc_phys_to_bus()/mmc_bus_to_phys()

2020-12-23 Thread Nicolas Saenz Julienne
This will allow us to use DM variants of phys_to_bus()/bus_to_phys() when relevant. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Simon Glass --- Changes since v4: - Introduce mmc->dev access macros to avoid ifdefs - No need to create mmc_phys_to_bus() Changes since v3: - Don't call

[PATCH v5 10/13] xhci: translate virtual addresses into the bus's address space

2020-12-23 Thread Nicolas Saenz Julienne
So far we've been content with passing physical addresses when configuring memory addresses into XHCI controllers, but not all platforms have buses with transparent mappings. Specifically the Raspberry Pi 4 might introduce an offset to memory accesses incoming from its PCIe port. Introduce

[PATCH v5 09/13] dm: test: Add test case for dev_phys_to_bus()/dev_bus_to_phys()

2020-12-23 Thread Nicolas Saenz Julienne
By reusing DT nodes already available in sandbox's test DT introduce a test to validate dev_phys_to_bus()/dev_bus_to_phys(). Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Simon Glass --- Changes since v3: - Use ut_assertok() instead of ut_assert(!func()) - Use ut_assert_addr()

[PATCH v5 07/13] dm: test: Add test case for dev->dma_offset

2020-12-23 Thread Nicolas Saenz Julienne
Add test to validate dev->dma_offset is properly set on devices. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Simon Glass --- Changes since v3: - Use ut_assertok() instead of ut_assert(!func()) arch/sandbox/dts/test.dts | 4 configs/sandbox64_defconfig| 1 +

[PATCH v5 08/13] dm: Introduce dev_phys_to_bus()/dev_bus_to_phys()

2020-12-23 Thread Nicolas Saenz Julienne
These functions, instead of relying on hard-coded platform-specific address translations, make use of the DMA constraints provided by the DM core. This allows for per-device translations. We can't yet get rid of the legacy phys_to_bus()/bus_to_phys() implementations as some of its users are not

[PATCH v5 04/13] dm: Introduce xxx_get_dma_range()

2020-12-23 Thread Nicolas Saenz Julienne
Add the following functions to get a specific device's DMA ranges: - dev_get_dma_range() - ofnode_get_dma_range() - of_get_dma_range() - fdt_get_dma_range() They are specially useful in oder to be able validate a physical address space range into a bus's and to convert addresses from and to

[PATCH v5 06/13] dm: Introduce DMA constraints into the core device model

2020-12-23 Thread Nicolas Saenz Julienne
Calculating the DMA offset between a bus address space and CPU's every time we call phys_to_bus() and bus_to_phys() isn't ideal performance wise, as it implies traversing the device tree from the device's node up to the root. Since this information is static and available before the device's

[PATCH v5 05/13] dm: test: Add test case for dev_get_dma_ranges()

2020-12-23 Thread Nicolas Saenz Julienne
Introduce some new nodes in sandbox's test device-tree and dm tests in order to validate dev_get_dma_range(). Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Simon Glass --- Changes since v3: - Use ut_assertok() instead of ut_assert(!func()) arch/sandbox/dts/test.dts | 17 ++

[PATCH v5 03/13] pci: pcie-brcmstb: Fix inbound window configurations

2020-12-23 Thread Nicolas Saenz Julienne
So far we've assumed a fixed configuration for inbound windows as we had a single user for this controller. But the controller's DMA constraints were improved starting with BCM2711's B1 revision of the SoC, notably available in CM4 and Pi400. They allow for wider inbound windows. We can now cover

[PATCH v5 02/13] rpi: Add identifier for the new CM4

2020-12-23 Thread Nicolas Saenz Julienne
The Raspberry Pi Foundation released the new Compute Module 4 which we want to detect, so we can enable Ethernet on it and know the correct device tree file name. Note that this sets the Ethernet option to true since the official CM4 IO board has an Ethernet port. But that might not be the case

[PATCH v5 00/13] Raspberry Pi 400/Compute Module 4 support

2020-12-23 Thread Nicolas Saenz Julienne
This series could be split into at least two or even three parts, but I kept it as is for now as it contains all the changes needed in order to have u-boot working on the new Raspberry Pi 400 and Raspberry Pi Compute Module 4. There are core changes, specifically with regard to cpu to bus address

[PATCH v5 01/13] rpi: Add identifier for the new RPi400

2020-12-23 Thread Nicolas Saenz Julienne
The Raspberry Pi Foundation released the new RPi400 which we want to detect, so we can enable Ethernet on it and know the correct device tree file name. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - The RPi Foundation introduced a RPi400 specific device tree, so use that

Re: [u-boot,v2019.04-aspeed, v1 1/1] Common:fdt: Check for error return value

2020-12-23 Thread Simon Glass
On Sat, 12 Dec 2020 at 08:35, Simon Glass wrote: > > On Wed, 2 Dec 2020 at 12:48, Hongwei Zhang wrote: > > > > Check for negative return value of fdt_noffset from calling > > boot_get_fdt_fit(). > > > > Signed-off-by: Hongwei Zhang > > --- > > common/image-fdt.c | 3 +++ > > 1 file changed, 3

Re: [PATCH v2 4/6] test: spi: Add sandbox_spi_get_{speed, mode} interface

2020-12-23 Thread Simon Glass
On Mon, 14 Dec 2020 at 10:08, Ovidiu Panait wrote: > > Introduce sandbox_spi_get_{speed, mode} public interface to retrieve the > sandbox spi bus internal state. They are meant to be used in sandbox spi > testcases. > > Signed-off-by: Ovidiu Panait > Reviewed-by: Simon Glass > --- > > Changes

Re: [PATCH 1/1] sandbox: implement runtime system reset

2020-12-23 Thread Simon Glass
On Wed, 2 Dec 2020 at 08:22, Heinrich Schuchardt wrote: > > Implement a reset function that we can call after ExitBootServices(), > when all driver model devices are gone. > > Signed-off-by: Heinrich Schuchardt > --- > arch/sandbox/cpu/start.c | 10 ++ > lib/efi_loader/Kconfig | 3

Re: [PATCH 1/2] configs: sandbox: activate DEBUG_UART

2020-12-23 Thread Simon Glass
On Fri, 27 Nov 2020 at 03:49, Patrick Delaunay wrote: > > Add CONFIG_DEBUG_UART=y for all sandbox defconfig > as it is already done in sandbox_defconfig. > > Signed-off-by: Patrick Delaunay > --- > > configs/sandbox64_defconfig| 1 + > configs/sandbox_flattree_defconfig | 1 + >

Re: [PATCH 1/3] patman: Add --no-signoff to suppress adding signoffs

2020-12-23 Thread Simon Glass
On Tue, 24 Nov 2020 at 10:15, Philipp Tomsich wrote: > > To enable use of patman with FSF/GNU projects, such as GCC or > Binutils, no Signed-off-by may be added. This adds a command > line flag '--no-signoff' to suppress adding signoffs in patman > when processing commits. > > Signed-off-by:

Re: [PATCH v3] fdt: Use phandle to distinguish DT nodes with same name

2020-12-23 Thread Simon Glass
On Wed, 2 Dec 2020 at 22:26, Aswath Govindraju wrote: > > While assigning the sequence number to subsystem instances by reading the > aliases property, only DT nodes names are compared and not the complete > path. This causes a problem when there are two DT nodes with same name but > have

Re: [PATCH 2/3] patman: Add project-default for 'gcc'

2020-12-23 Thread Simon Glass
On Tue, 24 Nov 2020 at 10:15, Philipp Tomsich wrote: > > Add defaults for FSF/GNU projects, such as gcc, that provide sensible > settings for those projects. > > Signed-off-by: Philipp Tomsich > --- > > tools/patman/settings.py | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH v2 1/6] sandbox: spi: Drop unused sandbox_spi_parse_spec function

2020-12-23 Thread Simon Glass
Commit 1289e96797bf ("sandbox: spi: Drop command-line SPI option") dropped support for specifying SPI devices on the command line, removing the only user of sandbox_spi_parse_spec(). Remove the function too. Fixes: 1289e96797bf ("sandbox: spi: Drop command-line SPI option") Signed-off-by: Ovidiu

Re: [PATCH v2 2/6] sandbox: test: Add a second SPI slave on sandbox_spi bus

2020-12-23 Thread Simon Glass
Place a second spi slave on the sandbox_spi bus, to be used by the spi_claim_bus() testcase we are about to introduce. We need to make sure that jumping between slaves calling spi_claim_bus() sets the bus speed and mode appropriately. Use different max-hz and mode properties for this new slave.

Re: [PATCH v2 5/6] spi: spi-uclass: Fix spi_claim_bus() speed/mode setup logic

2020-12-23 Thread Simon Glass
Currently, when different spi slaves claim the bus consecutively using spi_claim_bus(), spi_set_speed_mode() will only be executed on the first two calls, leaving the bus in a bad state starting with the third call. This patch drops spi_slave->speed member and adds caching of bus speed/mode in

Re: [PATCH v2 3/6] spi: sandbox_spi: Implement speed/mode setup

2020-12-23 Thread Simon Glass
Implement sandbox_spi_set_{speed, mode} routines, to be able to keep track of the current bus speed/mode. This will help determine whether the values passed from dm_spi_claim_bus() are valid. Signed-off-by: Ovidiu Panait --- Changes in v2: - none drivers/spi/sandbox_spi.c | 26

Re: [PATCH] dm: spi: Fix spi_free_slave() freed memory write

2020-12-23 Thread Simon Glass
On Wed, 16 Dec 2020 at 04:12, Niel Fourie wrote: > > Remove setting slave->dev to NULL after the device_remove() call. > > The slave pointer points to dev->parent_priv, which has already > been freed by device_free(), called from device_remove() in the > preceding line. Writing to slave->dev may

Re: [PATCH v2 6/6] test: dm: spi: Add testcase for spi_claim_bus()

2020-12-23 Thread Simon Glass
Add testcase for spi_claim_bus(), which checks that sandbox spi bus speed/mode settings are updated correctly when multiple slaves use the bus consecutively. The following configurations are used for the two spi slaves involved: * different max_hz / different modes * different max_hz / same

Re: [PATCH] buildman: Remove output binaries before building

2020-12-23 Thread Simon Glass
Buildman reuses build directories from previous builds to avoid the cost of 'make mrproper' for every build. If the previous build produced an SPL image but the current one does not, the SPL image will remain and buildman will think it is a result of building the current board. Remove these files

Re: [PATCH] dm: core: Inline a few ofnode functions in SPL

2020-12-23 Thread Simon Glass
A recent change to unify the flattree/livetree code introduced a small size increase in SPL on some boards. For example SPL code size for px30-core-ctouch2-px30 increased by 40 bytes. To address this we can take advantage of the fact that some of the ofnode functions are only called a few times

[PATCH] cosmetic: fix typo in drivers/usb/Kconfig

2020-12-23 Thread ferlandm
From: Marc Ferland This commit fixes a simple typo: sPL --> SPL. Signed-off-by: Marc Ferland --- drivers/usb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index fedc0134f5..6e291198ab 100644 --- a/drivers/usb/Kconfig +++

Re: [PATCH v2] riscv: Add support for SPI on Kendryte K210

2020-12-23 Thread Christopher Obbard
Hi Sean, everything looks good! On Tue, 22 Dec 2020 at 23:58, Sean Anderson wrote: > > This enables configs necessary for using SPI. The environment is saved to > the very end of SPI flash. This is unlikely to be overwritten unless the > entire flash is reprogrammed. > > This also supplies a

[PATCH v2 16/18] dm: Use access methods for dev/uclass private data

2020-12-23 Thread Simon Glass
Most drivers use these access methods but a few do not. Update them. In some cases the access is not permitted, so mark those with a FIXME tag for the maintainer to check. Signed-off-by: Simon Glass Acked-by: Andy Shevchenko Acked-by: Pratyush Yadav --- (no changes since v1)

Re: [PATCH v2 5/6] mmc: actions: add MMC driver for Actions OWL S700

2020-12-23 Thread André Przywara
On 23/12/2020 12:29, Amit Tomar wrote: > Hi, > > Thanks again for the detailed review > > + > > >  3 files changed, 407 insertions(+) > >  create mode 100644 drivers/mmc/owl_mmc.c > > > > diff --git a/drivers/mmc/Kconfig

[PATCH v2 20/21] x86: tpl: Remove unwanted devicetree string

2020-12-23 Thread Simon Glass
Update this driver to use of_match_ptr(). This reduces the TPL binary size by about 32 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/tpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c index

[PATCH v2 18/21] x86: apl: Reduce size for TPL

2020-12-23 Thread Simon Glass
Update various drivers to use of_match_ptr() and to avoid including debug strings in TPL. Omit the WiFi driver entirely, since it is not used in TPL. This reduces the TPL binary size by about 608 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/lpc.c

[PATCH v2 06/21] test: Move some test drivers into their own file

2020-12-23 Thread Simon Glass
At present several test drivers are part of the test file itself. Some of these are useful for of-platdata tests. Separate them out so we can use them for other things also. A few adjustments are needed so this driver can build for sandbox_spl as well. Signed-off-by: Simon Glass --- (no

[PATCH v2 21/21] x86: Fix header guard in asm/pmu.h

2020-12-23 Thread Simon Glass
This has the wrong name. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/pmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/pmu.h b/arch/x86/include/asm/pmu.h index b76bdf64a30..818e80881ec 100644 ---

[PATCH v2 19/21] x86: pinctrl: Drop unlikely error messages from TPL

2020-12-23 Thread Simon Glass
These errors are only really for development purposes. Drop them to reduce the size of TPL. The error numbers are still reported. This reduces the TPL binary size on coral by about 160 bytes. Signed-off-by: Simon Glass --- (no changes since v1) drivers/pinctrl/intel/pinctrl.c | 11

[PATCH v2 16/21] x86: coral: Move fsp-m settings to a subnode

2020-12-23 Thread Simon Glass
At present these settings are in the node for host-bridge and so are visible in TPL as well as SPL. But they are only used for SPL. Move them to a subnode so that TPL does not included them. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/fsp_m.c | 5 -

[PATCH v2 17/21] x86: apl: Update hostbridge to remove unwanted TPL code

2020-12-23 Thread Simon Glass
At present several strings from this file appear in the TPL binary. Add preprocessor checks to drop them. This reduces the TPL binary size by about 128 bytes. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/hostbridge.c | 14 +- 1 file changed, 9

[PATCH v2 12/21] dtoc: Scan drivers for available information

2020-12-23 Thread Simon Glass
At present we simply record the name of a driver parsed from its implementation file. We also need to get the uclass and a few other things so we can instantiate devices at build time. Add support for collecting this information. This requires parsing each driver file. Signed-off-by: Simon Glass

[PATCH v2 15/21] x86: Move call64 into its own section

2020-12-23 Thread Simon Glass
When this code is not used (e.g. by TPL) we want it to be excluded from the image. Put it in its own section so that this happens. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/i386/call64.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/i386/call64.S

[PATCH v2 14/21] x86: apl: Use const for driver operations

2020-12-23 Thread Simon Glass
Update these declarations to const to ensure that the data ends up in the rodata section. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/pmc.c| 2 +- arch/x86/cpu/intel_common/p2sb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 13/21] dtoc: Allow use of the of_match_ptr() macro

2020-12-23 Thread Simon Glass
Update the regex for the of_match member to allow of_match_ptr() so it matches both: .of_match = apl_hostbridge_ids, and .of_match = of_match_ptr(apl_hostbridge_ids), Without this, dtoc emits warnings and cannot find the drivers. Signed-off-by: Simon Glass --- (no

[PATCH v2 11/21] dtoc: Convert _drivers to a dict

2020-12-23 Thread Simon Glass
At present this member holds a simple list of driver names. Update it to be a dict of DriverInfo, with the name being the key. This will allow more information to be added about each driver, in future patches. Signed-off-by: Simon Glass --- Changes in v2: - Rename DriverInfo to Driver - Add a

[PATCH v2 10/21] dtoc: Output the struct values in a separate function

2020-12-23 Thread Simon Glass
Reduce the length of output_node() futher by moving the struct-output functionality into a two separate functions. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 50 ++ 1 file changed, 34 insertions(+), 16 deletions(-)

[PATCH v2 07/21] dtoc: Fix a few pylint warnings in dtb_platdata

2020-12-23 Thread Simon Glass
These have crept in again. Update the file to fix all but these ones: dtb_platdata.py:143:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes) dtb_platdata.py:713:0: R0913: Too many arguments (6/5) (too-many-arguments) Signed-off-by: Simon Glass ---

[PATCH v2 08/21] dtoc: Make _output_list a top-level function

2020-12-23 Thread Simon Glass
It is annoying to have this function inside its parent since it makes the parent longer and hard to read. Move it to the top level. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 80 +++--- 1 file changed, 40 insertions(+), 40

[PATCH v2 09/21] dtoc: Output the device in a separate function

2020-12-23 Thread Simon Glass
Reduce the length of output_node() by moving the device-output functionality into a separate function. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/dtb_platdata.py | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git

[PATCH v2 05/21] test: Use a simple variable to record removed device

2020-12-23 Thread Simon Glass
At present the entire test state is effective passed into a test driver just to record which device was removed. This is unnecessary and makes it harder to track what is going on. Use a simple boolean instead. Also drop the unused 'removed' member while we are here. Signed-off-by: Simon Glass

[PATCH v2 04/21] timer: Use a shorter error in TPL

2020-12-23 Thread Simon Glass
This error should not happen in normal use. Reduce the length of it to save space in the image. Add an empty spl.h file to sh since it appears to lack this. Signed-off-by: Simon Glass --- (no changes since v1) lib/time.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH v2 03/21] arc: m68k: nds32: nios2: sh: xtensa: Add empty spl.h header

2020-12-23 Thread Simon Glass
At present it is not possible to include spl.h in on these architectures since the asm/spl.h file is not present. We want to be able to use the spl_phase() function, so add empty headers to make things build. Signed-off-by: Simon Glass --- (no changes since v1) arch/arc/include/asm/spl.h|

[PATCH v2 02/21] sysreset: Use a shorter error with SPL

2020-12-23 Thread Simon Glass
Use a minimal error message to save space. Sort the header files while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/sysreset/sysreset-uclass.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/sysreset/sysreset-uclass.c

[PATCH v2 01/21] pinctrl: Drop post_bind() method when not needed

2020-12-23 Thread Simon Glass
This is not used with of-platdata, so remove it in that case. Signed-off-by: Simon Glass --- (no changes since v1) drivers/pinctrl/pinctrl-uclass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index

[PATCH v2 00/21] dm: Preparation for enhanced of-platdata (part B)

2020-12-23 Thread Simon Glass
This series includes some refactoring of the dtoc tool and some changes to a few drivers (particularly on x86) to reduce TPL size. It is available at u-boot-dm/prep-working Changes in v2: - Rename DriverInfo to Driver - Add a test for the new code and a comment for Driver Simon Glass (21):

[PATCH] Revert "arm64: a37xx: pci: Assert PERST# signal when unloading driver"

2020-12-23 Thread Pali Rohár
This reverts commit 828d32621686aec593076d16445d39b9b8d49c05. This change revers code which asserting PERST# signal when unloading driver. Driver's remove callback is still there as it is used for other functionality. Asserting PERST# signal prior booting kernel is causing that A3720 boards

[v6 18/18] configs: socfpga: Add defconfig for Agilex and Stratix 10 with ATF support

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Booting Agilex and Stratix 10 with ATF support. SPL now loads ATF (BL31), U-Boot proper and DTB from FIT image. The new boot flow with ATF support is as follow: SPL -> ATF (BL31) -> U-Boot proper -> OS (Linux) U-Boot proper now starts at 0x20 (CONFIG_SYS_TEXT_BASE).

[v6 17/18] arm: socfpga: soc64: Enable FIT image generation using binman

2020-12-23 Thread Siew Chin Lim
Enable BINMAN when using Arm-Trusted-Firmware (ATF) to generate FIT images. Signed-off-by: Siew Chin Lim --- v4 --- Adjust BINMAN sequence in code, sorted by alphabetical order. v5 --- Revert all changes in Makefile for BINMAN: (1) Remove target "fit-itb", directly use binman command to

[v6 16/18] arm: socfpga: dts: soc64: Add binman node of FIT image with ATF support

2020-12-23 Thread Siew Chin Lim
Add binman node to device tree to generate the FIT image for u-boot (u-boot.itb) and OS kernel (kernel.itb). u-boot.itb contains arm trusted firmware (ATF), u-boot proper and u-boot device tree for ATF u-boot flow. kernel.itb contains Linux Image and Linux device tree. Signed-off-by: Siew Chin

[v6 15/18] arm: socfpga: soc64: Skip handoff data access in SSBL

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang SPL already setup the Clock Manager with the handoff data from OCRAM. When the Clock Manager's driver get probed again in SSBL, it shall skip the handoff data access in OCRAM. Signed-off-by: Chee Hong Ang --- arch/arm/mach-socfpga/wrap_pll_config_s10.c | 3 ++- 1 file

[v6 14/18] arm: socfpga: soc64: SSBL shall not setup stack on OCRAM

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang Since SSBL is running in DRAM, it shall setup the stack in DRAM instead of OCRAM which is occupied by SPL and handoff data. Signed-off-by: Chee Hong Ang --- include/configs/socfpga_soc64_common.h | 5 + 1 file changed, 5 insertions(+) diff --git

[v6 13/18] arm: socfpga: mailbox: Add 'SYSTEM_RESET' PSCI support to mbox_reset_cold()

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang mbox_reset_cold() will invoke ATF's PSCI service when running in non-secure mode (EL2). Signed-off-by: Chee Hong Ang --- arch/arm/mach-socfpga/mailbox_s10.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-socfpga/mailbox_s10.c

[v6 12/18] arm: socfpga: soc64: Add ATF support for FPGA reconfig driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), FPGA reconfiguration driver calls the SMC/PSCI services provided by ATF to configure the FPGA. Signed-off-by: Chee Hong Ang --- drivers/fpga/intel_sdm_mb.c | 139 1 file changed, 139 insertions(+) diff

[v6 11/18] arm: socfpga: soc64: Add ATF support for Reset Manager driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), Reset Manager driver calls the SMC/PSCI service provided by ATF to enable/disable the SOCFPGA bridges. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- arch/arm/mach-socfpga/reset_manager_s10.c | 13 + 1 file changed, 13

[v6 10/18] net: designware: socfpga: Add ATF support for MAC driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), MAC driver calls the SMC/PSCI services provided by ATF to setup the PHY interface. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- v5 --- Call secure register access helper function to write the secure register. Return error if fail

[v6 09/18] mmc: dwmmc: socfpga: Add ATF support for MMC driver

2020-12-23 Thread Siew Chin Lim
From: Chee Hong Ang In non-secure mode (EL2), MMC driver calls the SMC/PSCI services provided by ATF to set SDMMC's DRVSEL and SMPLSEL. Signed-off-by: Chee Hong Ang Signed-off-by: Siew Chin Lim --- v5 --- Call secure register access helper function to write the secure register. Return error

[v6 08/18] mmc: dwmmc: Change designware MMC 'clksel' callback function to return status

2020-12-23 Thread Siew Chin Lim
Change 'clksel' callback function to allow the code to return a status. This patch is a preparation for enabling Arm-Trusted-Firmware (ATF) in Intel SoC FPGA. This patch does not change functionality. When using Arm-Trusted-Firmware (ATF) in Intel SoC FPGA, the MMC clock related register is

  1   2   >