Pull request for efi-2021-10-rc5

2021-09-25 Thread Heinrich Schuchardt
The following changes since commit 8284d6f838684cfa6e3303a447deb38027c5d7f0: Merge branch '2021-09-24-assorted-minor-updates' (2021-09-24 14:28:54 -0400) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-efi.git tags/efi-2021-10-rc5 for you to

[PATCH v5 28/29] image: Split up boot_get_fdt()

2021-09-25 Thread Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the FDT into a separate function. Signed-off-by: Simon Glass --- Changes in v5: - Rebase to next common/image-fdt.c | 226 + 1 file changed,

[PATCH v5 27/29] image: Reduce variable scope in boot_get_fdt()

2021-09-25 Thread Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/common/image-fdt.c

[PATCH v5 21/29] image: Drop #ifdefs for fit_print_contents()

2021-09-25 Thread Simon Glass
Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 2f20bb7e446..3952ab749ad 100644 ---

[PATCH v5 11/29] image: Use the correct checks for CRC32

2021-09-25 Thread Simon Glass
Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) directly in the host build, so drop the unnecessary indirection. Add a few more conditions to SPL_CRC32 to avoid build failures as well as TPL_CRC32. Also update hash.c to make crc32 optional and to actually take notice

[PATCH v5 10/29] image: Use Kconfig to enable FIT_RSASSA_PSS on host

2021-09-25 Thread Simon Glass
Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the compiler to check the config where possible,

[PATCH v5 22/29] image: Drop most #ifdefs in image-board.c

2021-09-25 Thread Simon Glass
Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass --- Changes in v5: - Rebase to next common/image-board.c | 111 +++ include/image.h | 7 ++- 2 files changed, 55 insertions(+), 63

[PATCH v5 25/29] image: Remove #ifdefs from select_ramdisk()

2021-09-25 Thread Simon Glass
Use boolean variables to deal with the strange #ifdef logic of this function, so we can remove the #ifdefs. Signed-off-by: Simon Glass --- Changes in v5: - Rebase to next common/image-board.c | 139 ++- 1 file changed, 72 insertions(+), 67 deletions(-)

[PATCH v5 24/29] image: Split up boot_get_ramdisk()

2021-09-25 Thread Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the ramdisk into a separate function. Leave the code indented as it was for easier review. The next patch cleans this up along with checkpatch violations. Signed-off-by: Simon Glass ---

[PATCH v5 23/29] image: Reduce variable scope in boot_get_ramdisk()

2021-09-25 Thread Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/image-board.c

[PATCH v5 26/29] image: Remove some #ifdefs from image-fit and image-fit-sig

2021-09-25 Thread Simon Glass
Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig.boot| 10 ++ common/image-fit-sig.c | 8 ++-- common/image-fit.c | 7 --- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git

[PATCH v5 20/29] image: Drop unnecessary #ifdefs from image.h

2021-09-25 Thread Simon Glass
This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. Signed-off-by: Simon Glass --- Changes in v5: - Rebase to next include/image.h| 39 --

[PATCH v5 15/29] image: Drop IMAGE_ENABLE_IGNORE

2021-09-25 Thread Simon Glass
We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fit.c | 2 +- include/image.h| 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index

[PATCH v5 14/29] image: Drop IMAGE_OF_SYSTEM_SETUP

2021-09-25 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 2 +- include/image.h| 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/common/image-fdt.c

[PATCH v5 13/29] image: Drop IMAGE_OF_BOARD_SETUP

2021-09-25 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) common/image-fdt.c | 4 ++-- include/image.h| 6 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/common/image-fdt.c

[PATCH v5 19/29] image: Tidy up fit_unsupported_reset()

2021-09-25 Thread Simon Glass
This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass --- (no changes since v1) common/bootm_os.c | 8 include/image.h |

[PATCH v5 16/29] efi: Correct dependency on FIT_SIGNATURE

2021-09-25 Thread Simon Glass
At present EFI_SECURE BOOT selects RSA but does not necessarily enable FIT_SIGNATURE. Mostly this is fine, but a few boards do not enable it, so U-Boot tries to do RSA verification when loading FIT images, but it is not enabled. This worked because the condition for checking the RSA signature is

[PATCH v5 12/29] image: Drop IMAGE_BOOT_GET_CMDLINE

2021-09-25 Thread Simon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass --- Changes in v5: - Update commit message to indicate that the code is in a separate file

[PATCH v5 09/29] image: Use Kconfig to enable CONFIG_FIT_VERBOSE on host

