public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [platforms: PATCH v2 00/12] Armada 7k8k GPIO support
@ 2019-01-10  1:44 Marcin Wojtas
  2019-01-10  1:44 ` [platforms: PATCH v2 01/12] Marvell/Library: ArmadaSoCDescLib: Add GPIO information Marcin Wojtas
                   ` (11 more replies)
  0 siblings, 12 replies; 34+ messages in thread
From: Marcin Wojtas @ 2019-01-10  1:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: leif.lindholm, ard.biesheuvel, nadavh, mw, jsd, jaz, kostap

Hi,

With a big delay caused by private and professional matters,
I finaly submit the second version of the GPIO support for
Marvell Armada SoCs. The rework was HUGE. The biggest change
is dropping custom GPIO protocol and start using the generic
EMBEDDED_GPIO with all its types. I think I answered
all of the review remarks, the details can be found in the changelog
below.

Patches are available in the github:
https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/gpio-upstream-r20190110

I also enclose a diff between v1 and v2, which maybe can ease a bit
the effort of review:
https://pastebin.com/GvAiYfJD

I am looking forward to your feedback.

Best regards,
Marcin

Changelog:
v1->v2:
* All
  - rebase on top of the master branch and Xenon changes

* 1/12
  - s/AP/AP806/ in order to avoid confusion
  - drop desc/DESC usage and improve variables naming
  - use GPIO_CONTROLLER from EmbeddedGpio.h instead of custom MV_SOC_GPIO
  - update commit message

* 2,3,4,5/12
  - drop desc/DESC usage and improve variables naming
  - drop reference to I2c and use GpioExpander
  - improve commit logs

* 6/12
  - drop desc/DESC usage and improve variables naming
  - drop reference to I2c and use GpioExpander
  - remove global variable - same as for other interfaces the consumer
    is responsible for avoiding memory leak

* 7/12
  - use MV_GPIO_ prefix
  - switch to EMBEDDED_GPIO
  - remove custom Marvell GPIO Protocol and types
  - add subroutine to MvGpioGetProtocol and more coments to clarify the code
  - add driver types and related enums in other commits

* 8/12
  - extend error path in the entry point, rename variables
  - use MV_GPIO_ prefix
  - switch to EMBEDDED_GPIO
  - remove custom Marvell GPIO Protocol and types
  - replace '!!' expression for obtaining pin state
  - remove BIT() macro
  - use generic mDevicePathTemplate name
  - put validate function under '#if !defined(MDEPKG_NDEBUG)' and
     call from inside ASSERT_EFI_ERROR, add comment
  - update commit message
  - add common enum for describing controllers
  - change authorship

- 9/12
  - Add Leif's RB

* 10/12
  - same modifications as 8/12
  - use I2C flags directly and remove PCA95XX_OPERATION enum
  - add common enum for describing controllers

* 11/12
  - Add Leif's RB

* 12/12
  - Add local headers
  - Make STATIC names more generic
  - s/GetInitializerForType/NonDiscoverableDeviceInitializerGet/
  - Use global enum for McBin GPIO controller

Marcin Wojtas (11):
  Marvell/Library: ArmadaSoCDescLib: Add GPIO information
  Marvell/Library: ArmadaBoardDescLib: Add GPIO information
  SolidRun/Armada80x0McBin: Extend board description library with GPIO
  Marvell/Armada70x0Db: Extend board description library with GPIO
  Marvell/Armada80x0Db: Extend board description library with GPIO
  Marvell/Drivers: MvBoardDesc: Extend protocol with GPIO support
  Marvell/Drivers: MvGpioDxe: Introduce platform GPIO driver
  Marvell/Drivers: I2c: Use common header for macros
  Marvell/Drivers: MvPca95xxDxe: Introduce GPIO expander driver
  Marvell/Armada7k8k: Enable GPIO drivers compilation
  Marvell/Armada7k8k: Introduce NonDiscoverable device init routines

