From patchwork Mon Mar 27 18:37:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 75614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1716865vqo; Mon, 27 Mar 2023 11:44:02 -0700 (PDT) X-Google-Smtp-Source: AKy350aeb7I4yxUnDiB1wRRs9AJuHMyZGKjhiayWAccc04NOCNY7xWSAVTj5sM0itQoy/Tvg6tib X-Received: by 2002:aa7:c54f:0:b0:4fb:7ad6:907a with SMTP id s15-20020aa7c54f000000b004fb7ad6907amr12857889edr.13.1679942642217; Mon, 27 Mar 2023 11:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679942642; cv=none; d=google.com; s=arc-20160816; b=ACueUwS0Y38zCLOD1x/qPatakuMjQMg5OkSIf2FGby3QLMqE3am7mECPkoiA1y2Pia kdfCZgQLN9SLHDTpkYEySyW/MmXTHiY0vpM+ccv60WPHe5muz1LdlZkypI5+nEgSJgMe tJhe06b6OqGutMVkoMytQ9zP1QQw9AtHl2YX9tyKo4EfJaw5FI1dxtCBNdvo3yLQznV5 mOXjpDMzmmsy9ryFSZsLENsp8ovBO4EkItscBukhFC20wHKm5yfgWgSx8wMr1CQR8MeI 0TUspa7VhI0p0ZQgAKrPb6AIo67Va2F8kGzl2ncY81OnkWkjMXGgXwSil4u9iu4HL0PT xaNw== 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=IIvrfq7nPBrhOHJF/rCo/28hLbusgGnVy+v+bHtkkN4=; b=Qwop7f3re8dniaebNBfplp7eC12h3hZmKr0e/Vcs/SUNHocKVndLQTLHpdt9v7g/jZ Sjlh99gm721lrqCw6s4IoB9D13yD3zkKu/3mNKxnM982G4wZ9WMcJ5Wv4/T2H8xEMQEa X7BQVc2f1T1+vW+E2ea6L0E71qFfJ2FlydVKCKBUfY9xJWcUf3ABihbh2nWR8Xx1ivp4 tg2I0Z/u5btfgezB4Lc0dMsm4qfimN/k3U1jXJWuEN2Lun8QSL8l87BaatNWMA25YWEs bCVa//xDO20I4U2yOdvfUFbbpt/hH5vwqT4Wmc5GH+/0RcosP1uGX+ziqZ7KgJAta8EE Sjkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=A3bRQUWQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020aa7dad1000000b004a18f2ffb81si29539477eds.321.2023.03.27.11.43.38; Mon, 27 Mar 2023 11:44:02 -0700 (PDT) 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=@dylanvanassche.be header.s=MBO0001 header.b=A3bRQUWQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232487AbjC0SiA (ORCPT + 99 others); Mon, 27 Mar 2023 14:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbjC0Sh4 (ORCPT ); Mon, 27 Mar 2023 14:37:56 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B048E; Mon, 27 Mar 2023 11:37:55 -0700 (PDT) Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PlhQ76bdvz9sTQ; Mon, 27 Mar 2023 20:37:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1679942271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IIvrfq7nPBrhOHJF/rCo/28hLbusgGnVy+v+bHtkkN4=; b=A3bRQUWQbemZgduxd1HMFw9MyHqgdbfGJvA6qN1aoX/inj48X5WF+3y4cIyI5/CSYM4gqG BrrVVIuCyG5kLYsAkkT8OJvutnFGvPrx2SLoI+GjTpwEY3H7FIAOI64Vz6+fLnVp3xSjMS GzpuGmck2Fspx/XZD04XbLEwc1opX2OgGLjjBEFx0E+cri/OK6c1fl0+q6bee4nQRc500P dXI5HwgwI7UbZSnKiBznoWgRtYnrKyS1vopb3XjQaImHkma6kgd6B289HzMxHd0RdCMhXj W3uC5shL1VxHywClv6Esx1si+NJJjngfiG2w7/hJcWIgBB7SjIwrulQ+w2Ymkg== From: Dylan Van Assche To: Andy Gross , Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski Cc: Konrad Dybcio , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dylan Van Assche Subject: [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Date: Mon, 27 Mar 2023 20:37:34 +0200 Message-Id: <20230327183736.496170-2-me@dylanvanassche.be> In-Reply-To: <20230327183736.496170-1-me@dylanvanassche.be> References: <20230327183736.496170-1-me@dylanvanassche.be> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761547536095326330?= X-GMAIL-MSGID: =?utf-8?q?1761547536095326330?= SLPI DSP remoteproc on DSP is defined by the 'qcom,sdm845-slpi-pas' compatible in the qcom_q6v5_pas driver. Add this compatible to the devicetree bindings. Signed-off-by: Dylan Van Assche Reviewed-by: Krzysztof Kozlowski --- .../bindings/remoteproc/qcom,adsp.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml index 643ee787a81f..eb4a440a661a 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml @@ -26,6 +26,7 @@ properties: - qcom,sdm660-adsp-pas - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas + - qcom,sdm845-slpi-pas reg: maxItems: 1 @@ -63,6 +64,7 @@ allOf: - qcom,msm8998-adsp-pas - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas + - qcom,sdm845-slpi-pas then: properties: clocks: @@ -104,6 +106,7 @@ allOf: - qcom,msm8998-slpi-pas - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas + - qcom,sdm845-slpi-pas then: properties: interrupts: @@ -157,6 +160,22 @@ allOf: required: - px-supply + - if: + properties: + compatible: + enum: + - qcom,sdm845-slpi-pas + then: + properties: + power-domains: + items: + - description: LCX power domain + - description: LMX power domain + power-domain-names: + items: + - const: lcx + - const: lmx + - if: properties: compatible: From patchwork Mon Mar 27 18:37:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 75618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1718294vqo; Mon, 27 Mar 2023 11:46:32 -0700 (PDT) X-Google-Smtp-Source: AKy350Y2PJfQb64JbHP2uSyC6xvdMyFz32kia013hX3ToQ9fXpT8Q0xM4ZFZwfnkkr+aoL2XA1mt X-Received: by 2002:a17:907:3fa3:b0:93d:425a:b935 with SMTP id hr35-20020a1709073fa300b0093d425ab935mr16125108ejc.25.1679942792070; Mon, 27 Mar 2023 11:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679942792; cv=none; d=google.com; s=arc-20160816; b=QLyOO79GziHV+OaUrS+7v/9AC4bCwXD8YS+d7AyuXvBIRFhagKpFweKT8786BGJbel j7ohXZF6Yd0uZhLW5TscDBPzx3atIVyALGWeYTjeAZicwy/kVN9w8RrThBvHuDfIjARK PNpshQEGzhsFXKaqjouVPQshJhsdp5g0YvJP+rBmRahB5q+qTXx0M+X+VYIC8Yo8+DOZ JbVsqP19OnxNGub3LlnXY0pXjHFJKe4qnZcgSR5STa8w6apNsuVdV3aIPuZHY0ip6FBE 2351yePKAKI/nqIHtAdDY20TIf+rRvSiaGnGu3W/G/THkDIWCfSfpfpD3kOEHswGtwv2 KHFg== 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=UYNhSu+2Wobyn2s4WHdqzJN3u63ahHSl1LNIJlpGGUg=; b=x1kapCraKBcVNPV5gJ3ejCdg9XLH8L8pWv/m4WEDJG8ZIhEPoWnrozR+cC9n5PG4Pi j6d+4vlotja06V05z0BnEcbW+EQL69iFx0uXgQRye3jn/Oezh7cs3rynyJH+RzXF2bdv qxwvxilkidcNSZVASTeI5RJmdbW9QCvmrYRg6Yrq2OfnbKHK3P76z0kOtEDnunKOIlzG qrtKnV0q9UQf5VCd/3bU0HdbZGnwU1Ota+PTaP26Zkn3XYRmEFJt/f8s6RRGXG6woG2z 6LmbKmUdSiVVxmmH4t/vPX7uaIChnTSjDOfY6Yi3wHEu64yF8NZCFGEl5dLpSkvIRgMc IqSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=gR6UI5cM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga42-20020a1709070c2a00b0093c121f879fsi14804330ejc.45.2023.03.27.11.46.08; Mon, 27 Mar 2023 11:46:32 -0700 (PDT) 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=@dylanvanassche.be header.s=MBO0001 header.b=gR6UI5cM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232231AbjC0SiH (ORCPT + 99 others); Mon, 27 Mar 2023 14:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232452AbjC0Sh7 (ORCPT ); Mon, 27 Mar 2023 14:37:59 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B361711; Mon, 27 Mar 2023 11:37:57 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PlhQB0MMmz9sSr; Mon, 27 Mar 2023 20:37:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1679942274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UYNhSu+2Wobyn2s4WHdqzJN3u63ahHSl1LNIJlpGGUg=; b=gR6UI5cM0lSHtl1L3DB5zAYGKT2/vbODgBjpX8klFCCx8NaIbt56YXQHCUMZ7MsO2lem6H xOZFG32lQ9T35IJCWZlUv9LeYgZ2S+zjZBvTWDZd7hZcNMKXUUVKne/ijNwqlpu0CXI1qv V40rk+jWJrKzifFEcWCWjOG2JOLyzhOR22GMhidzapkZzp7fT7mPDqw1+KeHCDgnPA7jcx MBYGbVKNFUAvWoLbXq8Vnw9Aoy7hQ1c9gpB5Vj2epk9P2lyUDpnOtDP9ku3Rscndp5l6fi 5EpH2igSDXDuTu+S6oyHvXEZYlURocKtJmvth44SztwZ+YmzPHaJo/Lp6ANzFQ== From: Dylan Van Assche To: Andy Gross , Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski Cc: Konrad Dybcio , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dylan Van Assche Subject: [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource Date: Mon, 27 Mar 2023 20:37:35 +0200 Message-Id: <20230327183736.496170-3-me@dylanvanassche.be> In-Reply-To: <20230327183736.496170-1-me@dylanvanassche.be> References: <20230327183736.496170-1-me@dylanvanassche.be> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4PlhQB0MMmz9sSr X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761547692855489121?= X-GMAIL-MSGID: =?utf-8?q?1761547692855489121?= Add SLPI resources for the SDM845 Qualcomm SoC to the Qualcomm remoteproc q6v5_pas driver to define the default firmware name and GLink edge name. Signed-off-by: Dylan Van Assche --- drivers/remoteproc/qcom_q6v5_pas.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index c99a20542685..d82b6f4bced4 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1028,6 +1028,22 @@ static const struct adsp_data slpi_resource_init = { .ssctl_id = 0x16, }; +static const struct adsp_data sdm845_slpi_resource = { + .crash_reason_smem = 424, + .firmware_name = "slpi.mdt", + .pas_id = 12, + .auto_boot = true, + .proxy_pd_names = (char*[]){ + "lcx", + "lmx", + NULL + }, + .load_state = "slpi", + .ssr_name = "dsps", + .sysmon_name = "slpi", + .ssctl_id = 0x16, +}; + static const struct adsp_data sm8150_slpi_resource = { .crash_reason_smem = 424, .firmware_name = "slpi.mdt", @@ -1201,6 +1217,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init}, { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, + { .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource}, { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init}, { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init}, From patchwork Mon Mar 27 18:37:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 75620 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1719249vqo; Mon, 27 Mar 2023 11:48:30 -0700 (PDT) X-Google-Smtp-Source: AKy350YeSwW4sUvOfC5c6VofjMNB+9+S7zHRQFuOcQx4OM1ldOqrrHi6J1pizxdO8bDEAi49mIKW X-Received: by 2002:aa7:dd41:0:b0:4ac:bd6f:cacc with SMTP id o1-20020aa7dd41000000b004acbd6fcaccmr12461819edw.12.1679942910792; Mon, 27 Mar 2023 11:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679942910; cv=none; d=google.com; s=arc-20160816; b=d1VyE9LN5emKt+XIeZ9blL3kLFTlsGuIEAOLmIp6FcY5/9eZ0PKBlC01K0jJoYoDLk SaewJq7ELmjflVlX+LeKuvBsKdCS9dKo1/og9AMxDDjqo/5EkN8GJRyPJIWVeOsYRcBh oaHgbMaFBNHrO8fVigaIr6kgJpciIRy8rrnMQgHIyF67biW7/6p908MWUWOdOM9laZNp SCThGK1Y+zaxMyPaPtYRUb15mSr2Vvo7FPsIv59/8WP/krkP9cT7LMbnuN4HD+uLh8X2 iFjhpdnsDW8Cq34J/paI0JMyhdhbPwS2JAD4mcDxtBQcGUn+f3yczkhlwk8QY8XikUwK hksQ== 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=OpnY5Bll0e5uxT0SinClsl4A2EVcTJcY0t1lar/iMyU=; b=tKJA0njmQ7VUSqSmPmVuhEktZThpEgTqiClSPXj8a3tJV4+fhu4xICWi20M2dUvy+i 409llFbommefqkWOTkRUDzV9jWB2zqPBLcR9hJVU622G2UyGrGrDCo0Jf6EG/Bux1g2Z 1Zt5FdVx29UAgyMbtyv9ODX4izPsS4HzU2yKYqzT3BUWBs8OnK+t6DKwcm9X1lbHxX36 110faWDvzQXjOwXgKZ+psGW/bj/UIExaVI/XJEKH4m4ioVb6ygZ0+q3TAiEw863HMu+S 6Lcv5jfBO1zS6oQtCeLLsy8dgv50Ftfv03kPeBavroQjhFotJOVXIFacXOai6sw9hJYF dWCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=vXkPWp3D; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020aa7dad1000000b004a18f2ffb81si29539477eds.321.2023.03.27.11.48.07; Mon, 27 Mar 2023 11:48:30 -0700 (PDT) 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=@dylanvanassche.be header.s=MBO0001 header.b=vXkPWp3D; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232493AbjC0SiJ (ORCPT + 99 others); Mon, 27 Mar 2023 14:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbjC0SiF (ORCPT ); Mon, 27 Mar 2023 14:38:05 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6473B7; Mon, 27 Mar 2023 11:37:59 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PlhQD1WVrz9sc1; Mon, 27 Mar 2023 20:37:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1679942276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OpnY5Bll0e5uxT0SinClsl4A2EVcTJcY0t1lar/iMyU=; b=vXkPWp3D4jR8eSe2YoJquvRM/caraZwDhConHqvV7+z26+YIet9wjbUdnXJ80c+BNtpB8x QJSB3rWesiXNc/Qs9LKYO4gad8Te6cikFJLH/922jYZKNdsig0gfwkyU7s6ZcqnBEKAHMn udquq0Y4XY6dMhM2EJ/wEcuMxj19hTkEwAZenJMv6yPDC6I2blpnRVcx1v8HHNQfe26GL0 pdl4wE+77YJPMsTrkXDKCJqT+n5vaYLQzzXpOAXP6eR+0oLmvPfIyyZFUEHfPWUXBTd/gC QKfhygZ21oEgpz0eTYZyjHS4pItKvGk/o1sl5ED3Q9wXocJe15GVb8oS0FYGfg== From: Dylan Van Assche To: Andy Gross , Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski Cc: Konrad Dybcio , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dylan Van Assche Subject: [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Date: Mon, 27 Mar 2023 20:37:36 +0200 Message-Id: <20230327183736.496170-4-me@dylanvanassche.be> In-Reply-To: <20230327183736.496170-1-me@dylanvanassche.be> References: <20230327183736.496170-1-me@dylanvanassche.be> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4PlhQD1WVrz9sc1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761547817302647467?= X-GMAIL-MSGID: =?utf-8?q?1761547817302647467?= SLPI remoteproc initialization is the same for SDM845, SM8150, SM8250, SM8350 but is duplicated for each compatible. Refactor initialization structs for these 4 compatibles as a single struct. Signed-off-by: Dylan Van Assche --- drivers/remoteproc/qcom_q6v5_pas.c | 66 ++++-------------------------- 1 file changed, 9 insertions(+), 57 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index d82b6f4bced4..d1c7baec4aca 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1014,7 +1014,7 @@ static const struct adsp_data sc8180x_mpss_resource = { .ssctl_id = 0x12, }; -static const struct adsp_data slpi_resource_init = { +static const struct adsp_data msm_slpi_resource_init = { .crash_reason_smem = 424, .firmware_name = "slpi.mdt", .pas_id = 12, @@ -1028,7 +1028,7 @@ static const struct adsp_data slpi_resource_init = { .ssctl_id = 0x16, }; -static const struct adsp_data sdm845_slpi_resource = { +static const struct adsp_data sm_slpi_resource_init = { .crash_reason_smem = 424, .firmware_name = "slpi.mdt", .pas_id = 12, @@ -1044,54 +1044,6 @@ static const struct adsp_data sdm845_slpi_resource = { .ssctl_id = 0x16, }; -static const struct adsp_data sm8150_slpi_resource = { - .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", - .pas_id = 12, - .auto_boot = true, - .proxy_pd_names = (char*[]){ - "lcx", - "lmx", - NULL - }, - .load_state = "slpi", - .ssr_name = "dsps", - .sysmon_name = "slpi", - .ssctl_id = 0x16, -}; - -static const struct adsp_data sm8250_slpi_resource = { - .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", - .pas_id = 12, - .auto_boot = true, - .proxy_pd_names = (char*[]){ - "lcx", - "lmx", - NULL - }, - .load_state = "slpi", - .ssr_name = "dsps", - .sysmon_name = "slpi", - .ssctl_id = 0x16, -}; - -static const struct adsp_data sm8350_slpi_resource = { - .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", - .pas_id = 12, - .auto_boot = true, - .proxy_pd_names = (char*[]){ - "lcx", - "lmx", - NULL - }, - .load_state = "slpi", - .ssr_name = "dsps", - .sysmon_name = "slpi", - .ssctl_id = 0x16, -}; - static const struct adsp_data wcss_resource_init = { .crash_reason_smem = 421, .firmware_name = "wcnss.mdt", @@ -1200,9 +1152,9 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource}, { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init}, { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init}, + { .compatible = "qcom,msm8996-slpi-pil", .data = &msm_slpi_resource_init}, { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource}, - { .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init}, + { .compatible = "qcom,msm8998-slpi-pas", .data = &msm_slpi_resource_init}, { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init }, { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init }, { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init }, @@ -1217,7 +1169,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init}, { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, - { .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource}, + { .compatible = "qcom,sdm845-slpi-pas", .data = &sm_slpi_resource_init}, { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, { .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init}, { .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init}, @@ -1228,17 +1180,17 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sm8150-slpi-pas", .data = &sm8150_slpi_resource}, + { .compatible = "qcom,sm8150-slpi-pas", .data = &sm_slpi_resource_init}, { .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource}, { .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource}, - { .compatible = "qcom,sm8250-slpi-pas", .data = &sm8250_slpi_resource}, + { .compatible = "qcom,sm8250-slpi-pas", .data = &sm_slpi_resource_init}, { .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource}, { .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource}, - { .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource}, + { .compatible = "qcom,sm8350-slpi-pas", .data = &sm_slpi_resource_init}, { .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource}, { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource}, - { .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource}, + { .compatible = "qcom,sm8450-slpi-pas", .data = &sm_slpi_resource_init}, { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource}, { .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource}, { .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},