2021-09-25 Thread Simon Glass
Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the host build, so drop the forcing of this in the image.h header. Signed-off-by: Simon Glass --- Changes in v5: - Use TOOLS_ instead of HOST_ include/image.h | 5 ++--- tools/Kconfig | 5

[PATCH v5 08/29] image: Drop IMAGE_ENABLE_OF_LIBFDT

2021-09-25 Thread Simon Glass
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass --- Changes in v5: - Use TOOLS_ instead of HOST_ arch/arc/lib/bootm.c| 2 +- arch/arm/lib/bootm.c| 4

[PATCH v5 07/29] image: Drop IMAGE_ENABLE_FIT

2021-09-25 Thread Simon Glass
Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass --- Changes in v5: - Rebase to next arch/arm/mach-imx/hab.c | 2 +- common/bootm.c | 10 +-

[PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL

2021-09-25 Thread Simon Glass
At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this up by adding new Kconfig options to enable

[PATCH v5 03/29] image: Add Kconfig options for FIT in the tools build

2021-09-25 Thread Simon Glass
In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some #ifdefs which are immediately unnecessary

[PATCH v5 06/29] hash: Drop some #ifdefs in hash.c

2021-09-25 Thread Simon Glass
We can use the __maybe_unused attribute to avoid some of the #ifdefs in this file. Update the functions accordingly. Note: The actual hashing interface is still a mess, with four separate combinations and lots of #ifdefs. This should really use a driver approach, e.g. as is done with partition

[PATCH v5 01/29] compiler: Rename host_build() to tools_build()

2021-09-25 Thread Simon Glass
With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be described as a tool, so rename this function.

[PATCH v5 02/29] kconfig: Add tools support to CONFIG_IS_ENABLED()

2021-09-25 Thread Simon Glass
At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we could use, for example,

[PATCH v5 04/29] spl: cypto: Bring back SPL_ versions of SHA

2021-09-25 Thread Simon Glass
Unfortunately these were removed by mistake. This means that adding hash support to SPL brings in all software algorithms, with a substantial increase in code size. The origin of the problem was renaming them to SPL_FIT_xxx and then these were removed altogether in a later commit. Add them back.

[PATCH v5 00/29] image: Reduce #ifdefs and ad-hoc defines in image code (Part B)

2021-09-25 Thread Simon Glass
Much of the image-handling code predates the introduction of Kconfig and has quite a few #ifdefs in it. It also uses its own IMAGE_... defines to help reduce the #ifdefs, which is unnecessary now that we can use IS_ENABLED() et al. The image code is also where quite a bit of code is shared with

[PATCH u-boot-marvell v2 6/6] arm: a37xx: pci: Update private structure documentation

2021-09-25 Thread Marek Behún
From: Marek Behún There were several changes for this structure but the documentation was not changed at the time. Fix this. Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH u-boot-marvell v2 4/6] arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port

2021-09-25 Thread Marek Behún
From: Pali Rohár Now that PCI Bridge (PCIe Root Port) for Aardvark is emulated in U-Boot, add support for handling and propagation of CRSSVE bit. When CRSSVE bit is unset (default), driver has to reissue config read/write request on CRS response. CRSSVE bit is supported only when CRSVIS bit is

[PATCH u-boot-marvell v2 5/6] arm: a37xx: pci: Cosmetic change

2021-09-25 Thread Marek Behún
From: Marek Behún Update indentation in driver's private structure. Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index 53e9e23d4a..b4f350ca2c

[PATCH u-boot-marvell v2 2/6] arm: a37xx: pci: Add support for accessing PCI Bridge on root bus

2021-09-25 Thread Marek Behún
From: Pali Rohár Aardvark does not have a real PCIe Root Port device on the root bus. Instead it has PCIe registers of PCIe Root Port device mapped in internal Aardvark memory space starting at offset 0xc0. The PCIe Root Port itself is normally available as a PCI Bridge device on the root bus

[PATCH u-boot-marvell v2 3/6] arm: a37xx: pci: Do not automatically enable bus mastering on PCI Bridge

2021-09-25 Thread Marek Behún
From: Pali Rohár Now that PCI Bridge is working for the PCIe Root Port, U-Boot's PCI_PNP code automatically enables memory access and bus mastering when needed. We do not need to enable it when setting the HW up. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún ---

[PATCH u-boot-marvell v2 1/6] arm: a37xx: pci: Fix pcie_advk_link_up()

