From patchwork Tue May 16 07:31:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 99848 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1892618qge; Tue, 16 May 2017 00:37:17 -0700 (PDT) X-Received: by 10.237.59.168 with SMTP id r37mr9726988qte.246.1494920237729; Tue, 16 May 2017 00:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494920237; cv=none; d=google.com; s=arc-20160816; b=OF5PpjRAqrJaDwWRjNQ+Z/m3NjtHDGEk2lyWFsIzJc/g2NyqMwIMLofhIzAr/NC8CH 7bAbkynvSCCT3xo6mrgvnRTdSkujChDMmjH2Mo6x/9DTYWomzswmv4Tf1gtGfpY7hVVR Ys/Giw05Cl7LBCYwlB4EO6hvhRtyh25uctPrmRYfFUI9IJWgLlf3K11t5K2fofNw8/Bq Hhjh+Oy2rQ2/VWPSAYvLoPTy4w5haHhSGgb6uwkgvfamGDYBYeCG4Q0HviX9+YDp9nSa 0UdOkVAsbJ6FgPiPO0L93gOCMJVURBZIXtKC+WQWWcQfOPuElNzs6HV9Vttw1ORjgSSE JlJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=44w7tX21O8n/6IQI8f13h/XdrTUJjtRq9za34DtECtA=; b=lDFrojMwE9Vl4E3ZQ23jiDGSbt1W64x5ig2mIXCINBTLf7lejuDVh67/4S9dvmy88l QQ9krh6084p6do5zHorY5mpYMHS58gXB3sMB1Poo+MNauMyruamaIfUljPt2gtPQW8KD VMCy3+rzV+/kVDdn2NN5ZyYuuPLcIvCBoCgp+72hgX7AJFqVFKNItvaA3n8t9xf6GBD7 TNii9pmOIVlQN3ephJWRnXIIWQw9din59DxumXgFgLSHBaLbTo3IdinlB1WugzJzNp2v EvMCuw0aWVP+GSMh9/JzkMsO2MyOMUkHBGtJ+e0yh9i6bHuQEDJHt1kkrunXFpFK1ysU 2Vhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f49si12865501qta.61.2017.05.16.00.37.17; Tue, 16 May 2017 00:37:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 246B160698; Tue, 16 May 2017 07:37:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7D0FC60AD3; Tue, 16 May 2017 07:36:46 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E492C60AF7; Tue, 16 May 2017 07:36:41 +0000 (UTC) Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by lists.linaro.org (Postfix) with ESMTPS id 3AA1260589 for ; Tue, 16 May 2017 07:36:04 +0000 (UTC) Received: by mail-pg0-f53.google.com with SMTP id u187so72202588pgb.0 for ; Tue, 16 May 2017 00:36:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AmFgnPHjU8fcvkltglvfEIT29KL20OZ6Ugq3DBTQRNw=; b=nWkXyVl257vHhtalXzNiCy2GXRhHDEKmNFd5RZPhhsmYonveWK8G0187BzMYv4jpCH w40kAELE/bmsULNGObggh+YKaB0+6a9K9bYoG+t2WU7ss2ZqaRFTqKwcnNv0hJPIMDbB CLLnBof28MFsvsAjrckKK01/NWrjbgxKErNY95IOSJATPh7pvKA70L7lpQfYseipURbK Bdmft4UGlEXRzSahTB0dRGX8QI1IdvaTS+KqosvlMOZ8NVaPoKD4fs/u6dQOouG6XVTU sWhvTKZ7TVmlZ6XzCAEiws7y7KugV+tg4MgxaU6LnwKVoixXEml60ITiKf0SF539uwN7 7rUA== X-Gm-Message-State: AODbwcD5UQrEKVPOJSVbBUIl9ycT5VJk5//d1xL3WaXlV6tFpYRzc9of qu0eVXAlVMg9Tpjrg0U= X-Received: by 10.99.102.134 with SMTP id a128mr10332267pgc.42.1494920163525; Tue, 16 May 2017 00:36:03 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id n7sm4086316pfk.74.2017.05.16.00.36.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 May 2017 00:36:02 -0700 (PDT) From: Chenhui Sun To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, graeme.gregory@linaro.org Date: Tue, 16 May 2017 15:31:19 +0800 Message-Id: <1494919879-72821-3-git-send-email-chenhui.sun@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494919879-72821-1-git-send-email-chenhui.sun@linaro.org> References: <1494919879-72821-1-git-send-email-chenhui.sun@linaro.org> Cc: Yi Li , "zhichang.yuan" , Heyi Guo , sunchenhui@huawei.com, wanghuiqiang@huawei.com Subject: [Linaro-uefi] [PATCH 3/3] D05: Support ipmi through LPC X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" From: "zhichang.yuan" Add ipmi description according to the new LPC driver of Linux kernel 4.10 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zhichang.yuan Signed-off-by: Heyi Guo Signed-off-by: Yi Li Signed-off-by: Chenhui Sun Reviewed-by: Graeme Gregory --- Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl | 91 +++++++++++++++++++++-- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl index 0965afc..d4b2372 100644 --- a/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl +++ b/Chips/Hisilicon/Hi1616/D05AcpiTables/Dsdt/Lpc.asl @@ -16,10 +16,89 @@ // LPC // -Device (LPC0) -{ - Name(_HID, "HISI0191") // HiSi LPC - Name (_CRS, ResourceTemplate () { - Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000) - }) +Scope(_SB) { + Device (LPC0) { + Name (_HID, "HISI0191") // HiSi LPC + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000) + }) + } + + Device (LPC0.IPMI) { + Name (_HID, "IPI0001") + Method (_IFT) { + Return (0x03) + } + Name (LORS, ResourceTemplate() { + QWordIO ( + ResourceConsumer, + MinNotFixed, // _MIF + MaxNotFixed, // _MAF + PosDecode, + EntireRange, + 0x0, // _GRA + 0xe4, // _MIN + 0x3fff, // _MAX + 0x0, // _TRA + 0x04, // _LEN + , , + BTIO + ) + }) + CreateQWordField (LORS, BTIO._MIN, CMIN) + CreateQWordField (LORS, BTIO._MAX, CMAX) + CreateQWordField (LORS, BTIO._LEN, CLEN) + + Method (_PRS, 0) { + Return (LORS) + } + + Method (_CRS, 0) { + Return (LORS) + } + Method (_SRS, 1) { + CreateQWordField (Arg0, \_SB.LPC0.IPMI.BTIO._MIN, IMIN) + Store (IMIN, CMIN) + CreateQWordField (Arg0, \_SB.LPC0.IPMI.BTIO._MAX, IMAX) + Store (IMAX, CMAX) + } + } + + Device (LPC0.CON0) { + Name (_HID, "HISI1031") + Name (_CID, "PNP0501") + Name (LORS, ResourceTemplate() { + QWordIO ( + ResourceConsumer, + MinNotFixed, // _MIF + MaxNotFixed, // _MAF + PosDecode, + EntireRange, + 0x0, // _GRA + 0x2F8, // _MIN + 0x3fff, // _MAX + 0x0, // _TRA + 0x08, // _LEN + , , + IO02 + ) + }) + CreateQWordField (LORS, IO02._MIN, CMIN) + CreateQWordField (LORS, IO02._MAX, CMAX) + CreateQWordField (LORS, IO02._LEN, CLEN) + + Method (_PRS, 0) { + Return (LORS) + } + + Method (_CRS, 0) { + Return (LORS) + } + Method (_SRS, 1) { + CreateQWordField (Arg0, \_SB.LPC0.CON0.IO02._MIN, IMIN) + Store (IMIN, CMIN) + CreateQWordField (Arg0, \_SB.LPC0.CON0.IO02._MAX, IMAX) + Store (IMAX, CMAX) + } + } }