From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::543; helo=mail-ed1-x543.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (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 D697E21A07A80 for ; Sun, 18 Nov 2018 22:54:14 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id h50so1955269ede.5 for ; Sun, 18 Nov 2018 22:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KY5F5mDa/xiTP8YDFkj/Tu33xBcp6XEbrRQiZpegFAI=; b=Nz7vKUGRFud6LJ0pVpn9CzYrfeC7kTF8hMZs9L1g2Ls1UrJ+He1zHZrzK0KSOm8IuU C4Idmpo6tlCuEP3xZNpWXzSfoPslLBmtgw1tZ9dl8syrXwE5DPByCFWj1EDtw/cSqGwb TjVQm42TFJmrJnsN9tXtaebTm2Thj+1XrbqpRyhGAuQryUjAMkcqOJGF2eTUvHmm3RUY +gr/FwyV3LfdKickmO9usttAUodoJuNJOHkE4C5xTiDElAX0gTPFMNO9DYWfzvG5FstT Ftc/rFOzOjK0yuyzoH5ojKZNi07TwO6l1MZgKYeIDIh2tMChf8fVUoS6QYjfvtFiixpz 8d1Q== 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; bh=KY5F5mDa/xiTP8YDFkj/Tu33xBcp6XEbrRQiZpegFAI=; b=hUD+WTpEeRhLmms/+OP9y+mP3uCznvQ+REvN680KBEnq1tdPNOihMAAITqRSlXSTMq af61LpbjnEJkzWXyvjfVZf52mt9k4WbTd9FEFsq1CyAVhSezAlPODdgWc0dZOVeAYxMi 1T+v9snPbH9gL/LrDu/CO/ad3GUYSorBd8J+uOpzeUxk2N246iJzWQUAJgrRQRmbUmPI 7qseeYUsEAYGPwhrYAOCsTWUE3HqWuQhsqCCuH8EM/m3hfMiZpV/a7b7wWKV1kAwepxn t+ctY1KfC+0FZLqrpCi6rl4oLLFT6aX1yAtcHhqqtV+w0n+FoLd9F1eY8KZUpQJ7bP8G IUqg== X-Gm-Message-State: AGRZ1gLWRB1WH4gPYewf1v6EFeqyK68+90xrSsYnECWvnayc04lSE6T1 Hh9Pd0fTuDB9UQauvq1tt6m7mwkxnnQ= X-Google-Smtp-Source: AJdET5dBth8WiEvt0r5s0VnxeeZNpNjc4LXhEQakrElYIjcadjkK1Fe64KSzvXR9cEQ3gYBhQBIEbA== X-Received: by 2002:a17:906:49c2:: with SMTP id w2-v6mr16030262ejv.117.1542610452987; Sun, 18 Nov 2018 22:54:12 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id i56sm4893236eda.37.2018.11.18.22.54.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Nov 2018 22:54:12 -0800 (PST) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, hao.a.wu@intel.com, nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com, tm@semihalf.com Date: Mon, 19 Nov 2018 07:53:35 +0100 Message-Id: <1542610420-9258-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542610420-9258-1-git-send-email-mw@semihalf.com> References: <1542610420-9258-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v6 3/8] SolidRun/Armada80x0McBin: Introduce board description library 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: , X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 X-List-Received-Date: Mon, 19 Nov 2018 06:54:15 -0000 From: Tomasz Michalec This patch implements ArmadaBoarDescLib library for Armada80x0McBin comunity board and add to it ArmadaBoardDescSdMmcGet function with description of connected Xenon host controllers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc | 3 + Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf | 34 +++++++++++ Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c | 60 ++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf create mode 100644 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc index 52e2b9b..077224d 100644 --- a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc @@ -55,6 +55,9 @@ [Components.AARCH64] Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf +[LibraryClasses.common] + ArmadaBoardDescLib|Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf + ################################################################################ # # Pcd Section - list of all EDK II PCD Entries defined by this Platform diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf new file mode 100644 index 0000000..63a4f66 --- /dev/null +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf @@ -0,0 +1,34 @@ +## @file +# +# Copyright (C) 2018, Marvell International Ltd. and its affiliates
+# +# This program and the accompanying materials are licensed and made available +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR +# IMPLIED. +# +# +## + +[Defines] + INF_VERSION = 0x0001001A + BASE_NAME = ArmadaMcBinBoardDescLib + FILE_GUID = 8208558f-5f33-46e2-b5c5-43354384389e + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = ArmadaBoardDescLib + +[Sources] + Armada80x0McBinBoardDescLib.c + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/Marvell/Marvell.dec + +[LibraryClasses] + DebugLib + IoLib diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c new file mode 100644 index 0000000..d52adfc --- /dev/null +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c @@ -0,0 +1,60 @@ +/** +* +* Copyright (C) 2018, Marvell International Ltd. and its affiliates. +* +* This program and the accompanying materials are licensed and made available +* under the terms and conditions of the BSD License which accompanies this +* distribution. The full text of the license may be found at +* http://opensource.org/licenses/bsd-license.php +* +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* +**/ + +#include + +#include +#include +#include +#include +#include +#include + +// +// Order of devices in SdMmcDescTemplate has to be in par with ArmadaSoCDescLib +// +STATIC +MV_BOARD_SDMMC_DESC mMcBinSdMmcDescTemplate[] = { + { /* eMMC 0xF06E0000 */ + 0, /* SOC will be filled by MvBoardDescDxe */ + 0, /* SdMmcDevCount will be filled by MvBoardDescDxe */ + FALSE, /* Xenon1v8Enabled */ + TRUE, /* Xenon8BitBusEnabled */ + TRUE, /* XenonSlowModeEnabled */ + 0x40, /* XenonTuningStepDivisor */ + EmbeddedSlot /* SlotType */ + }, + { /* SD/MMC 0xF2780000 */ + 0, /* SOC will be filled by MvBoardDescDxe */ + 0, /* SdMmcDevCount will be filled by MvBoardDescDxe */ + FALSE, /* Xenon1v8Enabled */ + FALSE, /* Xenon8BitBusEnabled */ + FALSE, /* XenonSlowModeEnabled */ + 0x19, /* XenonTuningStepDivisor */ + EmbeddedSlot /* SlotType */ + } +}; + +EFI_STATUS +EFIAPI +ArmadaBoardDescSdMmcGet ( + OUT UINTN *SdMmcDevCount, + OUT MV_BOARD_SDMMC_DESC **SdMmcDesc + ) +{ + *SdMmcDesc = mMcBinSdMmcDescTemplate; + *SdMmcDevCount = ARRAY_SIZE (mMcBinSdMmcDescTemplate); + + return EFI_SUCCESS; +} -- 2.7.4