From patchwork Thu Sep 20 01:51:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10606807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C7661390 for ; Thu, 20 Sep 2018 01:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D0AE2CC38 for ; Thu, 20 Sep 2018 01:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 310E12CD45; Thu, 20 Sep 2018 01:49:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_DBL_ABUSE_MALW autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D16AA2CC38 for ; Thu, 20 Sep 2018 01:49:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732681AbeITHaT (ORCPT ); Thu, 20 Sep 2018 03:30:19 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35501 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732658AbeITHaT (ORCPT ); Thu, 20 Sep 2018 03:30:19 -0400 Received: by mail-pf1-f194.google.com with SMTP id p12-v6so3565902pfh.2 for ; Wed, 19 Sep 2018 18:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TH6B8WSzd10W48SEVbkFc6rDiVSy0C3hDys859up1d4=; b=daH5aI5/54SMpB6AWMNqMhS1OY1gIsDRikwSaVsKuoQZS5lZEhNkCHn5J1EbXydWQQ 48cEAl14YHVPQv8TAtYAkqDUX+rYyuG+tMhbZXF3gmoYNitM/NsBgdcqOZEdoyjqeigk yjfgcx275l0YYDjgDoUygJ93zy6o8+5osRjjo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TH6B8WSzd10W48SEVbkFc6rDiVSy0C3hDys859up1d4=; b=Qc0xJQ3w5hwe2BEjeMs3PjuM12EICC+LgUx1AHAIcl9e6sh1K3/yJBzoKdtB8FKf1S DpstNv+Zlnx7SyOPQZMy/9TlOMcBvGE1HYkSIYhg3e5e0kCvRSmYHGPtLxNQrVtMjEd+ hiX8xhIyP0u6fOu8euediUCRsaTpnOLwQ3yIIHc9SbllDB3BXh8b29V1yCaDGoJ6wKJH aKCabYkRQq7pBWxAQ/odqFR3yvv5RPbUm7m840DcUoJMXDbjs6X2KiJOQHxHUAP50ksh VbQMSFq+lNrxjwIBSvzhQiQI4AWu1ZtdLaoyG8pNoNiT8ESHdXh1qVTPMvwMSKi5DNmY AuEg== X-Gm-Message-State: APzg51Atch7AKczWs2CV9sokil1YHsr8eqeOu9SVZq+SFOhPyVf/VGpr 51e1Q0pdqaYLCwX2z0uRvNoIKQ== X-Google-Smtp-Source: ANB0VdZSQzHkoRTvJAVVn6/G9R2Ks1aOkNsHhMdIdM1l7+10fHRLQk1xoj4LJgiupXkiSivVbNSdmQ== X-Received: by 2002:a62:c0a:: with SMTP id u10-v6mr39027862pfi.43.1537408174380; Wed, 19 Sep 2018 18:49:34 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x24-v6sm28927336pfh.67.2018.09.19.18.49.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 18:49:33 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] remoteproc: qcom: q6v5: Propagate EPROBE_DEFER Date: Wed, 19 Sep 2018 18:51:51 -0700 Message-Id: <20180920015151.15957-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the case that the interrupts fail to result because of the interrupt-controller not yet being registered the platform_get_irq_byname() call will fail with -EPROBE_DEFER, but passing this into devm_request_threaded_irq() will result in -EINVAL being returned, the driver is therefor not reprobed later. Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Cc: stable@vger.kernel.org Signed-off-by: Bjorn Andersson Reviewed-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index 61a760ee4aac..e9ab90c19304 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -198,6 +198,9 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->fatal_irq = platform_get_irq_byname(pdev, "fatal"); + if (q6v5->fatal_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + ret = devm_request_threaded_irq(&pdev->dev, q6v5->fatal_irq, NULL, q6v5_fatal_interrupt, IRQF_TRIGGER_RISING | IRQF_ONESHOT, @@ -208,6 +211,9 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->ready_irq = platform_get_irq_byname(pdev, "ready"); + if (q6v5->ready_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + ret = devm_request_threaded_irq(&pdev->dev, q6v5->ready_irq, NULL, q6v5_ready_interrupt, IRQF_TRIGGER_RISING | IRQF_ONESHOT, @@ -218,6 +224,9 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, } q6v5->handover_irq = platform_get_irq_byname(pdev, "handover"); + if (q6v5->handover_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + ret = devm_request_threaded_irq(&pdev->dev, q6v5->handover_irq, NULL, q6v5_handover_interrupt, IRQF_TRIGGER_RISING | IRQF_ONESHOT, @@ -229,6 +238,9 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, disable_irq(q6v5->handover_irq); q6v5->stop_irq = platform_get_irq_byname(pdev, "stop-ack"); + if (q6v5->stop_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + ret = devm_request_threaded_irq(&pdev->dev, q6v5->stop_irq, NULL, q6v5_stop_interrupt, IRQF_TRIGGER_RISING | IRQF_ONESHOT,