summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/uniphier/pinctrl-uniphier.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-29 19:39:00 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-07-02 05:44:30 +0900
commit64c1cc4cc5f72f480787bf493a5ebb0696d68bc0 (patch)
tree0b05897e677d5b1d77175a06e7ca6ac414805ed2 /drivers/pinctrl/uniphier/pinctrl-uniphier.h
parent5e25b9d5d90205ce9531677e362e9dd9359963b3 (diff)
downloadu-boot-imx-64c1cc4cc5f72f480787bf493a5ebb0696d68bc0.zip
u-boot-imx-64c1cc4cc5f72f480787bf493a5ebb0696d68bc0.tar.gz
u-boot-imx-64c1cc4cc5f72f480787bf493a5ebb0696d68bc0.tar.bz2
pinctrl: uniphier: avoid building unneeded pin-mux tables for SPL
SPL does not use all of the devices, so we can save some memory footprint. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/pinctrl/uniphier/pinctrl-uniphier.h')
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index ff0a368..4bb8932 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -80,7 +80,7 @@ struct uniphier_pinctrl_socdata {
.data = UNIPHIER_PIN_ATTR_PACKED(b), \
}
-#define UNIPHIER_PINCTRL_GROUP(grp) \
+#define __UNIPHIER_PINCTRL_GROUP(grp) \
{ \
.name = #grp, \
.pins = grp##_pins, \
@@ -90,6 +90,19 @@ struct uniphier_pinctrl_socdata {
ARRAY_SIZE(grp##_muxvals)), \
}
+#define __UNIPHIER_PINMUX_FUNCTION(func) #func
+
+#ifdef CONFIG_SPL_BUILD
+#define UNIPHIER_PINCTRL_GROUP(grp) { .name = NULL }
+#define UNIPHIER_PINMUX_FUNCTION(func) NULL
+#else
+#define UNIPHIER_PINCTRL_GROUP(grp) __UNIPHIER_PINCTRL_GROUP(grp)
+#define UNIPHIER_PINMUX_FUNCTION(func) __UNIPHIER_PINMUX_FUNCTION(func)
+#endif
+
+#define UNIPHIER_PINCTRL_GROUP_SPL(grp) __UNIPHIER_PINCTRL_GROUP(grp)
+#define UNIPHIER_PINMUX_FUNCTION_SPL(func) __UNIPHIER_PINMUX_FUNCTION(func)
+
/**
* struct uniphier_pinctrl_priv - private data for UniPhier pinctrl driver
*