Commit 7569805e authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a49c3ab7
...@@ -87,12 +87,14 @@ ...@@ -87,12 +87,14 @@
* @IPA_LOADER_DEFER: System not ready; try again later * @IPA_LOADER_DEFER: System not ready; try again later
* @IPA_LOADER_SELF: AP loads GSI firmware * @IPA_LOADER_SELF: AP loads GSI firmware
* @IPA_LOADER_MODEM: Modem loads GSI firmware, signals when done * @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 * @IPA_LOADER_INVALID: GSI firmware loader specification is invalid
*/ */
enum ipa_firmware_loader { enum ipa_firmware_loader {
IPA_LOADER_DEFER, IPA_LOADER_DEFER,
IPA_LOADER_SELF, IPA_LOADER_SELF,
IPA_LOADER_MODEM, IPA_LOADER_MODEM,
IPA_LOADER_SKIP,
IPA_LOADER_INVALID, IPA_LOADER_INVALID,
}; };
...@@ -740,6 +742,10 @@ static enum ipa_firmware_loader ipa_firmware_loader(struct device *dev) ...@@ -740,6 +742,10 @@ static enum ipa_firmware_loader ipa_firmware_loader(struct device *dev)
if (!strcmp(str, "modem")) if (!strcmp(str, "modem"))
return IPA_LOADER_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 */ /* Any value other than "self" is an error */
if (strcmp(str, "self")) if (strcmp(str, "self"))
return IPA_LOADER_INVALID; return IPA_LOADER_INVALID;
...@@ -872,10 +878,12 @@ static int ipa_probe(struct platform_device *pdev) ...@@ -872,10 +878,12 @@ static int ipa_probe(struct platform_device *pdev)
if (loader == IPA_LOADER_MODEM) if (loader == IPA_LOADER_MODEM)
goto done; goto done;
/* The AP is loading GSI firmware; do so now */ if (loader == IPA_LOADER_SELF) {
ret = ipa_firmware_load(dev); /* The AP is loading GSI firmware; do so now */
if (ret) ret = ipa_firmware_load(dev);
goto err_deconfig; if (ret)
goto err_deconfig;
} /* Otherwise loader == IPA_LOADER_SKIP */
/* GSI firmware is loaded; proceed to setup */ /* GSI firmware is loaded; proceed to setup */
ret = ipa_setup(ipa); ret = ipa_setup(ipa);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment