2022-11-16 08:23:48

by Alex Elder

[permalink] [raw]
Subject: [PATCH net-next v3 0/5] net: ipa: change GSI firmware load specification

Version 3 just adds reviewed-by tags for Krzysztof Kozlowski.

Version 2 of this series modifies the first patch only. One section
in the description is reworded, and the example now consistenly
describes the SC7180 SoC, both as suggested by Krzysztof.

Currently, GSI firmware must be loaded for IPA before it can be
used--either by the modem, or by the AP. New hardware supports a
third option, with the bootloader taking responsibility for loading
GSI firmware. In that case, neither the AP nor the modem needs to
do that.

The first patch in this series deprecates the "modem-init" Device
Tree property in the IPA binding, using a new "qcom,gsi-loader"
property instead. The second and third implement logic in the code
to support either the "old" or the "new" way of specifying how GSI
firmware is loaded.

The last two patches implement a new value for the "qcom,gsi-loader"
property. If the value is "skip", neither the AP nor modem needs to
load the GSI firmware. The first of these patches implements the
change in the IPA binding; the second implements it in the code.

-Alex

Alex Elder (5):
dt-bindings: net: qcom,ipa: deprecate modem-init
net: ipa: encapsulate decision about firmware load
net: ipa: introduce "qcom,gsi-loader" property
dt-bindings: net: qcom,ipa: support skipping GSI firmware load
net: ipa: permit GSI firmware loading to be skipped

.../devicetree/bindings/net/qcom,ipa.yaml | 78 +++++++++++----
drivers/net/ipa/ipa_main.c | 95 +++++++++++++++----
2 files changed, 135 insertions(+), 38 deletions(-)

--
2.34.1



2022-11-16 08:53:38

by Alex Elder

[permalink] [raw]
Subject: [PATCH net-next v3 4/5] dt-bindings: net: qcom,ipa: support skipping GSI firmware load

Add a new enumerated value to those defined for the qcom,gsi-loader
property. If the qcom,gsi-loader is "skip", the GSI firmware will
already be loaded, so neither the AP nor modem is required to load
GSI firmware.

Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
v3: Added Krzysztof's reviewed-by tag.

Documentation/devicetree/bindings/net/qcom,ipa.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index d0f34763b9383..9e81b9ec7cfdd 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -128,10 +128,12 @@ properties:
enum:
- self
- modem
+ - skip
description:
Indicates how GSI firmware should be loaded. If the AP loads
and validates GSI firmware, this property has value "self".
If the modem does this, this property has value "modem".
+ Otherwise, "skip" means GSI firmware loading is not required.

modem-init:
deprecated: true
--
2.34.1


2022-11-16 08:55:14

by Alex Elder

[permalink] [raw]
Subject: [PATCH net-next v3 5/5] net: ipa: permit GSI firmware loading to be skipped

Define a new value "skip" for the "qcom,gsi-loader" Device Tree
property. If used, it indicates that neither the AP nor the modem
need to load GSI firmware (because it has already been loaded--for
example by the boot loader).

Signed-off-by: Alex Elder <[email protected]>
---
drivers/net/ipa/ipa_main.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 214e524dce795..8f20825675a1a 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -87,12 +87,14 @@
* @IPA_LOADER_DEFER: System not ready; try again later
* @IPA_LOADER_SELF: AP loads GSI firmware
* @IPA_LOADER_MODEM: Modem loads GSI firmware, signals when done
+ * @IPA_LOADER_SKIP: Neither AP nor modem need to load GSI firmware
* @IPA_LOADER_INVALID: GSI firmware loader specification is invalid
*/
enum ipa_firmware_loader {
IPA_LOADER_DEFER,
IPA_LOADER_SELF,
IPA_LOADER_MODEM,
+ IPA_LOADER_SKIP,
IPA_LOADER_INVALID,
};

@@ -740,6 +742,10 @@ static enum ipa_firmware_loader ipa_firmware_loader(struct device *dev)
if (!strcmp(str, "modem"))
return IPA_LOADER_MODEM;

+ /* No GSI firmware load is needed for "skip" */
+ if (!strcmp(str, "skip"))
+ return IPA_LOADER_SKIP;
+
/* Any value other than "self" is an error */
if (strcmp(str, "self"))
return IPA_LOADER_INVALID;
@@ -872,10 +878,12 @@ static int ipa_probe(struct platform_device *pdev)
if (loader == IPA_LOADER_MODEM)
goto done;

- /* The AP is loading GSI firmware; do so now */
- ret = ipa_firmware_load(dev);
- if (ret)
- goto err_deconfig;
+ if (loader == IPA_LOADER_SELF) {
+ /* The AP is loading GSI firmware; do so now */
+ ret = ipa_firmware_load(dev);
+ if (ret)
+ goto err_deconfig;
+ } /* Otherwise loader == IPA_LOADER_SKIP */

/* GSI firmware is loaded; proceed to setup */
ret = ipa_setup(ipa);
--
2.34.1


2022-11-18 06:53:14

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next v3 0/5] net: ipa: change GSI firmware load specification

Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <[email protected]>:

On Wed, 16 Nov 2022 01:32:51 -0600 you wrote:
> Version 3 just adds reviewed-by tags for Krzysztof Kozlowski.
>
> Version 2 of this series modifies the first patch only. One section
> in the description is reworded, and the example now consistenly
> describes the SC7180 SoC, both as suggested by Krzysztof.
>
> Currently, GSI firmware must be loaded for IPA before it can be
> used--either by the modem, or by the AP. New hardware supports a
> third option, with the bootloader taking responsibility for loading
> GSI firmware. In that case, neither the AP nor the modem needs to
> do that.
>
> [...]

Here is the summary with links:
- [net-next,v3,1/5] dt-bindings: net: qcom,ipa: deprecate modem-init
https://git.kernel.org/netdev/net-next/c/4ca0c6474f71
- [net-next,v3,2/5] net: ipa: encapsulate decision about firmware load
https://git.kernel.org/netdev/net-next/c/50f803d4aa71
- [net-next,v3,3/5] net: ipa: introduce "qcom,gsi-loader" property
https://git.kernel.org/netdev/net-next/c/07f2f8e1b747
- [net-next,v3,4/5] dt-bindings: net: qcom,ipa: support skipping GSI firmware load
https://git.kernel.org/netdev/net-next/c/a49c3ab7d75f
- [net-next,v3,5/5] net: ipa: permit GSI firmware loading to be skipped
https://git.kernel.org/netdev/net-next/c/7569805ec26e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html