public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: ard.biesheuvel@linaro.org, michael.d.kinney@intel.com,
	edk2-devel@lists.01.org, udit.kumar@nxp.com, v.sethi@nxp.com
Subject: Re: [PATCH edk2-platforms 05/41] Silicon/NXP: Add support for I2c driver
Date: Tue, 18 Dec 2018 17:25:22 +0000	[thread overview]
Message-ID: <20181218172522.btvaf6jtpombokuu@bivouac.eciton.net> (raw)
In-Reply-To: <1543417315-5763-6-git-send-email-meenakshi.aggarwal@nxp.com>

On Wed, Nov 28, 2018 at 08:31:19PM +0530, Meenakshi Aggarwal wrote:
> I2C driver produces gEfiI2cMasterProtocolGuid which can be
> used by other modules.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>

Many thanks for the non-trivial rework.

A few style comments below.

> ---
>  Silicon/NXP/Drivers/I2cDxe/ComponentName.c | 185 ++++++++
>  Silicon/NXP/Drivers/I2cDxe/DriverBinding.c | 241 ++++++++++
>  Silicon/NXP/Drivers/I2cDxe/I2cDxe.c        | 693 +++++++++++++++++++++++++++++
>  Silicon/NXP/Drivers/I2cDxe/I2cDxe.h        |  96 ++++
>  Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf      |  64 +++
>  5 files changed, 1279 insertions(+)
>  create mode 100644 Silicon/NXP/Drivers/I2cDxe/ComponentName.c
>  create mode 100644 Silicon/NXP/Drivers/I2cDxe/DriverBinding.c
>  create mode 100644 Silicon/NXP/Drivers/I2cDxe/I2cDxe.c
>  create mode 100644 Silicon/NXP/Drivers/I2cDxe/I2cDxe.h
>  create mode 100644 Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf
> 
> diff --git a/Silicon/NXP/Drivers/I2cDxe/ComponentName.c b/Silicon/NXP/Drivers/I2cDxe/ComponentName.c
> new file mode 100644
> index 0000000..efed6b9
> --- /dev/null
> +++ b/Silicon/NXP/Drivers/I2cDxe/ComponentName.c
> @@ -0,0 +1,185 @@
> +/** @file
> +
> +  Copyright 2018 NXP
> +
> +  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 "I2cDxe.h"
> +
> +STATIC EFI_UNICODE_STRING_TABLE mNxpI2cDriverNameTable[] = {
> +  {
> +    "en",
> +    (CHAR16 *)L"Nxp I2C Driver"
> +  },
> +  { }
> +};
> +
> +STATIC EFI_UNICODE_STRING_TABLE mNxpI2cControllerNameTable[] = {
> +  {
> +    "en",
> +    (CHAR16 *)L"Nxp I2C Controller"
> +  },
> +  { }
> +};
> +
> +/**
> +  Retrieves a Unicode string that is the user readable name of the driver.
> +
> +  This function retrieves the user readable name of a driver in the form of a
> +  Unicode string. If the driver specified by This has a user readable name in
> +  the language specified by Language, then a pointer to the driver name is
> +  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
> +  by This does not support the language specified by Language,
> +  then EFI_UNSUPPORTED is returned.
> +
> +  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
> +                                EFI_COMPONENT_NAME_PROTOCOL instance.
> +
> +  @param  Language[in]          A pointer to a Null-terminated ASCII string
> +                                array indicating the language. This is the
> +                                language of the driver name that the caller is
> +                                requesting, and it must match one of the
> +                                languages specified in SupportedLanguages. The
> +                                number of languages supported by a driver is up
> +                                to the driver writer. Language is specified
> +                                in RFC 4646 or ISO 639-2 language code format.
> +
> +  @param  DriverName[out]       A pointer to the Unicode string to return.
> +                                This Unicode string is the name of the
> +                                driver specified by This in the language
> +                                specified by Language.
> +
> +  @retval EFI_SUCCESS           The Unicode string for the Driver specified by
> +                                This and the language specified by Language was
> +                                returned in DriverName.
> +
> +  @retval EFI_INVALID_PARAMETER Language is NULL.
> +
> +  @retval EFI_INVALID_PARAMETER DriverName is NULL.
> +
> +  @retval EFI_UNSUPPORTED       The driver specified by This does not support
> +                                the language specified by Language.
> +
> +**/
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +NxpI2cGetDriverName (
> +  IN  EFI_COMPONENT_NAME2_PROTOCOL  *This,
> +  IN  CHAR8                         *Language,
> +  OUT CHAR16                        **DriverName
> +  )
> +{
> +  return LookupUnicodeString2 (Language,
> +                               This->SupportedLanguages,
> +                               mNxpI2cDriverNameTable,
> +                               DriverName,
> +                               FALSE);
> +}
> +
> +/**
> +  Retrieves a Unicode string that is the user readable name of the controller
> +  that is being managed by a driver.
> +
> +  This function retrieves the user readable name of the controller specified by
> +  ControllerHandle and ChildHandle in the form of a Unicode string. If the
> +  driver specified by This has a user readable name in the language specified by
> +  Language, then a pointer to the controller name is returned in ControllerName,
> +  and EFI_SUCCESS is returned.  If the driver specified by This is not currently
> +  managing the controller specified by ControllerHandle and ChildHandle,
> +  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not
> +  support the language specified by Language, then EFI_UNSUPPORTED is returned.
> +
> +  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
> +                                EFI_COMPONENT_NAME_PROTOCOL instance.
> +
> +  @param  ControllerHandle[in]  The handle of a controller that the driver
> +                                specified by This is managing.  This handle
> +                                specifies the controller whose name is to be
> +                                returned.
> +
> +  @param  ChildHandle[in]       The handle of the child controller to retrieve
> +                                the name of.  This is an optional parameter that
> +                                may be NULL.  It will be NULL for device
> +                                drivers.  It will also be NULL for a bus drivers
> +                                that wish to retrieve the name of the bus
> +                                controller.  It will not be NULL for a bus
> +                                driver that wishes to retrieve the name of a
> +                                child controller.
> +
> +  @param  Language[in]          A pointer to a Null-terminated ASCII string
> +                                array indicating the language.  This is the
> +                                language of the driver name that the caller is
> +                                requesting, and it must match one of the
> +                                languages specified in SupportedLanguages. The
> +                                number of languages supported by a driver is up
> +                                to the driver writer. Language is specified in
> +                                RFC 4646 or ISO 639-2 language code format.
> +
> +  @param  ControllerName[out]   A pointer to the Unicode string to return.
> +                                This Unicode string is the name of the
> +                                controller specified by ControllerHandle and
> +                                ChildHandle in the language specified by
> +                                Language from the point of view of the driver
> +                                specified by This.
> +
> +  @retval EFI_SUCCESS           The Unicode string for the user readable name in
> +                                the language specified by Language for the
> +                                driver specified by This was returned in
> +                                DriverName.
> +
> +  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
> +
> +  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
> +                                EFI_HANDLE.
> +
> +  @retval EFI_INVALID_PARAMETER Language is NULL.
> +
> +  @retval EFI_INVALID_PARAMETER ControllerName is NULL.
> +
> +  @retval EFI_UNSUPPORTED       The driver specified by This is not currently
> +                                managing the controller specified by
> +                                ControllerHandle and ChildHandle.
> +
> +  @retval EFI_UNSUPPORTED       The driver specified by This does not support
> +                                the language specified by Language.
> +
> +**/
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +NxpI2cGetControllerName (
> +  IN  EFI_COMPONENT_NAME2_PROTOCOL                    *This,
> +  IN  EFI_HANDLE                                      ControllerHandle,
> +  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,
> +  IN  CHAR8                                           *Language,
> +  OUT CHAR16                                          **ControllerName
> +  )
> +{
> +  if (ChildHandle != NULL) {
> +    return EFI_UNSUPPORTED;
> +  }
> +
> +  return LookupUnicodeString2 (Language,
> +                               This->SupportedLanguages,
> +                               mNxpI2cControllerNameTable,
> +                               ControllerName,
> +                               FALSE);
> +}
> +
> +//
> +// EFI Component Name 2 Protocol
> +//
> +EFI_COMPONENT_NAME2_PROTOCOL gNxpI2cDriverComponentName2 = {
> +  NxpI2cGetDriverName,
> +  NxpI2cGetControllerName,
> +  "en"
> +};
> diff --git a/Silicon/NXP/Drivers/I2cDxe/DriverBinding.c b/Silicon/NXP/Drivers/I2cDxe/DriverBinding.c
> new file mode 100644
> index 0000000..ad7a9f3
> --- /dev/null
> +++ b/Silicon/NXP/Drivers/I2cDxe/DriverBinding.c
> @@ -0,0 +1,241 @@
> +/** @file
> +
> +  Copyright 2018 NXP
> +
> +  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 <Library/BaseMemoryLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +
> +#include <Protocol/DriverBinding.h>
> +
> +#include "I2cDxe.h"
> +
> +/**
> +  Tests to see if this driver supports a given controller.
> +
> +  @param  This[in]                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL
> +                                   instance.
> +  @param  ControllerHandle[in]     The handle of the controller to test.
> +  @param  RemainingDevicePath[in]  The remaining device path.
> +                                   (Ignored - this is not a bus driver.)
> +
> +  @retval EFI_SUCCESS              The driver supports this controller.
> +  @retval EFI_ALREADY_STARTED      The device specified by ControllerHandle is
> +                                   already being managed by the driver specified
> +                                   by This.
> +  @retval EFI_UNSUPPORTED          The device specified by ControllerHandle is
> +                                   not supported by the driver specified by This.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +NxpI2cDriverBindingSupported (
> +  IN EFI_DRIVER_BINDING_PROTOCOL  *This,
> +  IN EFI_HANDLE                   ControllerHandle,
> +  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath
> +  )
> +{
> +  NON_DISCOVERABLE_DEVICE    *Dev;
> +  EFI_STATUS                 Status;
> +
> +  //
> +  //  Connect to the non-discoverable device
> +  //
> +  Status = gBS->OpenProtocol (ControllerHandle,
> +                              &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                              (VOID **) &Dev,
> +                              This->DriverBindingHandle,
> +                              ControllerHandle,
> +                              EFI_OPEN_PROTOCOL_BY_DRIVER);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  if (CompareGuid (Dev->Type, &gNxpNonDiscoverableI2cMasterGuid)) {
> +    Status = EFI_SUCCESS;
> +  } else {
> +    Status = EFI_UNSUPPORTED;
> +  }
> +
> +  //
> +  // Clean up.
> +  //
> +  gBS->CloseProtocol (ControllerHandle,
> +                      &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                      This->DriverBindingHandle,
> +                      ControllerHandle);
> +
> +  return Status;
> +}
> +
> +
> +/**
> +  Starts a device controller or a bus controller.
> +
> +  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL
> +                                   instance.
> +  @param[in]  ControllerHandle     The handle of the device to start. This
> +                                   handle must support a protocol interface that
> +                                   supplies an I/O abstraction to the driver.
> +  @param[in]  RemainingDevicePath  The remaining portion of the device path.
> +                                   (Ignored - this is not a bus driver.)
> +
> +  @retval EFI_SUCCESS              The device was started.
> +  @retval EFI_DEVICE_ERROR         The device could not be started due to a
> +                                   device error.
> +  @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a
> +                                   lack of resources.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +NxpI2cDriverBindingStart (
> +  IN EFI_DRIVER_BINDING_PROTOCOL  *This,
> +  IN EFI_HANDLE                   ControllerHandle,
> +  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL
> +  )
> +{
> +  return NxpI2cInit (This->DriverBindingHandle, ControllerHandle);
> +}
> +
> +
> +/**
> +  Stops a device controller or a bus controller.
> +
> +  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL
> +                                instance.
> +  @param[in]  ControllerHandle  A handle to the device being stopped. The handle
> +                                must support a bus specific I/O protocol for the
> +                                driver to use to stop the device.
> +  @param[in]  NumberOfChildren  The number of child device handles in
> +                                ChildHandleBuffer.
> +  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be
> +                                NULL if NumberOfChildren is 0.
> +
> +  @retval EFI_SUCCESS           The device was stopped.
> +  @retval EFI_DEVICE_ERROR      The device could not be stopped due to a device
> +                                error.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +NxpI2cDriverBindingStop (
> +  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,
> +  IN  EFI_HANDLE                  ControllerHandle,
> +  IN  UINTN                       NumberOfChildren,
> +  IN  EFI_HANDLE                  *ChildHandleBuffer OPTIONAL
> +  )
> +{
> +  return NxpI2cRelease (This->DriverBindingHandle, ControllerHandle);
> +}
> +
> +
> +STATIC EFI_DRIVER_BINDING_PROTOCOL  gNxpI2cDriverBinding = {
> +  NxpI2cDriverBindingSupported,
> +  NxpI2cDriverBindingStart,
> +  NxpI2cDriverBindingStop,
> +  0xa,
> +  NULL,
> +  NULL
> +};
> +
> +
> +/**
> +  The entry point of I2c UEFI Driver.
> +
> +  @param  ImageHandle                The image handle of the UEFI Driver.
> +  @param  SystemTable                A pointer to the EFI System Table.
> +
> +  @retval  EFI_SUCCESS               The Driver or UEFI Driver exited normally.
> +  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than
> +                                     SystemTable->Hdr.Revision.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +I2cDxeEntryPoint (
> +  IN  EFI_HANDLE          ImageHandle,
> +  IN  EFI_SYSTEM_TABLE    *SystemTable
> +  )
> +{
> +  EFI_STATUS    Status;
> +
> +  //
> +  //  Add the driver to the list of drivers
> +  //
> +  Status = EfiLibInstallDriverBindingComponentName2 (
> +             ImageHandle, SystemTable, &gNxpI2cDriverBinding, ImageHandle,
> +             NULL, &gNxpI2cDriverComponentName2);
> +  ASSERT_EFI_ERROR (Status);
> +
> +  return EFI_SUCCESS;
> +}
> +
> +
> +/**
> +  Unload function for the I2c UEFI Driver.
> +
> +  @param  ImageHandle[in]        The allocated handle for the EFI image
> +
> +  @retval EFI_SUCCESS            The driver was unloaded successfully
> +  @retval EFI_INVALID_PARAMETER  ImageHandle is not a valid image handle.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +I2cDxeUnload (
> +  IN EFI_HANDLE  ImageHandle
> +  )
> +{
> +  EFI_STATUS  Status;
> +  EFI_HANDLE  *HandleBuffer;
> +  UINTN       HandleCount;
> +  UINTN       Index;
> +
> +  //
> +  // Retrieve all USB I/O handles in the handle database
> +  //
> +  Status = gBS->LocateHandleBuffer (ByProtocol,
> +                                    &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                                    NULL,
> +                                    &HandleCount,
> +                                    &HandleBuffer);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  //
> +  // Disconnect the driver from the handles in the handle database
> +  //
> +  for (Index = 0; Index < HandleCount; Index++) {
> +    Status = gBS->DisconnectController (HandleBuffer[Index],
> +                                        gImageHandle,
> +                                        NULL);
> +  }
> +
> +  //
> +  // Free the handle array
> +  //
> +  gBS->FreePool (HandleBuffer);
> +
> +  //
> +  // Uninstall protocols installed by the driver in its entrypoint
> +  //
> +  Status = gBS->UninstallMultipleProtocolInterfaces (ImageHandle,
> +                  &gEfiDriverBindingProtocolGuid,
> +                  &gNxpI2cDriverBinding,
> +                  NULL
> +                  );
> +
> +  return EFI_SUCCESS;
> +}
> diff --git a/Silicon/NXP/Drivers/I2cDxe/I2cDxe.c b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.c
> new file mode 100644
> index 0000000..08aae72
> --- /dev/null
> +++ b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.c
> @@ -0,0 +1,693 @@
> +/** I2cDxe.c
> +  I2c driver APIs for read, write, initialize, set speed and reset
> +
> +  Copyright 2017 NXP
> +
> +  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 <Library/BaseMemoryLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/DevicePathLib.h>
> +#include <Library/IoLib.h>
> +#include <Library/MemoryAllocationLib.h>
> +#include <Library/TimerLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +#include <Library/UefiLib.h>
> +
> +#include "I2cDxe.h"
> +
> +STATIC CONST UINT16 ClkDiv[60][2] = {

m-prefix please.
Also, could you rework this slightly as a

STATIC CONST STRUCT {
  UINT16 <something>;
  UINT16 <something else>;
} mClkDiv = { {..., ...},
......
};

?

> +  { 20,  0x00 }, { 22, 0x01 },  { 24, 0x02 },  { 26, 0x03 },
> +  { 28,  0x04 }, { 30,  0x05 }, { 32,  0x09 }, { 34, 0x06 },
> +  { 36,  0x0A }, { 40, 0x07 },  { 44, 0x0C },  { 48, 0x0D },
> +  { 52,  0x43 }, { 56,  0x0E }, { 60, 0x45 },  { 64, 0x12 },
> +  { 68,  0x0F }, { 72,  0x13 }, { 80,  0x14 }, { 88,  0x15 },
> +  { 96,  0x19 }, { 104, 0x16 }, { 112, 0x1A }, { 128, 0x17 },
> +  { 136, 0x4F }, { 144, 0x1C }, { 160, 0x1D }, { 176, 0x55 },
> +  { 192, 0x1E }, { 208, 0x56 }, { 224, 0x22 }, { 228, 0x24 },
> +  { 240, 0x1F }, { 256, 0x23 }, { 288, 0x5C }, { 320, 0x25 },
> +  { 384, 0x26 }, { 448, 0x2A }, { 480, 0x27 }, { 512, 0x2B },
> +  { 576, 0x2C }, { 640, 0x2D }, { 768, 0x31 }, { 896, 0x32 },
> +  { 960, 0x2F }, { 1024, 0x33 }, { 1152, 0x34 },{ 1280, 0x35 },
> +  { 1536, 0x36 }, { 1792, 0x3A }, { 1920, 0x37 }, { 2048, 0x3B },
> +  { 2304, 0x3C }, { 2560, 0x3D }, { 3072, 0x3E }, { 3584, 0x7A },
> +  { 3840, 0x3F }, { 4096, 0x7B }, { 5120, 0x7D }, { 6144, 0x7E },
> +};
> +
> +/**
> +  Calculate and return proper clock divider
> +
> +  @param  Rate       clock rate

Desired clock rate or current clock rate?

> +
> +  @retval ClkDiv     Value used to get frequency divider value

Does this mean the register configuration value?
(I think the rework I propose above would help clarify this.)

> +
> +**/
> +STATIC
> +UINT8
> +GetClkDiv (

GetClkDivIndex?

> +  IN  UINT32         Rate
> +  )
> +{
> +  UINTN              ClkRate;
> +  UINT32             Div;
> +  UINT8              ClkDivx;

I don't understand what ClkDivx is - index?

> +
> +  ClkRate = GetBusFrequency ();
> +
> +  Div = (ClkRate + Rate - 1) / Rate;
> +
> +  if (Div < ClkDiv[0][0]) {
> +    ClkDivx = 0;
> +  } else if (Div > ClkDiv[ARRAY_SIZE (ClkDiv) - 1][0]){
> +    ClkDivx = ARRAY_SIZE (ClkDiv) - 1;
> +  } else {
> +    for (ClkDivx = 0; ClkDiv[ClkDivx][0] < Div; ClkDivx++);
> +  }
> +
> +  return ClkDivx;


With that restructuring, this code could be changed to something like

  UINT8 Index;
  Index = 0;

  if (Div < *mClkDiv.<something>) {
    return 0;
  }

  do {
    if (mClkDiv[Index].<something> >= Div) {
      return Index;
    }
    Index++;
  } while (Index < ARRAY_SIZE (mClkDiv));

  return ARRAY_SIZE (mClkDiv) - 1;

which is easier for at least me to read.

(I've not tested the above, and I might have got a comparison wrong
somewhere, but you get the idea.)

> +}
> +
> +/**
> +  Function used to check if i2c is in mentioned state or not
> +
> +  @param   I2cRegs        Pointer to I2C registers
> +  @param   State          i2c state need to be checked
> +
> +  @retval  EFI_NOT_READY  Arbitration was lost
> +  @retval  EFI_TIMEOUT    Timeout occured
> +  @retval  CurrState      Value of state register
> +
> +**/
> +STATIC
> +EFI_STATUS
> +WaitForI2cState (
> +  IN  I2C_REGS            *I2cRegs,
> +  IN  UINT32              State
> +  )
> +{
> +  UINT8                   CurrState;
> +  UINT64                  Cnt;

Cnt -> Count

> +
> +  for (Cnt = 0; Cnt < 50000; Cnt++) {

Could you add a #define for that 50000?
Presumably <something>_RETRIES?

> +    MemoryFence ();
> +    CurrState = MmioRead8 ((UINTN)&I2cRegs->I2cSr);
> +    if (CurrState & I2C_SR_IAL) {
> +       MmioWrite8 ((UINTN)&I2cRegs->I2cSr, CurrState | I2C_SR_IAL);
> +        return EFI_NOT_READY;
> +    }
> +
> +    if ((CurrState & (State >> 8)) == (UINT8)State) {
> +      return CurrState;
> +    }
> +  }
> +
> +  return EFI_TIMEOUT;
> +}
> +
> +/**
> +  Function to transfer byte on i2c
> +
> +  @param   I2cRegs        Pointer to i2c registers
> +  @param   Byte           Byte to be transferred on i2c bus
> +
> +  @retval  EFI_NOT_READY  Arbitration was lost
> +  @retval  EFI_TIMEOUT    Timeout occured
> +  @retval  EFI_NOT_FOUND  ACK was not recieved
> +  @retval  EFI_SUCCESS    Data transfer was succesful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +TransferByte (
> +  IN  I2C_REGS            *I2cRegs,
> +  IN  UINT8               Byte
> +  )
> +{
> +  EFI_STATUS              Ret;

Ret -> RetVal

> +
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cSr, I2C_SR_IIF_CLEAR);
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cDr, Byte);
> +
> +  Ret = WaitForI2cState (I2cRegs, IIF);
> +  if ((Ret == EFI_TIMEOUT) || (Ret == EFI_NOT_READY)) {
> +    return Ret;
> +  }
> +
> +  if (Ret & I2C_SR_RX_NO_AK) {
> +    return EFI_NOT_FOUND;
> +  }
> +
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Function to stop transaction on i2c bus
> +
> +  @param   I2cRegs          Pointer to i2c registers
> +
> +  @retval  EFI_NOT_READY    Arbitration was lost
> +  @retval  EFI_TIMEOUT      Timeout occured
> +  @retval  EFI_SUCCESS      Stop operation was successful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +I2cStop (
> +  IN  I2C_REGS             *I2cRegs
> +  )
> +{
> +  INT32                    Ret;

Ret -> RetVal.
EFI_STATUS.

(Can you please change these throughout - it's more edk2 idiomatic.)

> +  UINT32                   Temp;
> +
> +  Temp = MmioRead8 ((UINTN)&I2cRegs->I2cCr);
> +
> +  Temp &= ~(I2C_CR_MSTA | I2C_CR_MTX);
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +
> +  Ret = WaitForI2cState (I2cRegs, BUS_IDLE);
> +
> +  if (Ret < 0) {
> +    return Ret;
> +  } else {
> +    return EFI_SUCCESS;
> +  }
> +}
> +
> +/**
> +  Function to send start signal, Chip Address and
> +  memory offset
> +
> +  @param   I2cRegs         Pointer to i2c base registers
> +  @param   Chip            Chip Address
> +  @param   Offset          Slave memory's offset
> +  @param   Alen            length of chip address
> +
> +  @retval  EFI_NOT_READY   Arbitration lost
> +  @retval  EFI_TIMEOUT     Failed to initialize data transfer in predefined time
> +  @retval  EFI_NOT_FOUND   ACK was not recieved
> +  @retval  EFI_SUCCESS     Read was successful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +InitTransfer (
> +  IN  I2C_REGS             *I2cRegs,
> +  IN  UINT8                Chip,
> +  IN  UINT32               Offset,
> +  IN  INT32                Alen

AddressLength?

> +  )
> +{
> +  UINT32                   Temp;
> +  EFI_STATUS               Ret;
> +
> +  // Enable I2C controller
> +  if (MmioRead8 ((UINTN)&I2cRegs->I2cCr) & I2C_CR_IDIS) {
> +    MmioWrite8 ((UINTN)&I2cRegs->I2cCr, I2C_CR_IEN);
> +  }
> +
> +  if (MmioRead8 ((UINTN)&I2cRegs->I2cAdr) == (Chip << 1)) {
> +    MmioWrite8 ((UINTN)&I2cRegs->I2cAdr, (Chip << 1) ^ 2);
> +  }
> +
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cSr, I2C_SR_IIF_CLEAR);
> +  Ret = WaitForI2cState (I2cRegs, BUS_IDLE);
> +  if ((Ret == EFI_TIMEOUT) || (Ret == EFI_NOT_READY)) {
> +    return Ret;
> +  }
> +
> +  // Start I2C transaction
> +  Temp = MmioRead8 ((UINTN)&I2cRegs->I2cCr);
> +  // set to master mode
> +  Temp |= I2C_CR_MSTA;
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +
> +  Ret = WaitForI2cState (I2cRegs, BUS_BUSY);
> +  if ((Ret == EFI_TIMEOUT) || (Ret == EFI_NOT_READY)) {
> +    return Ret;
> +  }
> +
> +  Temp |= I2C_CR_MTX | I2C_CR_TX_NO_AK;
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +
> +  // write slave Address
> +  Ret = TransferByte (I2cRegs, Chip << 1);
> +  if (Ret != EFI_SUCCESS) {
> +    return Ret;
> +  }
> +
> +  if (Alen >= 0) {
> +    while (Alen--) {
> +      Ret = TransferByte (I2cRegs, (Offset >> (Alen * 8)) & 0xff);
> +      if (Ret != EFI_SUCCESS)
> +        return Ret;
> +    }
> +  }
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Function to check if i2c bus is idle
> +
> +  @param   Base          Pointer to base address of I2c controller
> +
> +  @retval  EFI_SUCCESS
> +
> +**/
> +STATIC
> +INT32
> +I2cBusIdle (
> +  IN  VOID               *Base
> +  )
> +{
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Function to initiate data transfer on i2c bus
> +
> +  @param   I2cRegs         Pointer to i2c base registers
> +  @param   Chip            Chip Address
> +  @param   Offset          Slave memory's offset
> +  @param   Alen            length of chip address
> +
> +  @retval  EFI_NOT_READY   Arbitration lost
> +  @retval  EFI_TIMEOUT     Failed to initialize data transfer in predefined time
> +  @retval  EFI_NOT_FOUND   ACK was not recieved
> +  @retval  EFI_SUCCESS     Read was successful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +InitDataTransfer (
> +  IN  I2C_REGS             *I2cRegs,
> +  IN  UINT8                Chip,
> +  IN  UINT32               Offset,
> +  IN  INT32                Alen

AddressLength?
(Please update throughout.)

> +  )
> +{
> +  EFI_STATUS               Status;

Hmm ... actually, could you please align these throughout the patch.
I don't really care whether it's RetVal or Status - but I would like
for it to be consistent within any given module.

> +  INT32                    Retry;
> +
> +  for (Retry = 0; Retry < 3; Retry++) {

A #define for that 3?

No more comments for this patch.

Regards,

Leif

> +    Status = InitTransfer (I2cRegs, Chip, Offset, Alen);
> +    if (Status == EFI_SUCCESS) {
> +      return EFI_SUCCESS;
> +    }
> +
> +    I2cStop (I2cRegs);
> +
> +    if (EFI_NOT_FOUND == Status) {
> +      return Status;
> +    }
> +
> +    // Disable controller
> +    if (Status != EFI_NOT_READY) {
> +      MmioWrite8 ((UINTN)&I2cRegs->I2cCr, I2C_CR_IDIS);
> +    }
> +
> +    if (I2cBusIdle (I2cRegs) < 0) {
> +      break;
> +    }
> +  }
> +  return Status;
> +}
> +
> +/**
> +  Function to read data using i2c bus
> +
> +  @param   BaseAddr        I2c Controller Base Address
> +  @param   Chip            Address of slave device from where data to be read
> +  @param   Offset          Offset of slave memory
> +  @param   Alen            Address length of slave
> +  @param   Buffer          A pointer to the destination buffer for the data
> +  @param   Len             Length of data to be read
> +
> +  @retval  EFI_NOT_READY   Arbitration lost
> +  @retval  EFI_TIMEOUT     Failed to initialize data transfer in predefined time
> +  @retval  EFI_NOT_FOUND   ACK was not recieved
> +  @retval  EFI_SUCCESS     Read was successful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +I2cDataRead (
> +  IN  UINTN                BaseAddr,
> +  IN  UINT8                Chip,
> +  IN  UINT32               Offset,
> +  IN  UINT32               Alen,
> +  IN  UINT8                *Buffer,
> +  IN  UINT32               Len
> +  )
> +{
> +  EFI_STATUS               Status;
> +  UINT32                   Temp;
> +  INT32                    I;
> +  I2C_REGS                 *I2cRegs;
> +
> +  I2cRegs = (I2C_REGS *)(BaseAddr);
> +
> +  Status = InitDataTransfer (I2cRegs, Chip, Offset, Alen);
> +  if (Status != EFI_SUCCESS) {
> +    return Status;
> +  }
> +
> +  Temp = MmioRead8 ((UINTN)&I2cRegs->I2cCr);
> +  Temp |= I2C_CR_RSTA;
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +
> +  Status = TransferByte (I2cRegs, (Chip << 1) | 1);
> +  if (Status != EFI_SUCCESS) {
> +    I2cStop (I2cRegs);
> +    return Status;
> +  }
> +
> +  // setup bus to read data
> +  Temp = MmioRead8 ((UINTN)&I2cRegs->I2cCr);
> +  Temp &= ~(I2C_CR_MTX | I2C_CR_TX_NO_AK);
> +  if (Len == 1) {
> +    Temp |= I2C_CR_TX_NO_AK;
> +  }
> +
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cSr, I2C_SR_IIF_CLEAR);
> +
> +  // Dummy Read to initiate recieve operation
> +  MmioRead8 ((UINTN)&I2cRegs->I2cDr);
> +
> +  for (I = 0; I < Len; I++) {
> +    Status = WaitForI2cState (I2cRegs, IIF);
> +    if ((Status == EFI_TIMEOUT) || (Status == EFI_NOT_READY)) {
> +       I2cStop (I2cRegs);
> +       return Status;
> +    }
> +    //
> +    // It must generate STOP before read I2DR to prevent
> +    // controller from generating another clock cycle
> +    //
> +    if (I == (Len - 1)) {
> +      I2cStop (I2cRegs);
> +    } else if (I == (Len - 2)) {
> +      Temp = MmioRead8 ((UINTN)&I2cRegs->I2cCr);
> +      Temp |= I2C_CR_TX_NO_AK;
> +      MmioWrite8 ((UINTN)&I2cRegs->I2cCr, Temp);
> +    }
> +    MmioWrite8 ((UINTN)&I2cRegs->I2cSr, I2C_SR_IIF_CLEAR);
> +    Buffer[I] = MmioRead8 ((UINTN)&I2cRegs->I2cDr);
> +  }
> +
> +  I2cStop (I2cRegs);
> +
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Function to write data using i2c bus
> +
> +  @param   BaseAddr        I2c Controller Base Address
> +  @param   Chip            Address of slave device where data to be written
> +  @param   Offset          Offset of slave memory
> +  @param   Alen            Address length of slave
> +  @param   Buffer          A pointer to the source buffer for the data
> +  @param   Len             Length of data to be write
> +
> +  @retval  EFI_NOT_READY   Arbitration lost
> +  @retval  EFI_TIMEOUT     Failed to initialize data transfer in predefined time
> +  @retval  EFI_NOT_FOUND   ACK was not recieved
> +  @retval  EFI_SUCCESS     Read was successful
> +
> +**/
> +STATIC
> +EFI_STATUS
> +I2cDataWrite (
> +  IN  UINTN                BaseAddr,
> +  IN  UINT8                Chip,
> +  IN  UINT32               Offset,
> +  IN  INT32                Alen,
> +  OUT UINT8                *Buffer,
> +  IN  INT32                Len
> +  )
> +{
> +  EFI_STATUS               Status;
> +  I2C_REGS                 *I2cRegs;
> +  INT32                    I;
> +
> +  I2cRegs = (I2C_REGS *)BaseAddr;
> +
> +  Status = InitDataTransfer (I2cRegs, Chip, Offset, Alen);
> +  if (Status != EFI_SUCCESS) {
> +    return Status;
> +  }
> +
> +  // Write operation
> +  for (I = 0; I < Len; I++) {
> +    Status = TransferByte (I2cRegs, Buffer[I]);
> +    if (Status != EFI_SUCCESS) {
> +      break;
> +    }
> +  }
> +
> +  I2cStop (I2cRegs);
> +  return Status;
> +}
> +
> +/**
> +  Function to set i2c bus frequency
> +
> +  @param   This            Pointer to I2c master protocol
> +  @param   BusClockHertz   value to be set
> +
> +  @retval EFI_SUCCESS      Operation successfull
> +**/
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +SetBusFrequency (
> +  IN CONST EFI_I2C_MASTER_PROTOCOL   *This,
> +  IN OUT UINTN                       *BusClockHertz
> + )
> +{
> +  I2C_REGS                 *I2cRegs;
> +  UINT8                    ClkId;
> +  UINT8                    SpeedId;
> +  NXP_I2C_MASTER           *I2c;
> +
> +  I2c = NXP_I2C_FROM_THIS (This);
> +
> +  I2cRegs = (I2C_REGS *)(I2c->Dev->Resources[0].AddrRangeMin);
> +
> +  ClkId = GetClkDiv (*BusClockHertz);
> +  SpeedId = ClkDiv[ClkId][1];
> +
> +  // Store divider value
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cFdr, SpeedId);
> +
> +  MemoryFence ();
> +
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Function to reset I2c Controller
> +
> +  @param  This             Pointer to I2c master protocol
> +
> +  @return EFI_SUCCESS      Operation successfull
> +**/
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +Reset (
> +  IN CONST EFI_I2C_MASTER_PROTOCOL *This
> +  )
> +{
> +  I2C_REGS                         *I2cRegs;
> +  NXP_I2C_MASTER                   *I2c;
> +
> +  I2c = NXP_I2C_FROM_THIS (This);
> +
> +  I2cRegs = (I2C_REGS *)(I2c->Dev->Resources[0].AddrRangeMin);
> +
> +  // Reset module
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cCr, I2C_CR_IDIS);
> +  MmioWrite8 ((UINTN)&I2cRegs->I2cSr, 0);
> +
> +  MemoryFence ();
> +
> +  return EFI_SUCCESS;
> +}
> +
> +STATIC
> +EFI_STATUS
> +EFIAPI
> +StartRequest (
> +  IN CONST EFI_I2C_MASTER_PROTOCOL *This,
> +  IN UINTN                         SlaveAddress,
> +  IN EFI_I2C_REQUEST_PACKET        *RequestPacket,
> +  IN EFI_EVENT                     Event            OPTIONAL,
> +  OUT EFI_STATUS                   *I2cStatus       OPTIONAL
> +  )
> +{
> +  NXP_I2C_MASTER                   *I2c;
> +  UINT32                           Count;
> +  INT32                            Ret;
> +  UINT32                           Length;
> +  UINT8                            *Buffer;
> +  UINT32                           Flag;
> +  UINT32                           RegAddress;
> +  UINT32                           OffsetLength;
> +
> +  RegAddress = 0;
> +
> +  I2c = NXP_I2C_FROM_THIS (This);
> +
> +  if (RequestPacket->OperationCount <= 0) {
> +    DEBUG ((DEBUG_ERROR,"%a: Operation count is not valid %d\n",
> +           __FUNCTION__, RequestPacket->OperationCount));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +
> +  OffsetLength = RequestPacket->Operation[0].LengthInBytes;
> +  RegAddress = *RequestPacket->Operation[0].Buffer;
> +
> +  for (Count = 1; Count < RequestPacket->OperationCount; Count++) {
> +    Flag = RequestPacket->Operation[Count].Flags;
> +    Length = RequestPacket->Operation[Count].LengthInBytes;
> +    Buffer = RequestPacket->Operation[Count].Buffer;
> +
> +    if (Length <= 0) {
> +      DEBUG ((DEBUG_ERROR,"%a: Invalid length of buffer %d\n",
> +             __FUNCTION__, Length));
> +      return EFI_INVALID_PARAMETER;
> +    }
> +
> +    if (Flag == I2C_FLAG_READ) {
> +      Ret = I2cDataRead (I2c->Dev->Resources[0].AddrRangeMin, SlaveAddress,
> +              RegAddress, OffsetLength, Buffer, Length);
> +      if (Ret != EFI_SUCCESS) {
> +        DEBUG ((DEBUG_ERROR,"%a: I2c read operation failed (error %d)\n",
> +               __FUNCTION__, Ret));
> +        return Ret;
> +      }
> +    } else if (Flag == I2C_FLAG_WRITE) {
> +      Ret = I2cDataWrite (I2c->Dev->Resources[0].AddrRangeMin, SlaveAddress,
> +              RegAddress, OffsetLength, Buffer, Length);
> +      if (Ret != EFI_SUCCESS) {
> +        DEBUG ((DEBUG_ERROR,"%a: I2c write operation failed (error %d)\n",
> +               __FUNCTION__, Ret));
> +        return Ret;
> +      }
> +    } else {
> +      DEBUG ((DEBUG_ERROR,"%a: Invalid Flag %d\n",
> +             __FUNCTION__, Flag));
> +      return EFI_INVALID_PARAMETER;
> +    }
> +  }
> +
> +  return EFI_SUCCESS;
> +}
> +
> +STATIC CONST EFI_I2C_CONTROLLER_CAPABILITIES I2cControllerCapabilities = {
> +  0,
> +  0,
> +  0,
> +  0
> +};
> +
> +EFI_STATUS
> +NxpI2cInit (
> +  IN EFI_HANDLE             DriverBindingHandle,
> +  IN EFI_HANDLE             ControllerHandle
> +  )
> +{
> +  EFI_STATUS                Status;
> +  NON_DISCOVERABLE_DEVICE   *Dev;
> +  NXP_I2C_MASTER            *I2c;
> +
> +  Status = gBS->OpenProtocol (ControllerHandle,
> +                              &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                              (VOID **)&Dev, DriverBindingHandle,
> +                              ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  I2c = AllocateZeroPool (sizeof (NXP_I2C_MASTER));
> +
> +  I2c->Signature                            = NXP_I2C_SIGNATURE;
> +  I2c->I2cMaster.SetBusFrequency            = SetBusFrequency;
> +  I2c->I2cMaster.Reset                      = Reset;
> +  I2c->I2cMaster.StartRequest               = StartRequest;
> +  I2c->I2cMaster.I2cControllerCapabilities  = &I2cControllerCapabilities;
> +  I2c->Dev                                  = Dev;
> +
> +  CopyGuid (&I2c->DevicePath.Vendor.Guid, &gEfiCallerIdGuid);
> +  I2c->DevicePath.MmioBase = I2c->Dev->Resources[0].AddrRangeMin;
> +  SetDevicePathNodeLength (&I2c->DevicePath.Vendor,
> +    sizeof (I2c->DevicePath) - sizeof (I2c->DevicePath.End));
> +  SetDevicePathEndNode (&I2c->DevicePath.End);
> +
> +  Status = gBS->InstallMultipleProtocolInterfaces (&ControllerHandle,
> +                  &gEfiI2cMasterProtocolGuid, (VOID**)&I2c->I2cMaster,
> +                  &gEfiDevicePathProtocolGuid, &I2c->DevicePath,
> +                  NULL);
> +
> +  if (EFI_ERROR (Status)) {
> +    FreePool (I2c);
> +    gBS->CloseProtocol (ControllerHandle,
> +                        &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                        DriverBindingHandle,
> +                        ControllerHandle);
> +  }
> +
> +  return Status;
> +}
> +
> +EFI_STATUS
> +NxpI2cRelease (
> +  IN EFI_HANDLE                 DriverBindingHandle,
> +  IN EFI_HANDLE                 ControllerHandle
> +  )
> +{
> +  EFI_I2C_MASTER_PROTOCOL       *I2cMaster;
> +  EFI_STATUS                    Status;
> +  NXP_I2C_MASTER                *I2c;
> +
> +  Status = gBS->HandleProtocol (ControllerHandle,
> +                                &gEfiI2cMasterProtocolGuid,
> +                                (VOID **)&I2cMaster);
> +  ASSERT_EFI_ERROR (Status);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  I2c = NXP_I2C_FROM_THIS (I2cMaster);
> +
> +  Status = gBS->UninstallMultipleProtocolInterfaces (ControllerHandle,
> +                  &gEfiI2cMasterProtocolGuid, I2cMaster,
> +                  &gEfiDevicePathProtocolGuid, &I2c->DevicePath,
> +                  NULL);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  Status = gBS->CloseProtocol (ControllerHandle,
> +                               &gEdkiiNonDiscoverableDeviceProtocolGuid,
> +                               DriverBindingHandle,
> +                               ControllerHandle);
> +  ASSERT_EFI_ERROR (Status);
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  gBS->FreePool (I2c);
> +
> +  return EFI_SUCCESS;
> +}
> diff --git a/Silicon/NXP/Drivers/I2cDxe/I2cDxe.h b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.h
> new file mode 100644
> index 0000000..01eeca4
> --- /dev/null
> +++ b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.h
> @@ -0,0 +1,96 @@
> +/** I2cDxe.h
> +  Header defining the constant, base address amd function for I2C controller
> +
> +  Copyright 2017 NXP
> +
> +  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.
> +
> +**/
> +
> +#ifndef __I2C_DXE_H__
> +#define __I2C_DXE_H__
> +
> +#include <Library/UefiLib.h>
> +#include <Uefi.h>
> +
> +#include <Protocol/I2cMaster.h>
> +#include <Protocol/NonDiscoverableDevice.h>
> +
> +#define I2C_CR_IIEN           (1 << 6)
> +#define I2C_CR_MSTA           (1 << 5)
> +#define I2C_CR_MTX            (1 << 4)
> +#define I2C_CR_TX_NO_AK       (1 << 3)
> +#define I2C_CR_RSTA           (1 << 2)
> +
> +#define I2C_SR_ICF            (1 << 7)
> +#define I2C_SR_IBB            (1 << 5)
> +#define I2C_SR_IAL            (1 << 4)
> +#define I2C_SR_IIF            (1 << 1)
> +#define I2C_SR_RX_NO_AK       (1 << 0)
> +
> +#define I2C_CR_IEN            (0 << 7)
> +#define I2C_CR_IDIS           (1 << 7)
> +#define I2C_SR_IIF_CLEAR      (1 << 1)
> +
> +#define BUS_IDLE              (0 | (I2C_SR_IBB << 8))
> +#define BUS_BUSY              (I2C_SR_IBB | (I2C_SR_IBB << 8))
> +#define IIF                   (I2C_SR_IIF | (I2C_SR_IIF << 8))
> +
> +#define I2C_FLAG_WRITE        0x0
> +
> +#define NXP_I2C_SIGNATURE         SIGNATURE_32 ('N', 'I', '2', 'C')
> +#define NXP_I2C_FROM_THIS(a)      CR ((a), NXP_I2C_MASTER, \
> +                                      I2cMaster, NXP_I2C_SIGNATURE)
> +extern EFI_COMPONENT_NAME2_PROTOCOL gNxpI2cDriverComponentName2;
> +
> +#pragma pack(1)
> +typedef struct {
> +  VENDOR_DEVICE_PATH              Vendor;
> +  UINT64                          MmioBase;
> +  EFI_DEVICE_PATH_PROTOCOL        End;
> +} NXP_I2C_DEVICE_PATH;
> +#pragma pack()
> +
> +typedef struct {
> +  UINT32                          Signature;
> +  EFI_I2C_MASTER_PROTOCOL         I2cMaster;
> +  NXP_I2C_DEVICE_PATH             DevicePath;
> +  NON_DISCOVERABLE_DEVICE         *Dev;
> +} NXP_I2C_MASTER;
> +
> +/**
> +  Record defining i2c registers
> +**/
> +typedef struct {
> +  UINT8     I2cAdr;
> +  UINT8     I2cFdr;
> +  UINT8     I2cCr;
> +  UINT8     I2cSr;
> +  UINT8     I2cDr;
> +} I2C_REGS ;
> +
> +extern
> +UINT64
> +GetBusFrequency (
> +  VOID
> +  );
> +
> +EFI_STATUS
> +NxpI2cInit (
> +  IN EFI_HANDLE  DriverBindingHandle,
> +  IN EFI_HANDLE  ControllerHandle
> +  );
> +
> +EFI_STATUS
> +NxpI2cRelease (
> +  IN EFI_HANDLE  DriverBindingHandle,
> +  IN EFI_HANDLE  ControllerHandle
> +  );
> +
> +#endif
> diff --git a/Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf
> new file mode 100644
> index 0000000..0691362
> --- /dev/null
> +++ b/Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf
> @@ -0,0 +1,64 @@
> +#  @file
> +#
> +#  Component description file for I2c driver
> +#
> +#  Copyright (c) 2015, Freescale Semiconductor, Inc. All rights reserved.
> +#  Copyright 2017 NXP
> +#
> +#  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                      = I2cDxe
> +  FILE_GUID                      = 5f2927ba-1b04-4d5f-8bef-2b50c635d1e7
> +  MODULE_TYPE                    = DXE_DRIVER
> +  VERSION_STRING                 = 1.0
> +  ENTRY_POINT                    = I2cDxeEntryPoint
> +  UNLOAD                         = I2cDxeUnload
> +
> +[Sources.common]
> +  ComponentName.c
> +  DriverBinding.c
> +  I2cDxe.c
> +
> +[LibraryClasses]
> +  ArmLib
> +  BaseMemoryLib
> +  DevicePathLib
> +  IoLib
> +  MemoryAllocationLib
> +  PcdLib
> +  SocLib
> +  TimerLib
> +  UefiBootServicesTableLib
> +  UefiDriverEntryPoint
> +  UefiLib
> +
> +[Guids]
> +  gNxpNonDiscoverableI2cMasterGuid
> +
> +[Packages]
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  Silicon/NXP/NxpQoriqLs.dec
> +
> +[Protocols]
> +  gEdkiiNonDiscoverableDeviceProtocolGuid    ## TO_START
> +  gEfiI2cMasterProtocolGuid                  ## BY_START
> +
> +[Pcd]
> +  gNxpQoriqLsTokenSpaceGuid.PcdI2cSpeed
> +  gNxpQoriqLsTokenSpaceGuid.PcdI2c0BaseAddr
> +  gNxpQoriqLsTokenSpaceGuid.PcdI2cSize
> +  gNxpQoriqLsTokenSpaceGuid.PcdNumI2cController
> +
> +[Depex]
> +  TRUE
> -- 
> 1.9.1
> 


  reply	other threads:[~2018-12-18 17:25 UTC|newest]

Thread overview: 254+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16  8:49 [PATCH edk2-platforms 00/39] NXP: Add support of LS1043, LS1046 and LS2088 SoCs Meenakshi
2018-02-16  8:49 ` [PATCH edk2-platforms 01/39] Silicon/NXP: Add support for Big Endian Mmio APIs Meenakshi
2018-02-21 15:46   ` Leif Lindholm
2018-02-21 16:06     ` Laszlo Ersek
2018-02-21 18:58       ` Leif Lindholm
2018-02-22  4:45         ` Meenakshi Aggarwal
2018-02-22  8:34         ` Laszlo Ersek
2018-02-22 11:52           ` Leif Lindholm
2018-02-22 13:56             ` Laszlo Ersek
2018-02-23  8:40               ` Pankaj Bansal
2018-02-23  9:21                 ` Laszlo Ersek
2018-02-23  9:47                   ` Meenakshi Aggarwal
2018-02-23 10:17                     ` Laszlo Ersek
2018-02-23 10:39                   ` Udit Kumar
2018-02-23 10:59                     ` Laszlo Ersek
2018-02-23 11:04                       ` Pankaj Bansal
2018-02-23 11:22                         ` Laszlo Ersek
2018-02-23 11:48                           ` Pankaj Bansal
2018-02-23 15:17                             ` Laszlo Ersek
2018-02-23 11:21                       ` Udit Kumar
2018-02-23 10:25               ` Udit Kumar
2018-02-23 10:47                 ` Laszlo Ersek
2018-02-23 11:48                   ` Udit Kumar
2018-02-23 15:15                     ` Laszlo Ersek
2018-02-28 13:19                   ` Leif Lindholm
2018-02-22  4:49     ` Udit Kumar
2018-02-16  8:49 ` [PATCH edk2-platforms 02/39] Silicon/NXP : Add support for Watchdog driver Meenakshi
2018-02-16  8:49 ` [PATCH edk2-platforms 03/39] SocLib : Add support for initialization of peripherals Meenakshi
2018-04-18 15:12   ` Leif Lindholm
2018-04-18 16:38     ` Meenakshi Aggarwal
2018-04-18 18:15       ` Leif Lindholm
2018-04-19  4:59         ` Meenakshi Aggarwal
2018-02-16  8:50 ` [PATCH edk2-platforms 04/39] Silicon/NXP : Add support for DUART library Meenakshi
2018-04-18 15:15   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 05/39] Silicon/NXP: Add support for I2c driver Meenakshi
2018-04-17 16:36   ` Leif Lindholm
2018-04-23  8:21     ` Meenakshi Aggarwal
2018-04-23  8:38       ` Leif Lindholm
2018-04-23 10:34         ` Meenakshi Aggarwal
2018-04-23 13:39           ` Ard Biesheuvel
2018-04-23 15:50             ` Meenakshi Aggarwal
2018-04-23 15:53               ` Ard Biesheuvel
2018-02-16  8:50 ` [PATCH edk2-platforms 06/39] Silicon/Maxim : Add support for DS1307 RTC library Meenakshi
2018-04-18 15:27   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 07/39] Platform/NXP: Add support for ArmPlatformLib Meenakshi
2018-04-18 15:32   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 08/39] Compilation : Add the fdf, dsc and dec files Meenakshi
2018-04-18 15:38   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 09/39] Build : Add build script and environment script Meenakshi
2018-02-21 16:02   ` Leif Lindholm
2018-02-22  4:58     ` Meenakshi Aggarwal
2018-02-16  8:50 ` [PATCH edk2-platforms 10/39] IFC : Add Header file for IFC controller Meenakshi
2018-04-18 18:31   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 11/39] LS1043/BoardLib : Add support for LS1043 BoardLib Meenakshi
2018-04-18 18:34   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 12/39] Silicon/NXP : Add support of IfcLib Meenakshi
2018-04-18 18:39   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 13/39] LS1043/FpgaLib : Add support for FpgaLib Meenakshi
2018-04-18 18:43   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 14/39] LS1043 : Enable support of FpgaLib Meenakshi
2018-04-18 18:43   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 15/39] Silicon/NXP : Add support of NorFlashLib Meenakshi
2018-04-18 19:26   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 16/39] Silicon/NXP : Add NOR driver Meenakshi
2018-04-17 16:23   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 17/39] LS1043 : Enable NOR driver for LS1043aRDB package Meenakshi
2018-04-19  9:54   ` Leif Lindholm
2018-04-19 10:14     ` Meenakshi Aggarwal
2018-02-16  8:50 ` [PATCH edk2-platforms 18/39] Silicon/NXP:Add LS1046ARDB SoCLib Support Meenakshi
2018-04-19 10:00   ` Leif Lindholm
2018-04-19 10:05     ` Meenakshi Aggarwal
2018-04-19 10:20       ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for PCF2129 Real Time Clock Library Meenakshi
2018-04-19 10:11   ` Leif Lindholm
2018-04-19 12:33     ` Meenakshi Aggarwal
2018-04-19 13:47       ` Leif Lindholm
2018-04-20  3:20         ` Meenakshi Aggarwal
2018-02-16  8:50 ` [PATCH edk2-platforms 20/39] Platform/NXP: LS1046A RDB Board Library Meenakshi
2018-04-19 13:49   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 21/39] Platform/NXP: Add ArmPlatformLib for LS1046A Meenakshi
2018-04-19 13:53   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 22/39] Platform/NXP: LS1046 RDB Board FPGA library Meenakshi
2018-04-19 14:44   ` Leif Lindholm
2018-06-04  4:10     ` Meenakshi Aggarwal
2018-06-04  9:25       ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 23/39] Platform/NXP: Compilation for LS1046A RDB Board Meenakshi
2018-04-19 14:54   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 24/39] Silicon/NXP:SocLib support for initialization of peripherals Meenakshi
2018-04-19 15:20   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 25/39] Platform/NXP/LS2088aRdbPkg: ArmPlatformLib Support for LS2088ARDB Meenakshi
2018-04-19 15:59   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 26/39] Silicon/Maxim: DS3232 RTC Library Support Meenakshi
2018-04-19 16:02   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 27/39] Compilation : Add the fdf, dsc and dec files Meenakshi
2018-04-19 16:28   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 28/39] Platform/NXP: LS2088A RDB Board Library Meenakshi
2018-04-19 16:28   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 29/39] Platform/NXP: LS2088 RDB Board FPGA library Meenakshi
2018-04-19 16:30   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 30/39] LS2088 : Enable support of FpgaLib Meenakshi
2018-04-19 16:31   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 31/39] LS2088ARDB: Enable NOR driver and Runtime Services Meenakshi
2018-04-19 16:32   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 32/39] Silicon/NXP: Implement PciSegmentLib to support multiple RCs Meenakshi
2018-04-19 19:27   ` Leif Lindholm
2018-04-20  6:40     ` Vabhav Sharma
2018-04-20 12:41       ` Leif Lindholm
2018-04-24 12:30         ` Vabhav Sharma
2018-02-16  8:50 ` [PATCH edk2-platforms 33/39] Silicon/NXP: Implement PciHostBridgeLib support Meenakshi
2018-04-20  8:34   ` Ard Biesheuvel
2018-04-24 12:17     ` Vabhav Sharma
2018-04-20 14:54   ` Leif Lindholm
2018-04-24 12:32     ` Vabhav Sharma
2018-02-16  8:50 ` [PATCH edk2-platforms 34/39] Silicon/NXP: Implement EFI_CPU_IO2_PROTOCOL Meenakshi
2018-04-20  8:40   ` Ard Biesheuvel
2018-04-24 12:26     ` Vabhav Sharma
2018-04-24 12:33       ` Ard Biesheuvel
2018-04-24 13:36         ` Vabhav Sharma
2018-04-24 14:02           ` Ard Biesheuvel
2018-04-20 15:15   ` Leif Lindholm
2018-04-24 12:40     ` Vabhav Sharma
2018-02-16  8:50 ` [PATCH edk2-platforms 35/39] Compilation: Update the fdf, dsc and dec files Meenakshi
2018-04-20 15:22   ` Leif Lindholm
2018-04-24 12:47     ` Vabhav Sharma
2018-02-16  8:50 ` [PATCH edk2-platforms 36/39] DWC3 : Add DWC3 USB controller initialization driver Meenakshi
2018-04-20 15:30   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 37/39] LS2088 : Enable support of USB controller Meenakshi
2018-04-20 15:30   ` Leif Lindholm
2018-02-16  8:50 ` [PATCH edk2-platforms 38/39] Platform/NXP:PCIe enablement for LS1046A RDB Meenakshi
2018-04-20 15:33   ` Leif Lindholm
2018-04-24 12:48     ` Vabhav Sharma
2018-02-16  8:50 ` [PATCH edk2-platforms 39/39] Platform/NXP:PCIe enablement for LS2088A RDB Meenakshi
2018-04-20 15:36   ` Leif Lindholm
2018-04-24 12:50     ` Vabhav Sharma
2018-04-17 16:44 ` [PATCH edk2-platforms 00/39] NXP: Add support of LS1043, LS1046 and LS2088 SoCs Leif Lindholm
2018-04-20 16:15 ` Leif Lindholm
2018-11-28 15:01 ` [PATCH edk2-platforms 00/41] NXP : " Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 01/41] Silicon/NXP: Add Library to return Mmio APIs pointer Meenakshi Aggarwal
2018-12-21 19:17     ` Leif Lindholm
2018-12-26  5:00       ` Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 02/41] Silicon/NXP : Add support for Watchdog driver Meenakshi Aggarwal
2018-12-17 17:36     ` Leif Lindholm
2019-01-29  5:32       ` Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 03/41] SocLib : Add support for initialization of peripherals Meenakshi Aggarwal
2018-12-18 12:31     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 04/41] Silicon/NXP : Add support for DUART library Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 05/41] Silicon/NXP: Add support for I2c driver Meenakshi Aggarwal
2018-12-18 17:25     ` Leif Lindholm [this message]
2018-11-28 15:01   ` [PATCH edk2-platforms 06/41] Silicon/Maxim : Add support for DS1307 RTC library Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 07/41] Platform/NXP: Add support for ArmPlatformLib Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 08/41] Platform/NXP: Add Platform driver for LS1043 RDB board Meenakshi Aggarwal
2018-12-18 17:47     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 09/41] Compilation : Add the fdf, dsc and dec files Meenakshi Aggarwal
2018-12-18 18:35     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 10/41] Readme : Add Readme.md file Meenakshi Aggarwal
2018-12-18 18:41     ` Leif Lindholm
2019-02-01  5:43       ` Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 11/41] IFC : Add Header file for IFC controller Meenakshi Aggarwal
2018-12-18 18:45     ` Leif Lindholm
2019-02-01  5:55       ` Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 12/41] LS1043/BoardLib : Add support for LS1043 BoardLib Meenakshi Aggarwal
2018-12-18 18:50     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 13/41] Silicon/NXP : Add support of IfcLib Meenakshi Aggarwal
2018-12-19 13:25     ` Leif Lindholm
2019-02-01  6:53       ` Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 14/41] Silicon/NXP : Add support for FpgaLib Meenakshi Aggarwal
2018-12-19 17:37     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 15/41] LS1043 : Enable support of FpgaLib Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 16/41] Silicon/NXP : Add support of NorFlashLib Meenakshi Aggarwal
2018-12-19 18:13     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 17/41] Silicon/NXP : Add NOR driver Meenakshi Aggarwal
2018-12-19 18:32     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 18/41] LS1043 : Enable NOR driver for LS1043aRDB package Meenakshi Aggarwal
2018-12-19 18:33     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 19/41] Silicon/NXP:Add LS1046ARDB SoCLib Support Meenakshi Aggarwal
2018-12-19 18:41     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 20/41] Silicon/NXP:Add support for PCF2129 Real Time Clock Library Meenakshi Aggarwal
2018-12-19 18:52     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 21/41] Platform/NXP: LS1046A RDB Board Library Meenakshi Aggarwal
2018-12-19 18:54     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 22/41] Platform/NXP: Add ArmPlatformLib for LS1046A Meenakshi Aggarwal
2018-12-19 19:08     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 23/41] Platform/NXP: Add Platform driver for LS1046 RDB board Meenakshi Aggarwal
2018-12-19 22:05     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 24/41] Platform/NXP: Compilation for LS1046A RDB Board Meenakshi Aggarwal
2018-12-20 17:39     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 25/41] Silicon/NXP:SocLib support for initialization of peripherals Meenakshi Aggarwal
2018-12-21  9:22     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 26/41] Platform/NXP/LS2088aRdbPkg: ArmPlatformLib Support for LS2088ARDB Meenakshi Aggarwal
2018-12-21  9:30     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 27/41] Platform/NXP: Add Platform driver for LS2088 RDB board Meenakshi Aggarwal
2018-12-21  9:35     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 28/41] Silicon/Maxim: DS3232 RTC Library Support Meenakshi Aggarwal
2018-12-21  9:56     ` Leif Lindholm
2018-12-21 10:01       ` Ard Biesheuvel
2018-11-28 15:01   ` [PATCH edk2-platforms 29/41] Compilation : Add the fdf, dsc and dec files Meenakshi Aggarwal
2018-12-21 10:17     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 30/41] Platform/NXP: LS2088A RDB Board Library Meenakshi Aggarwal
2018-12-21 10:20     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 31/41] Platform/NXP: LS2088 RDB Board FPGA library Meenakshi Aggarwal
2018-12-21 10:22     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 32/41] LS2088 : Enable support of FpgaLib Meenakshi Aggarwal
2018-12-21 10:23     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 33/41] LS2088ARDB: Enable NOR driver and Runtime Services Meenakshi Aggarwal
2018-12-21 10:24     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 34/41] Silicon/NXP: Implement PciSegmentLib to support multiple RCs Meenakshi Aggarwal
2018-12-21 10:44     ` Ard Biesheuvel
2018-12-21 14:01     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 35/41] Silicon/NXP: Implement PciHostBridgeLib support Meenakshi Aggarwal
2018-12-21 10:51     ` Ard Biesheuvel
2018-12-21 18:30     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 36/41] Silicon/NXP: Implement EFI_CPU_IO2_PROTOCOL Meenakshi Aggarwal
2018-12-21 11:09     ` Ard Biesheuvel
2018-12-21 18:49     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 37/41] Compilation: Update the fdf, dsc and dec files Meenakshi Aggarwal
2018-12-21 18:51     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 38/41] DWC3 : Add DWC3 USB controller initialization driver Meenakshi Aggarwal
2018-12-21 19:03     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 39/41] LS2088 : Enable support of USB controller Meenakshi Aggarwal
2018-11-28 15:01   ` [PATCH edk2-platforms 40/41] Platform/NXP:PCIe enablement for LS1046A RDB Meenakshi Aggarwal
2018-12-21 19:05     ` Leif Lindholm
2018-11-28 15:01   ` [PATCH edk2-platforms 41/41] Platform/NXP:PCIe enablement for LS2088A RDB Meenakshi Aggarwal
2018-12-21 19:05     ` Leif Lindholm
2018-12-17  9:50   ` [PATCH edk2-platforms 00/41] NXP : Add support of LS1043, LS1046 and LS2088 SoCs Leif Lindholm
     [not found]   ` <1570639758-30355-1-git-send-email-meenakshi.aggarwal@nxp.com>
     [not found]     ` <1570639758-30355-2-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 10:17       ` [PATCH edk2-platforms 01/12] Silicon/NXP: Add Library to provide Mmio APIs with swapped data Leif Lindholm
     [not found]     ` <1570639758-30355-3-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 10:23       ` [PATCH edk2-platforms 02/12] Silicon/NXP: Add function to return swapped Mmio APIs pointer Leif Lindholm
     [not found]     ` <1570639758-30355-4-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 10:39       ` [PATCH edk2-platforms 03/12] Silicon/NXP : Add support for Watchdog driver Leif Lindholm
     [not found]     ` <1570639758-30355-5-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 11:17       ` [PATCH edk2-platforms 04/12] SocLib : Add support for initialization of peripherals Leif Lindholm
     [not found]     ` <1570639758-30355-7-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 14:51       ` [PATCH edk2-platforms 06/12] Silicon/NXP: Add support for I2c driver Leif Lindholm
     [not found]     ` <1570639758-30355-9-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 15:07       ` [PATCH edk2-platforms 08/12] Silicon/NXP : Add MemoryInitPei Library Leif Lindholm
     [not found]     ` <1570639758-30355-11-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 15:12       ` [PATCH edk2-platforms 10/12] Platform/NXP: Add Platform driver for LS1043 RDB board Leif Lindholm
     [not found]     ` <1570639758-30355-12-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 15:17       ` [PATCH edk2-platforms 11/12] Compilation : Add the fdf, dsc and dec files Leif Lindholm
     [not found]     ` <1570639758-30355-13-git-send-email-meenakshi.aggarwal@nxp.com>
2019-10-10 15:19       ` [PATCH edk2-platforms 12/12] Readme : Add Readme.md file Leif Lindholm
2019-10-10 15:27     ` [PATCH edk2-platforms 00/12] NXP : Add support of LS1043 SoC Leif Lindholm
2019-11-21 16:25     ` [edk2-platforms] [PATCH v2 00/11] " Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 01/11] Silicon/NXP: Add Library to provide Mmio APIs with swapped data Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 02/11] Silicon/NXP: Add function to return swapped Mmio APIs pointer Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 03/11] SocLib : Add support for initialization of peripherals Meenakshi Aggarwal
2019-11-26 16:43         ` Leif Lindholm
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 04/11] Silicon/NXP : Add support for DUART library Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 05/11] Silicon/NXP: Add support for I2c driver Meenakshi Aggarwal
2019-11-26 17:00         ` Leif Lindholm
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 06/11] Silicon/Maxim : Add support for DS1307 RTC library Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 07/11] Silicon/NXP : Add MemoryInitPei Library Meenakshi Aggarwal
2019-11-26 16:55         ` [edk2-devel] " Leif Lindholm
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 08/11] Platform/NXP: Add support for ArmPlatformLib Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 09/11] Platform/NXP: Add Platform driver for LS1043 RDB board Meenakshi Aggarwal
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 10/11] Compilation : Add the fdf, dsc and dec files Meenakshi Aggarwal
2019-11-26 16:56         ` [edk2-devel] " Leif Lindholm
2019-11-21 16:25       ` [edk2-platforms] [PATCH v2 11/11] Readme : Add Readme.md file Meenakshi Aggarwal
2019-11-26 16:58         ` Leif Lindholm
2020-01-24 22:25       ` [edk2-platforms] [PATCH v3 00/11] Add support of LS1043 SoC Meenakshi Aggarwal
2020-01-24 22:25         ` [edk2-platforms] [PATCH v3 03/11] SocLib : Add support for initialization of peripherals Meenakshi Aggarwal
2020-01-24 22:25         ` [edk2-platforms] [PATCH v3 08/11] Silicon/NXP : Add MemoryInitPei Library Meenakshi Aggarwal

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=20181218172522.btvaf6jtpombokuu@bivouac.eciton.net \
    --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