Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp456959imu; Mon, 26 Nov 2018 13:19:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/VjUusL/dRhVnB+ZFTL4L1zeIdrJ+pUNnhz8DL1Cg2NzWVgFYZ5TN7KtyIdWnqDEMc3+7cq X-Received: by 2002:a63:7154:: with SMTP id b20mr26572059pgn.342.1543267158767; Mon, 26 Nov 2018 13:19:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543267158; cv=none; d=google.com; s=arc-20160816; b=zRVK7IdceuiV8kSSxrJLuxaIJDIoSKofCY5PIMd5QzyJMAFY43JZrcxXf6lYhqULgA Y0fXy7qUAyIO+4sFglyyhcoZnSMyD0C1rRnC5qwlXvn81NHbalwS6f+fOBf2oUIi/zUL kaGKN2TxFA51CR7F/VKruoN5jtGdP819Q5lCenwc/wUy6jQ4Hy2cMQpT4DzoNe0h2Mj0 rdTId6bgHZIpwSIl0WHY4/7xf6L/o+NUv59QGCQyUp9lJoorltA0Iosc4NznM3hnwPUL 1pHR0NmX68VZUyVcGZgLUD6JMzt6Kup+hRGhgNcrP+yQXxL3hbVNQhzX0FVLsAgWSanR jHNw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=oUeeBCZvv45J1G1xV+GwW+iYmNqVxnG9HQATayAZJK8=; b=WDgMZwh9Vsp1y/mApXUm43DFJQxIE5X955zESDjcXNRXOjti2/rfLX0aak6vqEnR1S sp/QiKKphSPNEl5nRpK+IEIoIGTBd6PHWAxC76JAALGU/fCjiMphMJ7W8/T/zoX/QcPx g8K8fJRVEidjEU6Dp1Jn70FeAIXtl/cUlR5UiBNHFDyitniAGvSfEalyTOUJ/c0pBwFi eCRKtaXMQhf9uk2s/b93ut5XUa16owSGimzXoYsc1Cwb4vWKemop09QgMtTpzvEHzjIh HQ7Q3KBuHIcgjOEOq27zMRzqqK9oGfaNPEm5wR1QxXmGHMd9tfRCpZPIWG9BbYgWoNvZ oHAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=AogdW2RK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si1441618plb.54.2018.11.26.13.19.03; Mon, 26 Nov 2018 13:19:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=AogdW2RK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbeK0INh (ORCPT + 99 others); Tue, 27 Nov 2018 03:13:37 -0500 Received: from vern.gendns.com ([98.142.107.122]:44174 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbeK0INg (ORCPT ); Tue, 27 Nov 2018 03:13:36 -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=oUeeBCZvv45J1G1xV+GwW+iYmNqVxnG9HQATayAZJK8=; b=AogdW2RKuwuwlVZSUTluyBx2ay 1Vgc6w+WwZPbQkVkjLzIVIIcHiLrRCgrVV7t5ISRHLKxT5QcxM1QKSdFDgfadl5YymB5yrzEL4sc6 5HphPFtPSlpBu+glGvCMFNzyl67me2LWD2RuvdwrExUtQL/4o9qXCz9wDawYSlCgjgfru2gKtpl6s QF78CZATlXXyQ6KnCame/WwzWw9l0++CtcbftRhGyW+YkffhV3xbxBsszHP7GXm7iY/VBmwTW6he3 TuEW1aJJdeYomxBtmz9LJhIirDwUe17Fe3w1xDzBzozpj1x/IynI7iLQ2vjOexdGyaTweGI6+DUHS u2BH4yvA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:44836 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gROFp-0002SP-MT; Mon, 26 Nov 2018 16:17:17 -0500 Subject: Re: [PATCH 09/17] soc: ti: pruss: add pruss_{request,release}_mem_region() API To: Roger Quadros , tony@atomide.com Cc: robh+dt@kernel.org, bcousson@baylibre.com, ssantosh@kernel.org, ohad@wizery.com, bjorn.andersson@linaro.org, s-anna@ti.com, nsekhar@ti.com, t-kristo@ti.com, nsaulnier@ti.com, jreeder@ti.com, m-karicheri2@ti.com, woods.technical@gmail.com, linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <1542886753-17625-1-git-send-email-rogerq@ti.com> <1542886753-17625-10-git-send-email-rogerq@ti.com> From: David Lechner Message-ID: Date: Mon, 26 Nov 2018 15:18:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1542886753-17625-10-git-send-email-rogerq@ti.com> 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/22/18 5:39 AM, Roger Quadros wrote: > From: "Andrew F. Davis" > > Add two new API - pruss_request_mem_region() & pruss_release_mem_region(), > to the PRUSS platform driver to allow client drivers to acquire and release > the common memory resources present within a PRU-ICSS subsystem. This > allows the client drivers to directly manipulate the respective memories, > as per their design contract with the associated firmware. > > Signed-off-by: Andrew F. Davis > [s-anna@ti.com: rename functions, add error checking, comments] > Signed-off-by: Suman Anna > Signed-off-by: Roger Quadros > --- > diff --git a/drivers/soc/ti/pruss.h b/drivers/soc/ti/pruss.h > index a5a0667..f8878c2 100644 > --- a/drivers/soc/ti/pruss.h > +++ b/drivers/soc/ti/pruss.h > @@ -22,28 +22,6 @@ > #define MAX_PRU_HOST_INT 10 > > /** > - * enum pruss_mem - PRUSS memory range identifiers > - */ > -enum pruss_mem { > - PRUSS_MEM_DRAM0 = 0, > - PRUSS_MEM_DRAM1, > - PRUSS_MEM_SHRD_RAM2, > - PRUSS_MEM_MAX, > -}; > - > -/** > - * struct pruss_mem_region - PRUSS memory region structure > - * @va: kernel virtual address of the PRUSS memory region > - * @pa: physical (bus) address of the PRUSS memory region > - * @size: size of the PRUSS memory region > - */ > -struct pruss_mem_region { > - void __iomem *va; > - phys_addr_t pa; > - size_t size; > -}; Why don't we just put these definitions in the correct header file to start with when they are introduced earlier in this series? > diff --git a/include/linux/pruss.h b/include/linux/pruss.h > new file mode 100644 > index 0000000..198ae25 > --- /dev/null > +++ b/include/linux/pruss.h > @@ -0,0 +1,61 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/** > + * PRU-ICSS Subsystem user interfaces > + * > + * Copyright (C) 2015-2018 Texas Instruments Incorporated - http://www.ti.com > + * Suman Anna > + * Tero Kristo > + */ > + > +#ifndef __LINUX_PRUSS_H > +#define __LINUX_PRUSS_H > + > +/** > + * enum pruss_mem - PRUSS memory range identifiers > + */ > +enum pruss_mem { > + PRUSS_MEM_DRAM0 = 0, > + PRUSS_MEM_DRAM1, > + PRUSS_MEM_SHRD_RAM2, > + PRUSS_MEM_MAX, > +}; > + > +/** > + * struct pruss_mem_region - PRUSS memory region structure > + * @va: kernel virtual address of the PRUSS memory region > + * @pa: physical (bus) address of the PRUSS memory region > + * @size: size of the PRUSS memory region > + */ > +struct pruss_mem_region { > + void __iomem *va; > + phys_addr_t pa; > + size_t size; > +}; > +