Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6824207rwb; Tue, 15 Nov 2022 04:19:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5QeveVyLu85mwf5dwyIlnL9qwHOhvaIhRX/3lYvyRqCzXiobX2KiRgLX9eNiHWMtQjpXjB X-Received: by 2002:a50:fa87:0:b0:467:4a80:719b with SMTP id w7-20020a50fa87000000b004674a80719bmr15358572edr.174.1668514760185; Tue, 15 Nov 2022 04:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668514760; cv=none; d=google.com; s=arc-20160816; b=VjHP5IFSPLQrPAl6WHjlxwUJZrO1FADUegQtLzqWcy6F/FTOJ6SOHA9CA/mWNYiMYe fKJ07QJx1xqpfqlpXZxsAPFrctYlJFTSA1WqJCm/wdFda9vl5GOhpCZ4MjkpUNOKJf0+ bUON5s97hdOAjf8wxDGMeOjMD7mi2fpVhsWuLKg515I5ztcg4DeFCBsOqA0xQcU8rNUN 1b/o/pXnBIzNgW2TQMUqyR/rIOGyRsRzYvmR/8/HV/3SU48nNtJevYJ7k2pMAaGDTT2S v5wF7bpf/p7qv2/wrkTytBz2el9VDr+oB+if0pKsANJllsFJAfWu0A7WORpjdVWbOHdW Xd5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=umpLk1dbP5jy5ZPV4Q21UM7cr1nZKFjsXDStFsdzpxA=; b=CWdJKdhjDxLJnDL5cm8Qje3wkAlggLt/yYHVtQLCuPl+61a5Xmsr0jHdEPSRZhnmoB umbmuTjYCxpuzj5BKiRx3wYjUwXd8vtWEDYbOMgzIwyN6hIq5iNpSa552LAxhhxtch+W i1urlapfx3ExTc4v8u/yxwxqENXeJNU5wqAOFTS6FMfzSIoUw74B1CmlOAAYa3JLQjF+ /yxxYSSeqI2j8slVfGk9yTUR4YtHBzQLcywS15HA5XnKE+FodlH7ebMvhWOsqj2Zv8qI 76Ww06FDCiXJADtRY+90+h7I7LbciTCQA9eljqIXD3ukx8zEkx9o6kmlXNYF5eM+S59L fxnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D8EGa8ht; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a056402249000b00463a583166asi11655344eda.197.2022.11.15.04.18.56; Tue, 15 Nov 2022 04:19:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D8EGa8ht; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbiKOLcM (ORCPT + 89 others); Tue, 15 Nov 2022 06:32:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236559AbiKOLbf (ORCPT ); Tue, 15 Nov 2022 06:31:35 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D918E1A3B4 for ; Tue, 15 Nov 2022 03:31:32 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id g12so23556960wrs.10 for ; Tue, 15 Nov 2022 03:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=umpLk1dbP5jy5ZPV4Q21UM7cr1nZKFjsXDStFsdzpxA=; b=D8EGa8htGFTrwr+uWFdhGjdWi5azQWY7WKuZsWKqSGl7DOBh5SqcqwVODSBoQ5raO3 16AhnKECzyxTxO7lN0ueLWY2nuYw2CdMPY/TbAJfSzrSkwxtx1hodXF27VnVR3P1SJwA wDO79WtzmOQyTP+Hy9qWADtHJAB2b2DxfGDlH8/j8SdN5KygAJ4KVfqjfABAjmxKamZl Gamru9txX23IdiJM7YAAh5W8WZfXelXG2MdFpSx2khyzXBPdwMHdllb5kf1+/UXPmw2y E5jfGp8Vv0HZ60B2wDiJQrYWgF/CpkTkZmYgOn5gJZNWsdBSnK08LXQSpPxY8pxRj12Y O3qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=umpLk1dbP5jy5ZPV4Q21UM7cr1nZKFjsXDStFsdzpxA=; b=osmlYZNwkXfu5BxKhOszyaCeTb2+N9D7SoQrLNFEKghtVFya5fAhQRRWIInzF1+dMp XIDmR8sGlvJijYwvFGGTsQZURjmpTUxjMX5+YnbpaLfLykKGLgmQhNIejo6vApWFv4oU ZP+BQ6YtP8LKpblgzb34Y+ZV/kYTjJs1GaCdxzlUwgj2vrZk0pJUUpZOpUMdmuM3HqGD Bd9C+yKYCkqDofpTN0cIr6jHgn3iFPDFKQpMamDNG4IPKVuSYhjT4DtHucZCNhYmHSAR j1XYmVQP1NzZtaSQq9PVLclco9gevARtN3S1H6SxWJJcqU17NN1wb7OnUgdrIcDktAQg N77g== X-Gm-Message-State: ANoB5pmj9P3rj3KTjaiYcybxpbrkstYFYHBKP9qglXl6FZsZWR5TCZYC xeSYMd/Hi5pAUnw1Vush68Xm4g== X-Received: by 2002:a5d:58c3:0:b0:238:8896:7876 with SMTP id o3-20020a5d58c3000000b0023888967876mr10459521wrf.645.1668511892383; Tue, 15 Nov 2022 03:31:32 -0800 (PST) Received: from zoltan.localdomain ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r18-20020adfe692000000b00238df11940fsm12273091wrm.16.2022.11.15.03.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 03:31:31 -0800 (PST) From: Alex Elder To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, agross@kernel.org, elder@kernel.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 5/5] net: ipa: permit GSI firmware loading to be skipped Date: Tue, 15 Nov 2022 05:31:19 -0600 Message-Id: <20221115113119.249893-6-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221115113119.249893-1-elder@linaro.org> References: <20221115113119.249893-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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