Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2013103ybh; Tue, 14 Jul 2020 13:09:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb8vN6mC9pWTiJPHJVOjuXyFsmICWqVTa/IBqcuSgkMuXeiHoKBqYf3nAgGKoTj5MC3j2+ X-Received: by 2002:a50:ef10:: with SMTP id m16mr6123281eds.206.1594757374885; Tue, 14 Jul 2020 13:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594757374; cv=none; d=google.com; s=arc-20160816; b=X4EIPkMq/MTu1n3gyzv4bp2T6X4jVvHUpehksOgN0bsZM7fXLlbIAUDGYt9gb2yXcP 9SWp9e5YS+sS4B7kCokWQK43709tJFyfpleGP3tty3ORAfCA00fQMhHg5pZSXDN5/jpk J7OAVHoRTKbuRaIYdh+FZefGCCEvm8DrEYpJxfOJJm6G1AQdagZ+veCOWuTs7wxkHVyG 6wkXcSgZb4UUYaSgZAZufDNGLshZ+5OuyAfz8gqbLRwgzv4uWn5riiEz9utyyDW0qwF8 LYMY//4o++P6s5nE0TZujJiTyermNbdL444DYwZ9+dMQPfa4jUlMnHvSys20fSrkkm7/ 247A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UOLpDhUaI5YvggRlgo01SV+Tf6RdV3ahOTchedkHuLg=; b=0OeQeNPm1k/0imxaEdzw5Sn7C1JhhQKihKEU19IXAxJFYIm2CXnRbGX0M21dDHLJck yxgK48klpGiXLUKAcOzvQ50VoKGUpghYzGaLUL1M9nAOanKkINi7k4ZLwR02UdK5wkXK UDNl3NZ685RLNVDeOQtuxVlRvTti5qPK+n6PP3f++h0VSfc7hoOR5oR9ZYdvzphDvktQ IrztT91yCNZ+TWvWW58iP8v2O15L4JyDPyBsAXUEx4mctgVaROvC9sA5bYZaDeINzPtB gSkxS7GYcMD1ab4g2EqWXm62Rpr7K/8fNwTc6B37YMrKjRnjsGhrDUSnMIUu39NZ1dxo fpyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miob1jqq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk22si11443066edb.289.2020.07.14.13.09.12; Tue, 14 Jul 2020 13:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miob1jqq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730289AbgGNUFa (ORCPT + 99 others); Tue, 14 Jul 2020 16:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729803AbgGNUEu (ORCPT ); Tue, 14 Jul 2020 16:04:50 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A1CC061755 for ; Tue, 14 Jul 2020 13:04:50 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id t6so8091577pgq.1 for ; Tue, 14 Jul 2020 13:04:50 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=UOLpDhUaI5YvggRlgo01SV+Tf6RdV3ahOTchedkHuLg=; b=miob1jqq3uyJWDK9ehHABuSktDa5Dsm4+0451K6rGGo5B3KyWsNDs4e5X+wFRxTVeq To5GMy0VfU2mFj7H8BeWp2p1pHYsb6ZtVxpCTupv7HY0xRWCgnekld6iDJwip0yq5y1y aCStCoIiKicPpeHwSqWvOTKd1pQD1QTFRvZPlEMia/WO3oqWxceKUyWDrt2M4az+zwqm wd+cXATvk3FyONmAIFkJaAIN3/1PpvpUKbK3nMvbVeBmIBtfB0NNA9ZAZRrXYWn5n+I+ fsGo79c6oOaV0L5pjzm0EIBAITNsPyFjht7r0mcoQCaDb+sUsEpSxWpghrI9gXmHW8U3 jrZA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UOLpDhUaI5YvggRlgo01SV+Tf6RdV3ahOTchedkHuLg=; b=XRtZHsDG+IG4pQ8zOBUVFikPLVvND1trO+BYNz+2D1uUtEDGZV9p79Knvu3fe2X+38 Esspf75moF9AxEDPkmgQb1VjdS/UpvsG2zmlfFwx1YJ37QkkNQUTs7phDuvXMwfGdoq0 HxIgKreqxXm6i4p+gXKLRr8vf47VxK4feJtEYJ0X57zlkxzumSeH7oLG+2oFD/laQL0p 4tjvO0XnNkXAt0a+M3jGAIfO1EFlGhxZXvLqap1u05RDozSdG0P4Nebzx1628yvQu+D1 KLX3NXheg5ExmVDsxa+5zkdNMHg6u4MHV3g7FYKrCZ1+QV5pwdBAgH1qzdy2uU1CyrRS lNpw== X-Gm-Message-State: AOAM530FcPuCiytFhm+n96JntcxvdCCm6IHCmc/97RYNPBUJ3EJZ+dN4 /8tc33cMekKOIBKOzH8x0gjnWg== X-Received: by 2002:a63:d806:: with SMTP id b6mr4287879pgh.403.1594757090379; Tue, 14 Jul 2020 13:04:50 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id t13sm3262959pjs.17.2020.07.14.13.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 13:04:49 -0700 (PDT) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, loic.pallardy@st.com, arnaud.pouliquen@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v6 02/11] remoteproc: stm32: Request IRQ with platform device Date: Tue, 14 Jul 2020 14:04:36 -0600 Message-Id: <20200714200445.1427257-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714200445.1427257-1-mathieu.poirier@linaro.org> References: <20200714200445.1427257-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Request IRQ with platform device rather than remote proc in order to call stm32_rproc_parse_dt() before rproc_alloc(). That way we can know whether we need to synchronise with the MCU or not. Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson --- drivers/remoteproc/stm32_rproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 2973ba201c1d..c00f60d42ab6 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -262,7 +262,8 @@ static int stm32_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) static irqreturn_t stm32_rproc_wdg(int irq, void *data) { - struct rproc *rproc = data; + struct platform_device *pdev = data; + struct rproc *rproc = platform_get_drvdata(pdev); rproc_report_crash(rproc, RPROC_WATCHDOG); @@ -554,7 +555,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev) if (irq > 0) { err = devm_request_irq(dev, irq, stm32_rproc_wdg, 0, - dev_name(dev), rproc); + dev_name(dev), pdev); if (err) { dev_err(dev, "failed to request wdg irq\n"); return err; -- 2.25.1