Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1384275pxb; Thu, 28 Jan 2021 15:25:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwascx2YPutP5fVYeuA9q1OXbKoG7KvKl2ekY2sIdMuY+GwxHjc7maCl/sOV3JerUx67zfW X-Received: by 2002:a50:ef0a:: with SMTP id m10mr2302937eds.38.1611876306219; Thu, 28 Jan 2021 15:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611876306; cv=none; d=google.com; s=arc-20160816; b=BtWOuVr6nMM7PcTa0w6poGUjhrAIdMCIpRI+YrF8xyA2Yez58j8iUZ3pfc5Gnwn06n Cga+iBnRdgEXMdKEL2xeXo22PSCZab0MiO93F+s7D746wz3rcFj+YGiNUoKMzrL7o8v4 aytmOr7a30NaDPYEoqmM7G0ZZqXXg0VHmkLNhTnUUYH+MmvmyhSZk+1yd6LQz0ZZkeg1 tl38T3J6hVH240gZt8ptYbwQ6YvFhWyoaw2jL4RIDavAH8eeMlD576BWWZ9l/Qw4FU+T 0D3fkCjvaVU8Cx8fb1oNy0JNvDStqMEKw1OWBnRFvMkign/6ja8w0U3oqdZOsh42xZKD LvRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=vxlxCLEYe7Qe4lS7C6DM4d8MIH71fHWxRV8aQVea7Ys=; b=1Jwczl97DDgeoY6eVNZ9sBE7vNGWpe+NhfyJGMkL1sJ8Pe6NBHksiT8+oPtCMDXHVZ ym8GrKzlp/be+lmZah7tUgKZWDRpx4zoHIw8NWDWuPeEJiEAdyyYTDQhCfp5ZrXHKD+V cVACKwzCL0QdYP58R0ls4U9h3R4yDryezAf2ClyYnvXC9hUH8LEYEye3QX8h+y2trJZE /VfIWwR2pEdHaqYKShkey4QYndAIH9+1SDxCd0lJOexS9pCKkNt7FZpep1AYdjttWb05 0mLw46oXv8KPldNxacXmFkzEJCh5IX6atJv+yOoTN8fuiERmTnmxyg0M6qCTZ2E7/3t0 EkcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=X+VBHukC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id um29si3791412ejb.722.2021.01.28.15.24.37; Thu, 28 Jan 2021 15:25:06 -0800 (PST) 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=fail header.i=@lechnology.com header.s=default header.b=X+VBHukC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbhA1XWK (ORCPT + 99 others); Thu, 28 Jan 2021 18:22:10 -0500 Received: from vern.gendns.com ([98.142.107.122]:59422 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhA1XWH (ORCPT ); Thu, 28 Jan 2021 18:22:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vxlxCLEYe7Qe4lS7C6DM4d8MIH71fHWxRV8aQVea7Ys=; b=X+VBHukCOX8r+XYvSfWAR9bb+8 JqHbWpTS3cQ07ZU36o3kbzgAG2kNkxUZF/vsZMJ3E6n2Y1CczeTLgc7e8zpdH5kecX8V01t0pp1AH UEpaxF9RGjJggnbaQFY6q9zzC/2xlG7kAmgRszhsnfz1dL/4qVUafF25eeSQdPMceSmH5/hejksgR rOusT0hb07HieVXhQ19wni1Hoy4kQx6/qbtfsDujPqUbBvmiS2jAqqPvVzIPWOw/KHq5hObXJpap+ rtH2rPxr8w/DFAiWWwrQJdcp2ZrzRVdRaRofZAQ2naRWOEN8/AW3qiM9amRlU+IP5Aza5drcq5FPI 2lKAACIA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:50246 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1l5GbL-00079l-AH; Thu, 28 Jan 2021 18:21:23 -0500 Subject: Re: [PATCH] remoteproc: pru: future-proof PRU ID matching To: Suman Anna , linux-remoteproc@vger.kernel.org Cc: Ohad Ben-Cohen , Bjorn Andersson , Grzegorz Jaszczyk , linux-kernel@vger.kernel.org References: <20210104211816.420602-1-david@lechnology.com> From: David Lechner Message-ID: <5fed434e-1569-ab9f-b1a4-475aa820ef47@lechnology.com> Date: Thu, 28 Jan 2021 17:21:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/28/21 4:55 PM, Suman Anna wrote: > Hi David, > > On 1/15/21 6:53 PM, Suman Anna wrote: >> On 1/4/21 3:18 PM, David Lechner wrote: >>> static int pru_rproc_probe(struct platform_device *pdev) >>> @@ -825,20 +808,28 @@ static int pru_rproc_remove(struct platform_device *pdev) >>> >>> static const struct pru_private_data pru_data = { >>> .type = PRU_TYPE_PRU, >>> + .pru0_iram_offset = 0x4000, >>> + .pru1_iram_offset = 0x8000, > > The offsets for the PRU cores are actually 0x34000 and 0x38000 respectively from > the base of the PRUSS on non-Davinci SoCs. > > If we were to use this static data approach, then we might as well continue to > use the current address masking logic with the appropriate masks for Davinci > (0x38000 and 0x3C000, not true offsets but as masks they would work). Davinci > PRUSS is the only one with its differences being the first PRUSS IP, and I would > prefer to keep the logic aligned to the IPs on all the recent SoCs on 3 > different TI SoC families (OMAP, Keystone 2 and K3). > > Let me know what you think. I'm not too picky as long as it works. :-) If keeping the static data to a minimum is really important, I suppose we could introduce a new type = PRU_TYPE_PRU_V1 for these PRUSSs instead. It sounds like this information might be useful elsewhere anyway.