2021-09-25 Thread Marek Behún
From: Pali Rohár Aardvark reports Disabled and Hot Reset LTSSM states as values >= 0x20. Link is not up in these states, so fix pcie_advk_link_up() function. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/pci/pci-aardvark.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH u-boot-marvell v2 0/6] A3720 PCIe enhancements

2021-09-25 Thread Marek Behún
From: Marek Behún Hello Stefan, Pali has worked on some more enhancements for Armada 3720 PCIe driver (Aardvark). The main change is adding support for accessing configuration space of the PCI Bridge on the PCIe Root Port. Linux does something similar with pci-bridge-emul. Marek Changes

Re: [PATCH v3 2/3] arm: Add an __image_copy_start symbol for ARMv8

2021-09-25 Thread Scott Wood
On Sat, 2021-09-25 at 09:46 -0600, Simon Glass wrote: > Hi Scott, > > On Thu, 5 Aug 2021 at 13:20, Simon Glass wrote: > > > > Hi Scott, > > > > On Wed, 4 Aug 2021 at 13:53, Scott Wood wrote: > > > > > > On Sun, 2021-08-01 at 14:59 -0600, Simon Glass wrote: > > > > This symbol is needed for

Re: [PATCH u-boot-marvell 6/6] arm: a37xx: pci: Update private structure documentation

2021-09-25 Thread Pali Rohár
On Saturday 25 September 2021 22:37:06 Marek Behún wrote: > From: Marek Behún > > There were several changes for this structure but the documentation was > not changed at the time. Fix this. > > Signed-off-by: Marek Behún > --- > drivers/pci/pci-aardvark.c | 17 + > 1 file

[PATCH v2 3/4] video: simplefb: Add 30bpp support

2021-09-25 Thread Mark Kettenis
Recognize the canonical format strings for framebuffers in 30bpp mode and 32/24bpp mode. Signed-off-by: Mark Kettenis --- drivers/video/simplefb.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index

[PATCH v2 4/4] efi_loader: GOP: Fix 30bpp block transfer support

2021-09-25 Thread Mark Kettenis
Convert pixel values when necessary like we do for 16bpp framebuffers. Signed-off-by: Mark Kettenis --- lib/efi_loader/efi_gop.c | 47 +++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index

[PATCH v2 2/4] efi_loader: GOP: Add 30bpp support

2021-09-25 Thread Mark Kettenis
Provide correct framebuffer information for 30bpp modes. Signed-off-by: Mark Kettenis --- lib/efi_loader/efi_gop.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 1206b2d7a2..5033a2c9e3 100644 ---

[PATCH v2 1/4] video: Add 30bpp support

2021-09-25 Thread Mark Kettenis
Add support for 30bpp mode where pixels are picked in 32-bit integers but use 10 bits instead of 8 bits for each component. Signed-off-by: Mark Kettenis --- drivers/video/vidconsole-uclass.c | 11 --- include/video.h | 9 + 2 files changed, 17 insertions(+), 3

[PATCH v2 0/4] 30bpp framebuffer support

2021-09-25 Thread Mark Kettenis
Apple M1 machines come up with a framebuffer that in 30bpp mode. This series adds basic support for this mode. What I call 30bpp mode here is really a 32bpp mode with pixels where each color channel is 10 bits deep. To distinguish this mode from the "regular" 32bpp mode (where each channel is 8

[PATCH u-boot-marvell 6/6] arm: a37xx: pci: Update private structure documentation

2021-09-25 Thread Marek Behún
From: Marek Behún There were several changes for this structure but the documentation was not changed at the time. Fix this. Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH u-boot-marvell 4/6] arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port

2021-09-25 Thread Marek Behún
From: Pali Rohár Now that PCI Bridge (PCIe Root Port) for Aardvark is emulated in U-Boot, add support for handling and propagation of CRSSVE bit. When CRSSVE bit is unset (default), driver has to reissue config read/write request on CRS response. CRSSVE bit is supported only when CRSVIS bit is

[PATCH u-boot-marvell 5/6] arm: a37xx: pci: Cosmetic change

2021-09-25 Thread Marek Behún
From: Marek Behún Update indentation in driver's private structure. Signed-off-by: Marek Behún --- drivers/pci/pci-aardvark.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index 53e9e23d4a..b4f350ca2c

[PATCH u-boot-marvell 3/6] arm: a37xx: pci: Do not automatically enable bus mastering on PCI Bridge

2021-09-25 Thread Marek Behún
From: Pali Rohár Now that PCI Bridge is working for the PCIe Root Port, U-Boot's PCI_PNP code automatically enables memory access and bus mastering when needed. We do not need to enable it when setting the HW up. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún ---

