Thanks Eric > -----Original Message----- > From: Schmauss, Erik <erik.schmauss@xxxxxxxxx> > Sent: Wednesday, June 12, 2019 10:07 PM > To: Udit Kumar <udit.kumar@xxxxxxx>; ACPI Devel Maling List <linux- > acpi@xxxxxxxxxxxxxxx> > Cc: lenb@xxxxxxxxxx; Rafael J. Wysocki <rafael@xxxxxxxxxx> > Subject: [EXT] RE: Help on named object in kernel > > Caution: EXT Email > > > -----Original Message----- > > From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi- > > owner@xxxxxxxxxxxxxxx] On Behalf Of Udit Kumar > > Sent: Wednesday, June 12, 2019 4:48 AM > > To: ACPI Devel Maling List <linux-acpi@xxxxxxxxxxxxxxx> > > Cc: lenb@xxxxxxxxxx; Rafael J. Wysocki <rafael@xxxxxxxxxx> > > 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? Below is actual ASL Scope(_SB) { Device(SAT0) { Name(_HID, "NXP0004") Name(_CCA, 1) Name(_UID, 0) Name(_CRS, ResourceTemplate() { Memory32Fixed(ReadWrite, SATA0_BASE, SATA_LEN, REG0) Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { SATA0_IT_1, SATA0_IT_2, SATA0_IT_3 } QwordMemory ( ResourceConsumer, PosDecode, // _DEC MinFixed, // _MIF MaxFixed, // _MAF NonCacheable, // _MEM ReadWrite, // _RW 0, // _GRA 0x700100520, // _MIN MinAddress 0x700100523, // _MAX MaxAddress 0, // _TRA 0x4, // _LEN , //ResourceSourceIndex, , //ResourceSource, SATA, //DescriptorName ,) }) } Driver code is https://elixir.bootlin.com/linux/latest/source/drivers/ata/ahci_qoriq.c#L267 For time being I changed platform_get_resource_byname to res = platform_get_resource(pdev, IORESOURCE_MEM, 1); for sure sata-err will fail, when I added few prints in platform_get_resource_byname to print each resource's name and start . I got below [ 3.013921] Udit res 3200000 name NXP0004:00 [ 3.018190] Udit res 10 name NXP0004:00 [ 3.022016] Udit res 11 name NXP0004:00 [ 3.025842] Udit res 12 name NXP0004:00 [ 3.029668] Udit res 700100520 name NXP0004:00 I am looking help on two here 1) how DescriptorName can be associated with resource name 2) is there any way to use resource name just as string Many Thanks Udit > Erik > > > > In Linux, all of resource of this device is added under its name (NXP0003:00). > > Reading r-> name for all resource of this device is giving name as NXP0003:00. > > So I am not able to use existing OS driver using call > > platform_get_resource_byname, I have to use platform_get_resource API > > with index to get above addresses. > > > > Could you help me, if there is way to use named resource in acpi. > > Fyi, I am on kernel 4.14.122 > > > > Many Thanks > > Udit