From e35e2e7867607520fa242d4f7d1b0b0e96fa959a Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 26 Sep 2014 17:48:28 -0700 Subject: rk3288: Add GPIO() macro The static gpio_t initializers are stylish, but they are still a little too annoying to write and read in day-to-day use. Let's wrap that in a macro to make it a little easier to handle. BUG=None TEST=None Change-Id: If41b2b3fd3c3f94797d314ba5f3ffcb2a250a005 Signed-off-by: Patrick Georgi Original-Commit-Id: 102a5c0a800f43d688d11d1d7bbc51e360341517 Original-Change-Id: I385ae5182776c8cbb20bbf3c79b986628040f1cf Original-Signed-off-by: Julius Werner Original-Reviewed-on: https://chromium-review.googlesource.com/220250 Original-Reviewed-by: David Hendricks Reviewed-on: http://review.coreboot.org/9052 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Stefan Reinauer --- src/soc/rockchip/rk3288/gpio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/soc/rockchip') diff --git a/src/soc/rockchip/rk3288/gpio.h b/src/soc/rockchip/rk3288/gpio.h index 6cac6cbdec..7049ddffe2 100644 --- a/src/soc/rockchip/rk3288/gpio.h +++ b/src/soc/rockchip/rk3288/gpio.h @@ -23,6 +23,8 @@ #include "addressmap.h" #include "grf.h" +#define GPIO(p, b, i) ((gpio_t){.port = p, .bank = GPIO_##b, .idx = i}) + struct rk3288_gpio_regs { u32 swporta_dr; u32 swporta_ddr; -- cgit v1.2.3