[PATCH u-boot-marvell 2/6] arm: a37xx: pci: Add support for accessing PCI Bridge on root bus

2021-09-25 Thread Marek Behún
From: Pali Rohár Aardvark does not have a real PCIe Root Port device on the root bus. Instead it has PCIe registers of PCIe Root Port device mapped in internal Aardvark memory space starting at offset 0xc0. The PCIe Root Port itself is normally available as a PCI Bridge device on the root bus

[PATCH u-boot-marvell 1/6] arm: a37xx: pci: Fix pcie_advk_link_up()

2021-09-25 Thread Marek Behún
From: Pali Rohár Aardvark reports Disabled and Hot Reset LTSSM states as values >= 0x20. Link is not up in these states, so fix pcie_advk_link_up() function. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/pci/pci-aardvark.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH u-boot-marvell 0/6] A3720 PCIe enhancements

2021-09-25 Thread Marek Behún
From: Marek Behún Hello Stefan, Pali has worked on some more enhancements for Armada 3720 PCIe driver (Aardvark). The main change is adding support for accessing configuration space of the PCI Bridge on the PCIe Root Port. Linux does something similar with pci-bridge-emul. Marek Marek Behún

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-09-25 Thread Ilias Apalodimas
Hi Mark, On Sat, Sep 25, 2021 at 07:01:07PM +0200, Mark Kettenis wrote: > > From: Ilias Apalodimas > > Date: Fri, 24 Sep 2021 16:12:51 +0300 > > > > Forgot to include Mark, which showed some interest for MBPs > > Well, I am currently using OF_BOARD, so this doesn't affect me. I was > merely

[PATCH u-boot-spi v2 9/9] mtd: Remove mtd_erase_callback() entirely

2021-09-25 Thread Marek Behún
From: Marek Behún The original purpose of mtd_erase_callback() in Linux at the time it was imported to U-Boot, was to inform the caller that erasing is done (since it was an asynchronous operation). All supplied callback methods in U-Boot do nothing, but the mtd_erase_callback() function was

[PATCH u-boot-spi v2 8/9] mtd: mtdpart: Make mtdpart's _erase method sane

2021-09-25 Thread Marek Behún
From: Marek Behún The _erase() method of the mtdpart driver, part_erase(), currently implements offset shifting (for given mtdpart partition) in a weird way: 1. part_erase() adds partition offset to block address 2. parent driver's _erase() method is called 3. parent driver's _erase()

[PATCH u-boot-spi v2 7/9] mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase()

2021-09-25 Thread Marek Behún
From: Marek Behún May it possible to interrupt the spi_nor_erase() function. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Tested-by: Masami Hiramatsu --- drivers/mtd/spi/spi-nor-core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/spi/spi-nor-core.c

[PATCH u-boot-spi v2 6/9] mtd: spi-nor-core: Call mtd_erase_callback() from spi_nor_erase()

2021-09-25 Thread Marek Behún
From: Marek Behún The spi_nor_erase() function does not call mtd_erase_callback() as it should. The mtdpart code currently implements the subtraction of partition offset in mtd_erase_callback(). This results in partition offset being added prior calling spi_nor_erase(), but not subtracted back

[PATCH u-boot-spi v2 5/9] mtd: spi-nor-core: Don't check for zero length in spi_nor_erase()

2021-09-25 Thread Marek Behún
From: Marek Behún This check is already done in mtdcore's mtd_erase(), no reason to do this here as well. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Tested-by: Masami Hiramatsu --- drivers/mtd/spi/spi-nor-core.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH u-boot-spi v2 3/9] mtd: spi-nor-core: Don't overwrite return value if it is non-zero

2021-09-25 Thread Marek Behún
From: Marek Behún The cleanup code of the spi_nor_erase() function overwrites the ret variable with return value of clean_bar(), even if the ret variable is already set. Fix this. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Tested-by: Masami Hiramatsu ---

[PATCH u-boot-spi v2 4/9] mtd: spi-nor-core: Check return value of write_disable() in spi_nor_erase()

2021-09-25 Thread Marek Behún
From: Marek Behún The cleanup code of spi_nor_erase() function calls write_disable(), but does not return it's return value even in case of failure. Fix this. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Tested-by: Masami Hiramatsu --- drivers/mtd/spi/spi-nor-core.c | 4 +++- 1 file

[PATCH u-boot-spi v2 2/9] mtd: spi-nor-core: Check return value of write_enable() in spi_nor_erase()

