From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 96566210E129A for ; Wed, 8 Aug 2018 07:55:10 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id b11-v6so1270308pfo.3 for ; Wed, 08 Aug 2018 07:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=hrQBIx+zTJMAZfN3p2xM5k0Ng20GTFJ5MkCQWjF5030=; b=hpL2EH+ERMOoKqjbrTTd8Wnx2MDjy6FMVNquhXOlAw5VZpKZfP9dp2FTQsnce8TIG6 /y7jSNzmUuCJ5d8XjvNG3OoqU0gBHkQKv/mQAMGmLt8vKuFTfciG7k8FIbQCsv5pvuP9 6Kv5oIw/TyZ/FTEAER73BpmuVpkaHhkGnIxQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=hrQBIx+zTJMAZfN3p2xM5k0Ng20GTFJ5MkCQWjF5030=; b=HsedMFE2D081TcyIJvmizyCl3/6YR7/mecJ+GOr9kwEqwjOjSLOf6DoFLyawODN5Rt 9VmSbEL/ZQydrEE1dMSCMQOcacPCK8hAF4nMlndkcs7R1vF4tVN1mQxp4VKVayD74O4E kQLgZVpcQ/zKPbTGuxIcIgN4YtZIK3XKnHoTznRQCPCAhJNdkef7OoMimyIgq2TUffKm mn3l7ZQXqLX+fwqQtvyi6/EGHjm7mm2DE0tbBNcUiMlk41o0y60G85Xe19wZ6l0pJIkd 1gVu3pnfYv+Sys6x64a9ZPNjNM4OjQqco9P1qFpEV7zwvwM0OGVWFJyi6LAj5nPbSpiV dDMA== X-Gm-Message-State: AOUpUlHooptCvz9/8AthZcQ028WYz+IZU5RgWGloKu2kPBLFnsvxqFfL 69xJIiLSrAArhVT8sT+gi1+y7A== X-Google-Smtp-Source: AA+uWPxr/hD3V6KhfE6pqKPUn4em5UdMbDp7hQ5IQV9QTBFt8xf6QpU3kEVWCmoyYEOcYdpD0WOiyg== X-Received: by 2002:a65:4c41:: with SMTP id l1-v6mr2963310pgr.310.1533740110304; Wed, 08 Aug 2018 07:55:10 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id b195-v6sm10322857pfb.2.2018.08.08.07.54.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 07:55:09 -0700 (PDT) To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, shaochangliang , Heyi Guo References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-18-ming.huang@linaro.org> <20180803133023.nmz36sqnezlt5wql@bivouac.eciton.net> From: Ming Message-ID: <30e518aa-21d0-bea3-be1b-9fea30dd5766@linaro.org> Date: Wed, 8 Aug 2018 22:54:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180803133023.nmz36sqnezlt5wql@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 17/38] Silicon/Hisilicon/D06: Optimize HNS config CDR post time X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2018 14:55:10 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/3/2018 9:30 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:09:01PM +0800, Ming Huang wrote: >> From: shaochangliang >> >> Use I2C 400KB speed for config CDR >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: shaochangliang >> Signed-off-by: Ming Huang >> Signed-off-by: Heyi Guo >> --- >> Silicon/Hisilicon/Library/I2CLib/I2CLib.c | 12 +++++++++++- >> 1 file changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/Silicon/Hisilicon/Library/I2CLib/I2CLib.c b/Silicon/Hisilicon/Library/I2CLib/I2CLib.c >> index fa8c510f36..8d87336375 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 ulCount) >> { >> MicroSecondDelay(ulCount); >> @@ -149,7 +152,14 @@ I2CInit(UINT32 Socket, UINT32 Port, SPEED_MODE SpeedMode) >> >> I2C_REG_READ(Base + I2C_CON_OFFSET, I2cControlReg.Val32); >> I2cControlReg.bits.master = 1; >> - I2cControlReg.bits.spedd = 0x1; >> + if(Normal == SpeedMode) >> + { > > '{' on previous line. > >> + I2cControlReg.bits.spedd = I2C_100KB_SPEED; >> + } >> + else > > 'else' on previous line. > >> + { > > '{' on previous line. All comments above will apply in v2. Thanks. > > / > Leif > >> + I2cControlReg.bits.spedd = I2C_400KB_SPEED; > > spedd? > That looks as a typo in the struct definition. > It should probably be Speed. > Yes, it should be Speed. > Can you please provide a separate patch for that preceding this one? OK, do it in v2. Thanks. > > / > Leif > >> + } >> I2cControlReg.bits.restart_en = 1; >> I2cControlReg.bits.slave_disable = 1; >> I2C_REG_WRITE(Base + I2C_CON_OFFSET,I2cControlReg.Val32); >> -- >> 2.17.0 >>