@@ -604,38 +604,6 @@ struct aspeed_pin_desc {
604
604
static const struct aspeed_pin_desc PIN_SYM(pin) = \
605
605
{ #pin, PIN_EXPRS_PTR(pin) }
606
606
607
- /**
608
- * Declare a two-signal pin
609
- *
610
- * @pin: The pin number
611
- * @other: Macro name for "other" functionality (subjected to stringification)
612
- * @high: Macro name for the highest priority signal functions
613
- * @low: Macro name for the low signal functions
614
- *
615
- * For example:
616
- *
617
- * #define A8 56
618
- * SIG_EXPR_DECL(ROMD8, ROM16, SIG_DESC_SET(SCU90, 6));
619
- * SIG_EXPR_DECL(ROMD8, ROM16S, SIG_DESC_SET(HW_STRAP1, 4),
620
- * { HW_STRAP1, GENMASK(1, 0), 0, 0 });
621
- * SIG_EXPR_LIST_DECL(ROMD8, SIG_EXPR_PTR(ROMD8, ROM16),
622
- * SIG_EXPR_PTR(ROMD8, ROM16S));
623
- * SIG_EXPR_LIST_DECL_SINGLE(NCTS6, NCTS6, SIG_DESC_SET(SCU90, 7));
624
- * PIN_DECL_2(A8, GPIOH0, ROMD8, NCTS6);
625
- */
626
- #define PIN_DECL_2 (pin , other , high , low ) \
627
- SIG_EXPR_LIST_DECL_SINGLE(other, other); \
628
- PIN_DECL_(pin, \
629
- SIG_EXPR_LIST_PTR(high), \
630
- SIG_EXPR_LIST_PTR(low), \
631
- SIG_EXPR_LIST_PTR(other))
632
-
633
- #define PIN_GROUP_SYM (func ) pins_ ## func
634
- #define FUNC_GROUP_SYM (func ) groups_ ## func
635
- #define FUNC_GROUP_DECL (func , ...) \
636
- static const int PIN_GROUP_SYM(func)[] = { __VA_ARGS__ }; \
637
- static const char *FUNC_GROUP_SYM(func)[] = { #func }
638
-
639
607
/**
640
608
* Declare a single signal pin
641
609
*
@@ -670,6 +638,46 @@ struct aspeed_pin_desc {
670
638
SIG_EXPR_LIST_DECL_SINGLE(other, other); \
671
639
PIN_DECL_(pin, SIG_EXPR_LIST_PTR(sig), SIG_EXPR_LIST_PTR(other)); \
672
640
FUNC_GROUP_DECL(sig, pin)
641
+ /**
642
+ * Declare a two-signal pin
643
+ *
644
+ * @pin: The pin number
645
+ * @other: Macro name for "other" functionality (subjected to stringification)
646
+ * @high: Macro name for the highest priority signal functions
647
+ * @low: Macro name for the low signal functions
648
+ *
649
+ * For example:
650
+ *
651
+ * #define A8 56
652
+ * SIG_EXPR_DECL(ROMD8, ROM16, SIG_DESC_SET(SCU90, 6));
653
+ * SIG_EXPR_DECL(ROMD8, ROM16S, SIG_DESC_SET(HW_STRAP1, 4),
654
+ * { HW_STRAP1, GENMASK(1, 0), 0, 0 });
655
+ * SIG_EXPR_LIST_DECL(ROMD8, SIG_EXPR_PTR(ROMD8, ROM16),
656
+ * SIG_EXPR_PTR(ROMD8, ROM16S));
657
+ * SIG_EXPR_LIST_DECL_SINGLE(NCTS6, NCTS6, SIG_DESC_SET(SCU90, 7));
658
+ * PIN_DECL_2(A8, GPIOH0, ROMD8, NCTS6);
659
+ */
660
+ #define PIN_DECL_2 (pin , other , high , low ) \
661
+ SIG_EXPR_LIST_DECL_SINGLE(other, other); \
662
+ PIN_DECL_(pin, \
663
+ SIG_EXPR_LIST_PTR(high), \
664
+ SIG_EXPR_LIST_PTR(low), \
665
+ SIG_EXPR_LIST_PTR(other))
666
+
667
+ #define PIN_DECL_3 (pin , other , high , medium , low ) \
668
+ SIG_EXPR_LIST_DECL_SINGLE(other, other); \
669
+ PIN_DECL_(pin, \
670
+ SIG_EXPR_LIST_PTR(high), \
671
+ SIG_EXPR_LIST_PTR(medium), \
672
+ SIG_EXPR_LIST_PTR(low), \
673
+ SIG_EXPR_LIST_PTR(other))
674
+
675
+ #define PIN_GROUP_SYM (func ) pins_ ## func
676
+ #define FUNC_GROUP_SYM (func ) groups_ ## func
677
+ #define FUNC_GROUP_DECL (func , ...) \
678
+ static const int PIN_GROUP_SYM(func)[] = { __VA_ARGS__ }; \
679
+ static const char *FUNC_GROUP_SYM(func)[] = { #func }
680
+
673
681
674
682
#define GPIO_PIN_DECL (pin , gpio ) \
675
683
SIG_EXPR_LIST_DECL_SINGLE(gpio, gpio); \
0 commit comments