From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::d42; helo=mail-io1-xd42.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (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 78D4421163277 for ; Mon, 8 Oct 2018 06:31:21 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id l25-v6so15862633ioj.0 for ; Mon, 08 Oct 2018 06:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=N6XcTSKBkcIiXVHRMKI9P2Sscybolk5Iod0ZeALYayg=; b=MiLzbxwWTzM5DqmwGBm3tD3+OB9Wv7yptomntNqSpLNZwAgm9YcJmV71iHwa3JFTBo G1Y61acU6XeHEouuf8P9fLQYUI4qW7N1RglU4DvyqDaW7HzkTm7USNCLQd8CPqOk3FdJ 93ChOJKuG9tr9HyN7P2dVxJhYpbLE9eAcEols= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=N6XcTSKBkcIiXVHRMKI9P2Sscybolk5Iod0ZeALYayg=; b=uoM0Lxh3jVJ8hvs6Gt4FtRKQ0HPPN1JAXwtmB7tIy+2DNnOD4V9HJWtB1zwKthpe1x qySXlfhXRGtuebaJXwhSYgqyADTIXUWTE8okZfvoa6UWUMbkwC12RjLivllbpWStphzW 9qkSszhQWOr2XFEgRK0QDvhsUQxg5WJXBjBfIb1xeYajBwwLPZWopOi8tc0CJmT4Wfof kwwy1SCIoQ2dh1VE96cRiSMZ5r2UOTDTQDGIJvjwZhr1gCTjsyXx2A1w7zV7y0eldwTz JEeEpf7qFBrE82z+DveX0fZOvhBWldT+6ghKsfooUcxJggwqvevWZMw80W3wyyURcE+S k8mQ== X-Gm-Message-State: ABuFfojmUYsk/G7Sx16vxMtMjhLs70Bggp+2MZ31sWR4fiTc9mbz8tB4 KMNQl368x91r2W3qK7zQYDujOtqyLhml9EDuG5nSrA== X-Google-Smtp-Source: ACcGV61eRWfLHrYab+RCWU7Yd3E9za4CKGIK5QFVhvfBVQtUSaPl1vH+AAHT7t0LDqHUgU3VvwBTT1ZIn0jt6YOYcds= X-Received: by 2002:a6b:5d12:: with SMTP id r18-v6mr15586375iob.170.1539005480550; Mon, 08 Oct 2018 06:31:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Mon, 8 Oct 2018 06:31:19 -0700 (PDT) In-Reply-To: References: <1538745968-22526-1-git-send-email-mw@semihalf.com> <1538745968-22526-6-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Mon, 8 Oct 2018 15:31:19 +0200 Message-ID: To: Marcin Wojtas Cc: edk2-devel-01 , Leif Lindholm , "Wu, Hao A" , Nadav Haklai , "jsd@semihalf.com" , Tomasz Michalec Subject: Re: [platforms: PATCH v2 5/7] Marvell/Armada80x0Db: 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, 08 Oct 2018 13:31:21 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 8 October 2018 at 15:28, Marcin Wojtas wrote: > Hi Ard, > > pon., 8 pa=C5=BA 2018 o 14:52 Ard Biesheuvel = napisa=C5=82(a): >> >> On 5 October 2018 at 15:26, Marcin Wojtas wrote: >> > From: Tomasz Michalec >> > >> > This patch implements ArmadaBoarDescLib library for >> > Armada8040 Development 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/Marvell/Armada80x0Db/Armada80x0Db.dsc = | 3 + >> > Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBo= ardDescLib.inf | 34 ++++++++++ >> > Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBo= ardDescLib.c | 66 ++++++++++++++++++++ >> > 3 files changed, 103 insertions(+) >> > create mode 100644 Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDes= cLib/Armada80x0DbBoardDescLib.inf >> > create mode 100644 Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDes= cLib/Armada80x0DbBoardDescLib.c >> > >> > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc b/Platform= /Marvell/Armada80x0Db/Armada80x0Db.dsc >> > index 92e2dc8..42f7bd3 100644 >> > --- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc >> > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc >> > @@ -54,6 +54,9 @@ >> > [Components.AARCH64] >> > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf >> > >> > +[LibraryClasses.common] >> > + ArmadaBoardDescLib|Platform/Marvell/Armada80x0Db/Armada80x0DbBoardD= escLib/Armada80x0DbBoardDescLib.inf >> > + >> > #####################################################################= ########### >> > # >> > # Pcd Section - list of all EDK II PCD Entries defined by this Platfo= rm >> > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Ar= mada80x0DbBoardDescLib.inf b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoar= dDescLib/Armada80x0DbBoardDescLib.inf >> > new file mode 100644 >> > index 0000000..2d39d96 >> > --- /dev/null >> > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x= 0DbBoardDescLib.inf >> > @@ -0,0 +1,34 @@ >> > +## @file >> > +# >> > +# Copyright (C) 2018, Marvell International Ltd. and its affiliates<= BR> >> > +# >> > +# This program and the accompanying materials are licensed and made = available >> > +# under the terms and conditions of the BSD License which accompanie= s 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" BAS= IS, >> > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS = OR >> > +# IMPLIED. >> > +# >> > +# >> > +## >> > + >> > +[Defines] >> > + INF_VERSION =3D 0x0001001A >> > + BASE_NAME =3D Armada80x0DbBoardDescLib >> > + FILE_GUID =3D fee9e874-1481-4b4f-9882-966bd0d1= 310f >> > + MODULE_TYPE =3D BASE >> > + VERSION_STRING =3D 1.0 >> > + LIBRARY_CLASS =3D ArmadaBoardDescLib >> > + >> > +[Sources] >> > + Armada80x0DbBoardDescLib.c >> > + >> > +[Packages] >> > + MdeModulePkg/MdeModulePkg.dec >> > + MdePkg/MdePkg.dec >> > + Silicon/Marvell/Marvell.dec >> > + >> > +[LibraryClasses] >> > + DebugLib >> > + IoLib >> > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Ar= mada80x0DbBoardDescLib.c b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardD= escLib/Armada80x0DbBoardDescLib.c >> > new file mode 100644 >> > index 0000000..00d696d >> > --- /dev/null >> > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x= 0DbBoardDescLib.c >> > @@ -0,0 +1,66 @@ >> > +/** >> > +* >> > +* 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 accompanie= s 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" BAS= IS, >> > +* 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 Armada= SoCDescLib >> > +// >> > +STATIC >> > +MV_BOARD_SDMMC_DESC mSdMmcDescTemplate[] =3D { >> > + { /* eMMC 0xF06E0000 */ >> > + 0, /* SOC will be filled by MvBoardDescDxe */ >> > + 0, /* SdMmcDevCount will be filled by MvBoardDescDxe */ >> > + TRUE, /* 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 */ >> >> Isn't the SD removable on MacchiatoBin? Or are we not able to support >> that in UEFI? >> >> > > UEFI CardDetect routine does not support CD via GPIO. On MacchiatoBin, > in case we define SD as 'RemovableSlot', it remains undetected. > OK, fair enough. We could look into adding support for this to the override protocol in the future, but I don't think it really matters tbh.