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 F3F92210FC0A1 for ; Wed, 22 Aug 2018 08:45:11 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id y2-v6so2467834wma.1 for ; Wed, 22 Aug 2018 08:45:11 -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=FsfIAqotEbIOr9kGVtX0Moz01QS7xPwHWWMUPEtAygU=; b=D29/ZoKHr1BKS20aUi6J7+DAsmIC2lY6nWCEamlH9OCp7GmPecKAQhuQKsBGqUowGf pPROXmbJiAMAlmvkTDHsKF+bSCtVd3IdntTK5Btv+iX6yTwM+bdQoDZrY7BPYMRY565L Q5tPMmMpHI3XshACQT+XrQv68H3DFFSC+5kQA= 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=FsfIAqotEbIOr9kGVtX0Moz01QS7xPwHWWMUPEtAygU=; b=jRLwXGrDEqwGD64sNU2qPHcL/g4+ehyFaXxxnmimTeHUXYrOBqr+D9qCvY+BNVQcl1 3eiByVIo8Urts58ToKJkESmh5TnXMj479bcYagTJfxiJKjw796AmydMHKDBvLa64Uq+V IoAo+2XBuGcT0nGEpS+9HPvnNyRKFKxxgkJvhc+RpDu0wjtO9jlVNfV78BcXTk0Zaubm qTPQ4CliOwJwF7fnII4/CmTp/vSAD4jbqGDvxo+7kKCVudtVRgR9Kn9muDmWtg7G+AQ+ XAQjB/vMIlE2xuYMZoJawvPqs01LuUaBuSZEUwFgq2EiouEdAYZxTChU2I49JEKPVj9P xNwA== X-Gm-Message-State: APzg51DyOsxEKkFmAkIWcLFJur43YGpllSWoCdoKwQQRmSkezU5Dv+s6 1BRmyFURYXE5V6rz87ZxO4+2eA== X-Google-Smtp-Source: ANB0VdYowmGtKpUTONYeprN+QGf7zSKhOImKlvf2gWWgLTNR/W7PITWrVP4Yh6U645CTmKp7FAy4nA== X-Received: by 2002:a1c:6354:: with SMTP id x81-v6mr2494000wmb.23.1534952710606; Wed, 22 Aug 2018 08:45:10 -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 z3-v6sm1760312wmf.12.2018.08.22.08.45.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 08:45:09 -0700 (PDT) Date: Wed, 22 Aug 2018 16:45:07 +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: <20180822154507.uhw3w5bscu5e5cbd@bivouac.eciton.net> References: <20180814080903.50466-1-ming.huang@linaro.org> <20180814080903.50466-39-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180814080903.50466-39-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v2 38/43] Silicon/Hisilicon/D06: 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: Wed, 22 Aug 2018 15:45:12 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2018 at 04:08:58PM +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 This change is not in Silicon/Hisilicon/D06, please fix the subject line. / Leif > --- > 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.17.0 >