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 723D1C07E9D for ; Mon, 26 Sep 2022 13:40:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFDDB84C66; Mon, 26 Sep 2022 15:40:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SPpzQWkl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 15AAF84C90; Mon, 26 Sep 2022 15:40:54 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 C72AA8494E for ; Mon, 26 Sep 2022 15:40:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x629.google.com with SMTP id dv25so14109247ejb.12 for ; Mon, 26 Sep 2022 06:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=hh+kKC7ZFgD6IsXRu0r11HiAkzLLc+srjjFhyv2vjH4=; b=SPpzQWklq/B0/hQawoowv6J5gbRhZVJwTVdShNKdenQREDbQcLmrHMQTMO06TjckzW GJwEeV92SYqeyE9pqt5HzwwI0hCgL2MG+7wBZUldb05Wgs+bNVCjiWMe8vhKBAhCncU2 2Tz+7+Y8kgybjdu0hiWM4acOAWmZ1ak599pZSbyH9npZZNNPJ9iq3duuGFgO8jL9pYXl 2r2CuwTA9yl8Qws4F0wtJTWuI3CwEJhIX8xW/d0kV3ssk9uX0L2n6KS3IxX3AR/PU0jI alCHtw6mLSkTRbe6pvvRCiYum7xi/LctSAH2lNPGvnXN7/Jqxoke7t7c0XuvYuelTN/O AkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=hh+kKC7ZFgD6IsXRu0r11HiAkzLLc+srjjFhyv2vjH4=; b=jneOEFzqssJubf616b49tqS2O7ufz+i4gP9plFaI51/OL7sYrGi7LLs3iDAOjAeCLw /CGLEIUrpBo9+GIHBCuBHhhsp2u/tbjlPk5+dr4jn+UivK6aWEAW9r59G4xGTm3F31e+ oEmAu4omN6aDEu8ahLxZ5Ty/kbJPx9lKX8y9PXIym6ujmeELGTOoK6IcvgGoDto0KES0 riKPsWYXl1sWXI7W8JXz8tAd/81KuFnIY1zqNPcl4cIOegRh2923EFU6e9zEDl/Yyh9G UjqVcAx+O4HvNeIZohvEJsKC6u4HmHDKqOrZkSxbeO29DM9VEsMT3qZOZN4euxKNQSZ/ 7ltw== X-Gm-Message-State: ACrzQf12Jyxuhzif8okpkkKCn5r6Nnc37Y9XqPmsgwZZlH01wrv2yh71 XM4oUXy71jRYIWClaufOBZsO6w== X-Google-Smtp-Source: AMsMyM7gS1IgchlA4mZ5B3pTdqTxOz91e8MDKvHwtsLJ69YTRm3ANUx9OTak7dc3YhlfQsIAvrb0cg== X-Received: by 2002:a17:907:1629:b0:782:9b8a:c8b9 with SMTP id hb41-20020a170907162900b007829b8ac8b9mr14739585ejc.673.1664199651405; Mon, 26 Sep 2022 06:40:51 -0700 (PDT) Received: from hera ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id g6-20020a170906538600b0077f324979absm8367999ejo.67.2022.09.26.06.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 06:40:51 -0700 (PDT) Date: Mon, 26 Sep 2022 16:40:48 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: Paul Barker , u-boot@lists.denx.de, Tom Rini Subject: Re: [PATCH v3 1/3] efi_loader: Add SPI I/O protocol support Message-ID: References: <20220921160628.4166966-1-paul.barker@sancloud.com> <20220921160628.4166966-2-paul.barker@sancloud.com> <8f5bcacf-65b1-42aa-ff7f-d770b93e3cec@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f5bcacf-65b1-42aa-ff7f-d770b93e3cec@gmx.de> 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 Hi Heinrich, [...] > > > +}; > > > + > > > +static struct efi_legacy_spi_controller_protocol > > > +dummy_legacy_spi_controller_protocol = { > > > + .maximum_offset = 0, > > > + .maximum_range_bytes = 0, > > > + .range_register_count = 0, > > > + .erase_block_opcode = legacy_erase_block_opcode, > > > + .write_status_prefix = legacy_write_status_prefix, > > > + .bios_base_address = legacy_bios_base_address, > > > + .clear_spi_protect = legacy_clear_spi_protect, > > > + .is_range_protected = legacy_is_range_protected, > > > + .protect_next_range = legacy_protect_next_range, > > > + .lock_controller = legacy_lock_controller > > > +}; > > > > Keeping in mind all these return EFI_UNSUPPORTED can we get rid of them and > > set the legacy_spi_protocol to NULL? Or defining them is mandatory from the PI spec? > > Do you plan to implement it in the future? > > What do you mean by setting to NULL? > You simply would not install the protocol interface on any handle. > If there is no legacy SPI controller, it does not make sense to install > the protocol. There's no protocol installation for this, The protocl we install is efi_spi_io_protocol and one of it's struct members is that legacy spi protocol [...] Cheers /Ilias