Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp9807ybt; Tue, 7 Jul 2020 14:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJs7yG7MQv8ZliCi8IlDto0Tv+VU07lYAqWQUXh7XY9PJJJk8B2vXftHr/iXH7fcQIjNSL X-Received: by 2002:a17:907:aad:: with SMTP id bz13mr51145338ejc.276.1594157590937; Tue, 07 Jul 2020 14:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594157590; cv=none; d=google.com; s=arc-20160816; b=ipavg9Ns3zCzR8HYzQTSRz+AZu69M/G+zCodVFYQv6nuWJZxuGpD7LMPsIH1CZwkFk +5ukBSGI5uEYZMGCDcSEcGrUBVTWdV27lxEZ10RDQwlSpaSeUcz/sJvDkW9fEHqTjXef x+yJ0fhszojD5CNe86CpLEJ51skR85MxERChly4kmsHE66tWQG8PQ36Bv0W7d7Q6p6je uE6axNdisDdu15CTNi30JAIer3iaQ8ll8g4XGfrQEyCQaHGgEyhUjElfirGt7wNdDSgt SyuV0BaSplp8+xMRn/2d+wLz/Mq0sLCTcF8EmRnt+/n4swtQy/9BJK3ADh6m/oo+s4P0 W7Ag== 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=WZOE1BCHToBRkuz5QYNPeeSHsFmyYaxE+QsY5sLyxFZnpbd9Wu2+3CedvWPKwmchTs H1gf0QLtceL2HzNXQH+FHD3vs0DLfbj/WstCiT0pCzwlU7BdzgJLaB2AHid8sEWAEWGR 4uBxEh7GG/YbNPBNJLOCe3qWA9DS9VAZ5ny/o91rgx0RQdth0SolpZ3bNowj0IpeycwJ OEchJQ3KADB0ZYNRGeNkjG7Ks8Qg2wiFJYe81Gd+nA16ts4Za4vMKlsaLIWUbtNumbA5 FbYUVQfyWYxJWf+tZc/mvGuHnQmUheVvo4dk1LzW/ndJF43WiwR8WJyPIlncK7zXbj/z oPqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y0V7o8t1; 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 z10si15210275ejc.59.2020.07.07.14.32.46; Tue, 07 Jul 2020 14:33:10 -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=Y0V7o8t1; 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 S1729274AbgGGVbT (ORCPT + 99 others); Tue, 7 Jul 2020 17:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729244AbgGGVbR (ORCPT ); Tue, 7 Jul 2020 17:31:17 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71E10C08C5DC for ; Tue, 7 Jul 2020 14:31:17 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id a14so14404850pfi.2 for ; Tue, 07 Jul 2020 14:31:17 -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=Y0V7o8t1H3YTMhZ4TUkXy4GVXShzOzSWSy21TEMMRnDoyvbmw6ulB1nneFGbHQhnWb RPVS9cocqmq+TNSkG85TTyWEE2Jvhr0FOaNEuLMKvEBOgGqwAlIFCiRO7P5+6MoaL0uG 8HCWa1qK/+LHGT/He2W6vUvyrI5u6qTLp9zkVr2okLWa6liHBbcNigt79AIfQuEjqrz9 f47iVafujZXEtxF8vZ/fxYccBGemuFiWA7z5Fz3BZrXY9fHSYHZMgl+R0P0dIibDlRjr jlyASpnXRxua+C8hzcs+DmecRTXzjtjJ0Lv9LRe42PI1qGOJJmnGRl+snWS1dAD9h+Jj Lf8Q== 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=jhjGN11YrITNBN4uz4RTnIAJ2+WqFEHWSw2SIHIvkswh6gLX5lb8q+uifV3on70UKj IjCK311Mklq0t14pi18OmUO1IdhMrPRm9eYXXPvzN3/YG4PvO13ng0jUJ1bEyjoEhLha RnyHkLISzxzfRAE51f1wHXxmUGWCYrrzlpfQB8B9z+piRR90VPu7en0ndXrsyVNk2WyW Ef+ZsHTJ1QbI/olysF6lRWKYWJxaoj7IU8SWyjDshWGaGpISXedwvB37JDbAcFVU1+Sj ZuLVJzrVp2IThATYfrIV4Eb8bcx60l7TJqNlEmHY/RupCjDJgIe88xejtbormROtLY0X ZFvQ== X-Gm-Message-State: AOAM532lUnDRAMiaHJiGtRbOBDMM6C4d3FBm/DtEFE2I38E6WDBcmR5B M8ksvXjTWcqcAzPdP3sOHEYdfw== X-Received: by 2002:aa7:9a92:: with SMTP id w18mr7887844pfi.233.1594157476994; Tue, 07 Jul 2020 14:31:16 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o128sm23560832pfg.127.2020.07.07.14.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 14:31:16 -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 v5 02/11] remoteproc: stm32: Request IRQ with platform device Date: Tue, 7 Jul 2020 15:31:03 -0600 Message-Id: <20200707213112.928383-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200707213112.928383-1-mathieu.poirier@linaro.org> References: <20200707213112.928383-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