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>
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 @@
 	.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 @@
 					  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
  *