From patchwork Mon Feb 13 07:53:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 93840 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp979555qgi; Sun, 12 Feb 2017 23:53:13 -0800 (PST) X-Received: by 10.84.140.133 with SMTP id 5mr28461907plt.178.1486972393803; Sun, 12 Feb 2017 23:53:13 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id p8si9354638pgc.148.2017.02.12.23.53.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Feb 2017 23:53:13 -0800 (PST) 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; 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 6536582116; Sun, 12 Feb 2017 23:53:13 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (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 C999E82116 for ; Sun, 12 Feb 2017 23:53:11 -0800 (PST) Received: by mail-pf0-x229.google.com with SMTP id e4so25669296pfg.1 for ; Sun, 12 Feb 2017 23:53:11 -0800 (PST) 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=xmuRKDrVr8Z5Z/d0PXfBVDpZYD+mzhMgItNfrwGJXH0=; b=EROnr7ynEO4RF1YeFXYyz61KstGBxEV4jLV4UIjJg2cqOTjPMvSV978cUmZ/x449UF OUXKeRxi5FiZmA8MZtpMrUt0lo0h3hxsLdA+LKM4Ory3EMnFcf9dkvSUbxlEW3hFqCEg AmwQXAkUrVwY6RzkbbHTtRo+t5YzVRlXA0D84= 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=xmuRKDrVr8Z5Z/d0PXfBVDpZYD+mzhMgItNfrwGJXH0=; b=tvQI7gd8tm/zZiLxQKcvGVPUQf3DjflRD89yfMdPXfUXzjDMNKuUatc1nwn4ZyCq1l rA9vTXliIGQeG38TP2Gdy86mRybexd1H1A4elg8CnTVw4eotGj7TAg34IincMt4EqB77 FJ5AxfXKslFcWWNXfGB7YCJuvQeYGJn4mfX1LwxYamF1naP8hmaxc58LGSKQwZR7jPIr FoRGKbHODZ4oDJ5oyXDkpreYpVrW7NTMoiAPnIeqqqUcZrE0wp7dzT49FlL+cVCzE9EK j/UWfAHv7HCJgcIl6k0yURwOatIufjZX5aMttO2jEdhP7FuMqLInEHKU1X67PcWP9Vr+ 3lAA== X-Gm-Message-State: AMke39m8IGuTWWSzdnJM2uAqBSLrw7hzKoc4cBj4suDZSohfQmI2s1YmGxhyYMpK3nfBRxMf X-Received: by 10.84.133.69 with SMTP id 63mr28008090plf.97.1486972391476; Sun, 12 Feb 2017 23:53:11 -0800 (PST) Received: from localhost.localdomain ([45.56.159.191]) by smtp.gmail.com with ESMTPSA id m29sm18896624pfi.54.2017.02.12.23.53.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Feb 2017 23:53:10 -0800 (PST) From: Haojian Zhuang To: leif.lindholm@linaro.org, ard.biesheuvel@linaro.o, edk2-devel@lists.01.org Date: Mon, 13 Feb 2017 15:53:00 +0800 Message-Id: <1486972380-24255-2-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486972380-24255-1-git-send-email-haojian.zhuang@linaro.org> References: <1486972380-24255-1-git-send-email-haojian.zhuang@linaro.org> Subject: [edk2] [PATCH 2/2] ArmPlatformPkg/PL061Gpio: fix the offset value in Get function X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haojian Zhuang MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" When call PL061GetPins() or PL061SetPins(), should use GPIO_PIN_MASK(offset) as parameter, not offset. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang --- ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Ard Biesheuvel diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c index ff8bb3b..81b9f6d 100644 --- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c +++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c @@ -186,7 +186,7 @@ Get ( return EFI_INVALID_PARAMETER; } - if (PL061GetPins (RegisterBase, Offset)) { + if (PL061GetPins (RegisterBase, GPIO_PIN_MASK(Offset))) { *Value = 1; } else { *Value = 0;