Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4589030imw; Tue, 19 Jul 2022 09:21:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saTuhVvtuDCOwIcw5qNi8nSKVjKqpluEPg2Ey5UXLcUQ7m1AWiTqNZ5ZZboCsOuYQGArZC X-Received: by 2002:a05:6402:34ce:b0:43a:a4bb:27a6 with SMTP id w14-20020a05640234ce00b0043aa4bb27a6mr44536899edc.158.1658247664945; Tue, 19 Jul 2022 09:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658247664; cv=none; d=google.com; s=arc-20160816; b=toLaUqoommL63z+T8rJE1WuSTxs8VS3cj826cUZoJNnXEXflCl3sCATDvXGWxImY+L RRPY0HZGoRez6eIRm7jIRzuYml87a0sy2+Ow7xgoBAyCMGqX14Z65FvI5T+W+hPv0P0H bwlUoCSIugQ7bteRIC1R4mvlQEtvWixmynT1aUpO9RcAM53CFrB7tDCY0yO4Hog8duis sXHdvU0mvHO9hWR0GDGHgW66y8OaK3+Rc7x+Nf062YaxoK47hc2kboMxdZ43tUwMhzRD dHEQ7Xlctc0EMF0x3vgoWFGdbddvOTrXpQHSQ0X1CzHxug1WZD1kCRZSpt1UjdcmR9C6 ifoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1/iQNc3gXhjz0NA1343D9qw+UVAwvTADGGcwrjN+3GM=; b=ekd9A+jJiCFPGbrGYzOjYS96IxLaJ+V8eLDg/9YyTRpxahPWZiQ73zKMBJpOkWgrSr JPJGikxmTLZAcoYTbuj5I3AJzuWq2gWqOr+6aX+/A5Q5ay6ervztYng+y4b7PBOyvZ/b S0JLHf/eamaLsFQ+7GwSeZc1G2OHNhigcYYXch72GOzeHItvwk/aDQi4K+8rOKX8Z7Bw j4fOLXRaUBfQcWP3r6NFiIxBOTrravLLyk4MaZ2vhRXKdO+e6rPh0/O/jAuFo26tI3b4 Y8zVWcTxKjXLbYI+YI1uRHqvR+8r7Tg8Ftfx9t3qtuuXgUsCEsYbfjpQnlD7RinVF/qm tlGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oxbpN3Gy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g20-20020a17090670d400b00717f2a08a2csi15851064ejk.169.2022.07.19.09.20.40; Tue, 19 Jul 2022 09:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oxbpN3Gy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237547AbiGSQQh (ORCPT + 99 others); Tue, 19 Jul 2022 12:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235849AbiGSQQa (ORCPT ); Tue, 19 Jul 2022 12:16:30 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13A584F196 for ; Tue, 19 Jul 2022 09:16:29 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id q5so12393110plr.11 for ; Tue, 19 Jul 2022 09:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=1/iQNc3gXhjz0NA1343D9qw+UVAwvTADGGcwrjN+3GM=; b=oxbpN3Gyqd2c/4XkRBh7oWvtJtFAUi6DioLRIU+O5ISqhEpCFnaxo9hd8bA8EKIVA+ cprpb1sL3DW86MpjliDUr0wkpsfQ0sU7ASSbPyvfDA4G03OrMBifHEUuy9VivSAxt0YH 8yRLBsfHCiY4kw2bPI3AzHkMciY4zCxsVlwIVN7VBgLFwr1pnyV3FDmjm8kBHuZTTe8p 6Lu59uObwDL/GjBoDgd8TIr+m5ShFiF7hk/UDihQwLxYTlVX58gW+zXSPabIKs9ibSbI qb4pdUf3uQh4BTLjuEE9pTt0VvGkdnv00TWvSHaiGZgyCLRxToTmLFybECxjBBZxHqfZ 7F0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=1/iQNc3gXhjz0NA1343D9qw+UVAwvTADGGcwrjN+3GM=; b=Vi8GLAhl1tvDZmml70GbCvs0N66ElFhhJ8Oze3A8mMdFCGPHq5MYC+Xc88jMjN3gFI m1CT6UPCGc47FqkaUnmpOEgwNWO7fzjl7A0LJjfzNVqqiIkrD5yk1aJxwQqemz/MAqkk 25ufGujYxMf+D5FZuADWEH33erpus+3WkIEe+jQIHUjGHLk7+0TuZ5K0J6oRu679mOgb qkGCqM+FqTZgHIf73nz6jup42TSquCNKhrsa1TOuGoP4ETOBtqtP8ai/JAeg2jcKwh0E FvDD/HbQSMNYdYvRxzvNF6VTr3gL/QrEpIdeNrW2+iWlwZHjsfWFiNmTXvQb5BrYKRqe yGZw== X-Gm-Message-State: AJIora8TTWzeUqoBSfWaewx8oDHafZv5kx5mc3qoX7lAmXKKZLPlFNlC aVDlLfj5MbzEddTjv+D9tqi3cw== X-Received: by 2002:a17:903:248:b0:168:cf03:eefe with SMTP id j8-20020a170903024800b00168cf03eefemr33889666plh.124.1658247388439; Tue, 19 Jul 2022 09:16:28 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id 72-20020a17090a09ce00b001efd39b7e39sm13705857pjo.37.2022.07.19.09.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 09:16:27 -0700 (PDT) Date: Tue, 19 Jul 2022 10:16:25 -0600 From: Mathieu Poirier To: Puranjay Mohan Cc: linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, krzysztof.kozlowski+dt@linaro.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, nm@ti.com, ssantosh@kernel.org, s-anna@ti.com, linux-arm-kernel@lists.infradead.org, rogerq@kernel.org, grygorii.strashko@ti.com, vigneshr@ti.com, kishon@ti.com, robh@kernel.org Subject: Re: [PATCH v5 6/6] remoteproc: pru: add support for configuring GPMUX based on client setup Message-ID: <20220719161625.GB3393732@p14s> References: <20220607045650.4999-1-p-mohan@ti.com> <20220607045650.4999-7-p-mohan@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220607045650.4999-7-p-mohan@ti.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2022 at 10:26:50AM +0530, Puranjay Mohan wrote: > From: Tero Kristo > > Client device node property ti,pruss-gp-mux-sel can now be used to > configure the GPMUX config value for PRU. > > Signed-off-by: Tero Kristo > [s-anna@ti.com: simplify the pru id usage] > Signed-off-by: Suman Anna > Signed-off-by: Puranjay Mohan > --- > V4->v5 > * This patch was included in v4 and had some checkpatch errors that have > been resolved in v5 > --- > drivers/remoteproc/pru_rproc.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c > index 2977eb50631b..f2c6c55f0f20 100644 > --- a/drivers/remoteproc/pru_rproc.c > +++ b/drivers/remoteproc/pru_rproc.c > @@ -123,6 +123,7 @@ struct pru_private_data { > * @dbg_single_step: debug state variable to set PRU into single step mode > * @dbg_continuous: debug state variable to restore PRU execution mode > * @evt_count: number of mapped events > + * @gpmux_save: saved value for gpmux config > */ > struct pru_rproc { > int id; > @@ -141,6 +142,7 @@ struct pru_rproc { > u32 dbg_single_step; > u32 dbg_continuous; > u8 evt_count; > + u8 gpmux_save; > }; > > static inline u32 pru_control_read_reg(struct pru_rproc *pru, unsigned int reg) > @@ -250,6 +252,7 @@ struct rproc *pru_rproc_get(struct device_node *np, int index, > struct device *dev; > const char *fw_name; > int ret; > + u32 mux; > > try_module_get(THIS_MODULE); > > @@ -273,6 +276,22 @@ struct rproc *pru_rproc_get(struct device_node *np, int index, > > mutex_unlock(&pru->lock); > > + ret = pruss_cfg_get_gpmux(pru->pruss, pru->id, &pru->gpmux_save); > + if (ret) { > + dev_err(dev, "failed to get cfg gpmux: %d\n", ret); > + goto err; > + } > + > + ret = of_property_read_u32_index(np, "ti,pruss-gp-mux-sel", index, > + &mux); > + if (!ret) { > + ret = pruss_cfg_set_gpmux(pru->pruss, pru->id, mux); > + if (ret) { > + dev_err(dev, "failed to set cfg gpmux: %d\n", ret); > + goto err; > + } > + } > + > if (pru_id) > *pru_id = pru->id; > > @@ -310,6 +329,7 @@ void pru_rproc_put(struct rproc *rproc) > > pru = rproc->priv; > > + pruss_cfg_set_gpmux(pru->pruss, pru->id, pru->gpmux_save); > pru_rproc_set_firmware(rproc, NULL); > CC drivers/remoteproc/pru_rproc.o /home/mpoirier/work/remoteproc/kernel-review/drivers/remoteproc/pru_rproc.c: In function ‘pru_rproc_get’: /home/mpoirier/work/remoteproc/kernel-review/drivers/remoteproc/pru_rproc.c:279:8: error: implicit declaration of function ‘pruss_cfg_get_gpmux’ [-Werror=implicit-function-declaration] 279 | ret = pruss_cfg_get_gpmux(pru->pruss, pru->id, &pru->gpmux_save); | ^~~~~~~~~~~~~~~~~~~ /home/mpoirier/work/remoteproc/kernel-review/drivers/remoteproc/pru_rproc.c:288:9: error: implicit declaration of function ‘pruss_cfg_set_gpmux’ [-Werror=implicit-function-declaration] 288 | ret = pruss_cfg_set_gpmux(pru->pruss, pru->id, mux); | ^~~~~~~~~~~~~~~~~~~ I get this on both rproc-next and today's linux next. > mutex_lock(&pru->lock); > -- > 2.17.1 >