Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10151165rwb; Fri, 25 Nov 2022 01:27:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jovpdXFVRlF/0YUqxQ3jMmfbBogRtoAet1wMs2r5Q0q5mKzCTIgwElr9G+UvzTGpFeDD1 X-Received: by 2002:a17:903:2112:b0:188:7dca:6f41 with SMTP id o18-20020a170903211200b001887dca6f41mr17494527ple.72.1669368437967; Fri, 25 Nov 2022 01:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669368437; cv=none; d=google.com; s=arc-20160816; b=b5QLxxjyPlySRxY7Nv+QkI0ldQRu9m3cep96SlD55EarPYYemPqb7F+jmRpFm5obkL spmZDfgzzXw518YRjaWuufGh1BBvFPFFy5Jpdye5fy1SDJo1/EXWtp8Qlck2ffp8juav +1ZEsI8KGzjWqJWTLCxCB9UpwAOpwfpFjRjk8CwpWYsQUG+Al5Gmmoy3fK5mTEVHJEy0 53H6VdTEAGxbQTrfSUHF7y2PULXc3WfAjmiZ7xfIRruFtmxb4LxHbgn3cNTj5i4qYZPt XwW8Tf11x9b6Mi/oKLBj1RYy+eoCTXyXAgt/460UvneZtc1YH3L2m2ZOb9izH/dHLk0Q xqGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=T7OivETepuhnfG4ts55951VCsyyAYAvRijTzyc7CAUw=; b=h7YgfvgMIyxKhxqm4mpRFgqe4qTwZoqKqaALwZZEILFSWc9wuogZOjPxe3RswNFWuZ I/UzCIzAVgZxBIjiaW3++41MEgM5nvn9h2OfOu5O2/jFC4Aujga6p5Z7kaAfLSWe0MYJ Y4Dzs09iXu1fqwyH1Fg8KV2pg8/T4eIlbHVCqkjqXQA0Qkl4HA8sxJaxSZvs5+cWGsE6 VVZmmU1CgiBzHiGwO5cFkCFnNsmxldqA6RdJmiHyDhWvfXXJFS5VWEsGRJFRQoUF5SbW e/g42qaSfCHDMzHqFxv1Ie8A2OuwtDnwjRCmufVzfRN1L9fopQKkgOP1oKYxEqtZ7YE1 UIgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MZLlKugA; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a170903410b00b00176939b5cd9si3020675pld.578.2022.11.25.01.27.06; Fri, 25 Nov 2022 01:27:17 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=MZLlKugA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbiKYJAE (ORCPT + 86 others); Fri, 25 Nov 2022 04:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbiKYI75 (ORCPT ); Fri, 25 Nov 2022 03:59:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA7B2326CC; Fri, 25 Nov 2022 00:59:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 884D5622F8; Fri, 25 Nov 2022 08:59:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5DF8C433D6; Fri, 25 Nov 2022 08:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669366795; bh=e6HuqocvKF2BxDIP+LM0eTorRMU5x/m6qeueXBoIy2o=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MZLlKugAC6ovMQ6VpXpiH0+51k+TUegiP4iNiF1dxh6mqfMkCiNkF+9QKGLP7DrfV zkPVQJbmZZ73wkWHtcjm2PltxG4gk/KN1zRvyCjxqgBFfVunKH23LEDHj3rOBYxIc3 zd9GbFmo9NaJ8mhDpbGaIkp2HyXMwun+13BEW7LatQzutT371SJbaQObTXQAK0i5At ltsgAti7Ey91x0scqvwEw/YCNQ94NK+reLBkdPy3atdvLcfgHdd0mStZGsVgv55Edn BqFR4/vKKScfoaGjnCwRk8zDanRtgRcKF00rg405puK0cBKagQ1MTjt161ZVHlYipH DI4uDKm++rPoA== Message-ID: <5b26410e-a9d9-de8c-ea31-13dfec6c77b1@kernel.org> Date: Fri, 25 Nov 2022 10:59:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v9 3/6] remoteproc: pru: Add enum for PRU Core Indentifiers. Content-Language: en-US To: MD Danish Anwar , Mathieu Poirier , Krzysztof Kozlowski , Rob Herring Cc: Suman Anna , "Andrew F . Davis" , nm@ti.com, vigneshr@ti.com, srk@ti.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20221118111924.3277838-1-danishanwar@ti.com> <20221118111924.3277838-4-danishanwar@ti.com> From: Roger Quadros In-Reply-To: <20221118111924.3277838-4-danishanwar@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi, On 18/11/2022 13:19, MD Danish Anwar wrote: > Introducing enum pruss_pru_id for PRU Core Identifiers. > PRUSS_PRU0 indicates PRU Core 0. > PRUSS_PRU1 indicates PRU Core 1. > PRUSS_NUM_PRUS indicates the total number of PRU Cores. > > Signed-off-by: MD Danish Anwar > --- > drivers/remoteproc/pru_rproc.c | 6 +++--- > include/linux/pruss.h | 9 +++++++++ > 2 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c > index 4769ade9c316..7d4ed39b3772 100644 > --- a/drivers/remoteproc/pru_rproc.c > +++ b/drivers/remoteproc/pru_rproc.c > @@ -564,7 +564,7 @@ static void *pru_d_da_to_va(struct pru_rproc *pru, u32 da, size_t len) > dram0 = pruss->mem_regions[PRUSS_MEM_DRAM0]; > dram1 = pruss->mem_regions[PRUSS_MEM_DRAM1]; > /* PRU1 has its local RAM addresses reversed */ > - if (pru->id == 1) > + if (pru->id == PRUSS_PRU1) > swap(dram0, dram1); > shrd_ram = pruss->mem_regions[PRUSS_MEM_SHRD_RAM2]; > > @@ -873,14 +873,14 @@ static int pru_rproc_set_id(struct pru_rproc *pru) > case RTU0_IRAM_ADDR_MASK: > fallthrough; > case PRU0_IRAM_ADDR_MASK: > - pru->id = 0; > + pru->id = PRUSS_PRU0; > break; > case TX_PRU1_IRAM_ADDR_MASK: > fallthrough; > case RTU1_IRAM_ADDR_MASK: > fallthrough; > case PRU1_IRAM_ADDR_MASK: > - pru->id = 1; > + pru->id = PRUSS_PRU1; > break; > default: > ret = -EINVAL; > diff --git a/include/linux/pruss.h b/include/linux/pruss.h > index 4909226f14a9..fdc719b43db0 100644 > --- a/include/linux/pruss.h > +++ b/include/linux/pruss.h > @@ -14,6 +14,15 @@ > > #define PRU_RPROC_DRVNAME "pru-rproc" > > +/* > + * enum pruss_pru_id - PRU core identifiers > + */ This does not follow kernel-doc style https://www.kernel.org/doc/html/v6.0/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation > +enum pruss_pru_id { > + PRUSS_PRU0 = 0, > + PRUSS_PRU1, > + PRUSS_NUM_PRUS, > +}; > + > struct device_node; > > #if IS_ENABLED(CONFIG_PRU_REMOTEPROC) cheers, -roger