Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp10260ybt; Tue, 7 Jul 2020 14:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF+G/RcYdMvZa0gUf0ndPNLj6QNCJ8RygfPeVimGsQ/GuL6fjdPd1SrQHxUHvJeX7mvjEs X-Received: by 2002:a17:906:2a94:: with SMTP id l20mr47366620eje.224.1594157634088; Tue, 07 Jul 2020 14:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594157634; cv=none; d=google.com; s=arc-20160816; b=sehTfROFY9VVPw90fc2wbnFpO8wWFeVNouSjdYj9wvjStX2ZayV//bDcIMRn+vptjX FIdpOefZ6LoPFegAXD8dirgYIQfAUwowHBiu5qab7qDoin3fT9bd8cR4CRnc8zCXmgGG Q1B67SauV3OqOvQXKqOX0tS14VJvFNij36mQyBLB0PAEETHg5M4z4nnNobDxKeamqZBk 1KoNEjYpHgcG7nPhHgvnk5Okzc5WQFFAkJsI7IBxRULq9K/FYKEJeaj88H+gZzrsEMoG tfaOjq71znxSH91+Vnkpn/yCizycweGKLDuZdje34P6UKWmBUzTDGZK4/xBrS/3e0xlA BADw== 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=QJEcAvXCkMubZ5CvQAwW4/233WmH+zu/CCD6+/Cfr60=; b=E9D1nWnyEJqxyYqz5mZD4gfPFu5G2+DriZEKQcguZOpAZ3dtrndxQOLiVrOcI4+0LY e2+Q+CbfhcBgoh1V6ChfnOLtqJzvFigX0TFaLcJd2PSNl3xKHQ8yyGwAtDWs/poSWvQL yfhAoTa4dqJsyLicQ2g8lg7/mQ7HTZCk4dMD/ka/zLjmzlqY47GNpKslZerEO20SWWE2 G/u5zYcg6M5f8HADiGz3hdkCloTTbYiYttc3e1XB1PP5PBx6GzNRPBJqQHEXf7SW3Ylb hlMZhhHpwaheGCY8ZdmpHb/BQFswGt1RFhyobcBwNjFiGIJ3Bjo18vlF7LI4XOC13k1J eZZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IE5epYPw; 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 g14si11387925edv.102.2020.07.07.14.33.31; Tue, 07 Jul 2020 14:33:54 -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=IE5epYPw; 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 S1729369AbgGGVbb (ORCPT + 99 others); Tue, 7 Jul 2020 17:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729340AbgGGVb1 (ORCPT ); Tue, 7 Jul 2020 17:31:27 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09762C061755 for ; Tue, 7 Jul 2020 14:31:27 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id t6so20626259pgq.1 for ; Tue, 07 Jul 2020 14:31:27 -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=QJEcAvXCkMubZ5CvQAwW4/233WmH+zu/CCD6+/Cfr60=; b=IE5epYPw1RKLJGcDCbEzvXqg/wzIPCWzzN5MF6MfqI9d6CQG5XFJfTcsGCoYnO5zor NlARFp0Hv7XGJIFLWDcqOl9OywPlN3WnMHXoaQ5VxZprr2okYGkcu+k0H04R5MX4oOxg NsV5m8lBFwZ2URIidMlNWX5GhkIlPnuVMB0Ky5FoKFHSDZVq1WnqoBVY1S65x6IReMVb ahpQc0LDTA9QmW3dmoQMLqWffbFzmuL7b9Cok+0Xi0y+l3kwb3A4HD5mYFXCd2lLKSly iCapvghsBYMN77c9lcOBiDhFr5vvYBEBuHFADT3RvDeGvWp7YtUDQBW4K7Tw51DAZElE DazA== 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=QJEcAvXCkMubZ5CvQAwW4/233WmH+zu/CCD6+/Cfr60=; b=lEL+RghSgEBhfew+u6acgSqMtJ7U1jKHHLz+PFo2T/9Gh9cr0zOpb0MB7F5t9EvBoX VHmRAdTdyAzZsQpN+7KObrm6LHZAQ5hRUvcK3NiIVPhz0dgbHIQcJDs3sXJwQE8wcc+V U9T1V5y6vgSzU0h5Rd+6b+gCQWd99m0EgoKOORRs2Gy9yJJhnDNjMktEcU/gcHGimAIU hQCHaW4q8vobIYcrOhWrBXFb0Au+4vwEgLNcem24YVURUJTiLivKVfjHohNXBGM0lfH7 /PHWwFwPUzdaOOOn8QfNYG0gLvAOrFQmb5zhHpJcG1ZWSQPadEOCvd8vC9rFL0FTH1GE Knpw== X-Gm-Message-State: AOAM532o79iLcKkeYXrQncx7ZTbA/BsDljYIIHjb+ECtxiRygAoJtPDy E6J/ePOchC2erODqYqbKLHueGQ== X-Received: by 2002:a62:fcca:: with SMTP id e193mr41781795pfh.307.1594157486584; Tue, 07 Jul 2020 14:31:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 14:31:26 -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 10/11] remoteproc: stm32: Introduce new attach() operation Date: Tue, 7 Jul 2020 15:31:11 -0600 Message-Id: <20200707213112.928383-11-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 Introduce new attach function to be used when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Signed-off-by: Mathieu Poirier --- drivers/remoteproc/stm32_rproc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 882229f3b1c9..7145cd49616e 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -460,6 +460,13 @@ static int stm32_rproc_start(struct rproc *rproc) return stm32_rproc_set_hold_boot(rproc, true); } +static int stm32_rproc_attach(struct rproc *rproc) +{ + stm32_rproc_add_coredump_trace(rproc); + + return stm32_rproc_set_hold_boot(rproc, true); +} + static int stm32_rproc_stop(struct rproc *rproc) { struct stm32_rproc *ddata = rproc->priv; @@ -525,6 +532,7 @@ static void stm32_rproc_kick(struct rproc *rproc, int vqid) static struct rproc_ops st_rproc_ops = { .start = stm32_rproc_start, .stop = stm32_rproc_stop, + .attach = stm32_rproc_attach, .kick = stm32_rproc_kick, .load = rproc_elf_load_segments, .parse_fw = stm32_rproc_parse_fw, -- 2.25.1