From: "Marcin Wojtas" <mw@semihalf.com>
To: devel@edk2.groups.io
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com,
kostap@marvell.com, Jici.Gao@arm.com, rebecca@bluestop.org,
kettenis@jive.eu
Subject: [edk2-platforms: PATCH v2 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description
Date: Mon, 20 May 2019 17:27:14 +0200 [thread overview]
Message-ID: <1558366047-15994-2-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1558366047-15994-1-git-send-email-mw@semihalf.com>
In order to avoid hardcoding the controller type when using
MV_GPIO_PIN, extend this structure with new according field.
This patch is required to properly handle PCIE slot reset
with the GPIO pin.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Silicon/Marvell/Include/Library/MvGpioLib.h | 1 +
Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 4 ++++
Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 6 ++++++
Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c | 1 +
4 files changed, 12 insertions(+)
diff --git a/Silicon/Marvell/Include/Library/MvGpioLib.h b/Silicon/Marvell/Include/Library/MvGpioLib.h
index 6ca9e79..35d979d 100644
--- a/Silicon/Marvell/Include/Library/MvGpioLib.h
+++ b/Silicon/Marvell/Include/Library/MvGpioLib.h
@@ -47,6 +47,7 @@ typedef struct {
} MV_GPIO_DEVICE_PATH;
typedef struct {
+ MV_GPIO_DRIVER_TYPE ControllerType;
UINTN ControllerId;
UINTN PinNumber;
BOOLEAN ActiveHigh;
diff --git a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 554155e..92a14bb 100644
--- a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -23,21 +23,25 @@
STATIC CONST MV_GPIO_PIN mXhciVbusPins[] = {
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_70x0_DB_IO_EXPANDER0,
ARMADA_70x0_DB_VBUS0_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_70x0_DB_IO_EXPANDER0,
ARMADA_70x0_DB_VBUS0_LIMIT_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_70x0_DB_IO_EXPANDER0,
ARMADA_70x0_DB_VBUS1_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_70x0_DB_IO_EXPANDER0,
ARMADA_70x0_DB_VBUS1_LIMIT_PIN,
TRUE,
diff --git a/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 804339f..cde73dd 100644
--- a/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -23,31 +23,37 @@
STATIC CONST MV_GPIO_PIN mXhciVbusPins[] = {
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER0,
ARMADA_80x0_DB_VBUS0_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER0,
ARMADA_80x0_DB_VBUS0_LIMIT_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER0,
ARMADA_80x0_DB_VBUS1_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER0,
ARMADA_80x0_DB_VBUS1_LIMIT_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER1,
ARMADA_80x0_DB_VBUS2_PIN,
TRUE,
},
{
+ MV_GPIO_DRIVER_TYPE_PCA95XX,
ARMADA_80x0_DB_IO_EXPANDER1,
ARMADA_80x0_DB_VBUS2_LIMIT_PIN,
TRUE,
diff --git a/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index c9e8872..f4e7246 100644
--- a/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -22,6 +22,7 @@
#include "NonDiscoverableInitLib.h"
STATIC CONST MV_GPIO_PIN mXhciVbusPin = {
+ MV_GPIO_DRIVER_TYPE_SOC_CONTROLLER,
MV_GPIO_CP0_CONTROLLER1,
ARMADA_80x0_MCBIN_VBUS0_PIN,
TRUE,
--
2.7.4
next prev parent reply other threads:[~2019-05-20 15:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 15:27 [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-20 15:27 ` Marcin Wojtas [this message]
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 03/14] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation Marcin Wojtas
2019-05-24 12:50 ` Ard Biesheuvel
2019-05-24 13:03 ` Marcin Wojtas
2019-05-24 13:08 ` Ard Biesheuvel
2019-05-24 14:28 ` Marcin Wojtas
2019-05-24 15:25 ` Ard Biesheuvel
2019-05-24 15:32 ` Leif Lindholm
2019-05-24 15:43 ` Marcin Wojtas
2019-05-24 15:46 ` Ard Biesheuvel
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-23 13:27 ` [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Mark Kettenis
2019-05-23 14:14 ` Leif Lindholm
2019-05-23 18:01 ` kettenis
2019-05-23 18:13 ` Ard Biesheuvel
2019-05-23 20:11 ` Leif Lindholm
2019-05-23 20:24 ` Ard Biesheuvel
2019-05-24 13:08 ` Marcin Wojtas
2019-05-24 13:12 ` Ard Biesheuvel
2019-05-24 13:13 ` Marcin Wojtas
2019-05-24 22:16 ` mark.kettenis
2019-05-25 9:47 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1558366047-15994-2-git-send-email-mw@semihalf.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox