From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED9BEC77B73 for ; Tue, 6 Jun 2023 09:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FP7b3W0i+lzF0Dd08QJLk65XX14qx6SoE6luHh6kggQ=; b=G5JycZ22csBCje EdDPIMtjJZJNys3PKKUVU8IWW4S8+0ELZ7YosIsAEAbpr5B3Cucnj9dU2I31tVTyGAMVh81uV3pS5 qygqFAKnlTR/USuISccraJ6Or/xvRRXmrKOjiLVzyqu/UJ+El5bdKkFLkv+VmSCrMdBpGMERyy9hG z1a4m4eqp/6BqDcYgSnwUz9ZAUH5N/6VhiHileRGZPuPyyB8Nrxme80blAVVtVQcCPJ7JENCXtqPB 9gc7AVMs8WsYjYJxbP+pQ7t7Hr9Dti8mBUL+rN2eaOMdCdoW3r/YG9hrHqT8YVbvJy3lBLXSPg9fu dEOGw8cT//5dIvSDfXkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6TBT-00133D-0y; Tue, 06 Jun 2023 09:40:59 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6TBP-0012zJ-1p for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2023 09:40:57 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3569ei3w057409; Tue, 6 Jun 2023 04:40:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686044444; bh=w8SrY+ikkcMi7SM9PmtVDxwhrCdH5GJSMEEsUmqJS5s=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=o435kgmjuDhakcO6daN39eT4zwGfSCqW/SwSDOkAGMSJQOCI6EHlZ2UmStlTLX3Vr BBcOBOUGJiYABA1jtyugir6DcumnDp9+ftRrjDwrB7XlTluGxE1uA/hWRxB/Kb8PSq 7piu/BwppWwgCxifx9cWwNppqZEbnYIm70XrEReU= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3569eicD088715 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Jun 2023 04:40:44 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 6 Jun 2023 04:40:44 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 6 Jun 2023 04:40:44 -0500 Received: from [10.24.69.114] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3569eeL3125049; Tue, 6 Jun 2023 04:40:41 -0500 Message-ID: <773f4723-65f4-9bad-6ab3-bda65e5a4319@ti.com> Date: Tue, 6 Jun 2023 15:10:40 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [EXTERNAL] Re: [PATCH] remoteproc: pru: add support for configuring GPMUX based on client setup Content-Language: en-US To: Mathieu Poirier , MD Danish Anwar CC: Bjorn Andersson , , , , , , , References: <20230601105904.3204260-1-danishanwar@ti.com> From: Md Danish Anwar Organization: Texas Instruments In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230606_024055_771768_20E653E7 X-CRM114-Status: GOOD ( 28.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mathieu, On 05/06/23 10:56 pm, Mathieu Poirier wrote: > Hi MD, > > On Thu, Jun 01, 2023 at 04:29:04PM +0530, MD Danish Anwar 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 >> Signed-off-by: Suman Anna >> Signed-off-by: MD Danish Anwar >> --- >> drivers/remoteproc/pru_rproc.c | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+) >> >> diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c >> index 2874c8d324f7..29d3a5a930c1 100644 >> --- a/drivers/remoteproc/pru_rproc.c >> +++ b/drivers/remoteproc/pru_rproc.c >> @@ -109,6 +109,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; >> @@ -127,6 +128,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) >> @@ -228,6 +230,7 @@ struct rproc *pru_rproc_get(struct device_node *np, int index, >> struct device *dev; >> const char *fw_name; >> int ret; >> + u32 mux; >> >> rproc = __pru_rproc_get(np, index); >> if (IS_ERR(rproc)) >> @@ -252,6 +255,22 @@ struct rproc *pru_rproc_get(struct device_node *np, int index, >> if (pru_id) >> *pru_id = pru->id; >> >> + 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; >> + } >> + } >> + > > It would have been nice to be told in a cover letter that pruss_cfg_get_gpmux() > is in linux-next so that I don't have to go fish for it... > My bad, I should have mentioned it. This patch depends on the soc: ti: pruss series [1] which is merged to Nishant's tree and is part of 'linux-next' but this isn't yet part of mainline linux. > I am fine with the code in this patch, though the changelog is cryptic and could > be enhanced to say "why" this is needed. The above could use some comments to > make sure people looking at this code understand that an error from > of_property_read_u32_index() is acceptable for backward compatibility. > > Here I have to suppose pruss_cfg_get_gpmux() has been added to Nishanth's tree. > As such the only way for me to apply your patch is if Nishanth sends me a pull > request for the patchset that introduced pruss_cfg_get_gpmux(). You can also > resend this in the next cycle. I will fix the changelog and send the next revision in the next cycle. > > Thanks, > Mathieu > [1] https://lore.kernel.org/all/20230414045542.3249939-1-danishanwar@ti.com/ -- Thanks and Regards, Danish. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel