From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Haojian Zhuang 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: [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: , X-List-Received-Date: Mon, 13 Feb 2017 07:53:11 -0000 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(-) 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; -- 2.7.4