From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web12.5547.1601032654656962984 for ; Fri, 25 Sep 2020 04:17:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=T+9Ht2uc; spf=pass (domain: nuviainc.com, ip: 209.85.221.44, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f44.google.com with SMTP id o5so3113857wrn.13 for ; Fri, 25 Sep 2020 04:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L9f/X8NGGU3ifcR36f61XSVOcZORVyEE7XcQd28qtgo=; b=T+9Ht2ucyhKBx2SxBD+YllAWYSXp5RxrfwQjrokTHRTq9lbnUGysz1AcHcDA7wrPKR j5ou56zmCKSDPnIs+AThGRuV+2R7VWnJAB3hXe1BZiOuqcFCbsnPVsdBVZLZwq9Phbxn dRZXsTGE1IVIVSgDPHQsQ9wUxNROGPVENWRseFtesaZj0ekoR/v+K7fG5MkW6xHidxI7 ovXoXPmW51weWQYRwgcUCSNdfQNhZxRZ7yY1jEVClBmqUWJINwoZ5Wvd6jStUQ9TwTeN pISUHMvCegSy+lMe4/ZzTWSVd0CzelTNsVmTM3uz4xVL/4FkpO9u94BrG5L/r6au4CBP +XYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L9f/X8NGGU3ifcR36f61XSVOcZORVyEE7XcQd28qtgo=; b=PKfKoVHbKo/vIJ/DBnYh8t+uHoff60ea1H38eyz+7DYRa0R5EGaVKxta+WzmcQNfEB m7xLrCAFfaDvYqZi0BIJSkRq6JzSDxCQqOZO8T8w9/Vw7b9Y7kAuELzw/ctJMkCI0fjk ZjovD461OPhMFapglRUthp9Rtl27wguRrWTuImm1TgyYZH8w2kc64BARCJ42LAD0cjtR 0Ov7RIeVYf0A18A4BRuEL/P+OqNBcSwpIacgU48zVE793bl7bylFBBZIVzNKvy2Rzv2T NSRmBBUcZvM1YHuHen/cmQAPjst3S//vKMaNlOezyvmicf6+HIdvrlW1nsZG7GYqY53K uzDg== X-Gm-Message-State: AOAM532A5ppqbNoifN4uJBWyJIP+u3tNLdJKpZoq20sJ4FN0mJAg00ZO zjs5ZF7/9gpNR/ShFIS93tEzFA== X-Google-Smtp-Source: ABdhPJwYX8tF18H8jkQV79XrFZJ85D9wlq0ayFN7bQr6Rxv6Bk7/Ly1nLSJLCk34pWflvzNlgh2/5Q== X-Received: by 2002:adf:8405:: with SMTP id 5mr4137922wrf.143.1601032653054; Fri, 25 Sep 2020 04:17:33 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id y207sm2587526wmc.17.2020.09.25.04.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 04:17:32 -0700 (PDT) Date: Fri, 25 Sep 2020 12:17:25 +0100 From: "Leif Lindholm" To: Meenakshi Aggarwal Cc: ard.biesheuvel@arm.com, michael.d.kinney@intel.com, devel@edk2.groups.io, v.sethi@nxp.com, Pramod Kumar , Meenakshi Aggarwal Subject: Re: [edk2-platforms 2/4] Platform/NXP/LS1046aFrwyPkg: GPIO mux changes for USB Message-ID: <20200925111725.GV5623@vanye> References: <1600187343-18732-1-git-send-email-meenakshi.aggarwal@oss.nxp.com> <1600187343-18732-3-git-send-email-meenakshi.aggarwal@oss.nxp.com> MIME-Version: 1.0 In-Reply-To: <1600187343-18732-3-git-send-email-meenakshi.aggarwal@oss.nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Same comment as for previous patch: Commit messages are not optional. On Tue, Sep 15, 2020 at 21:59:01 +0530, Meenakshi Aggarwal wrote: > Signed-off-by: Pramod Kumar > Signed-off-by: Meenakshi Aggarwal And only the poster can sign off. Please address for all patches in series. > --- > Silicon/NXP/NxpQoriqLs.dec | 8 ++++++++ > Silicon/NXP/LS1046A/LS1046A.dsc.inc | 5 +++++ > Silicon/NXP/NxpQoriqLs.dsc.inc | 2 ++ > .../Library/ArmPlatformLib/ArmPlatformLib.inf | 1 + > .../Library/ArmPlatformLib/ArmPlatformLib.c | 17 +++++++++++++++++ > 5 files changed, 33 insertions(+) > > diff --git a/Silicon/NXP/NxpQoriqLs.dec b/Silicon/NXP/NxpQoriqLs.dec > index 0c3608696569..3a568c0437e7 100644 > --- a/Silicon/NXP/NxpQoriqLs.dec > +++ b/Silicon/NXP/NxpQoriqLs.dec > @@ -29,6 +29,7 @@ [PcdsFeatureFlag] > gNxpQoriqLsTokenSpaceGuid.PcdDcfgBigEndian|FALSE|BOOLEAN|0x00000316 > gNxpQoriqLsTokenSpaceGuid.PcdPciLutBigEndian|FALSE|BOOLEAN|0x00000317 > gNxpQoriqLsTokenSpaceGuid.PcdSataErratumA009185|FALSE|BOOLEAN|0x00000318 > + gNxpQoriqLsTokenSpaceGuid.PcdGpioControllerBigEndian|FALSE|BOOLEAN|0x00000319 > > [PcdsFixedAtBuild.common] > # Pcds for PCI Express > @@ -48,6 +49,13 @@ [PcdsFixedAtBuild.common] > gNxpQoriqLsTokenSpaceGuid.PcdSataSize|0x0|UINT32|0x00000351 > gNxpQoriqLsTokenSpaceGuid.PcdNumSataController|0x0|UINT32|0x00000352 > > + # > + # Pcds for Gpio > + # > + gNxpQoriqLsTokenSpaceGuid.PcdNumGpioController|0|UINT32|0x00000355 > + gNxpQoriqLsTokenSpaceGuid.PcdGpioModuleBaseAddress|0|UINT64|0x00000356 > + gNxpQoriqLsTokenSpaceGuid.PcdGpioControllerOffset|0|UINT64|0x00000357 > + > [PcdsDynamic.common] > gNxpQoriqLsTokenSpaceGuid.PcdPciCfgShiftEnable|FALSE|BOOLEAN|0x00000600 > gNxpQoriqLsTokenSpaceGuid.PcdPciLsGen4Ctrl|FALSE|BOOLEAN|0x00000601 > diff --git a/Silicon/NXP/LS1046A/LS1046A.dsc.inc b/Silicon/NXP/LS1046A/LS1046A.dsc.inc > index dbe7f408fce9..db110553605f 100644 > --- a/Silicon/NXP/LS1046A/LS1046A.dsc.inc > +++ b/Silicon/NXP/LS1046A/LS1046A.dsc.inc > @@ -27,9 +27,14 @@ [PcdsDynamicDefault.common] > > [PcdsFixedAtBuild.common] > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x021c0500 > + gNxpQoriqLsTokenSpaceGuid.PcdNumGpioController|0x04 > + gNxpQoriqLsTokenSpaceGuid.PcdGpioModuleBaseAddress|0x02300000 > + gNxpQoriqLsTokenSpaceGuid.PcdGpioControllerOffset|0x10000 > + > > [PcdsFeatureFlag] > gNxpQoriqLsTokenSpaceGuid.PcdDcfgBigEndian|TRUE > + gNxpQoriqLsTokenSpaceGuid.PcdGpioControllerBigEndian|TRUE > > ################################################################################ > # > diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b/Silicon/NXP/NxpQoriqLs.dsc.inc > index fc600de01d74..21c87df73220 100644 > --- a/Silicon/NXP/NxpQoriqLs.dsc.inc > +++ b/Silicon/NXP/NxpQoriqLs.dsc.inc > @@ -103,6 +103,8 @@ [LibraryClasses.common] > MemoryInitPeiLib|Silicon/NXP/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf > > + GpioLib|Silicon/NXP/Library/GpioLib/GpioLib.inf > + > [LibraryClasses.common.SEC] > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf > diff --git a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.inf b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.inf > index 7802696bf39b..2e755842a714 100644 > --- a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.inf > +++ b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.inf > @@ -25,6 +25,7 @@ [Packages] > [LibraryClasses] > ArmLib > DebugLib > + GpioLib > SocLib > > [Sources.common] > diff --git a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.c b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.c > index e1f20da09337..d467992a3e47 100644 > --- a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.c > +++ b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLib.c > @@ -8,11 +8,14 @@ > > #include > #include > +#include > #include > > #include > #include > > +#define USB2_MUX_SEL_GPIO 23 > + > ARM_CORE_INFO mLS1046aMpCoreInfoTable[] = { > { > // Cluster 0, Core 0 > @@ -89,6 +92,19 @@ NxpPlatformGetClock( > } > > /** > + FRWY-LS1046A GPIO 23 use for USB2 > + mux seclection > +**/ > +STATIC VOID MuxSelectUsb2 (VOID) > +{ > + > + SetDir (GPIO3, USB2_MUX_SEL_GPIO, OUTPUT); > + SetData (GPIO3, USB2_MUX_SEL_GPIO, HIGH); Oh, I didn't spot in previous patch that these functions were exported (my bad). They need more global names then - at least GpioSetDirection/GpioSetData. / Leif > + > + return; > +} > + > +/** > Initialize controllers that must setup in the normal world > > This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei > @@ -101,6 +117,7 @@ ArmPlatformInitialize ( > ) > { > SocInit (); > + MuxSelectUsb2 (); > > return EFI_SUCCESS; > } > -- > 1.9.1 >