summaryrefslogtreecommitdiff
path: root/src/soc/rockchip/rk3288
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2014-09-26 17:48:28 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-03-27 08:06:51 +0100
commite35e2e7867607520fa242d4f7d1b0b0e96fa959a (patch)
tree11e221de7415c8f5146335b70a3c221e6526f8e1 /src/soc/rockchip/rk3288
parent5c8b034f21ddc0c8c362814f832be16b752f106a (diff)
downloadcoreboot-e35e2e7867607520fa242d4f7d1b0b0e96fa959a.tar.xz
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 <pgeorgi@chromium.org> Original-Commit-Id: 102a5c0a800f43d688d11d1d7bbc51e360341517 Original-Change-Id: I385ae5182776c8cbb20bbf3c79b986628040f1cf Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/220250 Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/9052 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/rockchip/rk3288')
-rw-r--r--src/soc/rockchip/rk3288/gpio.h2
1 files changed, 2 insertions, 0 deletions
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;