Message ID | 20180816121239.44129-19-ming.huang@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2000593ljj; Thu, 16 Aug 2018 05:14:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzu2C+/Z+AweLL2uCjTkmczqtF8DCjWBYadslT6sSgZr6LdfG2PvLwXPZjMqB6QiUTdqVse X-Received: by 2002:a62:280a:: with SMTP id o10-v6mr29005419pfo.129.1534421664782; Thu, 16 Aug 2018 05:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534421664; cv=none; d=google.com; s=arc-20160816; b=XpZ2ec8+FQr7L+Zk7gZuWRhlVGpXJWS6+F7IJORizKz+zuOrBmflIeMa+qKLiI9ERl /GcRgaA/WfN+wlfN+SaVxn/9AQI5PQAlsBYB//KWBenz+Jdoy+J6j1+4PohJNmmJuoHo a5SXQ77Me8OfqowZooUcSOLbKSQPxGpNh/KjRrmkDMNEDT7EGzOnTNiq2IiPda1IgcI5 h+OU/oxZ2FVunvabKt/ql2ndgyanzyt0WQsUiMh7nBN9+NrcxT/sxdDwYdc+xhCdVagt edCwV0N3cebLFAn+jnZG5+zaQ3C3+Zsh5m3kvFAH4Uy+vx17jeQr2zB2HRZSDn6DOs4p kThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=NfswRd+R/VYQkG0vaJbu3qIUhef4QAppQbzPibzU4oM=; b=ixj5DGGKxa2PVKhBkerOV2sVKZuJnWkbt6GxZykSxTeVP95C2xcEr+44pfYoSzziZo Evd6El3QMS4hXOTxX43ZICWEeL1I5ofkO3lJzs1SqCMnXF1dvQkOYUZuhWpLNtfDw77w pKfeORFk7xUK/ZUwX8ai80FbZhV3SAgp61yIaIl4gAx5F4fjd4jdxSuXtbGrrFJ9Av9I OfZYCN0FFSHMGt0weS3l4Y7m+KliniTwiSs3gg1TTiSDZAP+SJSnA0b4rZSauVGctPN/ t99I6H4wQsjo3RRq4roog/cBm4TIG4rqr86oKD8g2BPsJEMQqqWcK98rmb1+rtDi4VTR v0HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IW2R+I5E; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <edk2-devel-bounces@lists.01.org> Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id x66-v6si28016722pfx.129.2018.08.16.05.14.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 05:14:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IW2R+I5E; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 45126210F3D67; Thu, 16 Aug 2018 05:14:08 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::52c; helo=mail-pg1-x52c.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (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 ABA98210F3D64 for <edk2-devel@lists.01.org>; Thu, 16 Aug 2018 05:14:06 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id y5-v6so1996939pgv.1 for <edk2-devel@lists.01.org>; Thu, 16 Aug 2018 05:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GFiQQuBo8lBEEkD+bKLEw2KMvKmV79SbnO6NaTUyI4w=; b=IW2R+I5ECDH6LSGVk2TH4ixBkt7p8TMhor/0/xwTRi5PzlhJuOyWZU0QSJhMrMrxyg aNKbfdNj24TVZ/Iw0p9BYNpBTGiRD3U9pZuSsRvy9oO+gRYF2ObsQbqjlej1/lPnAYiA YX7rfmpSVW0MJoR8GErgpzlO9ksQQqlV4miY8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GFiQQuBo8lBEEkD+bKLEw2KMvKmV79SbnO6NaTUyI4w=; b=WW5QiWCvfNbLjE9MmZ8sAR7eKsc+BmAbkwsoPC/oRjGsKfeEQIW3pqufWkR8NxqiMD llPywgX6GfyzfTTwB+te+OxtdihS399EDeqJZCWvXRs6zP3QT71sEP8otWXavoXI6Hjz LVmuNWBI51DiSi+NzPdrkZTQvFww5rR9zNL0bmXboPTHNXCJ/EaxVOxi5AzBlBiQVxJH cJk3IH6oJEPeeir5NOHqP2KXxBg73jJxT4vedBMkfxCe58YggK35X0LTlhX3QS5lkFcC oeRS+utmyull/4PB0trTqzQlMpeYeWEW7O/f7porzHeJZiSxPV/Lu44YrAm79okF5/Sz yJ5g== X-Gm-Message-State: AOUpUlE5My55zFT9snB7vBNwIpR/+JmI/EDHQBnNPKCZm+vkTKekaHWL 2QdzaDzLxS224wYQ2yyqmzWHvQ== X-Received: by 2002:a63:8848:: with SMTP id l69-v6mr28283911pgd.377.1534421646137; Thu, 16 Aug 2018 05:14:06 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id j27-v6sm46736311pfj.91.2018.08.16.05.14.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Aug 2018 05:14:05 -0700 (PDT) From: Ming Huang <ming.huang@linaro.org> To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Thu, 16 Aug 2018 20:12:21 +0800 Message-Id: <20180816121239.44129-19-ming.huang@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180816121239.44129-1-ming.huang@linaro.org> References: <20180816121239.44129-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 18/36] 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 <edk2-devel.lists.01.org> List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>, <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe> List-Archive: <http://lists.01.org/pipermail/edk2-devel/> List-Post: <mailto:edk2-devel@lists.01.org> List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help> List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>, <mailto:edk2-devel-request@lists.01.org?subject=subscribe> Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, guoheyi@huawei.com, shaochangliang <shaochangliang@huawei.com>, huangdaode@hisilicon.com, michael.d.kinney@intel.com, lersek@redhat.com, wanghuiqiang@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" <edk2-devel-bounces@lists.01.org> |
Series |
Upload for D06 platform
|
expand
|
diff --git a/Silicon/Hisilicon/Library/I2CLib/I2CLib.c b/Silicon/Hisilicon/Library/I2CLib/I2CLib.c index ed44ac204f..55c030a3af 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 Count @@ -158,7 +161,11 @@ I2CInit ( I2C_REG_READ (Base + I2C_CON_OFFSET, I2cControlReg.Val32); I2cControlReg.bits.master = 1; - I2cControlReg.bits.Speed = 0x1; + if(SpeedMode == Normal) { + I2cControlReg.bits.Speed = I2C_100KB_SPEED; + } else { + I2cControlReg.bits.Speed = I2C_400KB_SPEED; + } I2cControlReg.bits.restart_en = 1; I2cControlReg.bits.slave_disable = 1; I2C_REG_WRITE (Base + I2C_CON_OFFSET, I2cControlReg.Val32);