From patchwork Tue Dec 11 18:35:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 153499 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp949466ljp; Tue, 11 Dec 2018 10:35:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/W6v3VGf0QXU+iCxBx2t3q5+J5WXRM665s34MUbrIu+MK94ctP/AYpCakVVlCXaQpGr6t11 X-Received: by 2002:a63:1321:: with SMTP id i33mr15875674pgl.380.1544553358058; Tue, 11 Dec 2018 10:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544553358; cv=none; d=google.com; s=arc-20160816; b=VJwtncJPN567tBvuQNS9LKPwZNAe+x7Unlb+F7uG74sgnKJoxWrVdvb70oS8BznJH8 say0zxKqp/MLcJ36H0NbyslhQ+XAsvR0AokTknwO/30XF2YVlg/fB4YG8zA/rAnCyY4I LRBG1En9W7Kn6YIXoBEzRgGCisDakD17dktnt8WTEY1HUQqC5KYPVhaznz7z9nbfpBUk 6pl8afPSbl2UEMUCKE8XvF1pVDag4Qhp9AfkJ1RHdE8KrYNcKWPq9S1lj2zBvzHz7KqJ Nb45AfAksXGbWD982RO0uEbfJINkYtJfXlrZ7hx1SZf+nv7Rspu370iXzD1O3BkpjOfv UREQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=TeJPorZzdVg0KmHuhL3bamUAOWMDUclVOb2gKlM8i2Q=; b=RiqAksP6DO3ZJjEFAxNo7udC9dLHdAMrC22qmOL4qb3rp611JkXfQjWXP6en/pCUMx TIl+lQOmxzulbJlO+bfgx9hT823Dvdi7EArWp5A6mhOfLliCgiKoUc3jpVFshl12sb+/ bN/K+ufBFwx4Fl6UuUJerPk660VHntYNDelDWNFonFp0L/mnLO8+fX0vwj0NX+PjA27g rvXhVxJ0TpN2Tm1jfx1JS39ZR8UJ65X8d3YPH+rIv6GfVZlVEz2MwnruQDRa4A1GDVB7 jxztLHws1UzmJrVYnLYk15CIwRO+kocHUwmMJFkQZ3SOy0xlN0hg7solFTL/VBDeZiSJ pnaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HyyEF/8B"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id l6si11892236pgg.592.2018.12.11.10.35.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 10:35:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HyyEF/8B"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A95442119A457; Tue, 11 Dec 2018 10:35:37 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A672521BADAB9 for ; Tue, 11 Dec 2018 10:35:35 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id s14so3307041wmh.1 for ; Tue, 11 Dec 2018 10:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=acPRjAm1LSHioxJowt59fUDI3OFAO0qahki8/64jPfE=; b=HyyEF/8Br+d7VHeIxjBV7OwrTLh9W2ovgFeEk/k41ee2A0eLD+29bkxYnEVGrVNaY/ A1t2gQfkUin+WTbokmbpF70VkdUJ4MHYKoVSUsWZNrBCa8ySZQx4OWSl1r4dLtCs/XNJ 7DBwLusRKam3A2K+ypBscHFit1CTomOhEwJ5Q= 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:mime-version:content-transfer-encoding; bh=acPRjAm1LSHioxJowt59fUDI3OFAO0qahki8/64jPfE=; b=Sp4xL4z6DF1fAWPuTnent6+5EYpgh9NaA63H8FuJBcMDM8+LLbZEafS10y/XG2ZR1l 5x4y5dH7UUaoGKyUK6mkH5CqLXKE8KFq/EpivAsEGW5TDEp8yuf6U6/kI4k0HqxMnaZA dyEo5Kgw993Im2nu/ODC54AxeyQ2dRV5wnpGOwnrIe2YmmxCcutqJ6VYauyE0EAYR4z9 JAUDDTh4bIPKub9ud9EcwdCMn2NIVZ6WV48G2zNEXSXlGMs9UjpMAG3SBBgE0f4j8wpP Ikd5iyZQT6GodzEKaSsTDPI6PkiHpihUgz8oRTIcqX/MBR+HGnpCJl3yxAJCpwiR3+sN 0/IA== X-Gm-Message-State: AA+aEWbt0Uf+PvuFY57VwucuXHFDEqsjINxjLeeajClOnKB31hx6lfxv KtjdpH/JPJAShP1xPRlSXp9NjrdBgf1JPg== X-Received: by 2002:a1c:8acd:: with SMTP id m196mr3514067wmd.120.1544553333953; Tue, 11 Dec 2018 10:35:33 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:8c3:6b9d:cbc9:58c6]) by smtp.gmail.com with ESMTPSA id h131sm1026688wmd.17.2018.12.11.10.35.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 10:35:32 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 11 Dec 2018 19:35:12 +0100 Message-Id: <20181211183514.20948-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181211183514.20948-1-ard.biesheuvel@linaro.org> References: <20181211183514.20948-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH edk2-platforms 09/11] Silicon/AMD/Styx/StyxDtbLoaderLib: replace DO_KCS macro reference with PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Get rid of the CPP conditionals, and use the new boolean PCD for KCS support instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf | 1 + Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf index af57ab24f084..23c5e563bbb6 100644 --- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf +++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.inf @@ -54,6 +54,7 @@ gArmPlatformTokenSpaceGuid.PcdCoreCount gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment + gAmdStyxTokenSpaceGuid.PcdEnableKcs gAmdStyxTokenSpaceGuid.PcdSata1PortCount [Guids] diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c index db7d9b077c32..248eda7c8a95 100644 --- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c +++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c @@ -247,11 +247,12 @@ SetSocIdStatus ( SetDeviceStatus (Fdt, "gpio@e0020000", IsRevB1); SetDeviceStatus (Fdt, "gpio@e0030000", IsRevB1); SetDeviceStatus (Fdt, "gwdt@e0bb0000", IsRevB1); -#if DO_KCS - SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1); -#else - SetDeviceStatus (Fdt, "kcs@e0010000", FALSE); -#endif + + if (FixedPcdGetBool (PcdEnableKcs)) { + SetDeviceStatus (Fdt, "kcs@e0010000", IsRevB1); + } else { + SetDeviceStatus (Fdt, "kcs@e0010000", FALSE); + } if (!PcdGetBool (PcdEnableSmmus)) { DisableSmmu (Fdt, "iommu-map", "/smb/smmu@e0a00000", "/smb/pcie@f0000000");