diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-06-29 10:39:00 (GMT) |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-07-01 20:44:30 (GMT) |
commit | 64c1cc4cc5f72f480787bf493a5ebb0696d68bc0 (patch) | |
tree | 0b05897e677d5b1d77175a06e7ca6ac414805ed2 /drivers/pinctrl/uniphier/pinctrl-uniphier.h | |
parent | 5e25b9d5d90205ce9531677e362e9dd9359963b3 (diff) | |
download | u-boot-fsl-qoriq-64c1cc4cc5f72f480787bf493a5ebb0696d68bc0.tar.xz |
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.h | 15 |
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 * |