2021-09-25 Thread Marek Behún
From: Marek Behún The spi_nor_erase() function does not check return value of the write_enable() call. Fix this. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Reviewed-by: Jagan Teki Tested-by: Masami Hiramatsu --- drivers/mtd/spi/spi-nor-core.c | 4 +++- 1 file changed, 3

[PATCH u-boot-spi v2 0/9] Fix `mtd erase` when used with mtdpart

2021-09-25 Thread Marek Behún
From: Marek Behún The original cover letter said: this patch series fixes the `mtd erase` command when used with mtdpart with a partition of non-zero offset. Currently when the `mtd erase` command is used for such a partition, it does not erase all blocks. Instead after a block is erased, the

[PATCH u-boot-spi v2 1/9] mtd: spi-nor-core: Try cleaning up in case writing BAR failed

2021-09-25 Thread Marek Behún
From: Marek Behún Use the cleanup codepath of spi_nor_erase() also in the event of failure of writing the BAR register. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Reviewed-by: Jagan Teki Tested-by: Masami Hiramatsu --- drivers/mtd/spi/spi-nor-core.c | 2 +- 1 file changed, 1

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-09-25 Thread Mark Kettenis
> From: Simon Glass > Date: Fri, 24 Sep 2021 07:57:00 -0600 > > Hi Ilias, > > On Fri, 24 Sept 2021 at 07:10, Ilias Apalodimas > wrote: > > > > At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got > > introduced, in order to support a DTB handed over by an earlier stage

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-09-25 Thread Mark Kettenis
> From: Ilias Apalodimas > Date: Fri, 24 Sep 2021 16:12:51 +0300 > > Forgot to include Mark, which showed some interest for MBPs Well, I am currently using OF_BOARD, so this doesn't affect me. I was merely pointing out that having OF_PRIOR_STAGE makes some sense as it clearly indicates that

Re: [PATCH 1/3] video: Add 30bpp support

2021-09-25 Thread Mark Kettenis
> From: Simon Glass > Date: Sat, 25 Sep 2021 07:40:54 -0600 > > On Thu, 16 Sept 2021 at 07:01, Mark Kettenis wrote: > > > > Add support for 30bpp mode where pixels are picked in 32-bit > > integers but use 10 bits instead of 8 bits for each component. > > > > Signed-off-by: Mark Kettenis > >

[PATCH] misc: ocotp: Allow disabling ocotp driver in SPL

2021-09-25 Thread Oleksandr Suvorov
From: Michael Scott This allows removal of the OCOTP driver when SPL is enabled. Disabling OCOTP reduces SPL size efficiently. Signed-off-by: Michael Scott Co-developed-by: Oleksandr Suvorov Signed-off-by: Oleksandr Suvorov --- drivers/misc/Kconfig | 9 + drivers/misc/Makefile | 2

Re: [PATCH 0/5] Apple M1 Support

2021-09-25 Thread Mark Kettenis
> From: Simon Glass > Date: Sat, 25 Sep 2021 08:42:30 -0600 > > Hi Mark, > > On Sat, 25 Sept 2021 at 07:52, Mark Kettenis wrote: > > > > > From: Simon Glass > > > Date: Sat, 25 Sep 2021 07:27:41 -0600 > > > > > > Hi Mark, > > > > > > On Sat, 25 Sept 2021 at 02:11, Mark Kettenis > > > wrote:

Re: [PATCH u-boot-marvell] arm: mvebu: turris_omnia: fix leaked mtd device

2021-09-25 Thread Pali Rohár
On Saturday 25 September 2021 02:49:18 Marek Behún wrote: > From: Marek Behún > > After getting MTD device via get_mtd_device_nm(), we need to put it with > put_mtd_device(), otherwise we get > > Removing MTD device #0 (mx25l6405d) with use count 1 > > before booting kernel. > >

Re: [PATCH v3 2/3] arm: Add an __image_copy_start symbol for ARMv8

2021-09-25 Thread Simon Glass
Hi Scott, On Thu, 5 Aug 2021 at 13:20, Simon Glass wrote: > > Hi Scott, > > On Wed, 4 Aug 2021 at 13:53, Scott Wood wrote: > > > > On Sun, 2021-08-01 at 14:59 -0600, Simon Glass wrote: > > > This symbol is needed for binman to locate the start of the image. Add it. > > > > > > Note: the

[PATCH] imx: syscounter: allow timer_init for SPL build

