From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DCC32210FC0A4 for ; Wed, 22 Aug 2018 07:30:52 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id u12-v6so529205wrr.4 for ; Wed, 22 Aug 2018 07:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TX3+wFPKMlKD1q2ppPpuJBQ1xJufLlUwo+8gxx4ejpo=; b=EkAAhqu0U92hcKY39OruSyofRUsyDQFy4fyn265IzgapXMrhmXB3GqY1WrQOG3U+MU dCPN3dnutT09KXPrWM5lothz/SZ/F22ezI8xmeTbfcYuMFSylmnaoi6o3q4a0o56CXHx SLOO3aN2ioAitRCh1EO2o5iT93YlBQSIsZ9rk= 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=TX3+wFPKMlKD1q2ppPpuJBQ1xJufLlUwo+8gxx4ejpo=; b=Lh0SFKJGDR3GG6YJlYilk6NE6GZKP22Zq0OdlIScYwH2JVzE6GotVo9pGXS+ldNsRD SovWbI8ktG4Q0Nm7w9cj9vom7ugJsLYZ6La8Qpw6pi/kkNvkGGoD2xcrFLD64EeIGN07 JGDMosp/2J9JvlnKJSPG4LUuo+BfdRI7Wpsdcaxox0mYC8BNcZxnCZPmHCxDoezSRTZa 2V+0fgzfTgDwvLejQySAx9CcvW3eIGFfJA55ZcHbhkhHUCcgBHrTfZFD1XuHuvMghKp3 IYb7mN4PHfgnRd2kC9ouob7gAHT/ZlbyIpaMASqDf4NMUsrIBh4wqSMx88PleluJZRDm 7Lyw== X-Gm-Message-State: AOUpUlHyXqId3TYgLLeJcZJgcj3otkGbPDEEL48Og1nyh2jPvmsKBkdM qeOW1gduCY0DCWkTBTw09hgnsQ== X-Google-Smtp-Source: ANB0VdaI/qNQX0iVNj8Grtn3TAqvQFEChALHdC/vA/K+hUW4Obf4UEc9wwsgHf4w7C+cSCBB6ZyCuQ== X-Received: by 2002:adf:dfca:: with SMTP id q10-v6mr12345511wrn.113.1534948251282; Wed, 22 Aug 2018 07:30:51 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id y206-v6sm2783897wmg.14.2018.08.22.07.30.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 07:30:50 -0700 (PDT) Date: Wed, 22 Aug 2018 15:30:48 +0100 From: Leif Lindholm To: Ming Huang Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, michael.d.kinney@intel.com, lersek@redhat.com, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, shaochangliang Message-ID: <20180822143048.frxo3mihoebi73jb@bivouac.eciton.net> References: <20180814080903.50466-1-ming.huang@linaro.org> <20180814080903.50466-26-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180814080903.50466-26-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v2 25/43] Silicon/Hisilicon/D06: Optimize HNS config CDR post time X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2018 14:30:53 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2018 at 04:08:45PM +0800, Ming Huang wrote: > From: shaochangliang > > Use I2C 400KB speed for config CDR. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang The start of the subject line is supposed to reflect the code that is being modified - not the platform you are doing it for. Drop D06, mention I2CLib. All of these patches should go in before the first D06 one. With those changes: Reviewed-by: Leif Lindholm > --- > Silicon/Hisilicon/Library/I2CLib/I2CLib.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Silicon/Hisilicon/Library/I2CLib/I2CLib.c b/Silicon/Hisilicon/Library/I2CLib/I2CLib.c > index ed44ac204f..55c030a3af 100644 > --- a/Silicon/Hisilicon/Library/I2CLib/I2CLib.c > +++ b/Silicon/Hisilicon/Library/I2CLib/I2CLib.c > @@ -28,6 +28,9 @@ > #include "I2CLibInternal.h" > #include "I2CHw.h" > > +#define I2C_100KB_SPEED 0x1 > +#define I2C_400KB_SPEED 0x2 > + > VOID > I2C_Delay ( > UINT32 Count > @@ -158,7 +161,11 @@ I2CInit ( > > I2C_REG_READ (Base + I2C_CON_OFFSET, I2cControlReg.Val32); > I2cControlReg.bits.master = 1; > - I2cControlReg.bits.Speed = 0x1; > + if(SpeedMode == Normal) { > + I2cControlReg.bits.Speed = I2C_100KB_SPEED; > + } else { > + I2cControlReg.bits.Speed = I2C_400KB_SPEED; > + } > I2cControlReg.bits.restart_en = 1; > I2cControlReg.bits.slave_disable = 1; > I2C_REG_WRITE (Base + I2C_CON_OFFSET, I2cControlReg.Val32); > -- > 2.17.0 >