From patchwork Tue May 10 04:26:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sireesh Kodali X-Patchwork-Id: 12844536 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 0277FC4167B for ; Tue, 10 May 2022 04:29:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236608AbiEJEdH (ORCPT ); Tue, 10 May 2022 00:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236701AbiEJEbq (ORCPT ); Tue, 10 May 2022 00:31:46 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0BF252DE3; Mon, 9 May 2022 21:27:28 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id e24so14865962pjt.2; Mon, 09 May 2022 21:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xKRAV/0WhjqQKBeF/P7yZiZfvRuC4R3b8RZ22MxUCh8=; b=dd6XhIeMYjfLZ5mCHf715M4qM/S4/M0cK3wDD7BFdVTchSMvP3f0lCYniK+9ItFIY9 nE4j84r05i8BcqghbyJhXIZl5CR6xGSQvKmTDBKg+VoiKnkQxrbZabTAvzbBUYcO6Ymo amLq2pe2MfE07Z290U8MN2ZWomVLM/ML65I7tpEM0dzFRrYYsn6ds9Nz99rITaa9HI2s 8795/bWTrCKMDqrwhhvOX9Q0ZYpDEcNv56dljHcH2HvzZaviz3HfnYuw1cbZ1DbMsrC1 oHmkaH8u13PJg37BwOzFxG5nucEpwoc+zulE/Dmut7INuFKL/LHZmadxSmmubuza8mkx Gt8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xKRAV/0WhjqQKBeF/P7yZiZfvRuC4R3b8RZ22MxUCh8=; b=AFUf61FVXOoKXmPf0z2e2flIm7dww9yiPayIa9Obm5N2xTjrDb4LfInEMljAIIut18 uXzbMsFvb+0Vw/pzOGJJPFIfWQq2o5k/jcij8u0UKByM1vy6noyOyZL2e6XgWvEQHEsl +ff/1ZFJG+HXRhUB0OnS6p/aml2HgOF7EXyJOaUJVpYaZKssoYUCNkqSWTBoLyQoCjlA clY/CXtfNFPofA5liXQy8hXGeE1p6z1pgggSPibVEAWrIwvH0aqYGf0zZyCW/rRIQAO2 ascyJIr0OHY1L4QyxvSm4LlFIgEYebXD8zMOSnLyojBwdYXKFDMoHYOAkO7RgRkt5z/+ SYAA== X-Gm-Message-State: AOAM533v9GIFEgBJLNJWWA7YWTwATi/756pLLXolYqbUuXn8g2ZMEBq0 eb+5RRCMZxnUMtPwyymsdpdU+/jn3bzQgg== X-Google-Smtp-Source: ABdhPJwP3+sbRFfYAYCxxMhQ/rcMcORClDoKk5ZbOJi8iEWE1FjcZb72ntagW0TDI+sNuJJTKN//9A== X-Received: by 2002:a17:902:eb85:b0:15e:bf29:bd9f with SMTP id q5-20020a170902eb8500b0015ebf29bd9fmr18822020plg.135.1652156847342; Mon, 09 May 2022 21:27:27 -0700 (PDT) Received: from skynet-linux.local ([2401:4900:33a2:808d:da42:4e61:10ad:478d]) by smtp.googlemail.com with ESMTPSA id x4-20020a1709028ec400b0015e8d4eb2aesm741263plo.248.2022.05.09.21.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 21:27:26 -0700 (PDT) From: Sireesh Kodali To: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org Cc: bjorn.andersson@linaro.org, Sireesh Kodali , Andy Gross , Mathieu Poirier , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] remoteproc: qcom: wcnss: Fix handling of IRQs Date: Tue, 10 May 2022 09:56:53 +0530 Message-Id: <20220510042654.71152-2-sireeshkodali1@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220510042654.71152-1-sireeshkodali1@gmail.com> References: <20220510042654.71152-1-sireeshkodali1@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org The wcnss_get_irq function is expected to return a value > 0 in the event that an IRQ is succssfully obtained, but it instead returns 0. This causes the stop and ready IRQs to never actually be used despite being defined in the device-tree. This patch fixes that. Fixes: aed361adca9f ("remoteproc: qcom: Introduce WCNSS peripheral image loader") Signed-off-by: Sireesh Kodali --- drivers/remoteproc/qcom_wcnss.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 9a223d394087..68f37296b151 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -467,6 +467,7 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss, irq_handler_t thread_fn) { int ret; + int irq_number; ret = platform_get_irq_byname(pdev, name); if (ret < 0 && optional) { @@ -477,14 +478,19 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss, return ret; } + irq_number = ret; + ret = devm_request_threaded_irq(&pdev->dev, ret, NULL, thread_fn, IRQF_TRIGGER_RISING | IRQF_ONESHOT, "wcnss", wcnss); - if (ret) + if (ret) { dev_err(&pdev->dev, "request %s IRQ failed\n", name); + return ret; + } - return ret; + /* Return the IRQ number if the IRQ was successfully acquired */ + return irq_number; } static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss) From patchwork Tue May 10 04:26:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sireesh Kodali X-Patchwork-Id: 12844534 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 93A6CC433FE for ; Tue, 10 May 2022 04:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236587AbiEJEdF (ORCPT ); Tue, 10 May 2022 00:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236711AbiEJEbr (ORCPT ); Tue, 10 May 2022 00:31:47 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAA73255099; Mon, 9 May 2022 21:27:34 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d22so15687471plr.9; Mon, 09 May 2022 21:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3fqvQ3B2e4Jfl0iz3GRolUCBYJvQ9lqVFwmUIWfWd7Y=; b=qnGCBaEYK367xZ1eAYI6+LLPhIq5OrOC6tUVYCrOxpre7uW8ekX+CMakaeuz1UVqyd TectHU6QsvpR50yVyYaeKk7h5h+s2aYfdkdTAhnPS9zffRxPDKoQvN1rU7dklJfWxova I/ldPFfE3b5gbTvzZay7FyWJK7W6z3a12SFhfLxGuv5t2zDWt2n5y0yuarCbp11MRLXW QTK5rYxv2fBJ34tOkoHjFt/bNPyutuujD8NF1u2lg47j+JGmaARATx+4p7tdnRV0KA9t uJeL4CwyP0Ima0AKFjSA0dswRk38mJ6Ncq+D7Mzf5K8jRow7L08wS/OJjXUE2E0XX1TO hlhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3fqvQ3B2e4Jfl0iz3GRolUCBYJvQ9lqVFwmUIWfWd7Y=; b=Lq9d6Tr9VbXwpFWtBsUYnCHVNPWpDgjMoXDR8Ckf8mkpzSpfCMak4P76gQmtbBmRri UW+HkJEQJTyKZrKoWbWiBsLOfFVIECWRjgRfwJFIW9YMHFRVyKTvOr95xGfGQJJN1yOh 7+0EbIsIi9g9KfjqFMlB3w6ew6LUeQA/m2kWMAhdSPXJUI6Pmca2bw97lGlbXry+o0Nu +vVDQdMfPk37AUOybLS59vc/UavXuOBAN6ESnjO7ntUGsj54iJ+jj7MhTliTGWbK9Awu Fl1oUAEPaYyBT5xMm5Il4qP5sGaLP1I80bkKcXFQXncipHigK9YSolp77yQlQzHUyHoh ovaA== X-Gm-Message-State: AOAM533Zblv+JBRdgdiPVn7TgbWy8sFTHgMSIw8ijUk8nwWLpLSULRGQ BzQG6XMYl4ePuiy064zZHlLfplv5Z4nUgg== X-Google-Smtp-Source: ABdhPJxIie1pCr/tmPsDQ9H3w67WWAhPJGg0hqYxGcy/AwcuMSO/PgjddGDmJ3g5glskXx3C8Rgv7g== X-Received: by 2002:a17:902:bf0a:b0:15c:df1b:f37d with SMTP id bi10-20020a170902bf0a00b0015cdf1bf37dmr18665939plb.90.1652156854032; Mon, 09 May 2022 21:27:34 -0700 (PDT) Received: from skynet-linux.local ([2401:4900:33a2:808d:da42:4e61:10ad:478d]) by smtp.googlemail.com with ESMTPSA id x4-20020a1709028ec400b0015e8d4eb2aesm741263plo.248.2022.05.09.21.27.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 21:27:33 -0700 (PDT) From: Sireesh Kodali To: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org Cc: bjorn.andersson@linaro.org, Sireesh Kodali , Andy Gross , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node Date: Tue, 10 May 2022 09:56:54 +0530 Message-Id: <20220510042654.71152-3-sireeshkodali1@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220510042654.71152-1-sireeshkodali1@gmail.com> References: <20220510042654.71152-1-sireeshkodali1@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org The smem-state properties for the pronto node were incorrectly labelled, reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing the stop state to be used. Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node") Signed-off-by: Sireesh Kodali Reviewed-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index e34963505e07..7ecd747dc624 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -1758,8 +1758,8 @@ pronto: remoteproc@a21b000 { <&rpmpd MSM8916_VDDMX>; power-domain-names = "cx", "mx"; - qcom,state = <&wcnss_smp2p_out 0>; - qcom,state-names = "stop"; + qcom,smem-states = <&wcnss_smp2p_out 0>; + qcom,smem-state-names = "stop"; pinctrl-names = "default"; pinctrl-0 = <&wcnss_pin_a>;