All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods
@ 2020-05-26 17:16 Andy Shevchenko
  2020-05-26 17:16 ` [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-05-26 17:16 UTC (permalink / raw)
  To: u-boot

Create buffers outside of the methods as ACPICA 20200214 complains about this:

	Remark 2173 - Creation of named objects within a method is
	highly inefficient, use globals or method local variables
	instead

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 106 +++++++++---------
 1 file changed, 55 insertions(+), 51 deletions(-)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index 9501cd8ada12..3518538806ee 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -141,13 +141,14 @@ Device (PCI0)
                 Return (STA_VISIBLE)
             }
 
+            Name (RBUF, ResourceTemplate()
+            {
+                GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
+                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 64 }
+            })
+
             Method (_CRS, 0, Serialized)
             {
-                Name (RBUF, ResourceTemplate()
-                {
-                    GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
-                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 64 }
-                })
                 Return (RBUF)
             }
 
@@ -348,12 +349,12 @@ Device (PCI0)
         {
             Name (_ADR, Zero)
 
+            Name (PCKG, Package () {
+                Buffer (0x14) {}
+            })
+
             /* GPLD: Generate Port Location Data (PLD) */
             Method (GPLD, 1, Serialized) {
-                Name (PCKG, Package () {
-                    Buffer (0x14) {}
-                })
-
                 /* REV: Revision 0x02 for ACPI 5.0 */
                 CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV)
                 Store (0x0002, REV)
@@ -411,20 +412,21 @@ Device (PCI0)
                 Return (STA_VISIBLE)
             }
 
+            Name (RBUF, ResourceTemplate()
+            {
+                UartSerialBus(0x0001C200, DataBitsEight, StopBitsOne,
+                    0xFC, LittleEndian, ParityTypeNone, FlowControlHardware,
+                    0x20, 0x20, "\\_SB.PCI0.HSU0", 0, ResourceConsumer, , )
+                GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
+                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 185 }
+                GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
+                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 184 }
+                GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
+                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 71 }
+            })
+
             Method (_CRS, 0, Serialized)
             {
-                Name (RBUF, ResourceTemplate()
-                {
-                    UartSerialBus(0x0001C200, DataBitsEight, StopBitsOne,
-                        0xFC, LittleEndian, ParityTypeNone, FlowControlHardware,
-                        0x20, 0x20, "\\_SB.PCI0.HSU0", 0, ResourceConsumer, , )
-                    GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
-                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 185 }
-                    GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
-                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 184 }
-                    GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
-                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 71 }
-                })
                 Return (RBUF)
             }
 
@@ -464,33 +466,34 @@ Device (PCI0)
                 Return (STA_VISIBLE)
             }
 
+            Name (RBUF, ResourceTemplate()
+            {
+                /*
+                 * Shadow registers in SRAM for PMIC:
+                 *   SRAM    PMIC register
+                 *   --------------------
+                 *   0x00-    Unknown
+                 *   0x03    THRMIRQ (0x04)
+                 *   0x04    BCUIRQ (0x05)
+                 *   0x05    ADCIRQ (0x06)
+                 *   0x06    CHGRIRQ0 (0x07)
+                 *   0x07    CHGRIRQ1 (0x08)
+                 *   0x08-    Unknown
+                 *   0x0a    PBSTATUS (0x27)
+                 *   0x0b-    Unknown
+                 */
+                Memory32Fixed(ReadWrite, 0xFFFFF610, 0x00000010)
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 30 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 23 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 52 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 51 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 50 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 27 }
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 49 }
+            })
+
             Method (_CRS, 0, Serialized)
             {
-                Name (RBUF, ResourceTemplate()
-                {
-                    /*
-                     * Shadow registers in SRAM for PMIC:
-                     *   SRAM    PMIC register
-                     *   --------------------
-                     *   0x00-    Unknown
-                     *   0x03    THRMIRQ (0x04)
-                     *   0x04    BCUIRQ (0x05)
-                     *   0x05    ADCIRQ (0x06)
-                     *   0x06    CHGRIRQ0 (0x07)
-                     *   0x07    CHGRIRQ1 (0x08)
-                     *   0x08-    Unknown
-                     *   0x0a    PBSTATUS (0x27)
-                     *   0x0b-    Unknown
-                     */
-                    Memory32Fixed(ReadWrite, 0xFFFFF610, 0x00000010)
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 30 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 23 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 52 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 51 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 50 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 27 }
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 49 }
-                })
                 Return (RBUF)
             }
 
@@ -537,13 +540,14 @@ Device (PCI0)
             Return (STA_VISIBLE)
         }
 
+        Name (RBUF, ResourceTemplate ()
+        {
+                Memory32Fixed(ReadWrite, 0xFF192000, 0x00001000)
+                Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 32 }
+        })
+
         Method (_CRS, 0, Serialized)
         {
-            Name (RBUF, ResourceTemplate ()
-            {
-                    Memory32Fixed(ReadWrite, 0xFF192000, 0x00001000)
-                    Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 32 }
-            })
             Return (RBUF)
         }
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge
  2020-05-26 17:16 [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Andy Shevchenko
@ 2020-05-26 17:16 ` Andy Shevchenko
  2020-05-31 14:08   ` Simon Glass
  2020-05-26 17:16 ` [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present Andy Shevchenko
  2020-05-28  6:58 ` [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Bin Meng
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-05-26 17:16 UTC (permalink / raw)
  To: u-boot

PCI Firmware specification requires _UID() and doesn't require _ADR()
to be set. Replace latter by former.

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index 3518538806ee..e44a7ccfc263 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -10,7 +10,7 @@ Device (PCI0)
     Name (_HID, EISAID("PNP0A08"))    /* PCIe */
     Name (_CID, EISAID("PNP0A03"))    /* PCI */
 
-    Name (_ADR, Zero)
+    Name (_UID, Zero)
     Name (_BBN, Zero)
 
     Name (MCRS, ResourceTemplate()
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present
  2020-05-26 17:16 [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Andy Shevchenko
  2020-05-26 17:16 ` [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge Andy Shevchenko
@ 2020-05-26 17:16 ` Andy Shevchenko
  2020-05-31 14:08   ` Simon Glass
  2020-05-28  6:58 ` [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Bin Meng
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-05-26 17:16 UTC (permalink / raw)
  To: u-boot

ACPICA complains that either _HID() or _ADR() should be used.
Drop _ADR() where _HID() is present.

Reported-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index e44a7ccfc263..eaf75c8c673d 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -452,7 +452,6 @@ Device (PCI0)
 
         Device (PMIC)
         {
-            Name (_ADR, Zero)
             Name (_HID, "INTC100E")
             Name (_CID, "INTC100E")
             Name (_DDN, "Basin Cove PMIC")
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods
  2020-05-26 17:16 [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Andy Shevchenko
  2020-05-26 17:16 ` [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge Andy Shevchenko
  2020-05-26 17:16 ` [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present Andy Shevchenko
@ 2020-05-28  6:58 ` Bin Meng
  2020-05-28  7:07   ` Bin Meng
  2 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-05-28  6:58 UTC (permalink / raw)
  To: u-boot

Hi Andy,

On Wed, May 27, 2020 at 1:16 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Create buffers outside of the methods as ACPICA 20200214 complains about this:
>
>         Remark 2173 - Creation of named objects within a method is
>         highly inefficient, use globals or method local variables
>         instead
>
> Reported-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  .../asm/arch-tangier/acpi/southcluster.asl    | 106 +++++++++---------
>  1 file changed, 55 insertions(+), 51 deletions(-)
>

This does not apply on top of u-boot-x86/master. Could you please rebase?

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods
  2020-05-28  6:58 ` [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Bin Meng
@ 2020-05-28  7:07   ` Bin Meng
  2020-05-28  9:18     ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-05-28  7:07 UTC (permalink / raw)
  To: u-boot

Hi Andy,

On Thu, May 28, 2020 at 2:58 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Andy,
>
> On Wed, May 27, 2020 at 1:16 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > Create buffers outside of the methods as ACPICA 20200214 complains about this:
> >
> >         Remark 2173 - Creation of named objects within a method is
> >         highly inefficient, use globals or method local variables
> >         instead
> >
> > Reported-by: Bin Meng <bmeng.cn@gmail.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  .../asm/arch-tangier/acpi/southcluster.asl    | 106 +++++++++---------
> >  1 file changed, 55 insertions(+), 51 deletions(-)
> >
>
> This does not apply on top of u-boot-x86/master. Could you please rebase?
>

When you send v2, please include "tangier" as a tag since the changes
are only for tangier.

Regards,
Bin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods
  2020-05-28  7:07   ` Bin Meng
@ 2020-05-28  9:18     ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2020-05-28  9:18 UTC (permalink / raw)
  To: u-boot

On Thu, May 28, 2020 at 03:07:34PM +0800, Bin Meng wrote:
> On Thu, May 28, 2020 at 2:58 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > On Wed, May 27, 2020 at 1:16 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > Create buffers outside of the methods as ACPICA 20200214 complains about this:
> > >
> > >         Remark 2173 - Creation of named objects within a method is
> > >         highly inefficient, use globals or method local variables
> > >         instead

> > This does not apply on top of u-boot-x86/master. Could you please rebase?

Fixed.

> When you send v2, please include "tangier" as a tag since the changes
> are only for tangier.

Done. Please, consider v2.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge
  2020-05-26 17:16 ` [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge Andy Shevchenko
@ 2020-05-31 14:08   ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2020-05-31 14:08 UTC (permalink / raw)
  To: u-boot

On Tue, 26 May 2020 at 11:16, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> PCI Firmware specification requires _UID() and doesn't require _ADR()
> to be set. Replace latter by former.
>
> Reported-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present
  2020-05-26 17:16 ` [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present Andy Shevchenko
@ 2020-05-31 14:08   ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2020-05-31 14:08 UTC (permalink / raw)
  To: u-boot

On Tue, 26 May 2020 at 11:16, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> ACPICA complains that either _HID() or _ADR() should be used.
> Drop _ADR() where _HID() is present.
>
> Reported-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 1 -
>  1 file changed, 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-31 14:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 17:16 [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Andy Shevchenko
2020-05-26 17:16 ` [PATCH v1 2/3] x86: acpi: Replace _ADR() by _UID() in description of PCI host bridge Andy Shevchenko
2020-05-31 14:08   ` Simon Glass
2020-05-26 17:16 ` [PATCH v1 3/3] x86: acpi: Drop _ADR() where _HID() is present Andy Shevchenko
2020-05-31 14:08   ` Simon Glass
2020-05-28  6:58 ` [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods Bin Meng
2020-05-28  7:07   ` Bin Meng
2020-05-28  9:18     ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.