Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp175937rdb; Thu, 8 Feb 2024 02:40:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXb09sDG/6OiUDKBI8Ko1iZ/bxIcj4uTENMW5u7T0iGgKybQzVNf3IP4O0nc1ggRtfeb5Yifw+kYew+xl1jFPthwsWvvNnvngbc1sWWrQ== X-Google-Smtp-Source: AGHT+IGsY1NJ6YJ94P6+pxt08q5Ms3fwG/6eijTBIudxJFBfS7bZD8bIX9Uw6Rj17XLsrAoTEn7s X-Received: by 2002:a05:6808:124e:b0:3bd:9d8f:f692 with SMTP id o14-20020a056808124e00b003bd9d8ff692mr9628257oiv.36.1707388843702; Thu, 08 Feb 2024 02:40:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707388843; cv=pass; d=google.com; s=arc-20160816; b=Veln3pCVetn2G+d93+NC+/JuAQVWTwcmLzsMOL6Kf16p6/gPxT08CUh0peJuBiich3 NCzb78F8kCeqsolgb6PqZblqrPUO1qTBJOCHAw9P3IuaEvXU4C2PYunt374VL/IWgu2h axtk6mIC/im9maGBhbQBIvOMJ9yDknxPnuRXyXGx+bHDFKszdfsD+x2nQ1oJTJOvaRc2 Gncz+1CQx1uNV9jjZ5kqNvosKoUGwU12TS3gCuhpjSL0Su33YhI0FWDJuolaQIPvGfjW 7p1f5XryFPjl03miSBEqCAEYJAP7yDl2t8TJMoKhikCQdRi0y4uULFWcT/B94fpkTQAI O4xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=VCYj+6BYk05i84Jpje+CvtSGcyxK25vY9GPZ/O/U9wM=; fh=9KX9/yYMf12wpZuv6YWtCH4Uc3QO4Bq1ltSTb35jXKE=; b=kPwDJJ7skjEV7YTP2+wMHIKydBDsqO2kgqdo1xOxfREsMXFdK+FhmLTIy5sNu4Ec2G O+c1cD2I2RzKstiVK2DjeUVVCprLvu3TZD32bz4sosIZKB3BZdo1s82YBYFP8VC4wW04 P/URuVJsgiStiX2Iyb/aBJlGChDmEWFrg3eEz2lVRLb72Eb4cPRyO+hLGNbL1Q/Fp4VK iSkIyL9tZF25WigdjThEaHtcvclE2S7Co0nmatHOV9/+D7ZHd+TR2wZr/dBdoxDvVFAt /8KIXLpxnHDXfokAb6wbllZiVDFuFN6nj8FCh6MBbkMfdKDC2kOJwOJ++lZxBPW9kc+S 7gEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BTxHRlOS; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-57874-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=2; AJvYcCUNR4Riwzr2z3TpIXXc5vWmMjXORyeT9vk4cGsImTjfre9RD7uje1qx+LyWqpdhHmJeXQEc95sdzdmIVSX35MKQl1MDDXBdhuMZua0jWA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g6-20020a056a0023c600b006e05237d8e8si4043024pfc.268.2024.02.08.02.40.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:40:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57874-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BTxHRlOS; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-57874-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5339E2855D3 for ; Thu, 8 Feb 2024 10:39:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD1466A352; Thu, 8 Feb 2024 10:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="BTxHRlOS" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3540E41A88; Thu, 8 Feb 2024 10:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707388750; cv=none; b=qGjp9qm7NLvgaenzvHg4lcZcQxRfud6DSjlAFODnUsJ8tII9/OktVz6a/PgSSRIdKHm6oWy8TRH9Y9vVUfHB9RM0I/RTTm7+eJdm3BxtoRjoGAlReHSGI+3OBTHoCjtoF7SCKOpcmD1FyVHPgJUpxvCkR6wnYJELOOWuw/gz73Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707388750; c=relaxed/simple; bh=ChPuBbqgOqqYPEaW2BwH6XzfhgpJTmqg/qylBBkB8Cw=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=KCtwPTSdyF634//UcECpEaZUYBdabC7ewtxApNZATTNcp8Sh6xLVQfm4rV3DjdP5dc3s84ahRa4/Q1UFFoqgwe1rYS3QiLnJU30cueEoL3xC/Ubx9wJoGnzdkAtjXdRfiC4NXKTBoPOPZGXjzQN6wD3c3kxg5+0FFEDlBKkDeP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=BTxHRlOS; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4188lplQ019681; Thu, 8 Feb 2024 10:39:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=VCYj+6BYk05i84Jpje+CvtSGcyxK25vY9GPZ/O/U9wM=; b=BT xHRlOSjprkzJnuek2e8MN9o5bBoRlZ7yHV1IgbiIH3KZlzQ8lAw0cBLEKKOHE8kQ weEKkTH9M/l0NNIw7dClftn0a1DgFbnqN78yKWsTXy5pFTICL/+meI7ShhGDkWwD xG49S0ow7Z9MYJt8JDZtrwsImvoaT22b8qn4FEyvKonwehYpWV1zoehwd5Eyflz7 QZnoo+rYDKzZ4Ms/k0kc/yxDLJGZtgjGtflc42q3HvLsMAfw7l4+LGWyjhuUr7Ik b2cbUPPy6YICzTeOw0pymtpA3/Uuujq70WLN87HotYFkXiL0SkR3h1ty851VfmPK HFoo/kK7Y/IBDsHziYng== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w4frwsvq0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Feb 2024 10:39:04 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 418Ad336003983 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Feb 2024 10:39:03 GMT Received: from [10.131.33.37] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 8 Feb 2024 02:38:59 -0800 Message-ID: <079ef9dc-fe21-2a28-9540-7395af0c4282@quicinc.com> Date: Thu, 8 Feb 2024 16:08:55 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 3/3] remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP Content-Language: en-US To: Abel Vesa , Dmitry Baryshkov CC: Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , , , , References: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> <20240129-x1e80100-remoteproc-v1-3-15d21ef58a4b@linaro.org> From: Sibi Sankar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 8IPKluktH-kK2P5TVffwT_SODUC4RHLr X-Proofpoint-GUID: 8IPKluktH-kK2P5TVffwT_SODUC4RHLr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-08_01,2024-02-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 clxscore=1011 lowpriorityscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402080055 On 1/31/24 15:00, Abel Vesa wrote: > On 24-01-29 17:17:28, Dmitry Baryshkov wrote: >> On Mon, 29 Jan 2024 at 15:35, Abel Vesa wrote: >>> >>> From: Sibi Sankar >>> >>> The UEFI loads a lite variant of the ADSP firmware to support charging >>> use cases. The kernel needs to unload and reload it with the firmware >>> that has full feature support for audio. This patch arbitarily shutsdown >>> the lite firmware before loading the full firmware. >>> >>> Signed-off-by: Sibi Sankar >>> Signed-off-by: Abel Vesa >>> --- >>> drivers/remoteproc/qcom_q6v5_pas.c | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c >>> index 083d71f80e5c..4f6940368eb4 100644 >>> --- a/drivers/remoteproc/qcom_q6v5_pas.c >>> +++ b/drivers/remoteproc/qcom_q6v5_pas.c >>> @@ -39,6 +39,7 @@ struct adsp_data { >>> const char *dtb_firmware_name; >>> int pas_id; >>> int dtb_pas_id; >>> + int lite_pas_id; >>> unsigned int minidump_id; >>> bool auto_boot; >>> bool decrypt_shutdown; >>> @@ -72,6 +73,7 @@ struct qcom_adsp { >>> const char *dtb_firmware_name; >>> int pas_id; >>> int dtb_pas_id; >>> + int lite_pas_id; >>> unsigned int minidump_id; >>> int crash_reason_smem; >>> bool decrypt_shutdown; >>> @@ -210,6 +212,10 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw) >>> /* Store firmware handle to be used in adsp_start() */ >>> adsp->firmware = fw; >>> >>> + /* WIP: Shutdown the ADSP if it's running a lite version of the firmware*/ >> >> Why is it still marked as WIP? > > AFAIU, there was more to be done here w.r.t. preloaded lite version > firmware. > > Later, was agreed that that is not case. > > So maybe I just need to drop the comment. > > Sibi, can you confirm? ack, this is the best we can currently do. Please drop the comment when you re-spin the series. Thanks for sending this out. -Sibi > >> >>> + if (adsp->lite_pas_id) >>> + ret = qcom_scm_pas_shutdown(adsp->lite_pas_id); >>> + >>> if (adsp->dtb_pas_id) { >>> ret = request_firmware(&adsp->dtb_firmware, adsp->dtb_firmware_name, adsp->dev); >>> if (ret) { >>> @@ -693,6 +699,7 @@ static int adsp_probe(struct platform_device *pdev) >>> adsp->rproc = rproc; >>> adsp->minidump_id = desc->minidump_id; >>> adsp->pas_id = desc->pas_id; >>> + adsp->lite_pas_id = desc->lite_pas_id; >>> adsp->info_name = desc->sysmon_name; >>> adsp->decrypt_shutdown = desc->decrypt_shutdown; >>> adsp->region_assign_idx = desc->region_assign_idx; >>> @@ -990,6 +997,7 @@ static const struct adsp_data x1e80100_adsp_resource = { >>> .dtb_firmware_name = "adsp_dtb.mdt", >>> .pas_id = 1, >>> .dtb_pas_id = 0x24, >>> + .lite_pas_id = 0x1f, >>> .minidump_id = 5, >>> .auto_boot = true, >>> .proxy_pd_names = (char*[]){ >>> >>> -- >>> 2.34.1 >>> >>> >> >> >> -- >> With best wishes >> Dmitry