jinghua (1):
  Marvell/Protocol: Introduce GPIO helper header

 Silicon/Marvell/Marvell.dec                                                                   |   1 +
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc                                                 |   2 +
 Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc                                                |   7 +-
 Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc                                                |   3 +
 Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc                                         |   3 +
 Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf           |   1 +
 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.inf               |  48 ++
 Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.inf           |   1 +
 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.inf               |  49 ++
 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf |   1 +
 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.inf           |  49 ++
 Silicon/Marvell/Armada7k8k/Drivers/PlatInitDxe/PlatInitDxe.inf                                |   1 +
 Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.inf              |   1 +
 Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.inf                                          |   1 +
 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.inf                                          |  44 ++
 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.inf                                    |  45 ++
 Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf                                             |   1 +
 Silicon/Marvell/Drivers/Net/MvMdioDxe/MvMdioDxe.inf                                           |   1 +
 Silicon/Marvell/Drivers/NonDiscoverableDxe/NonDiscoverableDxe.inf                             |   1 +
 Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonDxe.inf                                           |   1 +
 Silicon/Marvell/Library/ComPhyLib/ComPhyLib.inf                                               |   1 +
 Silicon/Marvell/Library/IcuLib/IcuLib.inf                                                     |   1 +
 Silicon/Marvell/Library/UtmiPhyLib/UtmiPhyLib.inf                                             |   1 +
 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h                 |  23 +
 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h                 |  28 +
 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.h             |  20 +
 Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h                |  10 +
 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h                                            |  49 ++
 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.h                                      |  65 ++
 Silicon/Marvell/Drivers/I2c/MvEepromDxe/MvEepromDxe.h                                         |  10 -
 Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.h                                               |  17 +-
 Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h                                          |  23 +
 Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h                                            |  12 +
 Silicon/Marvell/Include/Library/NonDiscoverableInitLib.h                                      |  28 +
 Silicon/Marvell/Include/Protocol/BoardDesc.h                                                  |   8 +
 Silicon/Marvell/Include/Protocol/MvGpio.h                                                     | 182 ++++++
 Silicon/Marvell/Include/Protocol/MvI2c.h                                                      |  31 +
 Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c             |  25 +
 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c                 |  96 +++
 Platform/Marvell/Armada80x0Db/Armada80x0DbBoardDescLib/Armada80x0DbBoardDescLib.c             |  31 +
 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c                 | 106 ++++
 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c   |  17 +
 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c             |  71 +++
 Silicon/Marvell/Applications/EepromCmd/EepromCmd.c                                            |   5 +-
 Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c                |  39 ++
 Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.c                                            |  43 ++
 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c                                            | 372 +++++++++++
 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c                                      | 651 ++++++++++++++++++++
 Silicon/Marvell/Drivers/I2c/MvEepromDxe/MvEepromDxe.c                                         |   3 +-
 Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c                                               |   4 +-
 Silicon/Marvell/Drivers/NonDiscoverableDxe/NonDiscoverableDxe.c                               |  13 +-
 Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf.inc                                            |   2 +
 Platform/Marvell/Armada80x0Db/Armada80x0Db.fdf.inc                                            |   2 +
 Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.fdf.inc                                     |   2 +
 54 files changed, 2214 insertions(+), 38 deletions(-)
 create mode 100644 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.inf
 create mode 100644 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.inf
 create mode 100644 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.inf
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.inf
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.inf
 create mode 100644 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h
 create mode 100644 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.h
 create mode 100644 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.h
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.h
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.h
 create mode 100644 Silicon/Marvell/Include/Library/NonDiscoverableInitLib.h
 create mode 100644 Silicon/Marvell/Include/Protocol/MvGpio.h
 create mode 100644 Silicon/Marvell/Include/Protocol/MvI2c.h
 create mode 100644 Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
 create mode 100644 Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
 create mode 100644 Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c
 create mode 100644 Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c

-- 
2.7.4



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2019-01-15 10:26 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-10  1:44 [platforms: PATCH v2 00/12] Armada 7k8k GPIO support Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 01/12] Marvell/Library: ArmadaSoCDescLib: Add GPIO information Marcin Wojtas
2019-01-14 23:45   ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 02/12] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2019-01-14 23:46   ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 03/12] SolidRun/Armada80x0McBin: Extend board description library with GPIO Marcin Wojtas
2019-01-14 23:46   ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 04/12] Marvell/Armada70x0Db: " Marcin Wojtas
2019-01-14 22:41   ` Leif Lindholm
2019-01-15  5:48     ` Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 05/12] Marvell/Armada80x0Db: " Marcin Wojtas
2019-01-14 22:44   ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 06/12] Marvell/Drivers: MvBoardDesc: Extend protocol with GPIO support Marcin Wojtas
2019-01-14 22:58   ` Leif Lindholm
2019-01-15  6:05     ` Marcin Wojtas
2019-01-15  9:56       ` Leif Lindholm
2019-01-15 10:05         ` Marcin Wojtas
2019-01-15 10:12           ` Leif Lindholm
2019-01-15 10:14             ` Marcin Wojtas
2019-01-15 10:26               ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 07/12] Marvell/Protocol: Introduce GPIO helper header Marcin Wojtas
2019-01-14 23:12   ` Leif Lindholm
2019-01-15  6:12     ` Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 08/12] Marvell/Drivers: MvGpioDxe: Introduce platform GPIO driver Marcin Wojtas
2019-01-14 23:32   ` Leif Lindholm
2019-01-15  6:19     ` Marcin Wojtas
2019-01-15 10:04       ` Leif Lindholm
2019-01-15 10:06         ` Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 09/12] Marvell/Drivers: I2c: Use common header for macros Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 10/12] Marvell/Drivers: MvPca95xxDxe: Introduce GPIO expander driver Marcin Wojtas
2019-01-14 23:40   ` Leif Lindholm
2019-01-10  1:44 ` [platforms: PATCH v2 11/12] Marvell/Armada7k8k: Enable GPIO drivers compilation Marcin Wojtas
2019-01-10  1:44 ` [platforms: PATCH v2 12/12] Marvell/Armada7k8k: Introduce NonDiscoverable device init routines Marcin Wojtas
2019-01-14 23:44   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox