Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp451475rdb; Mon, 29 Jan 2024 07:18:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNZD6ekzrW3BNwYu/tln+/ro8ZlhB8Kx+icjBYmCb57Whk0L50iAtduuJX5hedZmnDIUkB X-Received: by 2002:a17:906:718a:b0:a31:479b:ca0a with SMTP id h10-20020a170906718a00b00a31479bca0amr4363850ejk.33.1706541534613; Mon, 29 Jan 2024 07:18:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706541534; cv=pass; d=google.com; s=arc-20160816; b=RchrOieUXMr1VkndNtcPrKlDP0t/CN8AZy5i62DP2r8LKJeAntcDhf2Ecjjp9miexG hWeLLhVsEl+M4AyC7eWBRvUR+jzoRRIB4HRHMpuhzYXPm5FaO85zGJZZiLfZiAe5FnmR qjSyF8zcl7nK/hfaL8lWlZwu0LxgsIhajq6xse/WhGrRD9x4ih5fPaGfGHwGKpt6m8dp 79Jy7Mb5dT9Y+uXIj6aII/9EVZA4MQ39aq8qHOjOoHfrgYyH6MDs9AuyH/Qzt7M3fVcr 2QzYlcwuQ5Aq5WLBTIWJjuLCFgGxK118MHcT46smZ5EbWgvWpx5naqOed8cgLfMBmLc/ PLaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=5MB7A9ATBDbqpsaX+ySSekE4FzWm5nmsG8f0biE3UZk=; fh=csllVV2U0uAd2d7/8QVdDBW9ihuMPgpQZfg+nBP1BU0=; b=FND4xuwp8FCRdmQ8d34YT5eTUv4OEVVZHtoy9qNqmSYtGxazcLDIU3M48kqfLmPyjU zpeKxKpsG6r3d0rkc+6MdMVclcy7cKeFvQ4S2udLBLRbjn68A22RMf/t7gXxdqbxGvbk I6KwMMqNzUrKy4Vzwzj+MREnOEKZ1BfI4H3c83YBt2u+uAuxz6oCLrEit2biBI5uWuNJ UTrPIVOvid4639zZDDUiLj6H22GXSUYdTGZHm2/xa1icpTHyyVp5LYkHAUKfJkobQB/7 5qvOkvA5xvLOyIrIkTwfxfIw3WD6/g11YERvnaGBG/rEwptA72cnSakhwsHX35sXjPiS Bgtg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kiD6PFLb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-42981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id oq19-20020a170906cc9300b00a28fe2b3ad5si3621742ejb.1015.2024.01.29.07.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 07:18:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kiD6PFLb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-42981-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42981-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5FC2F1F23365 for ; Mon, 29 Jan 2024 15:18:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1009A154BF0; Mon, 29 Jan 2024 15:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kiD6PFLb" Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15B0115444F for ; Mon, 29 Jan 2024 15:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706541463; cv=none; b=N+6q/DRGaLhckaohZerdpcBIw8u0BuqFc6S28bM+zclwneeCK1pKIESpJOEpmJNkz4IWCEZ0zIKGahZNop7RotSjJUmahsEifcq/ThtrR9TUCtatYb1eQYDw9EZd0y+qAPYEOgD2aBkqEiqmKzmjA0zAhIBHmmxeYKZBRlioHao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706541463; c=relaxed/simple; bh=VYk2kDys0glDWMk0P7roTgZucENZXxmFY1OUmtkVmJY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=j9vzB0BwqybBYaciqtAMqEpRuFTCA+hxLZ1mr0mhlau0Uts6tkR2XLOy1CZYYj0Zrxwx3yWV8U4dowSF2AgrIkJcET83m7nxcccRoAMxn/6I5l9WRCVOhb0wiv7+es8toyQ+IgMh2YodmrBFOIZpR2GOpqIWi43TBNAs+8+vwYQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kiD6PFLb; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-5ff821b9acfso26821487b3.1 for ; Mon, 29 Jan 2024 07:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706541459; x=1707146259; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5MB7A9ATBDbqpsaX+ySSekE4FzWm5nmsG8f0biE3UZk=; b=kiD6PFLbpoidhxUJoTiebE9iECJ54bl15yaI4ZqYjNNDKYJM3NdyhqHrX16l08Qsx7 kjfzLk3SXatBf+9VaxrAXLIFkbr3G3uTHIHV5V42hHrJydKnyzjulN2GXJFbbL7lcP7y TOtUBzDfZHMthauxB5eSJsWAvzVuRSyL00omSrTaGPRv3b80bRDuokySymWmaBRfgbfK FP16mB6CczBflP6VqZVY8XrNocGFKLKXKirhg/K0LwPwvE/6cfp/Hx/DZvSROb/RFEyj WnxrcXU+b6CSUHYYWHk+S15pJyKGGykEHbvdHACc4EaFi4e8qb1GGXrDGGdrvhi52t6v Taxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706541459; x=1707146259; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5MB7A9ATBDbqpsaX+ySSekE4FzWm5nmsG8f0biE3UZk=; b=wyfw8TtakfEdDTW0NffqKbwXXfJ8E4kyJ+PYvKC4FfH15cZmaaJMhwQWi+FVSuoiWI JagIy6a5+ewKmgEOQw59l7MKCZVwjPuiYeYCyWpo3AXDTYrgnzCs3nE7osp8XoBjmMfu XVEXHh/pOsRkhaMNSFc3sX+JfDZel8Mi/ncFjgPNKcezadrwpY2LGVJifE0E/5EGGbyz zkjYFBJ+iuevU7nxGZiL2qCM8CGv/rUY9Y7I/7aOL/qKuWeEaIwh5S3BUYhcB6wKQS7s uWNNYARrC2KX0KPYWCHT0FY43n4f6VWaeQYLfOaLc+OS77pgxzaMgS+MwES+QykE/qx2 RWHg== X-Gm-Message-State: AOJu0Ywj4W0HC3dHkoPgdlMXkydPS1awCaoz7nzBuN3f8PDG7PeOCVcC 4qPUbDzrWKxPCCXk/ry2ih4/+E3GB4ygY5eX2EZ6fvjI92sOiWfqyRhyb5ZvWdgB2ezgeP2nvx9 3yOW6ui3vZSLTtaCjmZU85+jn+hRODT3YTyg8LQ== X-Received: by 2002:a81:99d5:0:b0:602:b375:380d with SMTP id q204-20020a8199d5000000b00602b375380dmr3586667ywg.80.1706541459045; Mon, 29 Jan 2024 07:17:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> <20240129-x1e80100-remoteproc-v1-3-15d21ef58a4b@linaro.org> In-Reply-To: <20240129-x1e80100-remoteproc-v1-3-15d21ef58a4b@linaro.org> From: Dmitry Baryshkov Date: Mon, 29 Jan 2024 17:17:28 +0200 Message-ID: Subject: Re: [PATCH 3/3] remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP To: Abel Vesa Cc: Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sibi Sankar Content-Type: text/plain; charset="UTF-8" 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? > + 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