On Mon, 7 Dec 2015 15:39:49 +0800
Shannon Zhao <zhaoshengl...@huawei.com> wrote:

> From: Shannon Zhao <shannon.z...@linaro.org>
> 
> Signed-off-by: Shannon Zhao <zhaoshengl...@huawei.com>
> Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>
> Tested-by: Wei Huang <w...@redhat.com>
Reviewed-by: Igor Mammedov <imamm...@redhat.com>

> ---
>  hw/acpi/aml-build.c         | 20 ++++++++++++++++++++
>  include/hw/acpi/aml-build.h |  7 +++++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
> index 4e1469a..41ac5db 100644
> --- a/hw/acpi/aml-build.c
> +++ b/hw/acpi/aml-build.c
> @@ -633,6 +633,26 @@ static Aml
> *aml_gpio_connection(AmlGpioConnectionType type, }
>  
>  /*
> + * ACPI 5.0: 19.5.53
> + * GpioInt(GPIO Interrupt Connection Resource Descriptor Macro)
> + */
> +Aml *aml_gpio_int(AmlConsumerAndProducer con_and_pro,
> +                  AmlLevelAndEdge edge_level,
> +                  AmlActiveHighAndLow active_level, AmlShared shared,
> +                  AmlPinConfig pin_config, uint16_t debounce_timeout,
> +                  const uint32_t pin_list[], uint32_t pin_count,
> +                  const char *resource_source_name,
> +                  const uint8_t *vendor_data, uint16_t
> vendor_data_len) +{
> +    uint8_t flags = edge_level | (active_level << 1) | (shared << 3);
> +
> +    return aml_gpio_connection(AML_INTERRUPT_CONNECTION,
> con_and_pro, flags,
> +                               pin_config, 0, debounce_timeout,
> pin_list,
> +                               pin_count, resource_source_name,
> vendor_data,
> +                               vendor_data_len);
> +}
> +
> +/*
>   * ACPI 1.0b: 6.4.3.4 32-Bit Fixed Location Memory Range Descriptor
>   * (Type 1, Large Item Name 0x6)
>   */
> diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
> index a8dba9e..41ffe29 100644
> --- a/include/hw/acpi/aml-build.h
> +++ b/include/hw/acpi/aml-build.h
> @@ -232,6 +232,13 @@ Aml *aml_call1(const char *method, Aml *arg1);
>  Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);
>  Aml *aml_call3(const char *method, Aml *arg1, Aml *arg2, Aml *arg3);
>  Aml *aml_call4(const char *method, Aml *arg1, Aml *arg2, Aml *arg3,
> Aml *arg4); +Aml *aml_gpio_int(AmlConsumerAndProducer con_and_pro,
> +                  AmlLevelAndEdge edge_level,
> +                  AmlActiveHighAndLow active_level, AmlShared shared,
> +                  AmlPinConfig pin_config, uint16_t debounce_timeout,
> +                  const uint32_t pin_list[], uint32_t pin_count,
> +                  const char *resource_source_name,
> +                  const uint8_t *vendor_data, uint16_t
> vendor_data_len); Aml *aml_memory32_fixed(uint32_t addr, uint32_t
> size, AmlReadAndWrite read_and_write);
>  Aml *aml_interrupt(AmlConsumerAndProducer con_and_pro,


Reply via email to