arm: psci: make psci usable on single core socs
[oweals/u-boot.git] / arch / arm / include / asm / arch-fsl-layerscape / fsl_serdes.h
index f71c2c1773603da66181a74f09c1ea3dd8fa0f8b..a8f9a505016da36f9b7ea9f16b9f899c09162a19 100644 (file)
@@ -9,8 +9,12 @@
 
 #include <config.h>
 
-#ifdef CONFIG_LS2080A
+#ifdef CONFIG_ARCH_LS2080A
 enum srds_prtcl {
+       /*
+        * Nobody will check whether the device 'NONE' has been configured,
+        * So use it to indicate if the serdes_prtcl_map has been initialized.
+        */
        NONE = 0,
        PCIE1,
        PCIE2,
@@ -44,10 +48,10 @@ enum srds_prtcl {
        SGMII14,
        SGMII15,
        SGMII16,
-       QSGMII_A, /* A indicates MACs 1-4 */
-       QSGMII_B, /* B indicates MACs 5-8 */
-       QSGMII_C, /* C indicates MACs 9-12 */
-       QSGMII_D, /* D indicates MACs 12-16 */
+       QSGMII_A,
+       QSGMII_B,
+       QSGMII_C,
+       QSGMII_D,
        SERDES_PRCTL_COUNT
 };
 
@@ -55,8 +59,12 @@ enum srds {
        FSL_SRDS_1  = 0,
        FSL_SRDS_2  = 1,
 };
-#elif defined(CONFIG_LS1043A)
+#elif defined(CONFIG_FSL_LSCH2)
 enum srds_prtcl {
+       /*
+        * Nobody will check whether the device 'NONE' has been configured,
+        * So use it to indicate if the serdes_prtcl_map has been initialized.
+        */
        NONE = 0,
        PCIE1,
        PCIE2,
@@ -134,11 +142,13 @@ enum srds_prtcl {
        SGMII_2500_FM2_DTSEC6,
        SGMII_2500_FM2_DTSEC9,
        SGMII_2500_FM2_DTSEC10,
+       TX_CLK,
        SERDES_PRCTL_COUNT
 };
 
 enum srds {
        FSL_SRDS_1  = 0,
+       FSL_SRDS_2  = 1,
 };
 
 #endif
@@ -149,9 +159,17 @@ int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
 enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
 int is_serdes_prtcl_valid(int serdes, u32 prtcl);
 
-#ifdef CONFIG_LS1043A
+#ifdef CONFIG_FSL_LSCH2
 const char *serdes_clock_to_string(u32 clock);
 int get_serdes_protocol(void);
+#ifdef CONFIG_SYS_HAS_SERDES
+/* Get the volt of SVDD in unit mV */
+int get_serdes_volt(void);
+/* Set the volt of SVDD in unit mV */
+int set_serdes_volt(int svdd);
+/* The target volt of SVDD in unit mV */
+int setup_serdes_volt(u32 svdd);
+#endif
 #endif
 
 #endif /* __FSL_SERDES_H__ */