[coreboot-gerrit] Patch set updated for coreboot: rockchip: gpio: add macro so we can get gpio number

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Sun Jun 12 12:16:58 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 eec2bbc5ab1f6f34aa9d0ef669dbc437c4181cff
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