2021-09-25 Thread Oleksandr Suvorov
From: Michael Scott If we enable SPL and SKIP_LOWLEVEL_INIT, this results in the weak function timer_init() being used in the SPL build. This is not desirable as on iMX6 SoC, MMC will then fail once u-boot proper is booted due to timing issue. Fixes: be277c3a89 ("imx: mx7: avoid some

Re: [PATCH 1/3] Add fdt network helper header file

2021-09-25 Thread Simon Glass
Hi Tony, On Thu, 5 Aug 2021 at 22:50, Tony Dinh wrote: > > Add include header file include/fdt_support_net.h > > Signed-off-by: Tony Dinh > --- > > include/fdt_support_net.h | 39 +++ > 1 file changed, 39 insertions(+) > create mode 100644

[PATCH V2] configs: omap3x_logic: Enable LTO on more LogicPD OMAP3 boards

2021-09-25 Thread Adam Ford
There are five omap3 based boards from LogicPD. Two of them have added LTO support. Add the remaining three to use LTO. Signed-off-by: Adam Ford --- V2: Rebase diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig index 8b0c943024..5c1e19555c 100644 ---

Re: [PATCH] ARM: vexpress_ca9x4: Correct missing SYS_LOAD_ADDR

2021-09-25 Thread Simon Glass
Hi Tom, On Sat, 25 Sept 2021 at 07:47, Tom Rini wrote: > > On Sat, Sep 25, 2021 at 07:04:18AM -0600, Simon Glass wrote: > > > Add this missing option since it otherwise causes the build to fail in > > an infinite loop of: > > > >Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) >

Re: [PATCH 0/5] Apple M1 Support

2021-09-25 Thread Simon Glass
Hi Mark, On Sat, 25 Sept 2021 at 07:52, Mark Kettenis wrote: > > > From: Simon Glass > > Date: Sat, 25 Sep 2021 07:27:41 -0600 > > > > Hi Mark, > > > > On Sat, 25 Sept 2021 at 02:11, Mark Kettenis > > wrote: > > > > > > > From: Simon Glass > > > > Date: Fri, 24 Sep 2021 19:20:32 -0600 > > >

Re: [RFC PATCH] RFC: Replace CONFIG_SYS_BAUDRATE_TABLE by board and UART driver rounding functions

2021-09-25 Thread Pali Rohár
On Saturday 25 September 2021 09:51:08 Tom Rini wrote: > On Sat, Sep 25, 2021 at 02:19:58PM +0200, Pali Rohár wrote: > > > Add new functions which returns the nearest baudrate and use them instead > > of hardcoded and incomplete CONFIG_SYS_BAUDRATE_TABLE compile time option. > > > > Add

[PATCH] arm: spl: flush and disable cache before jumping to OPTEE

2021-09-25 Thread Oleksandr Suvorov
From: Ricardo Salveti Make sure to flush, disable caches and interrupts before jumpint to OPTEE. This fixes the SDP->SPL->OPTEE boot flow on iMX6Q and most likely on some other ARM SoCs. Signed-off-by: Ricardo Salveti Co-developed-by: Oleksandr Suvorov Signed-off-by: Oleksandr Suvorov ---

Re: [PATCH 0/5] Apple M1 Support

2021-09-25 Thread Mark Kettenis
> From: Simon Glass > Date: Sat, 25 Sep 2021 07:27:41 -0600 > > Hi Mark, > > On Sat, 25 Sept 2021 at 02:11, Mark Kettenis wrote: > > > > > From: Simon Glass > > > Date: Fri, 24 Sep 2021 19:20:32 -0600 > > > > > > Hi Mark, > > > > > > On Sat, 18 Sept 2021 at 07:54, Mark Kettenis wrote: > > >

Re: [RFC PATCH] RFC: Replace CONFIG_SYS_BAUDRATE_TABLE by board and UART driver rounding functions

2021-09-25 Thread Tom Rini
On Sat, Sep 25, 2021 at 02:19:58PM +0200, Pali Rohár wrote: > Add new functions which returns the nearest baudrate and use them instead > of hardcoded and incomplete CONFIG_SYS_BAUDRATE_TABLE compile time option. > > Add implementation of rounding function for serial_mvebu_a3700 driver and >

Re: [PATCH] ARM: vexpress_ca9x4: Correct missing SYS_LOAD_ADDR

2021-09-25 Thread Tom Rini
On Sat, Sep 25, 2021 at 07:04:18AM -0600, Simon Glass wrote: > Add this missing option since it otherwise causes the build to fail in > an infinite loop of: > >Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) >Error in reading or end of file. > > Signed-off-by: Simon Glass

