From patchwork Tue Dec 6 13:05:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 86814 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2004799qgi; Tue, 6 Dec 2016 05:08:31 -0800 (PST) X-Received: by 10.55.36.149 with SMTP id k21mr54082014qkk.252.1481029711028; Tue, 06 Dec 2016 05:08:31 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c36si11640602qtd.119.2016.12.06.05.08.30; Tue, 06 Dec 2016 05:08:31 -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 9D6AE60983; Tue, 6 Dec 2016 13:08: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 03BAD60D6B; Tue, 6 Dec 2016 13:07:00 +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 4CB806092D; Tue, 6 Dec 2016 13:06:51 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by lists.linaro.org (Postfix) with ESMTPS id 54E79609B8 for ; Tue, 6 Dec 2016 13:05:50 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id a197so127680724wmd.0 for ; Tue, 06 Dec 2016 05:05:50 -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=b5/j39tUs2NHN15W4DasOtE56WH1feylSmFM6EJjEzCcEp7zsER5IJK47IeG9zx2WP zXsIv/SkDYwJ2DEdP/gzY0HhGPpTQDSaQc5zGiQbzgRasG0rLbsz0a2KT0e9bja2OXZk hJyIfmq9yNcKl1WEzHLrtUYA83Sse+LMxaYVElrMt4I8ETJIVjeYnxM+PRUK0GbIOPhJ jlGlJLwBPiNvX6vF2zJHnyhwv38T6Z2/59eWGNxip95R0pEtkoLF8pfmaBwarK/5j8BJ wt+0lYxxEAttQJfw8XFrEWecIKUftP9/tllh8+6R6/HcVgqUw9NL7W07viH60c+TYn+S yqRg== X-Gm-Message-State: AKaTC01bfEo2ikuV3d2wLkFnRTKF7Wl8BLv48auk8OiRPuNRWyoLtRcA6VdxhuWr6w7F413lyl0= X-Received: by 10.28.157.137 with SMTP id g131mr2493329wme.29.1481029549311; Tue, 06 Dec 2016 05:05:49 -0800 (PST) Received: from localhost.localdomain ([105.144.52.243]) by smtp.gmail.com with ESMTPSA id i2sm25673450wjx.44.2016.12.06.05.05.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 05:05:48 -0800 (PST) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 6 Dec 2016 13:05:30 +0000 Message-Id: <1481029532-17057-7-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 6/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