From patchwork Tue Dec 6 09:45:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 86729 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1927842qgi; Tue, 6 Dec 2016 01:47:58 -0800 (PST) X-Received: by 10.200.36.46 with SMTP id c43mr52520864qtc.260.1481017678647; Tue, 06 Dec 2016 01:47:58 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s5si11263366qkd.293.2016.12.06.01.47.58; Tue, 06 Dec 2016 01:47:58 -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 336E060C0E; Tue, 6 Dec 2016 09:47:58 +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 8AEC160C8E; Tue, 6 Dec 2016 09:46:29 +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 853BA60AB8; Tue, 6 Dec 2016 09:46:13 +0000 (UTC) Received: from mail-wj0-f174.google.com (mail-wj0-f174.google.com [209.85.210.174]) by lists.linaro.org (Postfix) with ESMTPS id B553460A1A for ; Tue, 6 Dec 2016 09:46:09 +0000 (UTC) Received: by mail-wj0-f174.google.com with SMTP id v7so313207946wjy.2 for ; Tue, 06 Dec 2016 01:46:09 -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=u9XYl/nHePMSSBNwyxzsqd1NW59t4mHXUYpj8KCLEqw=; b=d77wB6+sbJJ9Cn9nxmNnOtlIW8zmyQertnAYeBeWCR88iccofbokFqbDRbtAPuvwIq iPKZO+EG95gNSyUXb9Kf0/CHq4GWYRCc8FPBYZLZSD1F689cbd/X925N+AaVW00GVOx2 4WlaeB0ZdBstxqqiMaJUkK7ebvfbbeyz0NpwLPAcXKacHLEUtzyHBqnIIR9DiLpL9H2B aevrRWE5LzoHI40ijN/FkiADD4kc8g79Enz/cOnn1KxrQKP0SU4E0SD7OYR+hVpeWd6s U714JV6r9qP9u42S1k8rhVLKO6M5CZUMo9tswQq0zj4u95QaSxTO9lqCTR12NuH5yICO IZEg== X-Gm-Message-State: AKaTC02eB03sWFCKn5anhghDNBhFqaNGRcwezawFcPQbNrZuYm66bKSe6o3VM3W+cVFyS8w3juc= X-Received: by 10.194.205.34 with SMTP id ld2mr40004512wjc.211.1481017568375; Tue, 06 Dec 2016 01:46:08 -0800 (PST) Received: from localhost.localdomain ([105.144.52.243]) by smtp.gmail.com with ESMTPSA id kq7sm24786708wjb.30.2016.12.06.01.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 01:46:07 -0800 (PST) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 6 Dec 2016 09:45:47 +0000 Message-Id: <1481017548-16050-8-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481017548-16050-1-git-send-email-ard.biesheuvel@linaro.org> References: <1481017548-16050-1-git-send-email-ard.biesheuvel@linaro.org> Cc: alan@softiron.co.uk Subject: [Linaro-uefi] [PATCH v2 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