Re: [PATCH 2/3] efi_loader: GOP: Add 30bpp support

2021-09-25 Thread Simon Glass
Hi Mark, On Thu, 16 Sept 2021 at 07:02, Mark Kettenis wrote: > > Provide correct framebuffer information for 30bpp modes. > > Signed-off-by: Mark Kettenis > --- > lib/efi_loader/efi_gop.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/lib/efi_loader/efi_gop.c

Re: [PATCH 3/3] video: simplefb: Add 30bpp support

2021-09-25 Thread Simon Glass
On Thu, 16 Sept 2021 at 07:02, Mark Kettenis wrote: > > Recognize the canonical format strings for framebuffers in > 30bpp mode. > > Signed-off-by: Mark Kettenis > --- > drivers/video/simplefb.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/video/simplefb.c

Re: [PATCH 1/3] video: Add 30bpp support

2021-09-25 Thread Simon Glass
On Thu, 16 Sept 2021 at 07:01, Mark Kettenis wrote: > > Add support for 30bpp mode where pixels are picked in 32-bit > integers but use 10 bits instead of 8 bits for each component. > > Signed-off-by: Mark Kettenis > --- > drivers/video/console_normal.c| 2 ++ >

Re: [PATCH 4/5] arm: dts: apple: Add preliminary device trees

2021-09-25 Thread Simon Glass
On Sun, 19 Sept 2021 at 21:16, Simon Glass wrote: > > On Sat, 18 Sept 2021 at 07:56, Mark Kettenis wrote: > > > > Add preliminary device trees for the Apple M1 mini (2020) and > > Apple M1 Macbook Pro 13" (2020). Device tree bindings for > > the Apple M1 SoC are still being formalized and these

Re: [PATCH 5/5] doc: board: apple: Add Apple M1 documentation

2021-09-25 Thread Simon Glass
On Sun, 19 Sept 2021 at 21:16, Simon Glass wrote: > > On Sat, 18 Sept 2021 at 07:56, Mark Kettenis wrote: > > > > Provide preliminary instructions on how to get U-Boot to run on > > Apple Silicon Macs. > > > > Signed-off-by: Mark Kettenis > > --- > > doc/board/apple/index.rst | 9 +++ > >

Re: [PATCH 3/5] misc: Add Apple DART driver

2021-09-25 Thread Simon Glass
On Mon, 20 Sept 2021 at 19:11, Simon Glass wrote: > > Hi Mark, > > On Mon, 20 Sept 2021 at 02:33, Mark Kettenis wrote: > > > > > From: Simon Glass > > > Date: Sun, 19 Sep 2021 21:16:00 -0600 > > > > > > Hi Mark, > > > > > > On Sat, 18 Sept 2021 at 07:55, Mark Kettenis wrote: > > > > > > > >

Re: [PATCH 1/5] arm: apple: Add initial support for Apple's M1 SoC

2021-09-25 Thread Simon Glass
Hi Mark, On Tue, 21 Sept 2021 at 10:09, Mark Kettenis wrote: > > > From: Bin Meng > > Date: Tue, 21 Sep 2021 23:53:10 +0800 > > > > On Tue, Sep 21, 2021 at 8:42 PM Tom Rini wrote: > > > > > > On Sun, Sep 19, 2021 at 10:33:25PM +0200, Mark Kettenis wrote: > > > > > From: Bin Meng > > > > >

Re: [PATCH 2/5] serial: s5p: Add Apple M1 support

2021-09-25 Thread Simon Glass
On Sun, 19 Sept 2021 at 21:15, Simon Glass wrote: > > Hi Mark, > > On Sat, 18 Sept 2021 at 07:55, Mark Kettenis wrote: > > > > Apple M1 SoCs include an S5L UART which is a variant of the S5P > > UART. Add support for this variant and enable it by default > > on Apple SoCs. > > > >

Re: [PATCH 0/5] Apple M1 Support

2021-09-25 Thread Simon Glass
Hi Mark, On Sat, 25 Sept 2021 at 02:11, Mark Kettenis wrote: > > > From: Simon Glass > > Date: Fri, 24 Sep 2021 19:20:32 -0600 > > > > Hi Mark, > > > > On Sat, 18 Sept 2021 at 07:54, Mark Kettenis wrote: > > > > > > This series adds basic support for Apple's M1 SoC to U-Boot. > > > This builds

[PATCH] ARM: vexpress_ca9x4: Correct missing SYS_LOAD_ADDR

