public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Udit Kumar <udit.kumar@nxp.com>
Cc: "Schmauss, Erik" <erik.schmauss@intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [EXT] Re: Help on named object in kernel
Date: Thu, 13 Jun 2019 18:08:31 +0100	[thread overview]
Message-ID: <20190613170831.GA27717@e107155-lin> (raw)
In-Reply-To: <VI1PR04MB4640A3A1E8B369240C3FC72091EF0@VI1PR04MB4640.eurprd04.prod.outlook.com>

On Thu, Jun 13, 2019 at 01:20:32AM +0000, Udit Kumar wrote:
>
>
> > -----Original Message-----
> > From: linux-acpi-owner@vger.kernel.org <linux-acpi-owner@vger.kernel.org>
> > On Behalf Of Sudeep Holla
> > Sent: Wednesday, June 12, 2019 10:31 PM
> > To: Schmauss, Erik <erik.schmauss@intel.com>
> > Cc: Udit Kumar <udit.kumar@nxp.com>; ACPI Devel Maling List <linux-
> > acpi@vger.kernel.org>; lenb@kernel.org; Sudeep Holla
> > <sudeep.holla@arm.com>; Rafael J. Wysocki <rafael@kernel.org>
> > Subject: [EXT] Re: Help on named object in kernel
> >
> > Caution: EXT Email
> >
> > On Wed, Jun 12, 2019 at 04:37:09PM +0000, Schmauss, Erik wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> > > > owner@vger.kernel.org] On Behalf Of Udit Kumar
> > > > Sent: Wednesday, June 12, 2019 4:48 AM
> > > > To: ACPI Devel Maling List <linux-acpi@vger.kernel.org>
> > > > Cc: lenb@kernel.org; Rafael J. Wysocki <rafael@kernel.org>
> > > > Subject: Help on named object in kernel
> > > >
> > > > Dear ACPI experts,
> > > > I need your help on defining named objected in ACPI under _CRS.
> > > > In my firmware, I have defined two addresses for my device using
> > > > Memory32Fixed and QwordMemory under _CRS.
> > > > These  two addresses are 32-bit and 64-bit long respectively.
> > > > For Memory32Fixed, I gave DescriptorName name as REG0 and for
> > > > QwordMemory I gave DescriptorName as SATA.
> > >
> > > Could you give us the ASL for the code snippet that you're talking about?
> > >
> >
> > IIUC, something like below(a very rough example based on the description
> > above):
> >
> >     Name (_CRS, ResourceTemplate (){
> >       QwordMemory (
> >         ResourceConsumer, PosDecode, MinFixed, MaxFixed, NonCacheable,
> >         ReadWrite, 0x0, 0x700100520, 0x700100523, 0x0, 4, , , "SATA",)
> >       Memory32Fixed(ReadWrite, 0x3200000, 0x10000, "REG0")
> >     }
> >
> > Basically 2 or more entries of Memory/Address Space Resource Descriptor
> > which can be identified in OSPM by DescriptorName. IOW if a device has
> > 2 sets of registers/memory/address space associated with it, instead of relying
> > on the order of declaration, identify them by the descriptor name provided in
> > ASL namespace.
>
> Thanks Sudeep,
> Shouldn't acpi frame work encapsulate descriptor name  while adding resource.
> So that driver can rely on platform_get_resource_byname .
> In such way, same driver could be used with device tree and acpi based systems.
>
> I am not sure, if acpi_evaluate_xx sort of api would work for
> descriptor-name , even if this does it will be limited to acpi only.
>

IIUC acpi_resource_source should have all the information, just not
used for this purpose yet. I do see some uses of string_ptr in that
elsewhere. I haven't tried it, but looking at the code I think the
support is there already.

But the question is who/where will the list of names for such resource
is listed for a given HID/CID/... ?
--
Regards,
Sudeep

      reply	other threads:[~2019-06-13 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 11:48 Help on named object in kernel Udit Kumar
2019-06-12 16:37 ` Schmauss, Erik
2019-06-12 17:00   ` [EXT] " Udit Kumar
2019-06-12 17:00   ` Sudeep Holla
2019-06-13  1:20     ` [EXT] " Udit Kumar
2019-06-13 17:08       ` Sudeep Holla [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190613170831.GA27717@e107155-lin \
    --to=sudeep.holla@arm.com \
    --cc=erik.schmauss@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=udit.kumar@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox