From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFEF1C2D0CC for ; Thu, 15 Dec 2022 14:24:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F1EB8549F; Thu, 15 Dec 2022 15:24:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="c/oS5LuQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BD7785279; Thu, 15 Dec 2022 15:24:18 +0100 (CET) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E0A1D85279 for ; Thu, 15 Dec 2022 15:24:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ej1-x62a.google.com with SMTP id bj12so52551710ejb.13 for ; Thu, 15 Dec 2022 06:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7bTI9IJM786DHajPUG8qD2uDllXE8txGEijUV77DGvo=; b=c/oS5LuQae/a+spOYYlrdwCwdc/oFE1GfJ8yLXQjPC+e/jVeO7SmG7rtb/6wAfwHKM RaoM+jFYaobE5yQDop69jPyMQpqgMI0wipnln/gDPonNVe4Dg6j0GAKZudII/AeX5wyq E8qel/fuCjGaWM/GiGQW7u5TonerlIcJqCs1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7bTI9IJM786DHajPUG8qD2uDllXE8txGEijUV77DGvo=; b=aiG0uFhzTjMzA1808OAX+ags7F0K2Yl6BCfkX1OUYoYSakaEgJ76yYNr9+LdyoN0yG +q2rJcV9g1s/R9XZQqr98Z16zIHFAvdM13lxgKvJ8xfdwvWUA6YTkQYHGSriGbUu0tFO 7J3Gse7PPGUzJVO6I7fWxfcT8tLlMv3gd2Z5K8Qv68/zbUX8Xl2YAzI8yh/iGxaKr/VX 9TCjxwtNSf1aN5KMIxbxf/3UQrzPIiQKUmYnaJlawx3cDJ+83C/ostGV7NQHTKUH0tIY T6RxgliwN1mV8Qwrw0ACKhLJ1qvF5GJ8Jj0gIzbmjKwxmBBzhoTQcEYxZLJ6RfV2YzXJ ZZ/g== X-Gm-Message-State: ANoB5pnbsr/g6oFDdTOpf2zoLNE20c31MzXSUrXFVMeTRH9KW/3eNCA6 GNaZ3HvCReIKFqm74zIdld6CJyXd2kXophGwgRxjtg== X-Google-Smtp-Source: AA0mqf6FoVNSzRUmN5Jd+LpziOfd3EubgzL6/G8dRPfQ6teQS0qzq2pruDSrt39709WFxPKQBvE8524Aa8kJOntuSCw= X-Received: by 2002:a17:906:f207:b0:7c1:5982:d731 with SMTP id gt7-20020a170906f20700b007c15982d731mr2759129ejb.589.1671114255279; Thu, 15 Dec 2022 06:24:15 -0800 (PST) MIME-Version: 1.0 References: <20221123175006.4080122-1-paul.barker@sancloud.com> <20221123175006.4080122-2-paul.barker@sancloud.com> <6371bab6-f9a1-6a59-7d50-d2a872092794@sancloud.com> In-Reply-To: <6371bab6-f9a1-6a59-7d50-d2a872092794@sancloud.com> From: Simon Glass Date: Thu, 15 Dec 2022 06:24:02 -0800 Message-ID: Subject: Re: [PATCH v5 1/3] efi_loader: Add SPI I/O protocol support To: Paul Barker Cc: u-boot@lists.denx.de, Tom Rini , Heinrich Schuchardt , Ilias Apalodimas , Jagan Teki Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Yes, that's it. Thanks. - Simon On Wed, 14 Dec 2022 at 01:57, Paul Barker wrote: > > On 14/12/2022 04:39, Simon Glass wrote: > > Hi Paul, > > > > On Wed, 23 Nov 2022 at 10:50, Paul Barker wrote: > >> > >> This addition allows UEFI applications running under u-boot to access > >> peripherals on SPI busses. It is based on the UEFI Platform > >> Initialization (PI) Specification, Version 1.7 Errata A (April 2020). > >> Only the core functionality required to discover SPI peripherals and > >> communicate with them is currently implemented. Other functionality such > >> as the legacy SPI controller interface and the ability to update the SPI > >> peripheral object associated with a particular SPI I/O protocol object > >> is currently unimplemented. > >> > >> The following protocols are defined: > >> * EFI_SPI_CONFIGURATION_PROTOCOL > >> * EFI_SPI_IO_PROTOCOL > >> * EFI_LEGACY_SPI_CONTROLLER_PROTOCOL > >> > >> Since there are no open source implementations of these protocols to use > >> as an example, educated guesses/hacks have been made in cases where the > >> UEFI PI specification is unclear and these are documented in comments. > >> > >> This implementation has been tested on the SanCloud BBE Lite and allowed > >> a UEFI test application to successfully communicate with a Micron > >> Authenta flash device connected via the SPI bus. > >> > >> Signed-off-by: Paul Barker > >> --- > >> MAINTAINERS | 6 + > >> configs/am335x_evm_defconfig | 1 + > >> include/efi_api.h | 4 + > >> include/efi_loader.h | 4 + > >> include/efi_spi_protocol.h | 166 +++++++++ > >> lib/efi_loader/Kconfig | 8 + > >> lib/efi_loader/Makefile | 1 + > >> lib/efi_loader/efi_setup.c | 6 + > >> lib/efi_loader/efi_spi_protocol.c | 576 ++++++++++++++++++++++++++++++ > >> lib/uuid.c | 4 + > >> 10 files changed, 776 insertions(+) > >> create mode 100644 include/efi_spi_protocol.h > >> create mode 100644 lib/efi_loader/efi_spi_protocol.c > > > > This should have a sandbox test as well. See test/dm/spi.c or sf.c for examples. > > Hi Simon, > > There is a test case in patch 2 of this series, is that what you're > looking for? It was split out as requested in the review of v3 of this > series. > > Thanks, > > -- > Paul Barker > Principal Software Engineer > SanCloud Ltd > > e: paul.barker@sancloud.com > w: https://sancloud.com/ >