2021-09-25 Thread Simon Glass
Add this missing option since it otherwise causes the build to fail in an infinite loop of: Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) Error in reading or end of file. Signed-off-by: Simon Glass Fixes: 15e30106ce6 (ARM: vexpress_ca9x4: Reintroduce board in order to use

[PATCH v4 15/15] image: Remove ifdefs around image_setup_linux() el at

2021-09-25 Thread Simon Glass
Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c which calls into it. Signed-off-by: Simon Glass --- Changes in v4: - Rebase to master Changes in v3: - Pick up only the first part of the original v2 series common/bootm.c | 16

[PATCH v4 10/15] image: Split board code out into its own file

2021-09-25 Thread Simon Glass
To avoid a large #ifdef in the image.c file, move the affected code into a separate file. Avoid any style fix-ups for easier review. Those are in the next patch. Signed-off-by: Simon Glass --- (no changes since v1) common/Makefile | 2 +- common/image-board.c | 925

[PATCH v4 14/15] image: Avoid #ifdefs for manual relocation

2021-09-25 Thread Simon Glass
Add a macro to handle manually relocating a pointer. Update the iamge code to use this to avoid needing #ifdefs. This also fixes a bug where the 'done' flag was not set. Signed-off-by: Simon Glass --- (no changes since v1) common/image-sig.c | 40 ++--

[PATCH v4 11/15] image: Fix up checkpatch warnings in image-board.c

2021-09-25 Thread Simon Glass
Tidy up the warnings. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 142 ++- 1 file changed, 72 insertions(+), 70 deletions(-) diff --git a/common/image-board.c b/common/image-board.c index f9053552e74..15419c78c48 100644

[PATCH v4 13/15] image: Create a function to do manual relocation

2021-09-25 Thread Simon Glass
Rather than adding an #ifdef and open-coding this calculation, add a helper function to handle it. Use this in the image code. Signed-off-by: Simon Glass --- (no changes since v1) common/image.c | 33 +++-- include/relocate.h | 24 +++- 2

[PATCH v4 12/15] image: Split host code out into its own file

2021-09-25 Thread Simon Glass
To avoid having #ifdefs in a few functions which are completely different in the board and host code, create a new image-host.c file. Signed-off-by: Simon Glass --- (no changes since v1) common/image-board.c | 17 + common/image-host.c | 27 +++

[PATCH v4 09/15] image: Update image_decomp() to avoid ifdefs

2021-09-25 Thread Simon Glass
Adjust this function so that preprocessor macros are not needed. With this, the host build uses more of the same header files as the target build. Rather than definining CONFIG_SYS_MALLOC_LEN, add a CONSERVE_MEMORY define, since that is the purpose of the value. This appears to have no impact on

[PATCH v4 08/15] gzip: Avoid use of u64

2021-09-25 Thread Simon Glass
The gzip API uses the u64 type in it, which is not available in the host build. This makes it impossible to include the header file. We could make this type available, but it seems unnecessary. Limiting the compression size to that of the 'unsigned long' type seems good enough. On 32-bit machines

[PATCH v4 07/15] image: Update zstd to avoid reporting error twice

2021-09-25 Thread Simon Glass
The zstd implementation prints the error in image_decomp() which is incorrect and does not match other algorithms. Drop this and let the caller report the error. Signed-off-by: Simon Glass --- (no changes since v1) common/image.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

[PATCH v4 02/15] Add support for an owned buffer

2021-09-25 Thread Simon Glass
When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example of this is where multiple files are decompressed from the firmware image, using a temporary buffer for reading (since the compressed data has

[PATCH v4 06/15] image: Avoid switch default in image_decomp()

2021-09-25 Thread Simon Glass
At present this function is full of preprocessor macros. Adjust it to check for an unsupported algorithm after the switch(). This will allow us to drop the macros. Fix up the return-value path and an extra blank line while we are here. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v4 04/15] zstd: Create a function for use from U-Boot

2021-09-25 Thread Simon Glass
The existing zstd API requires the same sequence of calls to perform its task. Create a helper for U-Boot, to avoid code duplication, as is done with other compression algorithms. Make use of of this from the image code. Note that the zstd code lacks a test in test/compression.c and this should

[PATCH v4 01/15] lib: Add memdup()

2021-09-25 Thread Simon Glass
Add a function to duplicate a memory region, a little like strdup(). Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add a patch to introduce a memdup() function include/linux/string.h | 13 + lib/string.c | 13 + test/lib/string.c

  1   2   >