On 16 December 2015 at 15:51, Igor Mammedov <imamm...@redhat.com> wrote:
> On Fri, 11 Dec 2015 11:21:24 +0800
> Shannon Zhao <zhaoshengl...@huawei.com> wrote:
>
>> From: Shannon Zhao <shannon.z...@linaro.org>
>>
>> Here GPIO pin 3 is used for Power Button, add _E03 in ACPI DSDT table.
>>
>> Signed-off-by: Shannon Zhao <zhaoshengl...@huawei.com>
>> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>
>> Tested-by: Wei Huang <w...@redhat.com>
>> ---
>>  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 e5dc2d5..1ffff62 100644
>> --- a/hw/arm/virt-acpi-build.c
>> +++ b/hw/arm/virt-acpi-build.c
>> @@ -339,6 +339,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, 1));
>>      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};
> Sorry, just noticed,
> do we allow declarations in the middle of the block?
> The same applies to 'Aml *method' below.

No, we prefer not to, but the file is full of them already...

thanks
-- PMM

Reply via email to