public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Support UEFI SPI I/O protocol
@ 2022-08-04 10:33 Paul Barker
  2022-08-04 10:34 ` [PATCH v2 1/3] efi_loader: Add SPI I/O protocol support Paul Barker
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paul Barker @ 2022-08-04 10:33 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt, Tom Rini, Ilias Apalodimas
  Cc: Paul Barker, Marc Murphy, Stuart Rubin, Andy VanDamia

These patches add support for the UEFI SPI I/O protocol defined in the
UEFI Platform Initialization (PI) Specification, Version 1.7 Errata A
(April 2020). This allows a UEFI application to interact with devices
on the SPI bus.

The code here is self-contained and easy to enable/disable at compile
time. Compilation testing with am335x_evm_defconfig shows that the size
of u-boot.img increases by less than 2kB when CONFIG_EFI_SPI_PROTOCOL
is enabled.

Changes since v1:

* Do not enable CONFIG_EFI_SPI_PROTOCOL by default.

* Add efi_seltest unit test.

* Mark functions with EFIAPI where necessary.

* Handle debug_transaction argument to efi_spi_io_transaction().

* Handle a value of zero for target->max_read_size &
  target->max_write_size.

* Probe inactive SPI devices when initializing the EFI SPI protocol to
  ensure that dev_get_parent_priv() returns valid data and the exported
  devices are ready to use.

* Skip emulated SPI peripherals. These appear as duplicates within the
  list of devices on the bus when using the sandbox SPI drivers.

* Make most printf statements debug only.

Paul Barker (3):
  efi_loader: Add SPI I/O protocol support
  arm: dts: am335x-sancloud-bbe-lite: UEFI SPI export
  am335x_evm_defconfig: Enable Micron SPI flash support

 MAINTAINERS                                  |   7 +
 arch/arm/dts/am335x-sancloud-bbe-lite.dts    |   8 +-
 arch/sandbox/dts/test.dts                    |   8 +
 configs/am335x_evm_defconfig                 |   1 +
 include/efi_loader.h                         |   4 +
 include/efi_spi_protocol.h                   | 158 +++++
 lib/efi_loader/Kconfig                       |   8 +
 lib/efi_loader/Makefile                      |   1 +
 lib/efi_loader/efi_setup.c                   |   6 +
 lib/efi_loader/efi_spi_protocol.c            | 614 +++++++++++++++++++
 lib/efi_selftest/Makefile                    |   1 +
 lib/efi_selftest/efi_selftest_spi_protocol.c | 237 +++++++
 12 files changed, 1051 insertions(+), 2 deletions(-)
 create mode 100644 include/efi_spi_protocol.h
 create mode 100644 lib/efi_loader/efi_spi_protocol.c
 create mode 100644 lib/efi_selftest/efi_selftest_spi_protocol.c


base-commit: 707b17f64e71fad1615ea25082f2e928f712e366
-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-14  7:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 10:33 [PATCH v2 0/3] Support UEFI SPI I/O protocol Paul Barker
2022-08-04 10:34 ` [PATCH v2 1/3] efi_loader: Add SPI I/O protocol support Paul Barker
2022-08-13 19:20   ` Heinrich Schuchardt
2022-08-25 10:58     ` Paul Barker
2022-09-12 16:14       ` Paul Barker
2022-09-14  7:11         ` Heinrich Schuchardt
2022-08-04 10:34 ` [PATCH v2 2/3] arm: dts: am335x-sancloud-bbe-lite: UEFI SPI export Paul Barker
2022-08-04 10:34 ` [PATCH v2 3/3] am335x_evm_defconfig: Enable Micron SPI flash support Paul Barker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox