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::544; helo=mail-pg1-x544.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (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 69B8421B02822 for ; Thu, 9 Aug 2018 19:20:09 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id f14-v6so3631776pgv.13 for ; Thu, 09 Aug 2018 19:20:09 -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=A6eppQufyaIXvMwROxWF/ueWlg1fn1E7BE7zZtCsurI=; b=Tb046bLSJitn+3bjyu1mPl8oWkF0pQsKcTi9MQZf4tl4CUUKpUW/VzvAFnRKlrDVdj xSUYSaXNAPw6Kah9WSyaDyDIfN6m5bKuetVy5g1V1sJdm7JrDlX84yOr+JDZaQphxMx5 mMdJzKdACH+LyXr7ObbAduSqoH0l+HjR3+Blk= 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=A6eppQufyaIXvMwROxWF/ueWlg1fn1E7BE7zZtCsurI=; b=QC+HnKVZqZEwhKjW05RuJgThim+DsRz8RsKNcEET0x99T6En3+blg4NWUuM2IMXfSO VCaazMFHbWpwwTE3h0Z2CeIhN75eAHIu54L0BbKbdjdhoeIUZlQK365Tl7Ve84Vw782i GQW2Um4iBDxwcdhlIVz3vpUTrB0bJwq39zpri0ax4UJhe/V5JG4ZmIUkSiiS6Yf9rf18 AIfI1DFwfZ9q3d5h/2flr0D8XtKYdzLdxctmwSH68K0LnCTtB4L3NH0IweApCy6z6xRK Mw5GQ4f0VYNAz3aPzDkEKhkVymBiQgdVLeuGxLnJylIb4LenXo5KnjBg9vFIlQGWTzoF bdAA== X-Gm-Message-State: AOUpUlE+ocnNUnzrARWL0cit6QAbQAulZ0kQFGcvLunsVP3MlCy6bymJ 3lcZ/1wc66PWsAr2yI6drXU0MQ== X-Google-Smtp-Source: AA+uWPw3b357v8Olw2Eg96ovLlhxnNwTKQB3E6MtwgWg1zbIRQw082mOuU2y2WJULq3fXsEKdmpVgA== X-Received: by 2002:a63:8848:: with SMTP id l69-v6mr4300338pgd.377.1533867609708; Thu, 09 Aug 2018 19:20:09 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id h69-v6sm19822177pfh.13.2018.08.09.19.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 19:20: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-35-ming.huang@linaro.org> <20180804151828.kptokhy7xrbfpw7k@bivouac.eciton.net> From: Ming Message-ID: <5238691b-756b-5131-37ce-43513f65bc37@linaro.org> Date: Fri, 10 Aug 2018 10:19:54 +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: <20180804151828.kptokhy7xrbfpw7k@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 34/38] Silicon/Hisilicon/D06: Add I2C Bus Exception deal function 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: Fri, 10 Aug 2018 02:20:10 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/4/2018 11:18 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:09:18PM +0800, Ming Huang wrote: >> From: shaochangliang >> >> During the period of I2c accessing, if the board is reset >> unexpectedly, and because the I2c client can not reset, >> the SDA will be always pull down, then it cause I2C bus >> Exception. >> >> Follow the Hi1620 I2C FS chapter 1.8.2 design, add I2C >> Bus Exception deal function. It will Config SCL and SDA > > 'handle' sounds better than 'deal' here and in the function > names. Could they be changed? OK, change them in v2. > >> to GPIO, and set the reversal frequency of SCL to 10KHz. >> >> The implementation of functions is in edk2-non-osi. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: shaochangliang >> Signed-off-by: Ming Huang >> Signed-off-by: Heyi Guo >> --- >> Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h >> index cc60e213de..483c2c2d41 100644 >> --- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h >> +++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h >> @@ -106,4 +106,9 @@ VOID CloseClusterClock(UINTN CpuClusterBase); >> VOID EnableClusterClock(UINTN CpuClusterBase); >> VOID CloseSktClock (UINT8 Skt); >> >> +EFI_STATUS EFIAPI DealI2cBusException(UINT32 Socket); >> +EFI_STATUS >> +EFIAPI >> +I2C_DealException(UINT32 Socket, UINT32 Port); > > Drop the '_'. > > Also if the first prototype is > HandleI2cBusException should this not be > HandleI2cException? (Putting the action in different places for the > two functions looks confusing.) OK, change it in v2. Thanks. > > / > Leif > >> + >> #endif >> -- >> 2.17.0 >>