From patchwork Tue Nov 1 17:25:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 80395 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp739331qge; Tue, 1 Nov 2016 10:28:37 -0700 (PDT) X-Received: by 10.31.84.130 with SMTP id i124mr9773524vkb.66.1478021316962; Tue, 01 Nov 2016 10:28:36 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u184si10239290vkb.223.2016.11.01.10.28.36; Tue, 01 Nov 2016 10:28:36 -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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0671E60B22; Tue, 1 Nov 2016 17:28:30 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 8807F60E3A; Tue, 1 Nov 2016 17:26:34 +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 7DA9360C15; Tue, 1 Nov 2016 17:26:16 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id 67B7A60DF7 for ; Tue, 1 Nov 2016 17:25:47 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id n67so299139731wme.1 for ; Tue, 01 Nov 2016 10:25:47 -0700 (PDT) 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=uuCujNq2Ug4m4xRXPSO2Mkp8/y3tmwaFQrnck+dvkRY=; b=cy1KySpJkZgwrUab7D59bCaWRKeS+I5+LvPxZguvx+02nsbbFz1hdT1VpYa1Lj+ALx KKmTCrJBy6iu+YSdeaXp4GG7WeP/Y0a9ULzOY6pRTDuALAXwJXjFWQPQ3lApToKabJDy 1tteCF/IEnWwpaNfud0XmFka7BWDP1L8Ey3/7KrDWsV9hSlZyDzDJSiBSqjHCW173+1o gaa9fwhOuI4wu8VqKInran9tD4jfNwPvtrdh1owKkwoA3N8pW2MxFcLBSIn42xxSZ0Rh oc2b2kOYoZUSPzKKpBQMtC9G4Wauqrj7J4SU8gmJRocieAAosbZObKlc7AIU+7URZJgz E+2Q== X-Gm-Message-State: ABUngvd8y667nE7JY5mOZzNPnC2FipN/DtVEqk5bLw73ZthA+G8Cn+lyGL45SfEU/pX00EI2nRg= X-Received: by 10.28.141.148 with SMTP id p142mr2351178wmd.107.1478021146476; Tue, 01 Nov 2016 10:25:46 -0700 (PDT) Received: from localhost.localdomain ([105.151.153.127]) by smtp.gmail.com with ESMTPSA id za1sm36816240wjb.8.2016.11.01.10.25.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Nov 2016 10:25:45 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org, leo.duran@amd.com, leif.lindholm@linaro.org, alan@softiron.co.uk Date: Tue, 1 Nov 2016 17:25:14 +0000 Message-Id: <1478021115-22781-8-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478021115-22781-1-git-send-email-ard.biesheuvel@linaro.org> References: <1478021115-22781-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [Linaro-uefi] [PATCH 7/8] Platforms/AMD/Styx/FdtDxe: 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 DT node when any ports are enabled on the second SATA controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platforms/AMD/Styx/Drivers/FdtDxe/BdsLinuxFdt.c | 7 ++----- Platforms/AMD/Styx/Drivers/FdtDxe/FdtDxe.inf | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Platforms/AMD/Styx/Drivers/FdtDxe/BdsLinuxFdt.c b/Platforms/AMD/Styx/Drivers/FdtDxe/BdsLinuxFdt.c index 13fc9c152bdc..aa595045ca3c 100644 --- a/Platforms/AMD/Styx/Drivers/FdtDxe/BdsLinuxFdt.c +++ b/Platforms/AMD/Styx/Drivers/FdtDxe/BdsLinuxFdt.c @@ -247,11 +247,8 @@ SetSocIdStatus ( SocId = PcdGet32 (PcdSocCpuId); IsRevB1 = (SocId & 0xFF0) && (SocId & 0x00F); -#if DO_SATA1 - SetDeviceStatus (fdt, "sata@e0d00000", IsRevB1); -#else - SetDeviceStatus (fdt, "sata@e0d00000", FALSE); -#endif + SetDeviceStatus (fdt, "sata@e0d00000", + IsRevB1 && FixedPcdGet8(PcdSata1PortCount) > 0); SetDeviceStatus (fdt, "gpio@e0020000", IsRevB1); SetDeviceStatus (fdt, "gpio@e0030000", IsRevB1); SetDeviceStatus (fdt, "gwdt@e0bb0000", IsRevB1); diff --git a/Platforms/AMD/Styx/Drivers/FdtDxe/FdtDxe.inf b/Platforms/AMD/Styx/Drivers/FdtDxe/FdtDxe.inf index 43f084d820fa..5479c7b0abfb 100644 --- a/Platforms/AMD/Styx/Drivers/FdtDxe/FdtDxe.inf +++ b/Platforms/AMD/Styx/Drivers/FdtDxe/FdtDxe.inf @@ -70,6 +70,7 @@ gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment gAmdStyxTokenSpaceGuid.PcdPsciOsSupport gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport + gAmdStyxTokenSpaceGuid.PcdSata1PortCount [Depex] TRUE