From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 DE1E621107479 for ; Thu, 30 Aug 2018 11:51:44 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id j192-v6so3053209wmj.1 for ; Thu, 30 Aug 2018 11:51:44 -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=idQv4/JhDzydF7tade8fqzflzGsucfWpkbzyiAuSZY4=; b=KS0OnDFFGoKeKo3EUxHKCjXaacJJaj225EQk6BKrqUfPDIrVxGfchxYUa5+GAlZh4v SyvRCOf+H+Hk74oRx5roNvCciL3ONZ80Rt1n2Bvhg5vpuH6UIGaTx9BN5B6Qaqdm08Ks 2UdnrFZ1QCdmummR3kbsJxAJ9Maj/ZB4dfkQs= 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=idQv4/JhDzydF7tade8fqzflzGsucfWpkbzyiAuSZY4=; b=SUf2JMVI4Z/kYQBLf3+QG7vwt1UbsOHeUMuii7a11gyCCAD0KGoT9YV0AtuyGA5E9A NjGHG9UXP9/iC2UR7AbWgiRCKhyt/8agOuE83wPE0erbhxnXdHpenfPdGMI3Lt7Zi47n KGamlGOWW+NCd7NDoiPQGAYm/nOXtXjHx80uJfhEWzSOu/+BpvFn5LG47FA7oyYsEzd1 fOAdDlX2LQvOl2xfFSEdZJ0hfZ2f2G71+AMXf9yibiDBcpcAt8wahv8n/0Aex8EMIjkc fkQlWkKZjAXT/TRewnLxiVzn3yhqU/Wm+GTVuB883UO8FFCwBQOp/quKDPwE6grSNQqB 4GXQ== X-Gm-Message-State: APzg51Df/FrQT5nZyX0uvftSU5AOLgm0NCIjHLeUkBmFPWy0iEtHX3AQ XL8g4144bOVfdxYQrdVqcPn1jtno42A= X-Google-Smtp-Source: ANB0VdbQanZyyWuCnBBIc/xUui/rfkZ3HFv8QPgdMrQXfiEcP60M0mh+FflSn9WgRfI3UE7blEVIjQ== X-Received: by 2002:a1c:85cb:: with SMTP id h194-v6mr2754119wmd.54.1535655103430; Thu, 30 Aug 2018 11:51:43 -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 k34-v6sm14914421wre.18.2018.08.30.11.51.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 11:51:42 -0700 (PDT) Date: Thu, 30 Aug 2018 19:51:40 +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 Message-ID: <20180830185140.ffaxhm5vnrvmeywc@bivouac.eciton.net> References: <20180823160743.45638-1-ming.huang@linaro.org> <20180823160743.45638-28-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180823160743.45638-28-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v4 27/31] Silicon/Hisilicon: Add I2C Bus Exception handle function 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: Thu, 30 Aug 2018 18:51:45 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 24, 2018 at 12:07:39AM +0800, Ming Huang wrote: > 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 handle function. It will Config SCL and SDA > 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: Ming Huang Reviewed-by: Leif Lindholm > --- > Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h > index 3ccfc6bee3..a232e52ed7 100644 > --- a/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h > +++ b/Silicon/Hisilicon/Include/Library/PlatformSysCtrlLib.h > @@ -106,4 +106,7 @@ VOID DisableClusterClock(UINTN CpuClusterBase); > VOID EnableClusterClock(UINTN CpuClusterBase); > VOID DisableSocketClock (UINT8 Skt); > > +EFI_STATUS EFIAPI HandleI2CException (UINT32 Socket, UINT32 Port); > +EFI_STATUS EFIAPI HandleI2CExceptionBySocket (UINT32 Socket); > + > #endif > -- > 2.18.0 >