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::442; helo=mail-wr1-x442.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450: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 E3E9921A00AE6 for ; Sat, 4 Aug 2018 08:18:32 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id h14-v6so8112720wrw.13 for ; Sat, 04 Aug 2018 08:18:32 -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=+iwIYEEBHrIvssxm0b6799p+NFKS+JWGA5jkPWpDsmY=; b=aVT1iEIH/riq7zq7P2LsQyaErx8nqcbCidrKghfXr1oCYXy7bPh0oI8BtVDURHmIUR oPQUrBCKsEC5Da8UnOqy/Rn9ICBAMrch4ITnvccr1bpU5Iqgnsr+I4eJVAJ4xIeL8Rnv GmDDbCKKh1q4Pi2U9Exxju6tp1gdDIkdcMFlA= 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=+iwIYEEBHrIvssxm0b6799p+NFKS+JWGA5jkPWpDsmY=; b=RYR8/BRqOCf91EHyCS8R5/LN64uz7c4TcEqLxzDag2UU6NnXt39j/ECE1L2Ul5fCGf Pu3Be+9rhsgGk41oS5M2U0UPZfrT6Jz/k/S3kbY5p41gTPqpgWedLH3otx3tNICjtvoG RFn2H7kkp6wMsxGluXQ/KjNmNcaZndmuOyIZTf878Oj9K8vx/2hKwJvn68aKVQSY7Zu9 /5g6P3f2G52IxBStiddKd2RzAmmS2upkwfT8XNVcDFripkorS7smWT06bq+Eudvmf605 k5pWs6tVBs3vbCA+GJhKBZ6fL/9vTLrQWo6eAZQGxNUJhRYhOCR1+MfvfBIHpVKqb3Sy 7gSg== X-Gm-Message-State: AOUpUlHoCIcBJaJiQAV1kwCNsgI1kpnNdmLWn2asDRwpo2QWA2GptBaH QIWYcvQto6+sdKlBCV2PbPh6CQ== X-Google-Smtp-Source: AAOMgpdsDBg2NE9X/JcnWjRzDH6oIxPY8KaP3ZTjT+CYdYMLdteqHOzddhz2rBYlgrXe0PwBmKGPeg== X-Received: by 2002:adf:fd12:: with SMTP id e18-v6mr5025949wrr.280.1533395911407; Sat, 04 Aug 2018 08:18:31 -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 w204-v6sm2716584wmw.5.2018.08.04.08.18.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Aug 2018 08:18:30 -0700 (PDT) Date: Sat, 4 Aug 2018 16:18:28 +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, 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 Message-ID: <20180804151828.kptokhy7xrbfpw7k@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-35-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180724070922.63362-35-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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: Sat, 04 Aug 2018 15:18:33 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? > 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.) / Leif > + > #endif > -- > 2.17.0 >