Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp287409ybl; Wed, 22 Jan 2020 21:40:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx89lY4dI/dM1r20nchKRWv+Qzb7jCaOrYP1hP0k3LGb0xZNnFi4miYB4tYWY1+Pw/Qk95h X-Received: by 2002:a05:6830:1bda:: with SMTP id v26mr9831158ota.314.1579758034455; Wed, 22 Jan 2020 21:40:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579758034; cv=none; d=google.com; s=arc-20160816; b=ZwRLI9UxBPU0AF69fqx1zG/WfqyYyKmHbrKGE2r/Z+inXPMLzmomb6Q5FzaQNd4PSs lhGEJh8YzyHvV2CyeF+UXt4lC437JZDv5VWpS7LtMgXVes56a8ZPwO4q0jStkl4XYmRe 8o0le8V/6iNeaiwZji1sgUaxsIIdiJSeD8eo/YlIjtIRFepXW/driD4e3RTbbAxbzAMW jRXtRSlFC9BT0BFfitByJSJeSncDLtZetnf8TFBP/+7FHKgbwg5fhpeq0Bz7Ge8q85+7 5PJvuhMPIsM5ATLJtgSuHS3JZK2pW5YmxFfiv+lnKyfiWNewreppLIItwN4uLiMziWfq 26Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=u59zjSXS/XTq3y/VRi/ypiF6GVPni5LqrGm7pUdf9CE=; b=r2RiHRNlUpuAYBkPqK6QxQv5jBx5QTps35j2cw3JwZYWvuLE+RsDpQJ5gMC6ZQQvE9 pT74txM1dEY6N2bfbGg5QVRyt5glMt+aLm1OGPGl09SnIlX09Zw+2K8bD0VhcY9V8LcX dLNWEmhoE2FAZFKI4HU8iuvy85HNug0OySaod7yL8oRFx1JUyZ7P9JVsffNG7SyDwWxX +Yzwj+72M+GoSrfqyRXQfAa5D3Um0q/cFc+78PiaaPlszIVUCz0Z8Gy7if6mMHVqqAAn xurvZUqfRj9wpHOB+x0ihvG/NCBFmxeGE1pwdMYdfYbDWr5r8DUSkZ01RCp4QSp9U+aT VP2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kgDZ3Ev4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i25si405267oii.259.2020.01.22.21.40.22; Wed, 22 Jan 2020 21:40:34 -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=pass header.i=@linaro.org header.s=google header.b=kgDZ3Ev4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726099AbgAWFiQ (ORCPT + 99 others); Thu, 23 Jan 2020 00:38:16 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:39841 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbgAWFiP (ORCPT ); Thu, 23 Jan 2020 00:38:15 -0500 Received: by mail-pj1-f65.google.com with SMTP id e11so712032pjt.4 for ; Wed, 22 Jan 2020 21:38:15 -0800 (PST) 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:in-reply-to:user-agent; bh=u59zjSXS/XTq3y/VRi/ypiF6GVPni5LqrGm7pUdf9CE=; b=kgDZ3Ev4YhI8UWauD6wYC6ui+jiErE23+nYrenotZ35rNra4h+mVoeirGvXwdx6CKN 77TGlhJY8iEJ62/2FuGOovMklg+H6b/iyel7P8It95jvfZBwE07PU3D9vxjmtSO6U53N LJpCPFfXIfHIGX30wrWCr6YhnnEescqs/XOwciVchmTCme+RjcrcDcmasWJ0EcVsgGqV 9Yk5mBDbsKPzz81AT+jdVrmll9S6543DWkRp9I99ZpVJTp5xNT1TA5/mNzmxUKRuXPDT 8aMdky9w8+/piEPQ2MqwrfQ8g2/Sg2OlgndjMBs33uaKlNOUnbVVIQ8VPtz/y+PmODbB XsVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=u59zjSXS/XTq3y/VRi/ypiF6GVPni5LqrGm7pUdf9CE=; b=kRA2hRbF5C+6EFIaM7d4+Iqbl6KN5Kzn+hnH9EAm20VJmWdqvEuhs4nE4kK/NGmGEs JnWb6Px8Aax7H7pnAw18bVfHEK+lpoLwGNChk5vqpQ6+WxjX0sKs8913xE6jpoLioiPd lSEb4fw2V1BodbQFn3lPql8lWxj1jC87Y/klfnLDlTFldMmIoC/Fv/tWylKSiolxHtHZ ZO9T8RSLnfUJhWq6bE5DSK2+sqolaimwlccKGiXOKm0oEJYzhMPtCKlxxMkxHMb9TzDW K/PkLprSZxhpp3VTRNpGj+Sdv6ws5KoHGgJ/+l0R04H+Y00KGkOSd4/KuXYli8jav5yy DRsg== X-Gm-Message-State: APjAAAXl/iin2Cuxt4xCgKX5DO6iTFaND8qC/+JyFR/26+Ndrb6JsVB3 X3JCWARlZ8nOl80Au17rX7iK6QqJKHo= X-Received: by 2002:a17:902:528:: with SMTP id 37mr15071319plf.322.1579757894919; Wed, 22 Jan 2020 21:38:14 -0800 (PST) Received: from yoga (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id f8sm788874pfn.2.2020.01.22.21.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 21:38:14 -0800 (PST) Date: Wed, 22 Jan 2020 21:38:11 -0800 From: Bjorn Andersson To: rishabhb@codeaurora.org Cc: Rob Herring , Mark Rutland , Ohad Ben-Cohen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Sibi Sankar Subject: Re: [PATCH v2 2/8] remoteproc: qcom: Introduce driver to store pil info in IMEM Message-ID: <20200123053811.GU1511@yoga> References: <20191227053215.423811-1-bjorn.andersson@linaro.org> <20191227053215.423811-3-bjorn.andersson@linaro.org> <60c10082ba90fbba0f056df8575d205f@codeaurora.org> <20200122230849.GC3261042@ripper> <2ffeff6b57e6bb4567f00c09e5b82131@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ffeff6b57e6bb4567f00c09e5b82131@codeaurora.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 22 Jan 15:58 PST 2020, rishabhb@codeaurora.org wrote: > On 2020-01-22 15:08, Bjorn Andersson wrote: > > On Wed 22 Jan 14:56 PST 2020, rishabhb@codeaurora.org wrote: > > > On 2019-12-26 21:32, Bjorn Andersson wrote: > > > > diff --git a/drivers/remoteproc/qcom_pil_info.c > > [..] > > > > +static int pil_reloc_probe(struct platform_device *pdev) > > > > +{ > > > > + struct pil_reloc *reloc; > > > > + > > > > + reloc = devm_kzalloc(&pdev->dev, sizeof(*reloc), GFP_KERNEL); > > > > + if (!reloc) > > > > + return -ENOMEM; > > > > + > > > > + reloc->dev = &pdev->dev; > > > > + reloc->map = syscon_node_to_regmap(pdev->dev.parent->of_node); > > > If there are multiple entries like "pil-reloc" in the imem node > > > mapping the entire imem multiple times may not work. Is there a way > > > we can somehow just iomap the required region for pil? > > > > With the entire imem being represented as a syscon this will be > > ioremapped once and all callers of syscon_node_to_regmap() (or one of > > the other syscon getters) will get a regmap back that reference this one > > mapping. > > > > So doing it this way allow us to "map" sections of imem that is smaller > > than PAGE_SIZE. > > > > > > That said, it means that all imem users/clients should access imem > > through this syscon regmap. > > > > Regards, > > Bjorn > Yes, the clients are spread around in different drivers currently. > So accessing same regmap is not possible. The few examples upstream are children of the imem simple-mfd/syscon and will thereby naturally request the regmap of the parent syscon. For driver that doesn't fit this model (I don't find one right now), or if you have downstream drivers that are designed differently you could use syscon_regmap_lookup_by_phandle() to acquire the imem regmap from any device in the system. Regards, Bjorn.