qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 6/8] ARM: ACPI: Add _E03 for Power Button


From: Shannon Zhao
Subject: Re: [Qemu-devel] [PATCH v4 6/8] ARM: ACPI: Add _E03 for Power Button
Date: Fri, 11 Dec 2015 09:52:02 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0


On 2015/12/11 4:09, Igor Mammedov wrote:
> On Mon, 7 Dec 2015 15:39:50 +0800
> Shannon Zhao <address@hidden> wrote:
> 
>> > From: Shannon Zhao <address@hidden>
>> > 
>> > Here GPIO pin 3 is used for Power Button, add _E03 in ACPI DSDT table.
>> > 
>> > Signed-off-by: Shannon Zhao <address@hidden>
>> > Signed-off-by: Shannon Zhao <address@hidden>
>> > Tested-by: Wei Huang <address@hidden>
>> > ---
>> >  hw/arm/virt-acpi-build.c | 14 ++++++++++++++
>> >  1 file changed, 14 insertions(+)
>> > 
>> > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
>> > index 1424672..d693135 100644
>> > --- a/hw/arm/virt-acpi-build.c
>> > +++ b/hw/arm/virt-acpi-build.c
>> > @@ -338,6 +338,20 @@ static void acpi_dsdt_add_gpio(Aml *scope, const
>> > MemMapEntry *gpio_memmap, aml_append(crs, aml_interrupt(AML_CONSUMER,
>> > AML_LEVEL, AML_ACTIVE_HIGH, AML_EXCLUSIVE, gpio_irq));
>> >      aml_append(dev, aml_name_decl("_CRS", crs));
>> > +
>> > +    Aml *aei = aml_resource_template();
>> > +    /* Pin 3 for power button */
>> > +    const uint32_t pin_list[1] = {3};
>> > +    aml_append(aei, aml_gpio_int(AML_CONSUMER_PRODUCER, AML_EDGE,
> looks like AML_CONSUMER_PRODUCER is wrong, ACPI6 spec says:
> "ResourceUsage is an optional argument and is assumed to be
> ResourceConsumer for this revision."
> 
Oh, yes. Will fix this later.
> 
>> > +                                 AML_ACTIVE_HIGH, AML_EXCLUSIVE,
>> > AML_PULL_UP, 0,
>> > +                                 pin_list, 1, "GPO0", NULL, 0));
>> > +    aml_append(dev, aml_name_decl("_AEI", aei));
>> > +
>> > +    /* _E03 is handle for power button */
>> > +    Aml *method = aml_method("_E03", 0);
>> > +    aml_append(method, aml_notify(aml_name(ACPI_POWER_BUTTON_DEVICE),
>> > +                                  aml_int(0x80)));
> could you include commit
> https://github.com/imammedo/qemu/commit/1b647d5534e8c8c8434574d1c0fe4c442b66c6b0
> in your series and rebase this patch to use a new am_method() signature.
> 
Sure
>> > +    aml_append(dev, method);
>> >      aml_append(scope, dev);
>> >  }
>> >  

-- 
Shannon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]