From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.1525.1589822419030406827 for ; Mon, 18 May 2020 10:20:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=dhXNetLt; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id h17so12762133wrc.8 for ; Mon, 18 May 2020 10:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lo+ptNr0XIlxRymUU7Ceo/q7FOMm8U9o5bdfLvrF05E=; b=dhXNetLtEqnst+CRi6H25HnZHwWGIq9VnG129JWSS9Eo7AA4EnqyVevBAknw8i5DTQ feofip/uLMsdDrAK1V6amNMmclJ39IhBkK72JHW/B7N7LA58US0WB7Eop31gNt4JhnJ0 YnDLuHMVekWO3YsYBi9CK0fHEK7aBUMdv7lcAzgerF/wBtpBL3+Dgawz498kWQGuHdiL mLK8myeHd0I97NQIegCiYUw7MRiw7ywm4aQdxRuHqyUDh5RSEmKUZduB3NLxORyXwDVc R0uFSEc8QAgW60wQLkA5ZRaNycUUBNYsTt3sdChiwqQO2DsB/zeaU8jizj78/XquxOFx XpkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lo+ptNr0XIlxRymUU7Ceo/q7FOMm8U9o5bdfLvrF05E=; b=Eu2vLQvc9oEhKDnq5mW9pOXZmLP3OLSivApOIYccB1HA9Xz4T22IsA6N/JPBa0ZrIE wDVLxp6wakfVEJ1ksWc4WWe4qeZ0Q8Requiag6T6pD1mgCTTk/RVfboEw4kXNBuySk9o r5JADprG/VQ50WKjILhi8FwJ1s3g6wnuWnnvR1xznEmjHBzERfUowqsmkvkx0/lOiPzo 15sapBK0buusz3WFuJnub//nNEBGk1TTZGhDyQ4CG90D+zoV/NLt86o/f8s9fOm0rVyH SCwYNnfNjusfXS6hXfeecDga0SJCx0xtM4XRCqXjzeD2guRaX9/If/MtMuh4MQ6J3647 uoyA== X-Gm-Message-State: AOAM533w59qXiCsS7ka8HHXkWFv6swwJV4TkGxP4bNQ+OK/XuUQOW6Lq TTV47Ok9cQWrMVJJYXV7lhHTEQ== X-Google-Smtp-Source: ABdhPJyBhrsJKV5OQKBXtpoveNsVanuwHStIRGSCr9qsXCrRg0igst4aKalIg+IbpWDasNZ6tzOIbg== X-Received: by 2002:a5d:5388:: with SMTP id d8mr20463937wrv.242.1589822417635; Mon, 18 May 2020 10:20:17 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id c25sm212354wmb.44.2020.05.18.10.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 10:20:17 -0700 (PDT) Date: Mon, 18 May 2020 18:20:15 +0100 From: "Leif Lindholm" To: Ard Biesheuvel Cc: devel@edk2.groups.io, andrey.warkentin@gmail.com Subject: Re: [PATCH edk2-platforms 1/1] Silicon/Socionext/SynQuacer: use Generic Event Device for power button Message-ID: <20200518172015.GE10467@vanye> References: <20200515083235.13415-1-ard.biesheuvel@arm.com> MIME-Version: 1.0 In-Reply-To: <20200515083235.13415-1-ard.biesheuvel@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 15, 2020 at 10:32:35 +0200, Ard Biesheuvel wrote: > Drop the description of the interrupt handling part of the GPIO > controller, and use a ACPI0013 Generic Event device instead to > handle the power button event. This way, an OS can handle these > events without the need for a SoC specific driver. > > Signed-off-by: Ard Biesheuvel Acked-by: Leif Lindholm > --- > Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl | 52 ++++++++++++-------- > 1 file changed, 31 insertions(+), 21 deletions(-) > > diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > index f6ff3988aa91..3cfd025fbc16 100644 > --- a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > @@ -196,18 +196,40 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR", > }) > } > > - Device (EXIU) { > - Name (_HID, "SCX0008") > + Device (GED0) { > + Name (_HID, "ACPI0013") > Name (_UID, Zero) > Name (_CRS, ResourceTemplate () { > - Memory32Fixed (ReadWrite, SYNQUACER_EXIU_BASE, SYNQUACER_EXIU_SIZE) > - }) > - Name (_DSD, Package () { > - ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > - Package () { > - Package () { "socionext,spi-base", 112 }, > - } > + Interrupt (ResourceConsumer, Edge, ActiveHigh, ExclusiveAndWake) { 152 } > }) > + OperationRegion (EXIU, SystemMemory, SYNQUACER_EXIU_BASE, 0x20) > + Field (EXIU, DWordAcc, NoLock, Preserve) > + { > + MASK, 32, > + SRCS, 32, > + REQS, 32, > + RAWR, 32, > + REQC, 32, > + LEVL, 32, > + EDGC, 32, > + SWIR, 32, > + } > + > + Method (_INI) { > + REQC = 0xffffffff > + MASK = 0xffffffff > + > + /* enable the power button on line 8 as edge active low */ > + LEVL &= ~0x100 > + EDGC |= 0x100 > + REQC = 0x100 > + MASK = 0xfffffeff > + } > + > + Method (_EVT) { > + REQC = 0x100 > + Notify (\_SB.PWRB, 0x80) > + } > } > > Device (GPIO) { > @@ -215,9 +237,6 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR", > Name (_UID, Zero) > Name (_CRS, ResourceTemplate () { > Memory32Fixed (ReadWrite, SYNQUACER_GPIO_BASE, SYNQUACER_GPIO_SIZE) > - Interrupt (ResourceConsumer, Edge, ActiveLow, ExclusiveAndWake, 0, "\\_SB.EXIU") { > - 8, > - } > }) > Name (_DSD, Package () { > ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > @@ -237,15 +256,6 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR", > } > } > }) > - Name (_AEI, ResourceTemplate () { > - GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullDefault, 0, "\\_SB.GPIO") > - { > - 8 > - } > - }) > - Method (_E08) { > - Notify (\_SB.PWRB, 0x80) > - } > } > > Device (PWRB) { > -- > 2.17.1 >