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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77F7EC61DA4 for ; Mon, 13 Mar 2023 15:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbjCMPup (ORCPT ); Mon, 13 Mar 2023 11:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjCMPul (ORCPT ); Mon, 13 Mar 2023 11:50:41 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF5151CA3 for ; Mon, 13 Mar 2023 08:50:26 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32D5bF4B000339; Mon, 13 Mar 2023 10:50:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=KSx4vfnoG0hKeX0+I8Xc6vC4Q61Hdoi1UYzczfNsx1Y=; b=kGObCyT8HDSo3bqsnFcpTx3x8hkeu6dvBqFi4dqTMpoaoH8waBP4fYgGO7lTRHWvpg7V 5WMKkdAtNASodLRPckCaDQ5LxGOEKnbPRb0l7IDOYGCYIV4+1Oyy5q7GMHim+4R1+iwc h9I8j/xuZPDuuKansrp+NYIHMednQZLvspVB0KC6gkn1mP0pnuuN0hvnauDQn44Htwbw 35qgNqLSD/e3VK+3STcZl1xTLbg3v7MiHzOg3YCguRckCbLBZFmgKoIHPr7ILQrNnf6m HG2K1xYZ4KcpJppSXfpIUGiOZoljvxDWXf5hwBk7a3x5jjFYIHpdTWt0TPtbsGNlgRjD pg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3p8pxvb6hn-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 10:50:06 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 13 Mar 2023 10:50:05 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 13 Mar 2023 10:50:05 -0500 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.64.92]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4DCC311D4; Mon, 13 Mar 2023 15:50:05 +0000 (UTC) From: Richard Fitzgerald To: , CC: , , , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH v2 3/8] firmware: cs_dsp: Support DSPs that don't require firmware download Date: Mon, 13 Mar 2023 15:49:50 +0000 Message-ID: <20230313154955.4268-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230313154955.4268-1-rf@opensource.cirrus.com> References: <20230313154955.4268-1-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: fx62dAPgC7-5CX24XJT20l2I_acxx3Xp X-Proofpoint-GUID: fx62dAPgC7-5CX24XJT20l2I_acxx3Xp X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Simon Trimmer When a DSP can self-boot from ROM it is not necessary to download firmware during the powering up sequence. A DSP that required firmware download would fail in a previous configuration step if firmware was not available. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- drivers/firmware/cirrus/cs_dsp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c index 97b73a254380..513136a924cf 100644 --- a/drivers/firmware/cirrus/cs_dsp.c +++ b/drivers/firmware/cirrus/cs_dsp.c @@ -1301,6 +1301,9 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware, int regions = 0; int ret, offset, type; + if (!firmware) + return 0; + ret = -EINVAL; pos = sizeof(*header) + sizeof(*adsp1_sizes) + sizeof(*footer); -- 2.30.2