[coreboot-gerrit] New patch to review for coreboot: rockchip: gpio: add macro so we can get gpio number
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Wed Jun 8 23:51:48 CEST 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15117
-gerrit
commit dd12588f739a5fa7283c4f250ba18cd6f8d2a5af
Author: Lin Huang <hl at rock-chips.com>
Date: Wed May 18 13:44:52 2016 +0800
rockchip: gpio: add macro so we can get gpio number
sometimes we need gpio number, so add this macro so we
can get the gpio number if we need.
BRANCH=None
BUG=chrome-os-partner:51924
TEST=Build gru
Change-Id: I0c8c6cc0643a66e9ae1f21b02c7364c641b9805d
Signed-off-by: Martin Roth <martinroth at chromium.org>
Original-Commit-Id:
Original-Change-Id: I98e8cf15543179904295a86e9f720c2d7c8b443a
Original-Signed-off-by: Lin Huang <hl at rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/349701
Original-Commit-Ready: Douglas Anderson <dianders at chromium.org>
Original-Tested-by: Douglas Anderson <dianders at chromium.org>
Original-Reviewed-by: Vadim Bendebury <vbendeb at chromium.org>
---
src/soc/rockchip/common/include/soc/gpio.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/soc/rockchip/common/include/soc/gpio.h b/src/soc/rockchip/common/include/soc/gpio.h
index f2e7970..55eb41d 100644
--- a/src/soc/rockchip/common/include/soc/gpio.h
+++ b/src/soc/rockchip/common/include/soc/gpio.h
@@ -19,6 +19,8 @@
#include <types.h>
#define GPIO(p, b, i) ((gpio_t){.port = p, .bank = GPIO_##b, .idx = i})
+#define GET_GPIO_NUM(gpio) (gpio.port * 32 + gpio.bank * 8 + gpio.idx)
+
struct rockchip_gpio_regs {
u32 swporta_dr;
More information about the coreboot-gerrit
mailing list