From patchwork Tue Dec 6 13:05:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 86817 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2005532qgi; Tue, 6 Dec 2016 05:09:53 -0800 (PST) X-Received: by 10.200.48.151 with SMTP id v23mr52264082qta.199.1481029793910; Tue, 06 Dec 2016 05:09:53 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r24si11637384qtb.183.2016.12.06.05.09.53; Tue, 06 Dec 2016 05:09:53 -0800 (PST) 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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6CB3C609BC; Tue, 6 Dec 2016 13:09:49 +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.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB 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 5EFB060D1B; Tue, 6 Dec 2016 13:07:14 +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 89E25609B3; Tue, 6 Dec 2016 13:06:54 +0000 (UTC) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by lists.linaro.org (Postfix) with ESMTPS id D172C609A4 for ; Tue, 6 Dec 2016 13:05:47 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id t79so124806757wmt.0 for ; Tue, 06 Dec 2016 05:05:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0kI8x+p/3OP9W+3xDJyLyF92n8YmLVEWVY7dCJU2Kpg=; b=AXQaB58CBi2AzyNTVick1OX+9kgJDvo9q2t4J2NxIoVXPjQ/F9ccZ16sdvC9LI+nZu t1ubvruKyatfTnTiGlkBpUKyytc6jTY2mjHpY+xY2moN/+bPADE4Lb2Y8ZT297iX6YmB J/1BnP1AOspgnZ6IHrWPfz/y1tlH1U5SPM4KWVMY80owJ/TUqCDB7rkNOgypfpvKTHwc 2EJPw9zRay9w/FlHZzBHqXukqHgxpqXtEC0bTXBhQvO3rKj9KX3JJiUZ1RdaZQRl6F+3 J2Oaqaxfc6MzEG1BqhTh0co/LsLguHFqNwan0wZluV7iUAKoxiuOt2fXE3hl9kmoxcWZ Ybag== X-Gm-Message-State: AKaTC00Llkvh+8XMyD87oQ0a6l9jgwVJj4Ug/5QzKybYmab7xNgGGR2yZpahxElJ6p3fpvVNzQs= X-Received: by 10.28.48.7 with SMTP id w7mr2527019wmw.115.1481029546901; Tue, 06 Dec 2016 05:05:46 -0800 (PST) Received: from localhost.localdomain ([105.144.52.243]) by smtp.gmail.com with ESMTPSA id i2sm25673450wjx.44.2016.12.06.05.05.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 05:05:46 -0800 (PST) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 6 Dec 2016 13:05:29 +0000 Message-Id: <1481029532-17057-6-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481029532-17057-1-git-send-email-ard.biesheuvel@linaro.org> References: <1481029532-17057-1-git-send-email-ard.biesheuvel@linaro.org> Cc: alan@softiron.co.uk Subject: [Linaro-uefi] [PATCH v3 5/8] Platforms/AMD/Styx/AcpiTables: enable second SATA controller X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: 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" Enable the second AHCI ACPI node when any ports are enabled on the second SATA controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/AMD/Styx/AcpiTables/AcpiTables.inf | 1 + Platforms/AMD/Styx/AcpiTables/Dsdt.c | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf b/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf index 72272aa0b85a..12e0444009ef 100644 --- a/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf +++ b/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf @@ -83,6 +83,7 @@ gAmdStyxTokenSpaceGuid.PcdPsciOsSupport gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion + gAmdStyxTokenSpaceGuid.PcdSata1PortCount [Depex] gAmdMpCoreInfoProtocolGuid diff --git a/Platforms/AMD/Styx/AcpiTables/Dsdt.c b/Platforms/AMD/Styx/AcpiTables/Dsdt.c index 922d7214adf4..360a446f7631 100644 --- a/Platforms/AMD/Styx/AcpiTables/Dsdt.c +++ b/Platforms/AMD/Styx/AcpiTables/Dsdt.c @@ -174,15 +174,10 @@ DsdtHeader ( else if (AsciiStrCmp(Table->Pathname, "_SB_.ETH1._DSD") == 0) { OverrideMacAddr ((UINT8 *)&AmlCode[Table->Offset], PcdGet64 (PcdEthMacB)); } -#if DO_SATA1 else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) { - OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1); - } -#else - else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) { - OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], FALSE); + OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], + EnableOnB1 && FixedPcdGet8(PcdSata1PortCount) > 0); } -#endif else if (AsciiStrCmp(Table->Pathname, "_SB_.GIO2._STA") == 0) { OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1); }