diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-06-29 19:39:00 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-07-02 05:44:30 +0900 |
commit | 64c1cc4cc5f72f480787bf493a5ebb0696d68bc0 (patch) | |
tree | 0b05897e677d5b1d77175a06e7ca6ac414805ed2 /drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | |
parent | 5e25b9d5d90205ce9531677e362e9dd9359963b3 (diff) | |
download | u-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-core.c')
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index 0ad15ab..225a05c 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -14,6 +14,8 @@ #include "pinctrl-uniphier.h" +static const char *uniphier_pinctrl_dummy_name = "_dummy"; + static int uniphier_pinctrl_get_groups_count(struct udevice *dev) { struct uniphier_pinctrl_priv *priv = dev_get_priv(dev); @@ -26,6 +28,9 @@ static const char *uniphier_pinctrl_get_group_name(struct udevice *dev, { struct uniphier_pinctrl_priv *priv = dev_get_priv(dev); + if (!priv->socdata->groups[selector].name) + return uniphier_pinctrl_dummy_name; + return priv->socdata->groups[selector].name; } @@ -41,6 +46,9 @@ static const char *uniphier_pinmux_get_function_name(struct udevice *dev, { struct uniphier_pinctrl_priv *priv = dev_get_priv(dev); + if (!priv->socdata->functions[selector]) + return uniphier_pinctrl_dummy_name; + return priv->socdata->functions[selector]; } |